Stopping the queue of actions in a condition

Get help using Construct 2

Post » Thu May 09, 2013 7:49 am

Hello!

I just started using C2 today, and I'm loving it so far. I seem to be stuck on one thing, though. I'm currently working the the 1st level of a mostly text RPG. The first level is also a short tutorial. At the moment if the player completes the level before the explanation is finished, the buttons will still pop up. I was wondering if I could stop the actions (MachineTalk1 text sets and System object creations) in progress if a condition is met (Level1 health <= 0).



My apologies if something similar has already been posted. I couldn't find anything in the FAQ thread.

Edit: I suppose I could have the buttons created BEFORE the user 'destroys' them, but I thought I'd try and figure this out, as it may have a use further down the road.Electronaut2013-05-09 19:49:45
B
3
Posts: 3
Reputation: 181

Post » Thu May 09, 2013 8:13 am

I have found a temporary solution:

Create all the buttons beforehand and keep them invisible. Instead of creating them, they will become visible. That way if they're destroyed they won't show up. The MachineTalk1 text object is also destroyed when health <=0.

I'm still curious if there's a method mentioned in my original post, however, if anyone is having a similar problem, perhaps this is a solution for them.
B
3
Posts: 3
Reputation: 181

Post » Thu May 09, 2013 1:45 pm

You should do a search for Timers. That is a better mechanism for performing long sequences than Wait. You can't cancel a Wait once you've set it up.
ImageImage
B
66
S
19
G
121
Posts: 3,195
Reputation: 72,852

Post » Thu May 09, 2013 7:48 pm

That should work. Thanks, hornet.
B
3
Posts: 3
Reputation: 181


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, anty21ro, DamonZero, Radulepy, Yahoo [Bot] and 0 guests