onTileRollover

Post here your questions about the OpenSpace 1.x or notify bugs and suggestions.

Moderators: Lapo, Bax

Post Reply
lilshtz
Posts: 17
Joined: 16 Dec 2008, 15:32

onTileRollover

Post by lilshtz »

I have a problem that seems very basic.....

Here is what I want to happen:
* rollover a tile
* have a skin on that tile change states and visually show something onRollOver
* click on that tile
* have the npc walk to the tile.

issues:
* the npc can navigate to the tile when walkable, but the onRollOver states of the skin do not function (because of the openspace 'sensor' placed on walkable tiles)
* when setting the tile's parameter, skinsOnTop to 1, the rollOver states work, but the TILE_SELECTED event is not fired, thus no walking to the tile (because the 'sensor' is being obscured by the skinsOnTop parameter)
[NOTE: isWalkable is still set to true]

This seems like basically functionality many users would want to put in their game, so I am inclined to think that I am simply overlooking a setting in openspace.

Any ideas on how to accomplish this task?

Thanks.
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

This is a problem related with the Flash behavior. When two movieclips are one on top of the other, in this case the mouse sensor and the skin, the mouse events are caught by the top movieclip. You can't assign a click event to one of the the two, and the rollover event to the other one.
The TILE_ROLLOVER event is not available in OpenSpace, because it would be too impacting on performance, so I don't see a way to do what you need.

The only option you have is to change the skin on tile selection, not on tile rollover.
Paolo Bax
The SmartFoxServer Team
Post Reply