• 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] GUI Damage Detection System

Status
Not open for further replies.
Level 11
Joined
Jan 25, 2009
Messages
572
I have a question about GUI damage detection system. I could try to create one but then i need some information cuz, as we all know, there will be a huge amount of calcuating.

As i know, the damage taken action can not be set into a variable instantly cuz the unit haven't been damaged because, probably, the event is unit is attacked. Then, how we can calculate how much time it takes until the unit to be damaged, bu using wait, but then, there comes another bad thing, the minimum time of wait is 0.27 seconds... And then, if the damage system is going to be used in a spell there will be a big fail, cuz the spell may set the HP of the unit being damaged to 50% of damage instead of 100%. Yeah like that.

So, but still we can calculate the wait time by include Movement speed, range of attack, rage or melee attacker?, distance between the units and how far the unit has walked using a loop trigger. Also, Missile art speed.

So, How many of you ppls think this will WORK?
 
Yes, this is how Anachron's new system will be based on. All of those factors will be implemented, along with more advanced features, e.g. dices and number of sides ( http://www.hiveworkshop.com/forums/triggers-scripts-269/idea-system-vjass-custommissle-157811/ ). Since the speed of a missile is able of getting calculated, the missile itself an an entity cannot be detected, simply because the engine is old and has enough of limitations in its coding aspect. You would need periodic events to check distances, since the target unit might be moving (and so will the missile's impact be delayed). So, the best way is to either have the Damage Detection System we all know of or an additional custom one (that you create dummies as missiles and stuff like that).
The one we all know of is this:
  • Trigger
  • 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 Trigger3 <gen> the event (Unit - (Picked unit) Takes damage)
  • Trigger2
  • Events
    • Unit - A unit enters (Playable Map Area)
  • Conditions
  • Actions
    • Trigger - Add to Trigger3 <gen> the event (Unit - (Triggering unit) Takes damage)
  • Trigger3
  • Events
  • Conditions
  • Actions
    • //Use (Triggering unit) to refer to the unit that takes the damage and (Damage source) to refer to the unit causing the damage.
 
Status
Not open for further replies.
Top