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 dahl

I'll post my skull entity in a sec, but when i place it in the welt and then run it, it falls right through the floor. I'm sorry if i've repeated a previous forum post, but i did not see anything about this particular issue. and Yes, i've placed solid tiles, from the media dir where the floor should be. i'm just running a simple test to see if the entity looked right.

ig.module(
	'game.entities.skull'
)
.requires(
	'impact.entity'
)
.defines(function(){

EntitySkull = ig.Entity.extend({
	
	size: {x:56, y:56},
	collides: ig.Entity.COLLIDES.FIXED,
	
	animSheet: new ig.AnimationSheet( 'media/skull.png', 56, 56 ),
	
	init: function( x, y, settings ) {
		this.parent( x, y, settings );
		
		this.addAnim( 'idle', 0.1, [0,1,2,3,4,5,6,7,8,1] );
		
		this.vel.x = 0;
		this.vel.y = 25;
	}
});

});

thanks for the help!

1 decade ago by Jerczu

Did you tick connect with collision layer? It happens if your collision layer don't reflect the main tile layer

1 decade ago by dahl

Yes sir. I even tried different tilesets, still falling through. It almost looks like the entity layer is on top of the the other layers, b/c the entity just falls right over the top of it. shrugs idk. i'll keep pluggin at it. thanks for trying though.

1 decade ago by fugufish

if it falls, the collision layer is set wrongly. Feel free to package the code for us to see, of use pastebin.com

1 decade ago by dahl

yep, got it all fixed up now. lol i'm not even gonna say what it was. but thanks for your help!

1 decade ago by Kxen

Why not say what it was? I'm kind of tired of people who think this is their own support forum. Share the solutions please!

1 decade ago by Jerczu

@Kxen - I would think it was something trivial not something that dahl wouldnt share - And I bet it was the collision layer not set properly or sized. There is no other explanation to the error.

1 decade ago by dahl

@Kxen, it was a rather dumb little error, lol. i had clicked the "link with collision" ON the collision layer, instead of the main layer. but it all worked out. i'd post what i did if it were not something n00bish like that. :)

thanks for the help guys. that's what i get for trying to code at 3am.
Page 1 of 1
« first « previous next › last »