How to check if a location exists via an expression? [Solved]

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.
Post Reply
User avatar
DazaKiwi
Posts: 847
Joined: Thu Oct 21, 2010 10:05 am
Points: 71
Location: New Zealand

How to check if a location exists via an expression? [Solved]

Post by DazaKiwi »

How do you write an expression to check if a location exists in a given direction?

This is what i have tried so far, below, but it doesn't work. I do not wish to use a restriction. This is to display next to choices in a task output to tell player whether or not they can flee in a given direction.

Code: Select all

<#if(%Player%.Location.LocationTo(East)=0,"Not Available","Route Available")#>
I see in restrictions it is a possibility to check if an location 'exists'. So i was thinking this could be what i could use in the expression form, but do not know how.

I figured it out.

Code: Select all

<#if(%Player%.Location.LocationTo(South).Name="nothing","Not Available","Route Available")#>
Post Reply