Ok, I've tried to figure this out and yet again I'm lost.....can someone tell me step-by-step how to set up a variable.....I hope it's a variable I'm looking for...I have many pipes aliases and triggers that affect certain pipes based on ID#s, I was looking to make a variable so that when I switch to another character I can just type in the right variable and it will switch all the pipes in the aliases and triggers so that they affect the new pipes. Maybe it can't be done, I'm not sure.....but if it can, I'd appreciate the help. I looked in the variables sections here and I'm still lost, so that didn't help
Variables
Posted by Hathcock on Sun 28 Dec 2003 02:57 AM — 7 posts, 28,455 views.
You can set up a variable very easily by going to the world configuration screen and scrolling down to the last item - variables (Scripting -> Variables).
Click "Add" and then type a name (eg. "pipe") and the contents (eg. "1234").
Then in your alias or trigger you can expand that variable. eg. an alias might say "fill @pipe".
Check the "Expand Variables" checkbox, and the contents of the pipe variable will replace @pipe.
You can make an alias to change the variable quickly. eg.
Match: newpipe *
Send: %1
Send to: Variable
Variable: pipe
Click "Add" and then type a name (eg. "pipe") and the contents (eg. "1234").
Then in your alias or trigger you can expand that variable. eg. an alias might say "fill @pipe".
Check the "Expand Variables" checkbox, and the contents of the pipe variable will replace @pipe.
You can make an alias to change the variable quickly. eg.
Match: newpipe *
Send: %1
Send to: Variable
Variable: pipe
If you are looking for a fast way to switch what every pipe does when you switch characters you *might* be able to use an if check or switch in the script to determine which pipes each character uses. It's not gonna be fast or pretty to code a fullscale switch routine that reworks whole pipe sets though and may not even be practical depending what scripting language you're using. Now that I think on that idea a bit more you could probably use a main script to call subscripts based on which character is being played and use Nick's example for how to store which char you're using. Still not fast or pretty but easier than trying to code something to automagically switch the pipes when you switch characters.
Hey again.. Im having the same problem, I have a variable called "axe1" I dont have it in any script or anything, just in the variable box.. and then I have loads with envenom alises, and when I get new axes, I want to just change the axe1 variable, I tried to make a alias "envenom @axe1 with (venom) but it wont work, anyone know why?
thanks
thanks
Seems to work for me. Did you check the "expand variables" check box?
I didn't know that Send to: Variable thing. Handy.
It would be nice, however, to have a common syntax in the command box to assign variables without resorting to perl, JS, etc.
@pipe = %1
@tobacco = %2
...and so on
explicitly, instead of having to do it with a Send to.
If this is already possible, great.
Dub
It would be nice, however, to have a common syntax in the command box to assign variables without resorting to perl, JS, etc.
@pipe = %1
@tobacco = %2
...and so on
explicitly, instead of having to do it with a Send to.
If this is already possible, great.
Dub
If you want to set multiple variables in a trigger or alias, use "send to script" and put in a couple of lines like this:
That is not much more work than what you suggested.
SetVariable "pipe", "%1"
SetVariable "tobacco", "%2"
That is not much more work than what you suggested.