• 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] Collision Detection Issues. Can't assign variable.

Status
Not open for further replies.
Level 24
Joined
May 9, 2007
Messages
3,563
I have an issue. I am making a map and I need a good GUI MUI collision detection system.

  • Unit - A unit comes within 50.00 of No unit
I have an Unit Array(12) for the MUI.

I can't set the "No Unit" to that array though. Also If I just make it a Unit not an array variable it still will not show that as an option.

Any ideas why?

Btw I am setting the array like this.

  • Set NetUnit[(Player number of (Owner of (Casting unit)))] = (Last created unit)
After I create a unit.

[900th post!]
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
What the?
  • Trigger - Add to Comes in range <gen> the event (Unit - A unit comes within 250.00 of (Triggering unit))
You cannot do this?
P.s. Here's one for you:
With the event Unit - A unit comes withing # range of some_unit, what is the event response that returns some_unit o.0
 
Level 24
Joined
May 9, 2007
Messages
3,563
I have an issue. . .

I am trying to make it so when the player cast the ability ensnare it creates a net that shoots forward and casts creates a dummy that casts ensnare on the entering unit. This does not work as I can not assign the variable. I have looked at your suggestions, but you can't remove events from triggers. . .

Thanks for the help. My triggers are below. Please ignore the leaks. They will be fixed.

  • Ensnare Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ensnare (aim)
    • Actions
      • Set TargetPoint[(Player number of (Owner of (Casting unit)))] = (Target point of ability being cast)
      • Set CasterPoint[(Player number of (Owner of (Casting unit)))] = (Position of (Casting unit))
      • Unit - Create 1 Net for (Owner of (Casting unit)) at CasterPoint[(Player number of (Owner of (Casting unit)))] facing Default building facing degrees
      • Set NetUnit[(Player number of (Owner of (Casting unit)))] = (Last created unit)
      • Trigger - Add to Comes in Range <gen> the event (Unit - A unit comes within 50.00 of (Last created unit))
      • Unit - Order (Last created unit) to Move To TargetPoint[(Player number of (Owner of (Casting unit)))]
  • Comes in Range
    • Events
    • Conditions
    • Actions
      • Set TempPoint[(Player number of (Owner of (Triggering unit)))] = (Position of (Triggering unit))
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at TempPoint[(Player number of (Owner of (Triggering unit)))] facing Default building facing degrees
      • Unit - Order (Last created unit) to Orc Raider - Ensnare (Random unit from (Units within 50.00 of TempPoint[(Player number of (Owner of (Triggering unit)))] matching ((Owner of (Triggering unit)) Not equal to (Owner of (Triggering unit)))))
What is the issue. Sorry if it is obvious I am sick, and tired right now (literally). Also if you know how would I remove my leaks from this trigger?
 
Status
Not open for further replies.
Top