Warcraft III resources & community, 2003–2006 · archived

Turning units into waygates?

3 posts
#1

Turning units into waygates?

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:
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:
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.
#2
To set-up waygates, you need regions. Generally they should be defined in the map, not dynamicly, but I've never tried to do what you are after.

It may be best to trigger a waygate effect for yourself, rather than use the abilities.
#3
actually, i figured it out. i feel like an idiot now.

gotta enable the waygate after setting the destination. Works just fine ingame :) now to spend 5 min makeing it leak-proof....