0 Favourites

Understanding "Else" Conditions

  • Say I have the following:

    -> Event | Condition

    --> Sub-event | Condition

    -> Else

    I understand that Else will take effect if the previous Event was false. In this case, does the Else wait for the Event or Sub-event to be false, since both come prior. However, to my thinking, the Sub-event is still part of the main Event, so it shouldn't matter, yes/no?

    So...let's say......

    -> Event | Condition TRUE

    --> Sub-event | Condition FALSE

    -> Else ...?...

    Similarly...

    -> Event | Condition FALSE

    --> Sub-event | Condition Doesn't run...

    -> Else TRUE......right?

    How does the Sub-event's true/false status play into the outcome of the Else condition since both the Event and Else are on the same level? Is the Sub-event viewed as an extension of the Event in the eyes of Else, or is the Sub-event still part of the Event and factor into the overall true/false?

    Additionally...

    I'm using a For Each to check the conditions of each instance of an object. Some instances may have true statements, others false. Will the Else condition take that into account?

    -> For Each | Instance 0 TRUE

    -> Else ...?...

    -> For Each | Instance 1 FALSE

    -> Else ...?...

    Thank you for your help!

  • The first condition is every time TRUE.

    -> Event | Condition | TRUE

    --> Sub-event | Condition | TRUE

    --> ELSE | FALSE

    -> Else | FALSE

    -> Event | Condition TRUE

    --> Sub-event | Condition

    -> Else FALSE

    "However, to my thinking, the Sub-event is still part of the main Event, so it shouldn't matter, yes/no?"

    It doesn?t matter, here is a example:

    -> Event | Condition | TRUE

    --> Sub-event | Condition | TRUE

    -> Else | FALSE

    So lets say the firstEvent|condition|true makes a true, the sub event get triggered with an false. So the sub event wont work but also the Else will not trigger.

    You need to understand it like:

    -> This Shirt is yellow!

    --> Yes it is yellow and it is also blue !

    ---> ....

    -> No it isn?t yellow

    So the subevent will totaly ignore the else, if it would work it is like:

    -> This Shirt is yellow!

    --> Yes it is yellow and it is also blue !

    ---> ....

    -> No it isn?t yellow but it is yellow and blue

    You see the problem ? :D

  • 'Else' means 'the previous event at the same indentation level was false'. So sub-events don't affect else in your example.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Darklinki - Thank you for your help. You kinda lost me with the shirt examples but I truly appreciate the examples all the same. :)

    @Ashley - Gotcha. Thank you! :) Next up...a post requesting help to understand how For Each loops are rendered at/during runtime. LOL (I'm trying to peek UNDER the hood to see how the engine does its thing. That's why all these "basic" questions. Trying to see where the limits are for each event and function, and where I need to add other instructions to compensate.)

  • I tried to make it as easy as possible :D Sry, but i�m glaad that I could help you a bit.

  • Karklinki - It's all good. Even teaching well requires some learning. Was actually one of my favorite classes in Bible college...just learning how people learn in different ways and relating to each type.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
0 Favourites
Understanding subscription
96 4,810
ruskul's avatar
ruskul
Unread hot topic
0 Favourites
Understanding Draw Calls.
42 2,991
newt's avatar
newt
Unread hot topic
46 3,560
Geo's avatar
Geo