I know how to do simple 'if then' statements for triggers
-----------------
if world.GetVariable("pa") = "0" then
send "command1"
else
end if
--------------
(I have another trigger which changes that variable to 1 at times)
But how can I take it up a notch to include more cause variables with possible alternative conclusions. Ideally it would be sort of like this.
if world.GetVariable("A") = "0" & world.Getvariable ("B") = "0" & world.Getvariable ("C") = "0" then
send "command1"
else
if world.GetVariable("A") = "1" & world.Getvariable ("B") = "0" & world.Getvariable ("C") = "0" then
send "command2"
else
if world.GetVariable("A") = "0" & world.Getvariable ("B") = "0" & world.Getvariable ("C") = "1" then
send "command3"
end if
Is something like that possible?
Basically I have triggers for hunger/thirst/spells status which switch their respective variable to 1 or 0. I want MC to evaluate those variables and send the appropriate command upon matching a generic balance regained trigger and or timer. IE "eat from bowl" if the "I'm hungry" status variable is 1, "drink sip from glass" if the thirsty variable is 1, or go ahead with a "perform action" if all the previous variables are 0.
-----------------
if world.GetVariable("pa") = "0" then
send "command1"
else
end if
--------------
(I have another trigger which changes that variable to 1 at times)
But how can I take it up a notch to include more cause variables with possible alternative conclusions. Ideally it would be sort of like this.
if world.GetVariable("A") = "0" & world.Getvariable ("B") = "0" & world.Getvariable ("C") = "0" then
send "command1"
else
if world.GetVariable("A") = "1" & world.Getvariable ("B") = "0" & world.Getvariable ("C") = "0" then
send "command2"
else
if world.GetVariable("A") = "0" & world.Getvariable ("B") = "0" & world.Getvariable ("C") = "1" then
send "command3"
end if
Is something like that possible?
Basically I have triggers for hunger/thirst/spells status which switch their respective variable to 1 or 0. I want MC to evaluate those variables and send the appropriate command upon matching a generic balance regained trigger and or timer. IE "eat from bowl" if the "I'm hungry" status variable is 1, "drink sip from glass" if the thirsty variable is 1, or go ahead with a "perform action" if all the previous variables are 0.