| 01-16-2003, 05:13 PM | #1 |
I am trying to change the spell to make it able to teleport friendly allied units as well as the player controlled units. I look in the properties using Excel and I find: TARGS air,ground,self,vuln,invu I changed it to this: TARGS air,ground,friend,self,vuln,invu But it still doesn't teleport allied units. Anyone tackled this problem? Hakujin |
| 01-17-2003, 01:07 AM | #2 |
well... it may not be able to be done or mabey "friend" poatition or somthing can be changed, ive made many spells but well im not sure... |
| 01-17-2003, 05:57 AM | #3 |
some spell targets are hard coded, raise dead for example, Mass Tele may be as well, if so, just teleport other allied units w/ triggers.. if u need to know how to do this let me know.. =o |
| 01-17-2003, 09:22 AM | #4 |
Actually trigger assistance would be very helpful. I have successfully changed Mass Teleport into a 3 level spell. My goal is: Level 1: teleports 1 unit (+ caster) [randomly chosen] Level 2: teleports 2 units (+ caster) [randomly chosen] Level 3: teleports 5 units (+ caster) [randomly chosen] This works for units under the same player's control. But as I am making a small team (4 players) based game, I need to be able to teleport small numbers of ALLIED heroes. Any help would be appreciated! Hakujin |
| 01-17-2003, 07:38 PM | #5 |
heres the steps you need to do: 1) determine when mass tele is cast 2) determine if it was sucessful (teleporting unit is alive, caster is alive, caster is not stunned, caster is not issued a new canceling order) 3) select X # of units based on skill level and move instantly to new location 4) create special effects how to do: create new trigger: events: unit owned by player 1 is issued an order targeting an object unit owned by player 2 is issued an order targeting an object unit owned by player 3 is issued an order targeting an object unit owned by player 4 is issued an order targeting an object conditions: issued order = order(massteleport) (i think this is the correct order but check 2 b sure) actions: Trigger - turn off this trigger set variable teleportCaster[Player Number of (Owner of (Ordered unit))] = Ordered Unit set variable teleportTarget[Player Number of (Owner of (Ordered unit))] = Target Unit of Issued Order set variable teleportCancel[Player Number of (Owner of (Ordered unit))] = False set variable X = teleportQuantity (# of units to be teleported) set variable teleportSource = Position of (ordered unit) (this is a point variable) Trigger turn on Teleport Cancel Trigger turn on this trigger wait (duration of mass teleport) (may need tweaking) if(teleportTarget is Dead equal to true) then Skip Remaining Actions else Do Nothing if(teleportCancel = True) then do Do Nothing else Trigger Run Teleport Go new trigger: Teleport Go Events: none Conditions: X is greater than or equal to 1 Actions: Set variable X = X - 1 Pick random unit from Units within (Area of mass teleport of (teleportSource)) matching condition (Owner of (Matching unit) is an ally of Owner of (Ordered Unit)) and do set variable teleportingUnit = picked unit (im sure if this is totally correct but you get the idea) Create Special effect at position of teleportingUnit (mass teleport target i believe, check the war3.mpq) set variable teleportSEffectsSource[X] = Last Created Special effect Unit - move unit instantly to random point within 500 of teleportTarget Create Special Effect at position of teleportingUnit (mass teleport target again) set variable teleportSEffectsDestination[X] = Last created special effect Trigger run Teleport Off checking conditions trigger run this trigger checking conditions Edited because: new trigger: Teleport Off Events: none Conditions: X is equal to 0 Actions: for each integer a from 1 to teleportQuantity do destroy special effect teleportSEffectsSource[Integer A] for each integer a from 1 to teleportQuantity do destroy special effect teleportSEffectsDestination[Integer A] new trigger: Teleport Levelup Events: Unit owned by player 1 learns a skill .. same for players 2 3 and 4 Conditions: learned skill equal to mass teleport Actions: if (Learned skill level = 1) then do set variable teleportQuantitiy = 1) else nothing if (Learned skill level = 2) then do set variable teleportQuantitiy = 2) else nothing if (Learned skill level = 3) then do set variable teleportQuantitiy = 5) else nothing . you may want to verify that this works at this point. next you need to make a trigger that will set teleportCancel to true if the spell is canceled. new trigger: Teleport Cancel (initially off) Events: Unit owned by player 1 is issued an order targeting a point Unit owned by player 1 is issued an order targeting an object Unit owned by player 1 is issued an order with no target Unit owned by player 1 dies ... (similar for players 2 3 and 4) Conditions: none Events: If ((last fired event) equal to (player owned unit dies) then do (if (dying unit) equal to teleportCaster[Player Number of (Owner of (Dying unit)) then do Do Nothing else Skip remaining actions) else do (if Ordered Unit equal to teleportCaster[Player Number of (Owner of (Ordered Unit)) then Do Nothing else Skip remaining actions) Set variable teleportCancel = True Trigger - turn off this trigger (i dont know how to detect if the unit was stunned... IE storm bolt, war stomp, etc. so that may be an issue for you.) OTher than that this should work for you.. I recently had done a lot of trigger aided spells and this is the general form i use. |
