Admit
New Member
- Reaction score
- 25
Is there any way to detect custom value of the UNIT-B in this line of code?
Trigger:
- Unit - A unit comes within 256.00 of UNIT_B <gen>
no. not with GUI.
Do you want the custom value involved in the "Comes with <Range>" part of that?
you could always pick every unit within x range and do action if that would work
you could add an immulasion on your dummy unit with 0 damage
and check if a unit takes damage and use dmaage scource to detect dummy unit.
if you just want the dummy to run the trigger once per unit just add the unit that takes damage to a unit group and check if unit is in group x equals false
I have had that idea to. But what if a group of unit's passes the Dummy at the same time? It won't be able to attack every one.
.
e) unit takes damage
c) damage scource is in unitgroupX //checknig if its right dummy
a) create a new dummy that do your action blablablabal
i didnt read your whole trigger since i'm a bit tired...
but why do you want THAT dummy to attack everyone?
just create a new dummy that attacks for it.
handwriten example:
Code:e) unit takes damage c) damage scource is in unitgroupX //checknig if its right dummy a) create a new dummy that do your action blablablabal
if number of units in unitgroup == 1 and picked unit == triggering unit
[CODE]do loop - w/e you wanted to do
if booleanX = true
something liek that
do pick every unit in unitgroup and do your random dmaage thing
may have missread (going to bed now)
but
1. if a unit thats NOT triggering unit pass the dummy nothing happends?
2. if the triggering unit pass without anyone else pass it too, it fires
3. if triggering unit AND another unit pass at the same time, there is a 50% chance that it target the other unit instand of triggering unit?
if follow is correct do something like:
pick all dummy units used for tihs and add all units around them in one unit group.
if number of units in unitgroup => 2Code:if number of units in unitgroup == 1 and picked unit == triggering unit [CODE]do loop - w/e you wanted to do
do loop - if picked unit = triggering unit set booleanX = true
[/CODE]
Code:if booleanX = true something liek that do pick every unit in unitgroup and do your random dmaage thing
ooh, so you want to check if the unit who issued the order is the same unit who came in range of dummy?
If so then : when Unit - Unit is issued an order targeting an point is activated (your first trigger) add a
"Set variable Temp_Issunit = Triggering unit" to actions
And if you want to check the unit in range then add the condition of checking the unit who came in range:
Event - Unit comes witin range of Dummy
Condition - (Triggering Unit) Equal to Temp_Issunid
Now it will check if the unit who was issued an order is the same who came in range of dummy
Condition:
(Distance between Temp_point[0] and Temp_point[1]) Greater than MaxMoveRange
cant you just store the location when your unit standed before moving and check every x seconds if the unit is outside that range?
something like
Code:Condition: (Distance between Temp_point[0] and Temp_point[1]) Greater than MaxMoveRange
when temp point[1] is where the unit originaly standed and temp point[2] is where the unit is now