"Triger once while true" and Layout travels.

For questions about using Classic.

Post » Tue Nov 23, 2010 8:45 pm

Basicly if an event with condition addon "triger once while true" is being run - its being run once. but what if player changes layouts ? does it run again on the other layout or travel unchanged?

EDIT: to not make another thread and beef my "i_dont_care" post count ill add this question:

IS it possible to change Layouts from OTHER Layouts? think: i am on level 1 with a switch and there is level 2 with a doors, if i pull the switch on level 1 - will the doors on layout 2 open?
ImageImageImageImage
B
26
S
7
G
7
Posts: 572
Reputation: 6,097

Post » Tue Nov 23, 2010 9:44 pm

What trigger once does is it runs the code the one tick where the condition became true and will only run again if the condition becomes false then true again. Without it the code would run every tick while the condition is true. It does not simply run once period.

What you want to do for your second question is use global variables. When you change a global variable it'll be changed for the entire program. So for your example have a variable for you door and have it 0 when the door is closed and 1 when it has been opened and it'll stay opened/closed if you change layouts.
B
73
S
20
G
10
Posts: 524
Reputation: 9,896

Post » Wed Nov 24, 2010 9:45 am

[quote="inkBot":2s5pp8yu]What trigger once does is it runs the code the one tick where the condition became true and will only run again if the condition becomes false then true again. Without it the code would run every tick while the condition is true. It does not simply run once period.

What you want to do for your second question is use global variables. When you change a global variable it'll be changed for the entire program. So for your example have a variable for you door and have it 0 when the door is closed and 1 when it has been opened and it'll stay opened/closed if you change layouts.[/quote:2s5pp8yu]

Thank you kindly. :)
ImageImageImageImage
B
26
S
7
G
7
Posts: 572
Reputation: 6,097


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests