how i can track character movement on ISO terain
UnitSeven

Sorry for bad englsih

First of all where i can find event list? I'll tryed to look in online editor and wondering full it is or not.

I saw onDestinationReached well i can use this... BUT maybe there is something like onPathNode but for iso terain...

For example i want event to know when Object is mowing to another tile on his autopath or even with wandering function...

Thank you for your time

All 3 Comments
foxcode

Hi UnitSeven

I'm afraid we don't have a complete event list, though it is something we should probably add. If you want to see all the events a scene object listens to by default you can look at the list of functions for the object in the editor. This does not include events that behaviors create however I don't think you need this in your case.

Both the IsoCharacter behaviour and the scene object have an onMoveComplete event. You dont want to modify the behaviours onMoveComplete, but you can do what you want with the scene objects onMoveComplete handler. That would fire every time your character changed direction while heading to his destination.

If you are looking for something that triggers every time the characters cell changes, I don't think we have an event for that. If you really need to know that, you could check the IsoObject's gridCoords property every frame and monitor for changes, though it would not be very efficient. I think we may add an event for tile changes in the near future.

UnitSeven

Thank you for reply and time you spend...

I think i'm stick with onMoveComplete for now... couse i'm not verry got witch programing :D

well.. i think event onTileChange vould be nice :) and it's not hard to make (i think),,,

Hope to see it somewhere in future :)

foxcode

Hello again UnitSeven

We have just released an update for wade that includes the event you need :)


You should now be able to select your isometric object and go to the functions tab. In the drop down list of functions, you should now be able to see a function called onIsoTileChange

This function is triggered every time the object enters a different cell, even if it's just passing through and not stopping. This event handler recieves a data object that contains 2 properties, previousTile and currentTile

I suggest you console log the data value inside the handler to see what it contains but the important bit is both previousTile and currentTile have an x and z value which represents the tile co-ordinates.

 

Hopefully this makes your task easier. If you have any questions please respond to this post :)

 

Post a reply
Add Attachment
Submit Reply
Login to Reply