How to I separate two groups of conditions by an "or"

How do I Separate two groups of conditions by an “or”? I am trying to make it so that it checks for if an object variable “Inventory” is 1, and another object variable “Inventory1” is “Shotgun”, and then it would do the events for the shotgun. After that it would check for if an object variable “Inventory” is 2, and another object variable “Inventory2” is “Shotgun”, and then it would do the events for the shotgun. The point of this is to specify if the shotgun is in inventory slot 1 or inventory slot 2.

The reason why I don’t just do this is because I’m worried if It’s bad to reuse the same events for weapons because over time the game will potentially have dozens of weapons and I don’t want to bloat the size of the game a ton.

Does anyone have any advise on how I could do this?

Welcome Lemons

You can put an AND condition inside the OR as a sub-condition. You can mix and match using one inside the other. Although, after too many it can become difficult to read. You only need the AND inside of an OR. Conditions all need to be true for the actions to be triggered. Except within an OR.

If left button was release AND AutoFire is true OR Space was released AND AutoFire is false


.

If left button was release AND AutoFire is true
OR
Space was released AND Rate >= 1 and Rate <=5


.

If left mouse was release
AND (all events need to be true, so AND is assumed)
AutoFire is true OR Rate >= 1 and Rate <=5

There might be an easier way to word your events so you don’t need to make a lot of events or so many actions for each combination. I don’t know how to arrange it without context but usually when you’re repeating the same conditions or actions there’s a more efficient and less repetitive way.

You can also have subevents share previous events. Each subevent can’t be triggered without the previous event. They also inherit the object picklist. So, if an object was checked for visibility then only those objects would be used.
image

Each subevent acts like an AND but the ones on the same level (indentation) behave sort as OR conditions.

1 Like

Thanks for the help on this!

1 Like