GML Visual Drag and Drop if [...] or [...]

D1Project

Member
Hello,

Using Drag and Drop, is there a way to do if [...] or [...] ?
The only workaround I found is to use an "If Expression" and put the whole expression in.

For example, if I have a boss with 4 phases, but I want him to execute the same action on phase 2 and 4.
In GML, we would put "if phase = 2 or phase = 3", how would you do it in DnD?

Thank you!
 

FrostyCat

Redemption Seeker
My Drag & Drop knowledge is a bit rusty, but switch actions are probably what you are looking for
Case actions in GMS 2 D&D automatically imply the closing break, so you can't chain them the way you can in standard GML (i.e. case 2: case 4:).

Aside from duplicating the actions, using the If Expression action with an expression of phase == 2 || phase == 4 is the correct solution.
 
Top