Page 1 of 1
Illusion System
Posted: Wed Dec 21, 2011 5:21 am
by Skriptz
Okay I'm attempting to make a illusion system which isn't working out.
In alias I have this
varIllusion = ginseng
echo("\nUsing Relapsing illusions.")
In script I have this
function illusion()
if varIllusion == goldenseal then
expandAlias("ill You shuffle your feet noisily, suddenly bored. and a test")
elseif varIllusion == "ginseng" then
illGinseng() else
end
end
I also have this
function illGinseng()
if varIllusion == ginseng then
expandAlias("ill ill Javar sinks his fangs into your body and you wince in pain.\nYou feel light headed and dizzy.")
end --ends If statement
end --ends function
So I use the alias ig short for Illusion Ginseng and I get the using Relapsing Illusions echo however every time I attack someone it sends "ill You shuffle your feet noisily, suddenly bored. and a test"
Could someone help me work out why it won't change the variable or run the Illusion function?
Re: Illusion System
Posted: Wed Dec 21, 2011 10:06 pm
by tsuujin
you're trying to assign the variable varIllusion to the variable ginseng, which is probably not what you wanted to do.
change it to varIllusion = "ginseng" (there are multiple occurances you'll have to change) and that might fix it.
Re: Illusion System
Posted: Thu Dec 22, 2011 10:40 am
by Skriptz
Thanks that works. I didn't realize that it needs to be a string with quotes otherwise it will see it as a variable and not a string.
Thanks again.