• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Trigger Question

Status
Not open for further replies.
Level 2
Joined
Oct 2, 2012
Messages
10
I have a question, How to make floating text that show you how much a attacking unit damage on your unit ?
 
Level 17
Joined
Mar 21, 2011
Messages
1,611
  • Trigger 1
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to Trigger 2 <gen> the event (Einheit - (Triggering unit) takes damage)
  • Trigger 2
    • Events
    • Conditions
      • (Damage taken) unequal to 0.00
    • Actions
      • Trigger - Turn off (This trigger)
      • Floating Text - Create floating text that reads (String((Damage taken))) above (Triggering unit) with Z offset 0.00, using font size 10.00, color (80.00%, 80.00%, 5.00%), and 0.00% transparency
      • Floating Text - Show (Last created floating text) for (All players)
      • Floating Text - Set the velocity of (Last created floating text) to 65.00 towards 65.00 degrees
      • Floating Text - Change (Last created floating text): Deactivate permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 1.25 seconds
      • Trigger - Turn on (This trigger)

NOTICE!: the unit HAS to enter playable map area, otherwise the trigger cannot catch the unit
 
Level 2
Joined
Oct 2, 2012
Messages
10
  • Trigger 1
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to Trigger 2 <gen> the event (Einheit - (Triggering unit) takes damage)
  • Trigger 2
    • Events
    • Conditions
      • (Damage taken) unequal to 0.00
    • Actions
      • Trigger - Turn off (This trigger)
      • Floating Text - Create floating text that reads (String((Damage taken))) above (Triggering unit) with Z offset 0.00, using font size 10.00, color (80.00%, 80.00%, 5.00%), and 0.00% transparency
      • Floating Text - Show (Last created floating text) for (All players)
      • Floating Text - Set the velocity of (Last created floating text) to 65.00 towards 65.00 degrees
      • Floating Text - Change (Last created floating text): Deactivate permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 1.25 seconds
      • Trigger - Turn on (This trigger)

NOTICE!: the unit HAS to enter playable map area, otherwise the trigger cannot catch the unit

I did exactly like that, but the text won't come out
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
I did exactly like that, but the text won't come out

I did exactly like that, and the text came out

210329-albums5809-picture61699.jpg


and if it's really not showing, then this could be something you're looking for

GIMLI_2 said:
NOTICE!: the unit HAS to enter playable map area, otherwise the trigger cannot catch the unit
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
NOTICE!: the unit HAS to enter playable map area, otherwise the trigger cannot catch the unit
Time to show how to counter this;
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup= true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Trigger - Add to Takes Damage <gen> the event (Unit - (Picked unit) Takes damage)
 
Status
Not open for further replies.
Top