| 10-22-2005, 08:34 AM | #1 |
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 :-/) |
| 10-22-2005, 03:51 PM | #2 |
Add debug statements to your triggers to see if all the unit variables are what you think they should be, if the ward ability trigger is firing, where the ward is place (map ping is handy), etc. |
| 10-22-2005, 11:14 PM | #3 |
I HAVE IT! and im an idiot for missing it! gotta "enable waygate" units you give the waygate ability to. i feel like an IDIOT for missing something THAT SIMPLE! >< |
