Yeah, thats the "z".
Fixed. It doesn't give errors anymore. <img src="smileys/smiley1.gif" border="0" align="middle" />
Add action:wander into grid_move behavior.
Wander range could be assigned in properties table or by actions.
Also please update board, squareTx, hexTx plugin.
Grid move behavior:
Add "condition:On colliding begin" to get collided target.
For example, chess A try to move to left grid, and there is a chess B at it's left side. Then this moving will trigger "On colliding begin with chess B".
Because that "chess B" might be the same kind sprite with "chess A", I use instance group plugin to save the uid of collided chess B. User could pick instances of collided chess B by instance group object.
Here is an example -- push box.
And it's capx
Also, please update board, squareTx, hexTx plugins.
nice new example... looks a bit like Sokoban :)
Thanks, the motivation of adding this feature is to create a "talking" event between two characters (chess).
Add expression:PXY2LX, PXY2LY in Board plugin, These could get logic X or logic Y from physical x and physical y. For example, get logic X and logic Y from current cursor position. Return (-1) if position is not in the board.
Also please update SquareTx and HexTx plugins
Thanks a lot, this is awesome. Working perfectly !
I'm looking for the grid movement used in your Wander example , how did u do that ?
I mean how did u do the "On key Up down, move up" and not hit the key Up for moving one tile by one tile ... ?
Maybe be, it would be better to give the same capx used for the example ?
Thanks again !
Develop games in your browser. Powerful, performant & highly capable.
An adventure game demo
This is a more complete demo with grid move by keyboard and wander for npc.
Oh thank you, didn't notice this thread !
It need to install many plugins. <img src="smileys/smiley36.gif" border="0" align="middle" />
[Plugin] Board, SquareTx, HexTx
Add "expression:Get neighbor UID by UID and direction".
Here is a demo for swapping two neighbor chess.
I'm having some problems when the NPCs are wandering, they happen to step on the tiles that are supossed to have rigid behavior (I know the tiles work fine beacause my player collides with them) and on you Adventre capx example, I can't find anything else about this :/
The collision and moving are handled by grid move behavior in this case.
User could put solid behavior at tiles or chess, the grid move behavior will check them automatically.
Or you need to check collision by yourself, you could get the UID of target tile by "board expression:LXYZ2UID". Then get tile instance with this UID.