- Joined
- Nov 28, 2008
- Messages
- 655
-
Get Magic Hammer
-
Events
-
Unit - A unit Acquires an item
-
-
Conditions
-
(Item-type of (Item being manipulated)) Equal to |cffff0000Magic Hammer|r
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Player_Items[(Player number of (Owner of (Triggering unit)))] Equal to 0
-
-
Then - Actions
-
Unit - Add |cffff0000Magic Hammer|r (Q) to (Triggering unit)
-
Set Player_Items[(Player number of (Owner of (Triggering unit)))] = (Player_Items[(Player number of (Owner of (Triggering unit)))] + 1)
-
Game - Display to (All players) the text: (String(Player_Items[(Player number of (Owner of (Triggering unit)))]))
-
-
Else - Actions
-
Unit - Add |cffff0000Magic Hammer|r (W) to (Triggering unit)
-
Set Player_Items[(Player number of (Owner of (Triggering unit)))] = (Player_Items[(Player number of (Owner of (Triggering unit)))] + 1)
-
Game - Display to (All players) the text: (String(Player_Items[(Player number of (Owner of (Triggering unit)))]))
-
-
-
-
-
Lose Magic Hammer
-
Events
-
Unit - A unit Loses an item
-
-
Conditions
-
(Item-type of (Item being manipulated)) Equal to |cffff0000Magic Hammer|r
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Player_Items[(Player number of (Owner of (Triggering unit)))] Equal to 2
-
-
Then - Actions
-
Unit - Remove |cffff0000Magic Hammer|r (W) from (Triggering unit)
-
Set Player_Items[(Player number of (Owner of (Triggering unit)))] = (Player_Items[(Player number of (Owner of (Triggering unit)))] - 1)
-
Game - Display to (All players) the text: (String(Player_Items[(Player number of (Owner of (Triggering unit)))]))
-
-
Else - Actions
-
Unit - Remove |cffff0000Magic Hammer|r (Q) from (Triggering unit)
-
Set Player_Items[(Player number of (Owner of (Triggering unit)))] = (Player_Items[(Player number of (Owner of (Triggering unit)))] - 1)
-
Game - Display to (All players) the text: (String(Player_Items[(Player number of (Owner of (Triggering unit)))]))
-
-
-
-
-
Get Firebolt
-
Events
-
Unit - A unit Acquires an item
-
-
Conditions
-
(Item-type of (Item being manipulated)) Equal to |cffff0000Firebolt|r
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Player_Items[(Player number of (Owner of (Triggering unit)))] Equal to 0
-
-
Then - Actions
-
Unit - Add |cffff0000Firebolt|r (Q) to (Triggering unit)
-
Set Player_Items[(Player number of (Owner of (Triggering unit)))] = (Player_Items[(Player number of (Owner of (Triggering unit)))] + 1)
-
Game - Display to (All players) the text: (String(Player_Items[(Player number of (Owner of (Triggering unit)))]))
-
-
Else - Actions
-
Unit - Add |cffff0000Firebolt|r (W) to (Triggering unit)
-
Set Player_Items[(Player number of (Owner of (Triggering unit)))] = (Player_Items[(Player number of (Owner of (Triggering unit)))] + 1)
-
Game - Display to (All players) the text: (String(Player_Items[(Player number of (Owner of (Triggering unit)))]))
-
-
-
-
-
Lose Firebolt
-
Events
-
Unit - A unit Loses an item
-
-
Conditions
-
(Item-type of (Item being manipulated)) Equal to |cffff0000Firebolt|r
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Player_Items[(Player number of (Owner of (Triggering unit)))] Equal to 2
-
-
Then - Actions
-
Unit - Remove |cffff0000Firebolt|r (W) from (Triggering unit)
-
Set Player_Items[(Player number of (Owner of (Triggering unit)))] = (Player_Items[(Player number of (Owner of (Triggering unit)))] - 1)
-
Game - Display to (All players) the text: (String(Player_Items[(Player number of (Owner of (Triggering unit)))]))
-
-
Else - Actions
-
Unit - Remove |cffff0000Firebolt|r (Q) from (Triggering unit)
-
Set Player_Items[(Player number of (Owner of (Triggering unit)))] = (Player_Items[(Player number of (Owner of (Triggering unit)))] - 1)
-
Game - Display to (All players) the text: (String(Player_Items[(Player number of (Owner of (Triggering unit)))]))
-
-
-
-
So the idea is, if you don't have an item, and you pick one up, it adds the skill for the Q key. If you do have an item, then it adds the ability for the W key. Both are in the right spots on the command card thing, x,y = (0,2) for Q and x,y = (1,2) for W.
The system doesn't work right though, and I can't see the error.
When you have no items, it adds the first item's Q, all good.
Then you pick up the second item, and it adds that item's W, not good.
Then you drop either item, and neither ability disappears, not good.
If you pick up the items a second time, it adds the W, and takes it away the right way, kinda good?
I can post the map if no one can see a blaring whole in my logic, but I think it works?