How do I stop repeating actions of global value?

Get help using Construct 2

Post » Thu Apr 23, 2015 12:19 pm

Because global values, this actions are repeting every tick. How i solve this and made this repeat only once?
Image
This is the print that shows the events. How do i do? Thanks for helps :D
Liked something I say?
Tip. My Bitcoin address: 1PLaeKmXQ8vEdGGJqXMq3KyB8hxeddxeSv
B
28
S
9
G
4
Posts: 359
Reputation: 4,246

Post » Thu Apr 23, 2015 12:24 pm

You could add a system trigger once condition or any other condition that is only true for that one tick..

Adding an action to set the global variable to some other value will work too..
The best place to do that would in this case probably be at the end of the function-actions..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Apr 23, 2015 12:35 pm

Which action i can use at end of this actions?
Liked something I say?
Tip. My Bitcoin address: 1PLaeKmXQ8vEdGGJqXMq3KyB8hxeddxeSv
B
28
S
9
G
4
Posts: 359
Reputation: 4,246

Post » Thu Apr 23, 2015 12:47 pm

LittleStain wrote:Adding an action to set the global variable to some other value...


so:

system set global variable to (any number that doesn't have an event attached)

You probably have an event that sets the global variable to trigger this event,
so after the event has triggered, you only have to set it back to the previous value..

Without looking at your capx or all of your events concerning these actions it's hard to make any further recommendations.
The way I usually handle these conditions, it wouldn't be necessary to check for them every tick, because at some point the change of the global variable is triggered and these conditions can be put as a subevent of that triggered event..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Apr 23, 2015 3:15 pm

Whats your email for i send my capx? This event occurs in Event sheet 1.
Liked something I say?
Tip. My Bitcoin address: 1PLaeKmXQ8vEdGGJqXMq3KyB8hxeddxeSv
B
28
S
9
G
4
Posts: 359
Reputation: 4,246

Post » Mon Jun 08, 2015 11:05 am

It's quite simple, adding the condition "Trigger once" at end of event!
Liked something I say?
Tip. My Bitcoin address: 1PLaeKmXQ8vEdGGJqXMq3KyB8hxeddxeSv
B
28
S
9
G
4
Posts: 359
Reputation: 4,246


Return to How do I....?

Who is online

Users browsing this forum: DarthPapalo666, Elliott and 32 guests