RPG Maker Forums

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. :D

Latest Threads

Latest Posts

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,047
Messages
1,018,540
Members
137,834
Latest member
EverNoir
Top