• 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.

Two Issues: Ignored condition/control groups

Status
Not open for further replies.
1.
  • BirthSentry
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set TempLoc78 = (Position of (Dying unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Current research level of Soul Sentry for (Owner of (Killing unit))) Equal to 1
          • (Number of units in (Units within 900.00 of TempLoc78 matching (((Owner of (Killing unit)) Equal to (Owner of (Matching unit))) and ((Unit-type of (Matching unit)) Equal to Death Knight)))) Greater than 0
          • (Number of units in (Units within 900.00 of TempLoc78 matching (((Owner of (Killing unit)) Equal to (Owner of (Matching unit))) and ((Unit-type of (Matching unit)) Equal to Soul Sentry)))) Less than 1
        • Then - Actions
          • Unit - Create 1 Soul Sentry for (Owner of (Killing unit)) at TempLoc78 facing Default building facing degrees
        • Else - Actions
      • Custom script: call RemoveLocation (udg_TempLoc78)
Why is the condition that a Soul Sentry not be there being ignored?

2. How can I remove a unit from a control group via triggers?
 
Level 13
Joined
Feb 18, 2009
Messages
1,381
Use triggering unit, not dying.
I think it is the "killing unit" but i am not sure
 
Level 9
Joined
Apr 28, 2009
Messages
538
I'm pretty sure the problem is in this lines

  • (Number of units in (Units within 900.00 of TempLoc78 matching (((Owner of (Killing unit)) Equal to (Owner of (Matching unit))) and ((Unit-type of (Matching unit)) Equal to Death Knight)))) Greater than 0
  • (Number of units in (Units within 900.00 of TempLoc78 matching (((Owner of (Killing unit)) Equal to (Owner of (Matching unit))) and ((Unit-type of (Matching unit)) Equal to Soul Sentry)))) Less than 1
Maybe this:
  • (((Owner of (Killing unit)) Equal to (Owner of (Matching unit)))
 
Level 6
Joined
Oct 10, 2009
Messages
1,426
maybe try to put conditions as
[trigger=Your Trigger]YourTrigger
BirthSentry
Events
Unit - A unit Dies
Conditions
Actions
Set TempLoc78 = (Position of (Dying unit))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And (Multiple Conditions)
(Current research level of Soul Sentry for (Owner of (Killing unit))) Equal to 1
(Number of units in (Units within 900.00 of TempLoc78 matching (((Owner of (Killing unit)) Equal to (Owner of (Matching unit))) and ((Unit-type of (Matching unit)) Equal to Death Knight)))) Greater than 0
(Number of units in (Units within 900.00 of TempLoc78 matching (((Owner of (Killing unit)) Equal to (Owner of (Matching unit))) and ((Unit-type of (Matching unit)) Equal to Soul Sentry)))) Less than 1
Then - Actions
Unit - Create 1 Soul Sentry for (Owner of (Killing unit)) at TempLoc78 facing Default building facing degrees
Else - Actions
Custom script: call RemoveLocation (udg_TempLoc78)
[/trigger]

even though it should do that anyways, its just a suggestion.
 
Status
Not open for further replies.
Top