Hi there, long time no post in here, but i'm having some problems, I need to run an IF statement asking if the player character is on walkable area 1 or 2 and depending on what walkable area the character is on depends on which object shows up, 1 or 0.
Object One should appear if the character is on area 1
Object Zero should appear if the character is on area 2
any help here?
If I remember right, there is a function like GetWalkableAreaAt... but I'm not sure. Anyhow, to get the player's position, use
character[GetPlayerCharacter()].x
character[GetPlayerCharacter()].y
global vars.
yes but doesnt that just find out the x and y co-ordinates? I need the whole of the walkable area
could you use regions instead, you can copy the walkable areas straight into regions in the editor (there's a button you click on [note: if you already have regions on this screen it will wipe them]).
then choose player walks onto region, and set the objects in the script there.
nm i sorted it, it was simple when i thought about it i just had to get the character location and match it with a walkable area, but I don't need it any more i just have to wait for some character art/animation before I can continue
in repeatedlyexecute:
int walkArea = GetWalkableAreaAt(character[EGO].x, character[EGO].y);
ObjectOff(0);
ObjectOn(1);
if (walkArea == 1) ObjectOn(1);
else
if (walkArea == 2) ObjectOn(0);
[EDIT] Didn't see that last post...