Start "Every X Seconds" on event?

Get help using Construct 2

Post » Fri Feb 22, 2013 2:43 pm

Have a look at

mana timer test

going to play with the wait command as this might work (never tried it yet...)RamPackWobble2013-02-22 14:44:11
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
59
S
30
G
34
Posts: 1,194
Reputation: 23,767

Post » Fri Feb 22, 2013 3:09 pm

OK Wait works also so maybe a better choice ?

mana test using wait

edit

this sets the 4 second timer the first time you use mana and it keeps increasing your mana every 4 seconds but it does not restart the 4 seconds every time you use mana if below 100%RamPackWobble2013-02-22 15:18:24
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
59
S
30
G
34
Posts: 1,194
Reputation: 23,767

Post » Fri Feb 22, 2013 7:41 pm

Hey RamBam,

Thanks a lot for looking into this. I don't use the beta version of construct, so I can't open your file. If you wouldn't mind, could you post an image of the code?

Thanks!
Steve
B
22
S
3
Posts: 451
Reputation: 2,135

Post » Fri Feb 22, 2013 8:53 pm

While grabbing the value of the timer and checking it to see if 4 seconds have gone by sounds good, I would probably have used WAIT myself.

Here is the screenshot of RamPackWobble's code:

B
200
S
51
G
30
Posts: 896
Reputation: 36,494

Post » Fri Feb 22, 2013 10:37 pm

My solutions

Embed the "every X seconds" into a group.
Enable when cast spell
Disable when mana is 100%
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Fri Feb 22, 2013 11:29 pm

Here is a copy of the first version code



I like the idea of using a group turned on or off...
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
59
S
30
G
34
Posts: 1,194
Reputation: 23,767

Post » Sat Feb 23, 2013 7:07 am

Perfect - thanks for all the responses. I ended up using RamPack's. I tried disabling the group, but for some reason it still didn't seem to work.

B
22
S
3
Posts: 451
Reputation: 2,135

Previous

Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], mercuryus and 19 guests