ErockMahan said:
Bob gives me an item, which sets a variable and then executes an alias 3 seconds later (with 'doafterspecial'), but for some reason the alias does not pick up the variable change.
I agree with what Twisol said, but the other thing is "what variable change"? His solution will pick up the variable at the time the delayed alias is called (which may or may not be what you want exactly - maybe the variable changes again 2 seconds later).
Also, if the thing you are doing is an alias (which you said it was) then Send is wrong, it should be Execute, like this:
DoAfterSpecial(3, 'Execute ("foo " .. GetVariable ("myvar"))', sendto.script)
(Note: sendto.script, not send_to.script).
That way "foo" is treated as an alias, and not just sent to the MUD.
However if I read your post correctly, you want to set a variable, and then use that new variable 3 seconds later. In which case this should work:
DoAfter (3, "foo " .. GetVariable ("myvar"))
This will concatenate your alias with the new contents of the variable, and then do that 3 seconds later.
However if you had (as Twisol guessed):
DoAfter (3, "foo @myvar")
Then you get the
old value of the variable, not the one you just set.