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 ansimuz

I am trying to figure out a logic to make an entity to jump and just before starts falling shoots.


Pseudocode
if(this.shootTimer.delta() > 0 ){
  ig.game.spawnEntity(EntityStone, this.pos.x, this.pos.y,{flip:this.flip});
   this.shootTimer.reset();
   shootflag = true;
}

Hope you can help me i tried checking the velocity and not luck.

1 decade ago by Nico

Maybe it has something weird to do with the EntityStone collision box? Try offsetting where the stone spawns to see if it was physically pushing the player up.

Otherwise I don't know :/

1 decade ago by quidmonkey

Try it this way:
if (!this.standing && this.vel.y > 0) {
   // shoot
}
Page 1 of 1
« first « previous next › last »