Using scripts I made added an "elevator" to the map that gives the player the illusion of going down to a floor that runs below the map. I'm including the script below but I believe the problem is less with the script and more with player behavior.
The whole room starts going down. Unseen by the player, the switch moves a different room, B, up.
1 second later, Room B starts moving down.
When Room A gets halfway down player is teleported to Room B which is also going down
Room B and Room A both stop with the player in room B.
Room A is set back to the starting position.
This same effect happens in reverse when player goes to Room A from Room B. When Room B with the player in it has stopped, if the player waits a second or two and presses the switch in Room B, the following happens:
The whole room B starts going up. Unseen by the Player, Room A moves down quickly.
1 Second later, Room A starts going up.
When Room B is halfway up, player is teleported to Room A which is also going up.
Room B and Room A both stop with the player in Room A
Room B goes back to starting position
This works well. However, if the player spams use on the wall where Room B 's switch would appear as soon as they teleport into Room B, Script 5 executes before Script 4 can begin. Thus this conflicts with the motion of Room A and breaks the map. How to I prevent Script 5 from executing while Script 4 is running or vice-versa?
Question
Zulk RS
Using scripts I made added an "elevator" to the map that gives the player the illusion of going down to a floor that runs below the map. I'm including the script below but I believe the problem is less with the script and more with player behavior.
SCRIPT 4 (void) { If(GameType() == GAME_SINGLE_PLAYER) { Floor_LowerByValueTimes8(11,16,32); Ceiling_LowerByValueTimes8(11,16,32); Floor_RaiseByValueTimes8(12,64,32); Ceiling_RaiseByValueTimes8(12,64,32); Delay(35*1); Floor_LowerByValueTimes8(12,16,32); Ceiling_LowerByValueTimes8(12,16,32); Delay(35*1); Teleport_NoFog(0,0,12,1); Delay(35*2); Floor_RaiseByValueTimes8(11,64,32); Ceiling_RaiseByValueTimes8(11,64,32); } else { Teleport_NoFog(0,0,12,1); } } SCRIPT 5 (void) { If(GameType() == GAME_SINGLE_PLAYER) { Floor_RaiseByValueTimes8(12,16,32); Ceiling_RaiseByValueTimes8(12,16,32); Floor_LowerByValueTimes8(11,64,32); Ceiling_LowerByValueTimes8(11,64,32); Delay(35*1); Floor_RaiseByValueTimes8(11,16,32); Ceiling_RaiseByValueTimes8(11,16,32); Delay(35*1); Teleport_NoFog(0,0,11,1); Delay(35*2); Floor_LowerByValueTimes8(12,64,32); Ceiling_RaiseByValueTimes8(12,64,32); } else { Teleport_NoFog(0,0,11,1); } }
What the script is supposed to do is:
This same effect happens in reverse when player goes to Room A from Room B. When Room B with the player in it has stopped, if the player waits a second or two and presses the switch in Room B, the following happens:
This works well. However, if the player spams use on the wall where Room B 's switch would appear as soon as they teleport into Room B, Script 5 executes before Script 4 can begin. Thus this conflicts with the motion of Room A and breaks the map. How to I prevent Script 5 from executing while Script 4 is running or vice-versa?
Share this post
Link to post
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.