• 🏆 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!

Killing a Unit w Triggers

Status
Not open for further replies.
Level 22
Joined
Jul 25, 2009
Messages
3,091
I want to kill a unit with a function but be able to set a killing unit that can be referenced.

The normal GUI function to kill a unit would work if it returned a killing unit.

Is it possible to do this with custom script?
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
It should be fairly easy to hardcode your damage detection system to, for example, ignore damage in excess of 10,000 or whatever some reasonable limit is to damage that can be dealt in your map. Any damage detection system worth its salt should also come with a way to deal damage which won't be registered by the system.
 
Level 22
Joined
Jul 25, 2009
Messages
3,091
The problem is I have it rigged to disperse all damage done to squad members to a squad leader thereby collectivizing their HP pools. Once the HP threshold drops below HP/SquadSize * some percentage I came up with based on a calculation... The unit taking damage dies. Killing the unit is the problem. I can't get the killing unit. I suppose I could just trigger all relevant triggers to ignore damage above a certain threshold yeah that just seems wonky though.
 
Status
Not open for further replies.
Top