HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Alternative Portal

01-11-2003, 07:54 PM#1
Exor
I made this Trigger for my Helm's Deep map and ther I had the Problem that if I use normal Portals for quick movement the enemys use them too so I made this trigger:
I want that if a Unit Group is ordered to follow a Teleporting Platform it will be moved to there not important where they are at the moment (otherwise pathing problem ).
But if already a unit is standing on the targeted platform you cant select the platform and they wont be moeved to there I solved the Problem.:

Event:
A Unit owned by player 1 is issued targeting an Object
..

Condition:
((Unit-type of (Target Unit of Issued Order)) Equal to <Teleporting Platform> or
(Unit type of((Random unit from ( Units within range of 90.00 of (Position of (Target Unit of Issued Order)) matching ((Unit type of (Matching Unit) equal to <teleporting Platform>) equal to <Teleporting Platform>.
Action:
Unit-Move (Triggering Unit) instantly to(Position of(Random unit from (Units within 90.00 of Position (Target unit issued order) matching unit type of (matching unit) equal to <Teleporting Platform>)
evt. specialeffect[s]

Hope this would be useful for someone
01-14-2003, 08:01 PM#2
Aka'lamanaia
or base the unit on way gate.
01-16-2003, 12:33 AM#3
Myster Mystery
Basing units off the waygate doesn't work, because it won't let you set the destination.
01-16-2003, 09:35 AM#4
Aka'lamanaia
well atleast by me it works:gsmile:
01-16-2003, 11:02 AM#5
Nogumari
PHP Code:
Event-Unit enters region

____________________________________________

Condition
-Unit(Type of entering (unit)) Equal to unit

_________________________________________________

Action
-Special Effect-Create Special effect at region
Action
-Move unit(instantly to (center of(region)) 

Hope this helps.
01-17-2003, 02:39 PM#6
Exor
Quote:
Event-Unit enters region

____________________________________________

Condition-Unit(Type of entering (unit)) Equal to unit

_________________________________________________

Action-Special Effect-Create Special effect at region
Action-Move unit(instantly to (center of(region))



:Heh:

I know there a lot solutions for this problem, my solution is a special solution, for specific use, like most triggers in this forum.
02-15-2003, 11:48 PM#7
Peppar
Actually, there is a way to set the waygate destination. You still need to do it in custom text, though. The function is:

call WaygateSetDestination(waygate, x, y)

If you don't know which X or Y you have, for example if you only have a position, then you can use the GetLocationX and GetLocationY on the position to make it simple:

call WaygateSetDestination(waygate, GetLocationX(position), GetLocationY(position))

You may want to change the variables waygate and position to whatever you need.

I hope this helps
02-16-2003, 12:13 AM#8
Peppar
Also, I do not know if the World Editor actually activates the new "waygate". You might want to add this line:

call WaygateActivate(waygate, true)