- Joined
- Dec 17, 2009
- Messages
- 1,115
I'm making a system that allows every player to own only 1 Mainhand weapon!
The problem is, when i test the map with it, it didn't work
i bought a sword, then it successfully says, Equipped Sword!
i bought a copper ore + sword = copper sword
then it dropped ( i triggered that, but it supposed to not drop! )
in the recipe trigger, it removed the sword and copper ore, then adds a copper sword!
by removing it, i think it dropped it somehow...
i want people reading this to try ^^ if the want to help me.. i sure give rep..
so here's the trig for the main hand
Level 1 item = Weapons(Mainhand)
WHile this one below..
Please help..
The problem is, when i test the map with it, it didn't work
i bought a sword, then it successfully says, Equipped Sword!
i bought a copper ore + sword = copper sword
then it dropped ( i triggered that, but it supposed to not drop! )
in the recipe trigger, it removed the sword and copper ore, then adds a copper sword!
by removing it, i think it dropped it somehow...
i want people reading this to try ^^ if the want to help me.. i sure give rep..
so here's the trig for the main hand
Level 1 item = Weapons(Mainhand)
-
Mainhand
-
Events
-
Unit - A unit Acquires an item
-
-
Conditions
-
(Item level of (Item being manipulated)) Equal to 1
-
-
Actions
-
Set PlayerNumber = (Player number of (Owner of (Hero manipulating item)))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Mainhand_Checker[PlayerNumber] Equal to False
-
-
Then - Actions
-
Set Mainhand_Checker[PlayerNumber] = True
-
Set Mainhand_count[PlayerNumber] = (Mainhand_count[PlayerNumber] + 1)
-
Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: (Equipped + (Name of (Item being manipulated)))
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Mainhand_Checker[PlayerNumber] Equal to True
-
-
Then - Actions
-
Hero - Drop (Item being manipulated) from (Hero manipulating item)
-
Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: You already equippe...
-
-
Else - Actions
-
-
-
-
-
-
Reduce Mainhand
-
Events
-
Unit - A unit Loses an item
-
-
Conditions
-
(Item level of (Item being manipulated)) Equal to 1
-
-
Actions
-
Set Mainhand_count[(Player number of (Owner of (Hero manipulating item)))] = (Mainhand_count[(Player number of (Owner of (Hero manipulating item)))] - 1)
-
-
WHile this one below..
-
Reset Mainhand
-
Events
-
Unit - A unit Loses an item
-
-
Conditions
-
(Item level of (Item being manipulated)) Equal to 1
-
Mainhand_Checker[(Player number of (Owner of (Hero manipulating item)))] Equal to True
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Mainhand_count[(Player number of (Owner of (Hero manipulating item)))] Equal to 0
-
-
Then - Actions
-
Set Mainhand_Checker[(Player number of (Owner of (Hero manipulating item)))] = False
-
Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: (Unequipped the + (Name of (Item being manipulated)))
-
-
Else - Actions
-
Floating Text - Create floating text that reads Insufficient materi... above (Hero manipulating item) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
-
Floating Text - Change (Last created floating text): Disable permanence
-
Floating Text - Change the lifespan of (Last created floating text) to 0.01 seconds
-
-
-
-
Please help..