 |
Dalton Newbie
Joined: 05 Dec 2002 Posts: 1 Location: USA
|
Posted: Thu Dec 05, 2002 1:25 am
Two minor obstacles to overcome |
Okay, admittedly I'm a newbie when it comes to Zmud and all this, but I'm trying to write my own script (someone should've slapped me when I thought of it!).
Two things are stopping me at the moment. Firstly, I should explain a bit about the system I'm writing this for. An unarmed combatant in Ice9's inferno, UA is pretty intense on the fingerwork to keep the combo's coming. You take a stance, and then there are 3 strikes you can use for that stance, a piercing attack, a blunt attack, and a slashing attack. Each creature in an area is weak against one of the three types of damage, and heavily armored against the other two. So I decide which type of damage I want to use, and I put the creature in a list of variables called 'slashers' for instance. Now I tried to make an #if statement that'd check to see if my current opponent was in either of the 3 groups, (I made a variable for each type of damage, and add creatures to the list as I hunt them.) and then use a strike I've already predefined in a variable with my stance. My problem is, that the #if statement checks to see if the opponent variable is true, and therefor doesn't work.
I tried #if (@opponent=@slashers) {strike @opponent with @slashstrike} which ironically didn't work, if I take out the '=' in the first part, it works... But the problem is that if it's not a slashing creature I need to follow it up with 2 more if statements, and all 3 will come out as 'true' and it'll try to strike the opponent with all 3 strikes, since all 3 statements are coming out as true. It's driving me crazy! Any advice?
I also have a question on the timer but I'll search a bit more before I clutter up the boards with questions that've probably already been asked, and are just hard to search out.
~Dalton
It's enough to make me go sane! |
|
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Dec 05, 2002 2:09 am |
quote:
Okay, admittedly I'm a newbie when it comes to Zmud and all this, but I'm trying to write my own script (someone should've slapped me when I thought of it!).
Two things are stopping me at the moment. Firstly, I should explain a bit about the system I'm writing this for. An unarmed combatant in Ice9's inferno, UA is pretty intense on the fingerwork to keep the combo's coming. You take a stance, and then there are 3 strikes you can use for that stance, a piercing attack, a blunt attack, and a slashing attack. Each creature in an area is weak against one of the three types of damage, and heavily armored against the other two. So I decide which type of damage I want to use, and I put the creature in a list of variables called 'slashers' for instance. Now I tried to make an #if statement that'd check to see if my current opponent was in either of the 3 groups, (I made a variable for each type of damage, and add creatures to the list as I hunt them.) and then use a strike I've already predefined in a variable with my stance. My problem is, that the #if statement checks to see if the opponent variable is true, and therefor doesn't work.
I tried #if (@opponent=@slashers) {strike @opponent with @slashstrike} which ironically didn't work, if I take out the '=' in the first part, it works... But the problem is that if it's not a slashing creature I need to follow it up with 2 more if statements, and all 3 will come out as 'true' and it'll try to strike the opponent with all 3 strikes, since all 3 statements are coming out as true. It's driving me crazy! Any advice?
I also have a question on the timer but I'll search a bit more before I clutter up the boards with questions that've probably already been asked, and are just hard to search out.
~Dalton
It's enough to make me go sane!
Instead of using an equality statement like x=y, use the %ismember() function to determine if x is a critter a, b, c, or d in the list.
%ismember(%1,@slashers)
li'l shmoe of Dragon's Gate MUD |
|
|
|
 |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|