Or Operator

Get help using Construct 2

Post » Sat Jul 27, 2013 4:02 am

Please see the attached:



As you can see, I have a check here to see if there is a value in webstorage for the high score. Of course, I want this to occur when the program first runs. I want to say if it does not have a value in web storage, to set the text in the text field to "". I can't seem to get it to add the OR in the right place. The only location I can seem to get to show the option for me to add OR is here:



I know I am not understanding something simple, but I am having trouble figuring how how to look this up. Can someone clue me in on what I need to do? Thank you. I am new to Construct. Please be kind. :)
B
4
Posts: 14
Reputation: 228

Post » Sat Jul 27, 2013 4:49 am

If you right click the webstorage condition itself only, you can "Invert" it.

Also, you probably could make this condition as a sub-event of the top level "On start of layout".

Have a look at this tutorial, if I remember correctly I have some implementation of something you're looking for in it.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
284
S
109
G
91
Posts: 7,317
Reputation: 87,483

Post » Sat Jul 27, 2013 6:08 am

Thanks! Will have a look. :)
B
4
Posts: 14
Reputation: 228

Post » Sat Jul 27, 2013 1:16 pm

The "On start of layout" event is a trigger. It can't be paired with an or operator because it always happens and is the soul trigger for the event.
Other events that have a green arrow such as "On collision with" can't have the "or" operator either.
B
10
S
3
G
3
Posts: 234
Reputation: 3,467

Post » Sat Jul 27, 2013 6:59 pm

That's just it. I don't want it paired with that. I want it paired with the check on the webstorage key existing.
B
4
Posts: 14
Reputation: 228

Post » Sat Jul 27, 2013 7:01 pm

...but I want it to occur at the start of the layout.
B
4
Posts: 14
Reputation: 228

Post » Sat Jul 27, 2013 7:16 pm

What's being suggested is something like this, based on your first message.

It's not clear where your OR was going.
ImageImageImage
B
71
S
21
G
220
Posts: 3,646
Reputation: 123,721


Return to How do I....?

Who is online

Users browsing this forum: ksiads and 3 guests