• 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] Disable trigger if attacked or dead

Status
Not open for further replies.
Level 4
Joined
Nov 23, 2014
Messages
56
Hey guys newbie here I need help with a trigger with my map I was trying to create a timed capture of a unit if a hero enters a region but i need help cancelling the trigger if the heeo is attacked but after a few seconds that the hero is not attacked and enters the region again it activates again. Any help will be acknowleged

sorry about the typos i'm not used to typing on my mobile
 
Last edited by a moderator:
Level 4
Joined
Nov 23, 2014
Messages
56
So, kind of like standing on one of the altars from the LoL map, Twisted Treeline? Do you have any triggers made, yet?

Exactly lol but a little different anyway here is my trigger.
 

Attachments

  • ss.png
    ss.png
    31.5 KB · Views: 95
Last edited:
Level 24
Joined
Aug 1, 2013
Messages
4,658
What you need is a periodic check that finds out if there are any (or multiple) valid control point takers in the given area.

This means that you would need a boolean array for example and check if the value is false (default).
When a unit takes damage, set it to true, run a timer and set it to false when it expires.

Then every 0.03 to 0.10 seconds of gametime, you pick all units inside the control point and check how many there are of each allied force (allied player group).
If there are multiple forces in there, then you dont change anything, if there is only one force, you can increase their contribution of the control point by either a raw value or a value based on the number of units in there.

There are too many different behaviors of these kind of control points to just give you the way to make it with this few information about it's actual behavior but this structure should work for every single kind of control point.
 
Level 4
Joined
Nov 23, 2014
Messages
56
What you need is a periodic check that finds out if there are any (or multiple) valid control point takers in the given area.

This means that you would need a boolean array for example and check if the value is false (default).
When a unit takes damage, set it to true, run a timer and set it to false when it expires.

Then every 0.03 to 0.10 seconds of gametime, you pick all units inside the control point and check how many there are of each allied force (allied player group).
If there are multiple forces in there, then you dont change anything, if there is only one force, you can increase their contribution of the control point by either a raw value or a value based on the number of units in there.

There are too many different behaviors of these kind of control points to just give you the way to make it with this few information about it's actual behavior but this structure should work for every single kind of control point.
Thank you I'm new with triggers so I have no Idea what those booleans and arrays are but I will try Thank you again!
 
Status
Not open for further replies.
Top