Leaving large number of corpses on the screen

Get help using Construct 2

Post » Sat Jun 27, 2015 10:58 am

Hello!

I have a fixed rectangular playing area that is not scrolling. On that playing field I am slaying monsters. When a monster die, i want to leave a slain monster on the screen until the game is over.
The corpses will never change or interact with anything after this point, so I want to "disable" the objects or "imprint" them into the background.. some trick to avoid object overflow.

After a while the corpses start to pile up and overlap each other.. this does not need to look perfect. Smart simplification techniques can be used to reduce the number of total objects.

Even if there is no good standard solution for this, any wild idea or far fetched idea is welcome :)
B
7
Posts: 10
Reputation: 297

Post » Sat Jun 27, 2015 4:57 pm

Hello,

Here's things you can do :

- use a boolean instance variable for your object, setting it to false when it dies and check for it when interaction. So during any interaction action, if it's dead, do nothing. It does not reduce the amount of object though. You can also disable collision for the object so it does not trigger anymore and saves a bit of cpu.

- Using the Paster or Canvas plugin, maybe you can create a paster on a layer, the size of your layout and paste on it the sprite when it dies and destroy the object. But you can do no interaction with the dead object after this.
B
14
S
4
Posts: 109
Reputation: 1,281

Post » Sat Jun 27, 2015 9:08 pm

+1 for the Paster idea. I used that method in one of my prototypes for discarded shells, scrapes, scorch marks and debris. Pretty painless to implement and all it costs is a little memory. Let that stuff pile up all you want and it'll never use more.
Image
B
35
S
9
G
4
Posts: 201
Reputation: 5,170

Post » Sun Jun 28, 2015 9:00 am

THANKS!!!! This was exactly what I was looking for! <3<3
B
7
Posts: 10
Reputation: 297

Post » Wed Jul 01, 2015 9:35 pm

Hi.. i tried paster.

1) "Paste object" function didn't work.. any ideas how to use it?

2) Draw Textured Quad worked to paste images as textures, but i did not manage to rotate the image before pasting. Any ideas?

An explanation of how you did your empty shells would be super nice :)
B
7
Posts: 10
Reputation: 297

Post » Thu Jul 02, 2015 2:16 am

1)
The paste action draws that object onto the paster object where they overlap. So normally you'd stretch the paster object to cover the screen in the editor, then in events you'd just paste the bullet when you destroy it. It should be that simple.

2)
That action is for another purpose and just grabs the texture of the object. To get the points positioned correctly you'll have to calculate the corner positions.
B
92
S
32
G
106
Posts: 5,273
Reputation: 69,457

Post » Thu Jul 02, 2015 7:52 am

It's totally clear now what the paster does! Thanks!
B
7
Posts: 10
Reputation: 297


Return to How do I....?

Who is online

Users browsing this forum: David181, dop2000, namaewayukidesu and 12 guests