Friday, November 21, 2014

Spriter Objects as NPC's in Construct 2

After some quick help from the creator of Spriter, my Construct 2 Origin point problem was fixed.  Turns out my problem was because Spriter kind of works backwards when it comes to Containers.  My idea was to spawn a box to use as the base.  I would put all of my behaviors and actions on that.  Then, I would add the Spriter object to that container.  You control the box and the Spriter Object reacts.  Well, it wouldn't let me add the Spriter Object to the container.  

So Lucid on the blog explained that the Spriter Object is already a Container.  So you add the box to it.  Once the box is added, you place an event for the Spriter Object to set its position to the box.  After that, just pin it to the box.  

I set up an event where pressing W will spawn one.  I kept shooting them out and my frame rate only went from 60 to 59.  That's pretty impressive.  

Next up: Trying to figure out how to randomize cloths and changing color.  Hopefully I can try that this weekend.


No comments:

Post a Comment