Else/If/Then

Posted by Malek on Sun 10 Sep 2006 02:24 AM — 2 posts, 11,444 views.

USA #0
Is there a way to use Else/if/and then in mush?

Also is there a way to make one trigger send %1 to one variable and %2 to another?

Thanks Much
Australia Forum Administrator #1
Browse some of the posts about scripts, they will have lots of examples.

If you "send to script" then you can do if/then/else.

For example, if you have Lua scripting:


if %1 > 30 then
  -- do something
else
  -- do something else
end -- if


To set multiple variables, use "send to script" and do something like this:


SetVariable ("a", "%1")
SetVariable ("b", "%2")