Hi! I'm very new to rpg maker.
Essentially I want to work it so that the character loses HP when traveling over a certain area, like a hot desert. I know you can set regions but it looks like you can only utilize the regions when setting an enemy encounter. When I click Change HP under 'Actor' I don't see a way to set it to a region. Would I have to copy this event to every single tile in the area?
Thank you in advance!
It's because you've put a colon after if. That isn't a thing in Ruby syntax, so it's telling you it didn't expect to find it. (ignore the $ on end, that's a kind of internal thing that you'll never actually have in your actual code).
The only reason I didn't include the answer in my edit was that I was doing it on my phone on my way to help my wife clean the games room so I was coming back to it in a bit but you responded before I could. 😛
Yeah, you can leave the else blank. It's only needed if you need another set of things to happen if the condition is false.
The wait is separate from the conditional, but if you take it out the player will lose HP every frame rather than every second.
I see you have worked it out now. Yes, there was only one line that contained a script. I couldn't remember if it showed If or Conditional Branch - I know at some point it changed from one to the other.
If you don't like the empty Else being there (I personally don't so I remove them), just edit the Conditional Branch and uncheck the Else box.
The wait is there as a parallel process will execute on every frame. Using parallel processes that don't disable themselves and don't have a wait is something that can cause your game to lag, which is why you've read elsewhere to try avoiding them unless you need them. In this case, a parallel process is the best non-script way to do what you want - a heap of events on the map are definitely not the way - but having that wait means it's taking a break and letting other things have a go at the processor, so no lag. Plus removing HP at set intervals. You can change the number of frames, the region id, and the amount of HP that's removed each time.