Dodighead147
New Member
- Reaction score
- 0
Hi... Well someone was very nice to help me with this post beofe (rep+) but there is ONE problem with it. This code gives +50 gold when you kill the peasant but I want it to give back the 1/5 of your gold that it takes (in the item). Can you please help me? This is the code:
Code:
Trigger 1
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Jew
Actions
Item - Create Gold Coins at (Position of (Triggering unit))
Item - Set the custom value of (Last created item) to (Custom value of (Triggering unit))
Code:
Trigger 2
Events
Unit - A unit Acquires an item
Conditions
(Custom value of (Item being manipulated)) Greater than 0
Actions
Player - Add (Custom value of (Item being manipulated)) to (Owner of (Hero manipulating item)) Current gold
Floating Text - Create floating text that reads (String((Custom value of (Item being manipulated)))) at (Position of (Hero manipulating item)) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change the fading age of (Last created floating text) to 4.00 seconds
Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds