- Joined
- Jun 24, 2013
- Messages
- 140
- Reaction score
- 10
- First Language
- English
- Primarily Uses
- RMVXA
Hi all. I need to find a way to turn on a switch for 150 steps, when an item is used, then turn it off again.
The reason for this is because, in my game, the enemies are events that wander around the map (rather than random encounters). For most enemies, if their level is lower than the player's, they wander randomly. If it is higher, they approach the player. On event touch, battle starts.
The item I am trying to make is a repellent that the player can use to stop higher-level enemies attacking them for 150 steps.
The problem is that for each emeny event, I have an event page for when the player's level is lower than the enemy's (enemy approaches), and another for when it is higher (enemy moves randomly). I need a third page where when the 'repellent' switch is on, the event moves randomly.
I tried a conditional branch on the approach page so that if the repellent state is on then it skips the battle (Jump to label: end), but that doesn't stop higher-level enemies approaching (and the player ends up surrounded and unable to move).
Because you cannot turn on a switch in the 'Effects' part of an item, instead I triggered a common event where the switch is turned on. This works, but I need the switch to turn off again once the effect wears off. I tried a loop, but it freezes the player movement once the item is used.
Any ideas?
I've attached a screenshot of my pathetic attempt at a common event with the loop that doesn't work, the item page and the state page.
Thanks in advance.
The reason for this is because, in my game, the enemies are events that wander around the map (rather than random encounters). For most enemies, if their level is lower than the player's, they wander randomly. If it is higher, they approach the player. On event touch, battle starts.
The item I am trying to make is a repellent that the player can use to stop higher-level enemies attacking them for 150 steps.
The problem is that for each emeny event, I have an event page for when the player's level is lower than the enemy's (enemy approaches), and another for when it is higher (enemy moves randomly). I need a third page where when the 'repellent' switch is on, the event moves randomly.
I tried a conditional branch on the approach page so that if the repellent state is on then it skips the battle (Jump to label: end), but that doesn't stop higher-level enemies approaching (and the player ends up surrounded and unable to move).
Because you cannot turn on a switch in the 'Effects' part of an item, instead I triggered a common event where the switch is turned on. This works, but I need the switch to turn off again once the effect wears off. I tried a loop, but it freezes the player movement once the item is used.
Any ideas?
I've attached a screenshot of my pathetic attempt at a common event with the loop that doesn't work, the item page and the state page.
Thanks in advance.
Attachments
-
13.3 KB Views: 3
-
18.6 KB Views: 3
-
10.8 KB Views: 3

