Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by Getimoliver

I have a chest entity. I would like to set the item in the chest with Weltmeister entity properties, like so:

/><br />
<br />
However, when I try to access the "item" property, I see that it is undefined.<br />
<br />
<pre class= EntityLoot = ig.Entity.extend({ animSheet:new ig.AnimationSheet('media/loot.png', 16, 16), init:function (x, y, settings) { console.log("Item: " + settings.item); switch (settings.item) { ... }} });
Is there a trick to accessing entity properties defined in Weltmeister?

1 decade ago by Joncom

You should almost always have this as your first line in the init function:
this.parent(x, y, settings);

Anyway, after that see what happens if instead of using settings.item, you use this.item...
Page 1 of 1
« first « previous next › last »