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.

Respawn timer for town income, help?

Ok in my game I have it where you own a town and i cant get it so that every 15min when you check your town income book you get a message saying something like 'todays town income is 1000gold' then you get 1000gold but if the time has still not run out it says 'the gold has not been collected yet.

I need it on a loop for every 15min of the game played. please help i cant seem to do it =[
 

Nachos

Sponsor

The best way would be to set a timer.. but it will appear on your screen, If you don't mind..

Like:
Code:
  @Conditional Branch= Timer = 0:00
   @Text: The gold has been collected!
    @Change gold + 1000
     @Set Timer: 15min
   Else
@Text: The gold hasn't been collected yet.

Or something like that.. If you can't still do it, I'll make a demo.
 
Yeah i need it so the timer doesn’t appear on the screen thanks for your help I’d really appreciate it if you could solve this one for me 
nahchito":305ozgi6 said:
The best way would be to set a timer.. but it will appear on your screen, If you don't mind..

Like:
Code:
  @Conditional Branch= Timer = 0:00
   @Text: The gold has been collected!
    @Change gold + 1000
     @Set Timer: 15min
   Else
@Text: The gold hasn't been collected yet.

Or something like that.. If you can't still do it, I'll make a demo.
 
Make a common event, parallel process, with a switch like "town owned" = ON, or something around those lines, as a condition. Inside, put a bunch of wait commands (being that RMXP runs at 20 frames per second and VX at 60 frames per second, I'll let you do the maths) and turn another switch on (you could name it "Can collect income").

For your income book, make a conditional branch that checks whether "Can collect income" is on or not, and after you collect it, turn that same switch off.
 
Thank you!!! =] it was really starting to annoy me trying to figure it out, thanks again
Hevendor":e4ez3c4o said:
Make a common event, parallel process, with a switch like "town owned" = ON, or something around those lines, as a condition. Inside, put a bunch of wait commands (being that RMXP runs at 20 frames per second and VX at 60 frames per second, I'll let you do the maths) and turn another switch on (you could name it "Can collect income").

For your income book, make a conditional branch that checks whether "Can collect income" is on or not, and after you collect it, turn that same switch off.
 

Nachos

Sponsor

I figured it out.


Make a common event parallel on turn it [ON], then put this in it.

Code:
 @Wait: 18000 frames  *
   @Text: The gold has been collected!
    @Change gold + 1000
     @Set Timer: 15min
  @Loop Above.

* 60 x 15 x 20 frames = X seconds in 15 minutes


Remember to make it Parallel, not autorun, otherwise It won't let you move or call the menu.
 

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