[Trigger] Health command

Status
Not open for further replies.
Level 3
Joined
Apr 13, 2009
Messages
49
Hey,

I'm looking for a trigger that shows the health from a selected unit in a game message by using the command -health.

I have no idea how to make this though. Would it be possible for anyone helping me create one please?

Thanks
 
  • Custom Script: call DisplayTextToForce(bj_FORCE_ALL_PLAYERS , R2S(GetUnitState(GetSelectedUnit() , UNIT_STATE_LIFE )
or in jass:
JASS:
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS , R2S(GetUnitState(GetSelectedUnit() , UNIT_STATE_LIFE )
 
  • Chocolate cupcakes
    • Events
      • Player - Player 1 (Red) types a chat message containing -health as An exact match
      • Repeat the above for all players that may write the command.
    • Conditions
      • Your conditions here
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
        • Loop - Actions
          • Game - Display to (Player group((Triggering player))) the text: (String((Integer((Life of (Picked unit))))))
For example, if a player has selected two grunts, and they have 239.22 hp and 593.89 hp, it will show this message:

240
594
 
Angel i rather teach him right then having him rework all his code in 2 months again coz he has new mapping skillz
its my way of teaching coz im not a great master of sentences and i feel sorry for that but everyone will learn more if he has to get all a bit from himself then just pasting
 
Status
Not open for further replies.
Back
Top