• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Floating Text Trigger triggering when Create Unit Trigger is triggered

Status
Not open for further replies.
Level 2
Joined
Jan 22, 2014
Messages
7
I need help. I'm new and my triggers are having problems. One of my trigger is when the skill is cast, it summons a unit that expires after 60 seconds. The problem is, when the summoned unit's timed life expires, it triggers the floating text trigger for a different character. Thanks.
 

Attachments

  • problem1.PNG
    problem1.PNG
    16.8 KB · Views: 83
  • problem2.PNG
    problem2.PNG
    8.3 KB · Views: 96
You can try checking if the "Owner of (Killing unit) is not equal to Owner of (Triggering unit)"

In this case, (Triggering unit) is the unit that died. It would look something like this:
  • Summon Wraith 2
    • Events
      • Unit - A unit dies
    • Conditions
      • (Owner of (Killing unit)) Equal to (Owner of Wintry)
      • (Owner of (Killing unit)) Not Equal to (Owner of (Triggering unit))
    • Actions
      • // the rest of your trigger
Basically, your floating text will fire only when the player kills units that are not his own. For example, if Wintry is Player 1 (Red), he shouldn't be able to kill his own units to get lumber.

As for an explanation of what is going wrong: my guess is that "a unit expires" doesn't have an actual "killer". There is no killing unit, so the owner of it defaults to Player 1 (I assume that is also the owner of Wintry).

Another way to approach it could be adding the condition "(Killing unit) Not Equal to No Unit)". Choose one that works for you and makes sense for your map.

Also, to save you the trouble of having to screenshot your triggers:
 
Level 2
Joined
Jan 22, 2014
Messages
7
Thanks for the fast reply! Since the map is a multiplayer map, I tried your last suggestion and it worked! Although I changed the condition to Unit Not Equal to Wintry. Also thanks for the link, much appreciated. +Rep and thanks again!
 
Level 11
Joined
Oct 9, 2015
Messages
721
You might want to store the "position of casting unit" into an point variable then destroy it after you used it, in the purpose of avoiding leaks to increase performance, like this:
  • Set TempPoint = Position of (Casting Unit)
  • Unit - Create 1 Fecal Matter at TempPoint for...
  • Unit - Add 60.00 second Generic Expiration Timer...
  • Custom script: call RemoveLocation(udg_TempPoint)
 
Status
Not open for further replies.
Top