Creating A Teleport That Will Only Work If The Trigger Player Has The Key

Posted by: Tylertoo (07-06-2002) on the AOW2 Scenario Forum

What the script does: Effectively creates a teleporter that will only work if player has the right “key.”

Create two teleporters. Do NOT specify matching coordinates to link the two. You end up with two seemingly dead teleporters. The “enter” button is greyed out.

Then, create a trigger to link one to the other only when hero/unit has, say, the Evil Eye potion.

Trigger type: Teleport

Activate: Always
FromXYL: coordinates of first teleporter
ToXYL: coordinates of second teleporter
Trigger player: (triggerplayer)

Trigger event: Enter Area
XYL: coordinates of first teleporter
Radius: 1
Stopmovement: false

Trigger Conditions: AND Item Owned
Type of condition: Item Owned
and their settings: specify item # (in this case, Evil Eye is 98)

Additional notes: By not specifying coordinates for the teleporters themselves, they are useless without the key. When a stack enters the teleporter, the script checks for the item. If its there, stack is transported to second teleporter.

Keep in mind the second teleporter needs its own script, with coordinates reversed, if you want stack to be able to go back. Just cut and paste the first script and then change the figures.

Back to Event Scripting Resource Database Menu

Back to Scenario Design Main Menu