Oye again, just another quick problem I am having a hard time resolving:

I need to have the controls set up so when you press '1' it disables 'Ghostcrown' and sets everything it disabled back to enabled as well as enabling 'Ghostcrown' at the end so you can repeat. The problem I come to is that when '1' is pressed, it both activates and de-activates everything at once.

[quote:1eigazkr]The problem I come to is that when '1' is pressed, it both activates and de-activates everything at once.[/quote:1eigazkr]

Both of your "On key 1 pressed" triggers are triggering in the same tick.

Example:

[code:1eigazkr]+ On key X pressed+ "Foo" is equal to 1 -> Set "Foo" to 2

+ On key X pressed+ "Foo" is equal to 2 -> Set "Foo" to 1[/code:1eigazkr]

You might think this would toggle the value back and forth between 1 and 2 with each keypress. But no. Practically speaking, Foo will never equal 2. If you press X then both of the "X pressed" triggers will run. In the first, you set Foo to 2. Since it's 2 now, then when you reach the second trigger Construct says "Oh, the X key has been pressed... and Foo is equal to 2 so let's run the event. And it sets it right back to 1.

Looking at the post before that one it appears that you have just made a simple logic error and if you look at it again I'm sure you'll see it pretty easily

[code:23wuk6gp]+ On key X pressed++ "Foo" is equal to 1 -> Set "Foo" to 2

++Else -> Set "Foo" to 1[/code:23wuk6gp](++ means subevent.)Here's how it works: When X is pressed, it checks the first subevent. If the first subevet it true, it will trigger the actions in the subevent. It will see the "Else" in the next event and will not even do anything else with that subevent. If the first subevent is NOT true, it will see the "Else" and will check if the second subevent is true. The second subevent needs no other conditions because it has two IMPLIED conditions: "On X key is pressed" and "'Foo' is NOT 1" ("Foo" can only equal 1 or 2 so this is the same as "'Foo' is 2"). This will work together as a toggle between the two values of "Foo" when X is pressed.

[quote="Mr Wolf":14j1r9b7]I had something like that happen before. I'd use:

[code:14j1r9b7]+ On key X pressed++ "Foo" is equal to 1 -> Set "Foo" to 2

++Else -> Set "Foo" to 1[/code:14j1r9b7](++ means subevent.)Here's how it works: When X is pressed, it checks the first subevent. If the first subevet it true, it will trigger the actions in the subevent. It will see the "Else" in the next event and will not even do anything else with that subevent. If the first subevent is NOT true, it will see the "Else" and will check if the second subevent is true. The second subevent needs no other conditions because it has two IMPLIED conditions: "On X key is pressed" and "'Foo' is NOT 1" ("Foo" can only equal 1 or 2 so this is the same as "'Foo' is 2"). This will work together as a toggle between the two values of "Foo" when X is pressed.[/quote:14j1r9b7]