- Joined
- Feb 1, 2009
- Messages
- 107
I wanna do a trigger that makes my character unequip its current weapon. By "weapon" I mean the special effect attached to his hand. The first choice would be:
So, i had to find a way so specify which Special Effect the "Unequip Current Weapon" button will destroy. I found one way, but I think it's way too complicated, and may not even work... I would have to change all the "Equip" triggers to something like...
So, basically, what I wanted to do with this thing is set a "special effect" variable for each possible case of a Player (my map has 8 players max) ordering his unit to equip a sword (and my map will have other weapons besides swords). So when I wanted to destroy the effect, so that the character unequips the weapon, I'd be able to specify which effect I want destroyed.
I wonder if there is any easier option to do this?
-
Unequip
-
Events
- Unit - A unit Begins casting an ability
-
Conditions
- (Ability being cast) Equal to Unequip Current Weapon
-
Actions
- Special Effect - Destroy (Last created special effect)
-
Events
So, i had to find a way so specify which Special Effect the "Unequip Current Weapon" button will destroy. I found one way, but I think it's way too complicated, and may not even work... I would have to change all the "Equip" triggers to something like...
-
Equip Sword
-
Events
- Unit - A unit Begins casting an ability
-
Conditions
- (Ability being cast) Equal to Equip Sword
-
Actions
- Special Effect - Create a special effect attached to the right hand of (Triggering unit) using Basic Sword.mdx
- Set Equip = Player[(Player number of (Owner of (Triggering unit)))]
-
For each (Integer Equip) from 1 to 8, do (Actions)
-
Loop - Actions
- If (Equip Equal to 1) then do (Set redhassword = (Last created special effect)) else do (Do nothing)
- If (Equip Equal to 2) then do (Set bluehassword = (Last created special effect)) else do (Do nothing)
- If (Equip Equal to 3) then do (Set "color"hasword= (Last created special effect)) else do (Do nothing)
- If (Equip Equal to 4) then do (Set "color"hasword= (Last created special effect)) else do (Do nothing)
- If (Equip Equal to 5) then do (Set "color"hasword= (Last created special effect)) else do (Do nothing)
- If (Equip Equal to 6) then do (Set "color"hasword= (Last created special effect)) else do (Do nothing)
- If (Equip Equal to 7) then do (Set "color"hasword= (Last created special effect)) else do (Do nothing)
- If (Equip Equal to 8) then do (Set "color"hasword= (Last created special effect)) else do (Do nothing)
-
Loop - Actions
- Unit - Remove Spell Book from (Triggering unit)
- Unit - Add Unequip Current Weapon to (Triggering unit)
-
Events
So, basically, what I wanted to do with this thing is set a "special effect" variable for each possible case of a Player (my map has 8 players max) ordering his unit to equip a sword (and my map will have other weapons besides swords). So when I wanted to destroy the effect, so that the character unequips the weapon, I'd be able to specify which effect I want destroyed.
I wonder if there is any easier option to do this?