0 Favourites

How do I

  • (Sorry for my bad english, I'm from france)

    Hello everyone, You know the teamplate : physics catapult when you click on new project in construct 2. Im making a game similar of this and I don t know how to make the pig respawn after the shot. I know its maybe not realy difficult but im a beginner and its been 4 hours im thinking how to do that, i tried everything. i realy need answer, thank you very much.

  • This will restart the game when the pig isent moving anymore.

    OR do you want just another pig to fire but the level shouldent be reset?

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Ok thank a lot its what i was looking for but can you learn me how to fire immediatly another pig after the end of the click? And no the level will not be reset.

  • immediatly after the first pig so the first pig is still flying?

  • Hmm thats tricky because the camera is set to follow the pig.

    SO you cant see the catapult after shooting the pig.

    But if you focus the camera on the catapult you cant see the pig flying anymore.

  • ho yes i forgot to say that in my game there no scroll to the pig and the map is bigger and we can see the pig flying.

    edit: you know how to do that ?

  • Sure but if your game is different to the template i need to consider this.

  • how do i send a screen shot like you did ?

  • i used the windows snipping tool to make a screenshot.

    Then you need to upload the image somewhere and put the link in the forum.

  • 1 system isaiming = 1 pig set position to catapult block ( image point 0)

    system scroll to catapult block

    2 touch is in touch pig set angle to angle ( touch.X, touch.Y, catapultblock.X, catapultblock.Y) degrees

    pig move min(distance( touch.X, touch.Y, catapultblock.X, catapultblock.Y / 3,45) pixels at angle self angle+180

    3 touch on any touch end system set is aiming = 0

    i delet the behavior physics on the pig and add bullet

    Voila, now i want to know how to after the first fire make spawn another pig and be able to fire immediatly after

  • 1 system isaiming = 1 pig set position to catapult block ( image point 0)

    system scroll to catapult block

    2 touch is in touch pig set angle to angle ( touch.X, touch.Y, catapultblock.X, catapultblock.Y) degrees

    pig move min(distance( touch.X, touch.Y, catapultblock.X, catapultblock.Y / 3,45) pixels at angle self angle+180

    3 touch on any touch end system set is aiming = 0

    i delet the behavior physics on the pig and add bullet

    Voila, now i want to know how to after the first fire make spawn another pig and be able to fire immediatly after

    edit: sorry for double post

  • If you want to have more than one pig you need to be able to tell the system which pig is actualy flying and which is at the catapult.

    You will need to reset the "isaiming" to 1 after the shoot but without affecting the first pig.

    Than you can just spawn a new pig at the catapultsblock position.

  • ok how i reset the isaimin 1 without afffecting the first pig? i did :

    system is aiming = 0 system reset global variable to 0

    on any touch end catapult block spawn pig

    but i think the system is aiming to 0 and then immediatly to 1 and the pig im firing can t fly, i don t know how to don t affect the pig who is supposed to be fired.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)