Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: fidodido on Wed 23/07/2003 19:55:27

Title: How to check in which walkable area the character is standing?
Post by: fidodido on Wed 23/07/2003 19:55:27
Is there a function like GetCharacterWalkablearea(EGO) or something like that?

I want that an action will occur if my character is standing in walkable area number 2, for example. How can I do that?
Title: Re:How to check in which walkable area the character is standing?
Post by: TheMagician on Wed 23/07/2003 22:07:24
Read the manual !

It says:

GetWalkableAreaAt (int x, int y)

Returns the number of the walkable area at ....

your x and y yould be

character[EGO].x and character[EGO].y

so your script should be

if (GetWalkableAreaAt (character[EGO].x,character[EGO].y) == 2) {
 blabla
 }
Title: Re:How to check in which walkable area the character is standing?
Post by: fidodido on Wed 23/07/2003 22:17:37
Thank you.

I read the manual like 78 times, but I never saw it there...