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

Turning units into waygates?

Status
Not open for further replies.
Level 1
Joined
Feb 18, 2004
Messages
4
Im trying to create a chat command (for an RP map) that gives a unit (a building) the functionality of a waygate.

I tried this first:

Trigger 1:
Code:
Events:
Player - Player 1 (Red) types a chat message containing 'waygate as An exact match
Conditions:
NONE
Actions: 
Set tempGroup = (Units currently selected by (Triggering player))
Unit Group - Pick every unit in tempGroup and do (Actions)
    Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Picked unit)) Not equal to Spawner
                (Owner of (Picked unit)) Equal to (Triggering player)
            Then - Actions
                Unit - Add waygate set  to (Picked unit)
                Unit - Add Waygate ability to (Picked unit)
            Else - Actions
Custom script:   call DestroyGroup( udg_tempGroup )

(im eventually gonna convert it to JASS and use locals... but for testing im being lazy.) the waygate set ability is a custom ability based off sentry ward (massive range, no mana cost, ext)

Trigger 2:
Code:
Events:
Unit - A unit Finishes casting an ability
Conditions
    (Ability being cast) Equal to waygate set 
Actions
    Neutral Building - Set (Casting unit) destination to (Target point of ability being cast)

Now, why the heck wont this work? i see nothing wrong with it. (unless its something stupid, like only the "Waygate" unti can use the waygate ability.... knowing blizzard, this is a possibility :-/) if you would like a more clear description of the subject which i need help on, then please just ask. thank you for your time.
 
Status
Not open for further replies.
Top