How do I put the animation on a single point

0 favourites
  • 9 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • im trying to make a game and i just added the running animation for the PC but when i run it the animation was moving around not in place it as if the frames are in different positions how can I put the animation on one spot?

  • issue is your frames are not set the same.

    check image point in each frame also check that the image is the same height - width

  • ok thx ill try that by the way does anyone know hot to limit enemy spawn for bosses to 1 and after there defeated they wont spawn any more i made a boss that would spawn once but would spawn again once defeated..

  • You just have to make him stay dead.

    You will need to remind the game that he is dead whenever it thinks he needs to be active. A global variable boss1Dead=1 (or boolean if you like) and start it at boss1Dead=0 then set it to 1 whenever he dies, then you just have to add the condition boss1Dead=0 into the conditions for his spawn.

  • i get what your saying but i dont know the proper conditions.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Make a global variable by right clicking canvas in event sheet and creating one. Name it BossOneDead and set its initial value to 0.

    Now wherever you create the boss right click in the left side boxes (not the actions, the conditions.. like On level start, etc) and choose add new condition and use system (gear) and select Compare global variable. Set it to BossOneDead=0. Now that event will not fire unless BossOneDead is equal to 0.

    Now go to where you destroy the boss after player kills him. Add the action Set global variable BossOneDead=1 right above the destroy action.

    Now once the player kills the boss he will stay dead.

  • i did what you said but it didn't work i think did something wrong..

    please note that i added the global variable as well..

  • As your code currently reads.. you may destroy the spite15 every time the layout starts and when his health is 0 or less but as long as the score value is over 20 he will respawn.

    Assuming you initialized BossIsDead to 0 when you made it.. otherwise add an action to On start of layout that sets value of BossIsDead to 0;

    You need to either add the condition BossIsDead=0 to the Create object Sprite15 on score over 20 event.

    OR you could add BossIsDead DOESNOT equal 1 condition to Sprite15 spawn event by creating a condition that says it DOES equal but then right click the condition and choose the red X to invert it to mean NOT.

    You will also need to move the System Add 1 to BossIsDead action to ABOVE the destroy action so he doesn't pop in for a split second before the variable stops him spawning.

    You add more conditions to events by right clicking the small area behind the current condition and choosing Add another condition... you can make many conditions inside a single event.

    Also not sure what the last System BossOneDead=0 is doing.. nothing at this point.... clear as mud?

  • Sorry for the late reply ill try the method you said but just tobmake sure can make your instructions a bit more clearer sorry im such a noob at this..

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