It looks like you're new here. If you want to get involved, click one of these buttons!
This is how my code looks like, of course the code is way bigger and messier but this is the baseline i need help with.<<if $Inv_slot1 is ["Stick", "Soda", "Coins"]>>
<<else>> <<set $Inv_slot1 to "Stick">>
<</if>>
<<if $Inv_slot1 is "Stick" "Soda" "Coins">>
<<if $Inv_slot1 is "Stick" or "Soda" or "Coins">>
And I'm trying to make a system that when I get an item, it will automatically place the item on whichever variable is not occupied with an item. However, since I cannot make a 'list' for the if command to look in this setup fails. So I need help on how to make a list that a if command can look for, as I've had multiple features that I've been unable to implement because I don't know how to do this.|!$Inv_slot1|!$Inv_slot2|$Inv_slot3|
|!$Inv_slot4|!$Inv_slot5|!$Inv_slot6|
/* Soda Check */
<<if $Soda is 1>>
<<if $Soda_check is 1>> <<else>>
<<if $Inv_slot1 is ["Stick", "Soda", "Coins"]>> <<else>>
<<set $Inv_slot1 to "Soda"; $Soda_check to 1>> <</if>> <</if>>
Comments
If you really wanted to use an array, then what you're looking for is the <Array>.contains() method. For example:
Either method will yield true if the value of $Inv_slot1 is one of Stick, Soda, or Coins.