• 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.

Special effect for every killed allied units?

Status
Not open for further replies.
Level 23
Joined
Oct 20, 2012
Messages
3,075
Use a boolean condition to check if the killing unit is an ally or not.

  • Deny
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True
    • Actions
      • Floating Text - Create floating text that reads ! above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
If you want to make it colored according to the team color of the killing unit, I guess you'll have to use a lot of ITEs..

Oh yea, forgot about that. Spartipolio's suggested solution below for TC floating text would be easier.

BTW, Offtopic:
Still working on your skin, sorry for being kinda slow. I'm really weak at adding shadows. x3
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Not really IT's for colors. You hold an array with player colors, and use the player number as the array index for it's color.

btw, it's a floating text, not an special effect.
 
Level 3
Joined
Jun 23, 2013
Messages
54
Well, frist of all we make a player group using a variable. Let's call this variable "Player1_Ally" (Player-Group variable)
Then we use a trigger that store every player that belong to ally of player 1 to the created variable "Player1_Ally"
And then here is the main trigger in GUI:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Player Group - Pick every player in Player1_Ally and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Owner of (Killing unit)) Equal to (Owner of (Dying unit))) or ((Owner of (Killing unit)) Equal to (Picked player))
            • Then - Actions
              • Set Effect_Point = (Position of (Dying unit))
              • Special Effect - Create a special effect at Effect_Point using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
              • Set Dying_Effect = (Last created special effect)
              • Custom script: call RemoveLocation(udg_Effect_Point)
              • Special Effect - Destroy Dying_Effect
            • Else - Actions
              • Do nothing
It's pretty simple, when an unit killed by allied unit the thunder clap effect will appear as sign of ally-killing
 
Use a boolean condition to check if the killing unit is an ally or not.

  • Deny
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True
    • Actions
      • Floating Text - Create floating text that reads ! above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
If you want to make it colored according to the team color of the killing unit, I guess you'll have to use a lot of ITEs..

Oh yea, forgot about that. Spartipolio's suggested solution below for TC floating text would be easier.

BTW, Offtopic:
Still working on your skin, sorry for being kinda slow. I'm really weak at adding shadows. x3

Oh ok. :D
Should I store the last created floating text?
 
Status
Not open for further replies.
Top