|
Post by weaksauce on May 3, 2017 21:05:28 GMT
We emailed you a couple of weeks ago about creating an endless runner style game, we have just bought wattage and will let you know how we get on.
How are you getting on with the demo?
Thanks
|
|
|
Post by Admin on May 9, 2017 5:25:23 GMT
|
|
|
Post by weaksauce on Jul 5, 2017 18:22:46 GMT
Hello Paul, did you see our email we sent a couple of days ago?
-------------------
We have successfully used your wattage engine to generate tile and entity layers and add entities using the entityLayer.addNonResourceEntity(displayObject) functionality.
However, when trying to use the region manager with the returned id from the addNonResourceEntity(), with any of its functions, such as:
regionManager.centerEntityOnTile(layerId, entityId, 1, 1)
or
local x, y = regionManager.getEntityLocation(layerId, entityId)
we get the following error:
ERROR: Runtime error
?:0: attempt to index field '?' (a nil value)
stack traceback:
?: in function 'centerEntityOnTile'
It does run correctly if using entityLayer.addEntity(index), but we need to pass in a display object.
Do you know if the region manager is currently setup to work with entityLayer.addNonResourceEntity() ?
If so, I wonder if there is anyway we can determine why it crashes this way.
Any hep appreciated
Thanks
|
|
|
Post by Admin on Jul 12, 2017 2:50:29 GMT
Yes, you are correct that the RegionManager was not set up to handle non-resource entities, however there is no reason not to allow it to handle them. So the following functions have been added to RegionManager to allow the use of non-resource entities: centerNonResourceEntityOnTile() getNonResourceEntityLocation() setNonResourceEntityLocation() Please see the docs for more details: paulwatt526.github.io/wattageTileEngineDocs/regionManager/type_regionManager.html
|
|