[SOLVED] Problem with a walkable area

Started by Cassiebsg, Sun 03/08/2014 20:46:07

Previous topic - Next topic

Cassiebsg

Hey again...

Sorry if this is an obvious one, but I'm a bit lost on this one, can't even figure out what is it that may be causing this problem. :(

This is the room (for now):


I have two walkable areas on this room, the big platform to the left (1) and the little ledge (2) right bellow the wood thingy... I also have these same walkables areas defined as regions.

For some odd reason, that seems beyond me, my character "seems" to only walk around the edges of the walkable area 1. I've managed to make him cross in the middle of it, so the walkable area seems to be set correct! But seems like any click with the walk cursor inside the walkable area results in nothing. Only clicking outside of it, makes the character walk. Dropping the backpack on it, results that he usually walks to the edge of the platform, and then walks "about" to where I clicked... :/

Only functions I've coded on this room are:
function hWood_UseInv()
function hPlatform_Talk()
function hPlatform_Look()
+ two booleans.

Any ideas?
There are those who believe that life here began out there...

Slasher

Could be something stopping the process click for walkable area 1.

You say you also have regions over the walkable areas.

Show us the region events and draw the walkable area so we can seen.

Meanwhile someone may know exactly what's going on.




Cassiebsg

Hey.


Regions are a copy of the walkable area. And Hotspot 1 is also the same as walkable area+region... Sorry, forgot about that one.

There are no events for the region, I'm only using it to determine where the player is in with an if condition... maybe that's what's wrong?

Code: ags

...
if (Region.GetAtRoomXY(player.x, player.y) == region[1])
...
else if (Region.GetAtRoomXY(player.x, player.y) == region[2])
...


I would rather not post the entire code if I can avoid it, as it may ruin the puzzle...

Ps - I've just removed those functions where I use the if conditions and it still not walking right. :/ So it's not that...
There are those who believe that life here began out there...

AnasAbdin

Not a solution rather than a suggestion to know what's causing the problem :-\

Could you disable the regions and/or and hotspots over walkable area and try walking around?

Cassiebsg

Problem solved...
I created a new room, loaded the BG, created a Walkable area, test, all good. New walkable area, test, all good. Copied the regions, test, all good. Created the 2 hotspots, test, all good... copied 1 by 1 all the functions, all good... Now this was mystics! Now they were identical, one was having this weird problem, the other one not... so... only one place left to look! The properties!

Apparently there's this little option there named "WalkToPoint"... and the xy was set to the edge of the platform. No wonder he kept going to the edge!

Now the big question is: why did I do that a few month backs when I coded part of this room? :D
There are those who believe that life here began out there...

Slasher

It looks like it was a Hotspot problem then?

Setting the "WalkToPoint" in the Hotspot options to 0,0 will disable automatically walking to a Hotspot.

SMF spam blocked by CleanTalk