Lmfaocj
Active Member
- Reaction score
- 1
Hey, I am making a shared gold trigger where every unit in 900 range of the dead unit gets gold and owner of killing unit gets gold, but for some reason some times when I kill a unit i won't get gold
Trigger:
- Share gold
- Events
- Unit - A unit Dies
- Conditions
- (Owner of (Triggering unit)) Equal to (==) Neutral Hostile
- ((Killing unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to (==) True
- Actions
- Set TempGroup = (Units within 900.00 of (Position of (Triggering unit)) matching (((Matching unit) belongs to an ally of (Owner of (Killing unit))) Equal to (==) True))
- Unit Group - Pick every unit in TempGroup and do (Set TempPGroup = (All players matching ((Matching player) Equal to (==) (Owner of (Picked unit)))))
- Set AATempInteger = (Number of players in TempPGroup)
- Set Gold_Rate = (((Point-value of (Triggering unit)) / AATempInteger) x Gold_Event)
- Player Group - Pick every player in TempPGroup and do (Player - Add Gold_Rate to (Picked player) Current gold)
- Floating Text - Create floating text that reads (|cffffcc00 + ((String(Gold_Rate)) + + Gold|r)) above (Triggering unit) with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.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
- Floating Text - Hide (Last created floating text) for (All players)
- Floating Text - Show (Last created floating text) for TempPGroup
- Custom script: call DestroyForce(udg_TempPGroup)
- Custom script: call DestroyGroup(udg_TempGroup)
- Events