zimberzimber wrote:
Can you please explain what exactly are you trying to achieve?
EDIT: This works just fine for me. If just nothing happens for you, then you either messed up the connectors, or not in the area you specified for this to happen. (Check elevation)
If it crashes, do send a report. (although I see no reason for this to crash)
(Though I still don't really understand why you complicated spawning a bunch of blasts in an area so much)
The script is actually part of several things I'm doing and this is also based off a script I'm already using in the dungeon. My electrocution chamber, for which I'll post the script below. This is also the reason I'm asking for help. I created a test dungeon; tossed my script in it along with a timer and floor trigger. Then loaded it up to see if it worked, and it did. Plus I have a similar script that works in the dungeon floor. Yes, I checked the height and XY coordinates a dozen times and they're fine identical even to the test dungeon I created. I've disconnected and reconnected the connectors and they work as well. I've completely destroyed the script and rewritten it by hand, and double checked it. The simple fact is, when I activate the pressure plate in this dungeon; door closes and then nothing. Not even an error message saying 'it's not working'.
Here's what I'm going for:
1. Basically the boss will trigger this then 'teleport' himself to a safe spot to avoid the damage. The of course object is for the party to reach the safe spot when it's available and stop the boss from teleporting to it so the boss takes the damage from the spell and not the party. I need this part to work first so I can test timing for the party to reach the safe zone from any part of the room and the timing before the boss reaches the safe spot as well. So it's more than possible for the party to completely avoid the damage.
2. I have a floor poison gas cloud trap where the party has to trigger floor tiles in a certain order in order to open secret doors that hold items that then are used to deactivate 'the flow of gas' to the room via a lock. Stepping on the wrong tiles activates additional poison clouds in the room temporarily before clearing, resetting the system, and allowing the player to try again. Object is to get the hidden secret items to deactivate the trap to allow access to a special item the party needs later.
Edit: Here's the working script.
Code: Select all
function zappulsechamberpuzzle()
local max = 0
if Electricution_lever_1.lever:isDeactivated() and
Electricution_lever_2.lever:isDeactivated() then
max = 2
elseif Electricution_lever_1.lever:isActivated() and
Electricution_lever_2.lever:isDeactivated() then
max = 1
elseif Electricution_lever_2.lever:isActivated() and
Electricution_lever_1.lever:isDeactivated() then
max = 0
elseif Electricution_lever_1.lever:isActivated() and
Electricution_lever_2.lever:isActivated() then
max = 0
end
for x = -max,max do
for y = -max,max do
if ( (x ~= 0) or (y ~= 0) ) then
spawn("lightning_bolt_blast", 1, 19 + x, 15 + y, 0)
spawn("lightning_bolt_blast", 1, 19, 15, 0)
else if ( (x == 0) or (y == 0) ) then
spawn("lightning_bolt_blast", 1, 19, 15, 0)
end
end
end
end
end