Fake Exits

ADRIFT 5 Help ›› Creating Games ›› Tutorials ›› Beginner ››
Parent Previous Next

Fake Exits

You might sometimes want to display an exit on the map that doesn't really go anywhere, giving the impression that the player can go that way, but providing some reason as to why not.

The way to do this in ADRIFT is to create a "fake" exit, then override the player movement task.

Look for the BlockExits.taf file in the Samples folder for an example you can load up.

To create a fake exit, simply create a link back to the same location.  You can either do this from the Location Editor, or directly on the map.  If adding the link on the map, you must select any anchor on the location other than the one the exit is coming from.

This will now display an exit from the location that goes nowhere:

In reality, if you leave it like that, if you go East from Start it will take you back to Start.  This is fine if that is the behaviour you want (it can be useful for creating infinite areas like an endless forest etc), but normally you would want to override this.

To do this, create a new Specific Task and select the Player Movement from the task dropdown, keeping override selected in the first dropdown.

In the Direction reference, select East, i.e. the direction you want to block.

Ensure that you have selected the Task is Repeatable checkbox, so the movement task is overridden every time.

As it stands, this would now block every movement East in the whole game, so we need to add a restriction to specify that the player is at the location we want to restrict the movement from.

The output text from this restriction should be left blank, otherwise it would override the default player movement task.