animation bug?

Get help using Construct 2

Post » Sat Sep 23, 2017 4:31 pm

thanks guys. also, i have blood spatter upon death of enemy but how do i keep the spatter in the same place instead of it just happening when an enemy dies
B
7
S
2
Posts: 105
Reputation: 889

Post » Sat Sep 23, 2017 4:40 pm

WOW just looking at the event sheet for the switch between guns is making my head spin. their has to be a " beginners" guide to this?
B
7
S
2
Posts: 105
Reputation: 889

Post » Sat Sep 23, 2017 5:08 pm

WOW just looking at the event sheet for the switch between guns is making my head spin. their has to be a " beginners" guide to this?


Yeah, it's a bit tricky because we are picking different gun objects there. Read some tutorials on objects, instances and picking, for example "Picking/selecting instance(s)" section in the FAQ. Understanding what instances are and how they are picked is probably the most important thing in C2.

Here is what happens in that event:
Imagine player is holding Automatic rifle and finds Shotgun.
1. On Player collision with Shotgun - the system picks Shotgun instance of Gun sprite. We save Shotgun's UID (unique number of this instance of Gun).
2. Then we pick all guns on the layout and unpin them all from the player. We actually need to pick and unpin only the Automatic gun player is still holding, but it's easier to just pick all guns and unpin them all.
3. Then we pick the new gun - Shotgun by its UID (which we saved earlier). And pin it to the player.

note: the word to pick I used here means to select instance(s) in C2, not "to take it off the ground" :)
Check out my awesome game Doptrix
B
17
S
9
G
51
Posts: 839
Reputation: 28,487

Post » Sun Sep 24, 2017 8:19 am

thanks guys. also, i have blood spatter upon death of enemy but how do i keep the spatter in the same place instead of it just happening when an enemy dies
B
7
S
2
Posts: 105
Reputation: 889

Post » Sun Sep 24, 2017 10:37 am

What do you mean?

Your blood splatter is in the "explosion" object, you move it to killed enemy position and then play "blood splattering everywhere" animation.
Which part do you want to change?
Check out my awesome game Doptrix
B
17
S
9
G
51
Posts: 839
Reputation: 28,487

Post » Sun Sep 24, 2017 2:46 pm

i want the blood spatter to stay their so every time an enemy is killed the spatter stays at its location so in the end theirs BLOOD EVERYWHERE lol
B
7
S
2
Posts: 105
Reputation: 889

Post » Sun Sep 24, 2017 3:05 pm

Now you have just 1 "explosion" object and you move it from one enemy to another.

When an enemy is killed, replace "Explosion ->set position to enemy" action with "Enemy->Spawn explosion". This will create a new blood splatter for every killed enemy. And you'll have your blood bath :)
Check out my awesome game Doptrix
B
17
S
9
G
51
Posts: 839
Reputation: 28,487

Post » Mon Sep 25, 2017 11:13 am

Message: OBLIVION can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
https://drive.google.com/file/d/0B_wGto ... sp=sharing

please add this for me as i seem to be doing it wrong. also when AMMO hits zero its still firing even after i had set it to destroy bullets
B
7
S
2
Posts: 105
Reputation: 889

Post » Mon Sep 25, 2017 11:18 am

Message: OBLIVION can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
https://drive.google.com/file/d/0B_wGtoNKF4qgQ1hpQzFfdUY5Tmc/view?usp=sharing
B
7
S
2
Posts: 105
Reputation: 889

Post » Mon Sep 25, 2017 11:39 am

Just replace "Explosion Set to position (enemy)" with "Enemy->Spawn explosion on layer 1".

In your "Mouse Left button is down" add another condition "Ammo>0"

It's that simple.
Check out my awesome game Doptrix
B
17
S
9
G
51
Posts: 839
Reputation: 28,487

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: maranpis, totoe and 33 guests