Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

When the timer runs out I can't engage in battle

I have a spell set up to call a common event. The idea is that the priest casts a spell called divine strength, and all my chars get a strength buff for five minutes. At the end, the buff goes away. Here's how I have the event set up.

Common Event
Name Divine Strength
Trigger None

@>Control Timer: Startup (5 min. 0 sec.)
@>Conditional Branch: Timer 0 min 0 sec or less
  @>Change State: Entire Party, -[Divine Strength]
  @>Exit Event Processing

This works out great, until the timer runs out. Then I have a timer in the upper right hand corner reading 0:00 that won't go away, and every time I enter battle, I immediately exit battle without engaging and without recieving any experience items or gold. If I cast the spell again, then everything is normal, but as soon as the timer runs down to zeros, the problem is back again. I've tried playing with erase event and break loop, but so far I can't find a solution. I'm pretty new at all this, but any help would be appreciated. Thanks alot.


-Rob
 
Ok, I tried inserting stop timer in the conditional branch, and that still won't work. I tried inserting it after the conditional branch, and it just ended the event immediately. I changed the conditional branch time from 0:00 to 0:01 and that didn't work. I changed it to more than instead of less than, and that worked, but it went off instantly and ended the event. So does the less than just not work? Or do I need to set it higher? Any more ideas? Thanks for the help.


-Rob
 
Ok, I've tried a bunch of different things and so far nothing seems to work. It works fine if it's set at more than on the conditional branch, but then it activates instantly, so as close as I can tell, less than doesn't seem to work. Maybe I'm just an idiot. Has anyone else gotten this to work or is it just me? Thanks.


-Rob
 
You need to set the trigger to Parallel Processing, not None. None just runs through the commands once, and then stops, so it sets the timer instantaneously, checks for the timer being 0, which it obviously isn't, then disappears. What you want is make a switch, and set that to be the condition. Then turn the switch on rather than calling the common event, and you're done.
 
Ok, I took your advice and created two seperate common events. The first one activates the switch and calls the second one. The second one runs parallel, then stops the timer, removes the state, and turns off the first switch. It runs fine now. Thanks alot!


-Rob
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top