How do I (Group of conditions) OR (Group of conditions)?

0 favourites
  • 3 posts
From the Asset Store
Globals 2.0
$3.99 USD
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • Hey all,

    I have another question,

    How do I do the following:

    IF 	a = "Test3"
    	b = "Test2"
    	c = "Test1"
    THEN
    	Result = "True first"
    
    -> OR
    
    IF 	a = "Test5"
    	b = "Test6"
    	c = "Test7"
    THEN
    	Result = "True second"
    
     -> OR
    
    IF 	a = "Test7"
    	b = "Test8"
    	c = "Test9"
    THEN
    	Result = "True third"
    
    

    I hope this makes sense, what I'm trying to do is to have a set/group of conditions and if one of the "group" conditions are met to execute a specific set of events for that specific type of condition that was met.

    And tips or advice would greatly be appreciated.

  • I would do:

    IF 	a = "Test3"
    	b = "Test2"
    	c = "Test1"
    THEN Result = "True first"
    
    else
    
    -> IF 	a = "Test5"
    -> 		b = "Test6"
    -> 		c = "Test7"
    -> THEN	Result = "True second"
    
    -> else
    
    -> -> IF 	a = "Test7"
    -> -> 		b = "Test8"
    -> -> 		c = "Test9"
    -> -> THEN Result = "True third"
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I did the else condition as you said, and thought that might be where my problem lies... But silly me just discovered that I exchanged my angles with my grid index so it was like trying to look at grid index 180 etc...

    It's fixed now, but thanks anyways :D

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)