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 Elliott

I have an enity which I'm trying to set the image size of the size set in Weltmeister I have tried the following :

animSheet: new ig.AnimationSheet('media/lava.png', x, y)

But this doesn't work as x/y isn't yet declared, I can view the x,y values in the init function as these are passed along :

init: function(x, y, settings)

Is it possible to set the animation size to the size set in Weltmeister?

I'm sure its pretty simple but I'm a n00b to this, thanks =D

1 decade ago by pm99

@Elliott,
I'm no coding pro but aren't the 'x and y' variables simply for you to set the size of the image? i.e. using Dom's 8x8 px crates, if you set the x,y to say 16,16 in above line, you will get a larger entity with the 8x8 crate image within.

So if you, say want a larger object just make them larger in the animsheet image (in my example above... 16x16) then set it to 16x16 as above and you'd see a 16x16 object.

.. if I understand you correct.

1 decade ago by Arantor

You can't do that, even if you could, you'd hit the next limitation which is that animations do not tile to entity size.

What you need to do is what Biolab Disaster does, create animation tiles for the water/lava/goo and set that animation up separately and just have an invisible entity to handle collisioin and damage to player, as should be documented in the Weltmeister video.
Page 1 of 1
« first « previous next › last »