How do I add an action to always take place after an event?

Get help using Construct 2

Post » Thu Jun 30, 2016 7:24 am

I want to add a couple of actions to take place after all the sub-events of an event are finished. Do I have to copy paste the actions at the end of every sub-event if they're in a if-else-if-else block? Is there any way to just put it once and it takes place no matter which sub-event took place?

Suppose I have this:

Code: Select all
when this happens:
    if(something):
          do 1
    else if(someotherthing):
          do 2
    else:
          do 3


Now I want to add an action to take place in the end. So I put an action in the end.

Code: Select all
when this happens:
    if(something):
          do 1
    else if(someotherthing):
          do 2
    else:
          do 3
    do 4


But what I've noticed till now in Construct 2 is I have to do this :-

Code: Select all
when this happens:
    if(something):
          do 1
          do 4
    else if(someotherthing):
          do 2
          do 4
    else:
          do 3
          do 4


How do I just put an action in the end using Construct 2? I tried using a blank sub-event but that made the code act weirdly.
B
4
Posts: 10
Reputation: 222

Post » Thu Jun 30, 2016 7:27 am

Have "do 4" in a blank sub event.
The action will always be executed no matter what after the testing/execution of all previous sub-events.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
296
S
119
G
96
Posts: 7,328
Reputation: 71,298

Post » Thu Jun 30, 2016 7:30 am

Thanks! I did try that but it gave out some weird results. I'll try it again.
B
4
Posts: 10
Reputation: 222


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 6 guests