TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
Do every (Number attribute) seconde . who change during the game Hellp pleaze
Pages:
1
Do every (Number attribute) seconde . who change during the game Hellp pleaze
YobKgames
Posts: 63
July 13, 2017, 10:21:45 pm
i wanna use the loop do every ...seconde with an number attribute
but the the loop apply only the initial value of number attribute after a few time I say that the number attribute change it change but the changing does not apply to the loop ..... Any solution helppp pleaaaaze
the idea its to do think everey 1 seconde and after a few time do it every 2 seconde and after time do it everey 3 seconde ...ect the value of the loop channge
designpeg
Posts: 731
July 14, 2017, 01:56:09 am
I'd use an event block, then let that event trigger itself after the period you want with a do after [period value] seconds block. The period value could be set via a game attribute.
You could also include a boolean so that you could stop it triggering when you want
YobKgames
Posts: 63
July 14, 2017, 06:04:34 am
can you give me an examplee pleaaaaaaze
designpeg
Posts: 731
July 14, 2017, 06:24:50 am
Hi, I've attached a screen shot, hopefully, it's clear enough.
If you need to stop the timer put the trigger event block within the do after inside an if block, and creat an attribute called timer running or something, of maybe if doEvery > 0, then you could set the interval to zero to stop it.
Once stopped, you need to call it with a trigger event to start it looping again
YobKgames
Posts: 63
July 14, 2017, 10:23:06 am
okey i never used before this technic so can you explain to me the operation of the bloc trigger
in the trigger bloc . event present what ? and in behaviour present what ? help me pleaze and in your screen shot in behaiviour you put repeat every ? this present what ?
excuse me for my bad english and thnks for your help
LIBERADO
Posts: 2720
July 14, 2017, 10:25:50 am
Quote from: YobKgames on July 14, 2017, 10:23:06 am
okey i never used before this technic so can you explain to me the operation of the bloc trigger
More info:
http://www.stencyl.com/help/view/custom-events/
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.
YobKgames
Posts: 63
July 14, 2017, 10:34:30 am
in beahaiviour what does it mean i dont understand ? it present what ? im suppose to write what in it ?
LIBERADO
Posts: 2720
July 14, 2017, 10:49:35 am
You can replace that block with this one:
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.
YobKgames
Posts: 63
July 14, 2017, 11:13:01 am
aahh it"s more cleaar thankss for your help
Pages:
1