FIFE forums

General Category => Game creators corner => Topic started by: marcello on August 29, 2012, 05:47:23 pm

Title: Instant moving to given coordinates on map and cell properties
Post by: marcello on August 29, 2012, 05:47:23 pm
I'm developing a simple demo using the fife engine and I stumbled
upon an issue I seem to be unable to address. I want to move an
object from its current location to some other cell on the map
given by random generated coords. So far so good, I can warp it
to an arbitrary position but I also want to avoid the object from
falling into a given subset of the cells depending on "static"
and "dynamic" constraints
(e.g. water and currently displayed portion of the map). I had a
look at the "walkable" property of the layers to avoid the object
from falling on some pre-defined parts of the map but I'm unable
to reach it in my Python code. I also tried to use methods from
the CellGrid class (like isAccessible) to determine if there is a
path between starting position and where I want to warp the
object (to avoid my character from falling into unreachable
zones) but I failed to do so.

Could you please point me towards some useful direction?

Thanks in advance,