How do I put the animation on a single point

Get help using Construct 2

Post » Sun Feb 07, 2016 9:30 am

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?
B
3
Posts: 7
Reputation: 189

Post » Sun Feb 07, 2016 9:34 am

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
B
29
S
13
G
10
Posts: 355
Reputation: 8,312

Post » Mon Feb 08, 2016 4:34 pm

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..
B
3
Posts: 7
Reputation: 189

Post » Mon Feb 08, 2016 4:41 pm

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.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
51
S
14
G
8
Posts: 593
Reputation: 8,558

Post » Tue Feb 09, 2016 2:56 pm

i get what your saying but i dont know the proper conditions.
B
3
Posts: 7
Reputation: 189

Post » Tue Feb 09, 2016 4:21 pm

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.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
51
S
14
G
8
Posts: 593
Reputation: 8,558

Post » Wed Feb 10, 2016 5:11 pm

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

Image

please note that i added the global variable as well..
B
3
Posts: 7
Reputation: 189

Post » Thu Feb 11, 2016 3:18 am

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?
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
51
S
14
G
8
Posts: 593
Reputation: 8,558

Post » Mon Feb 15, 2016 6:08 am

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..
B
3
Posts: 7
Reputation: 189


Return to How do I....?

Who is online

Users browsing this forum: MAVERICK, tarek2 and 5 guests