Lord_Kakashi
The Wabbits are attacking
- Reaction score
- 27
Okay so I'm very new to the whole JASS front in it's non-GUI form, so I was wondering if this would cause a desync or if it's okay for battle.net use.
Basically I went ahead and made my own "bounty" system for my tower defence map because the monsters spawned are not the same every level... e.g. first time playing the map.. round two monsters might be worms.. the next time it might be knights..
Anyway.. here's the actual trigger. (GUI with custom code)
Obviously the intention is to have the +[income variable] floating text only to display for one player. The one killing the unit
Basically I went ahead and made my own "bounty" system for my tower defence map because the monsters spawned are not the same every level... e.g. first time playing the map.. round two monsters might be worms.. the next time it might be knights..
Anyway.. here's the actual trigger. (GUI with custom code)
Code:
Bounty Give
Events
Unit - A unit owned by Player 12 (Brown) Dies
Conditions
Actions
Custom script: if GetLocalPlayer() == GetOwningPlayer(GetKillingUnitBJ()) then
Set monBountyPoint[(Player number of (Owner of (Killing unit)))] = (Position of (Dying unit))
Floating Text - Create floating text that reads (TempStrings[1] + (+ + (String(MonBounty[level])))) at monBountyPoint[(Player number of (Owner of (Killing unit)))] with Z offset 0.00, using font size 10.00, color (100.00%, 80.00%, 20.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Show (Last created floating text) for (Player group((Owner of (Killing unit))))
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 0.50 seconds
Player - Add MonBounty[level] to (Owner of (Killing unit)) Current gold
Custom script: endif
Custom script: call RemoveLocation(udg_monBountyPoint[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))])
Obviously the intention is to have the +[income variable] floating text only to display for one player. The one killing the unit