nkholski Posted August 15, 2014 Share Posted August 15, 2014 Hi! I've been testing Phaser out for a couple of weeks and love it. I found answers to all my questions by lurking around here, the docs or in the tutorials but one. I'm loading enemies from an object layer of a map made with Tiled, which works great. However I'm not sure if its possible to import properties set in Tiled on each object. Example:this.enemyPool contains the result from createFromObjects. In tiled I've added a custom property, "initVelocity". When I access an object in the pool, enemy, I would like the velocity property imported to something like enemy.properties.initVelocity. I have a event-triggering object layer where I managed to access properties per object so if there is no built-in-solution I might just write a function (createFromObjectsProp) myself and share it. thanks,Niklas Link to comment Share on other sites More sharing options...
lewster32 Posted August 15, 2014 Share Posted August 15, 2014 I think a similar post was just discussed about this topic: http://www.html5gamedevs.com/topic/8415-tiled-tile-properties/ Link to comment Share on other sites More sharing options...
nkholski Posted August 15, 2014 Author Share Posted August 15, 2014 Thanks, but that thread is about properties set to tiles, not objects with properties. However, I "solved" it. When creating sprites objects with createFromObjects the properties will be added directly to the objects. In my example it would be enemy.initVelocity. Embarrassing. Don't know how I could miss it. valueerror 1 Link to comment Share on other sites More sharing options...
Recommended Posts