• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Ability & Floating +++REP

Status
Not open for further replies.
Level 4
Joined
Jan 29, 2009
Messages
79
hey

i want a trigger which Shows a Floating for 1 Second when an Ability its casted

BUT this ability have a 20% chance to be casted (Like Critical)

Look my trigger and please tell me whats wrong!
  • Events
  • Unit - A unit begins casting an ability
  • Conditions
  • (Ability being cast) Equal to Pulverize
  • Actions
  • Floating Text - Create floating text that reads BLA BLA above (Triggering unit with Z.....
  • Floating Text - Change (LAST Created floating text):Disable Permamence
  • 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) to 1.00 secods
  • Floating text - Change the lifespan of (LAST Created) to 3.00 seconds
 
Level 12
Joined
Jul 27, 2008
Messages
1,181
You could dummy-damage the whole thing:
  • Events
    • Unit - A Unit Is damaged
  • Conditions
    • ((Damage source) has buff Dummy) Equal to True
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Random integer number between 1 and 100) Greater than or equal to 90
      • Then - Actions
        • Do your Actions
      • Else - Actions
        • Do nothing
Change the skill to a dummy aura and use a buff to determine if the attacker has pulverize.

EDIT: This event does not seem to exist, and no other damage based event...
Why do they have Damage Source then?
 
Level 12
Joined
Jul 27, 2008
Messages
1,181
Found a way. Keep the trigger but remove the event. Then do:

  • Events
    • Unit - A Unit Is attacked
  • Conditions
    • ((Attacking Unit) has buff Dummy) Equal to True
  • Actions
    • Trigger - Add to Pulverize the event (Unit - (Attacked unit) Takes damage)
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Critical Strike Detection

For the floating text:


  • Floating Text (add this in the critical strike-trigger)
  • Actions
    • Set TempLoc = (Position of (damage source))
    • Floating Text - Create floating text that reads ((String((Integer((Damage taken))))) + !) at TempLoc with Z offset 0.00, using font size 10.00, color (80.00%, 0.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 15.00 towards 90.00 degrees
    • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
    • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
    • Custom Script: call RemoveLocation(udg_TempLoc)
You can do this for every passive ability (Bash, Pulverize, ...).
 
Status
Not open for further replies.
Top