BESIDES containers?

Get help using Construct 2

Post » Thu Aug 02, 2012 2:13 pm

Hay guys,

Can anyone please help me with the whole "no containers" issue in Construct 2 I need a way to have multiple objects each (one at a time) die only when THEIR "health" is less than "0" rather than every single sprite die at the same time?

So could someone please make a capx. example for me? would really appreciate it!!

FrEaK
B
9
S
2
G
1
Posts: 14
Reputation: 1,377

Post » Thu Aug 02, 2012 2:37 pm

I would just have health be a be a number variable for the object and using the "system for each", you could check each object's health individually and based on the condition destroy the object.
B
17
S
9
G
7
Posts: 249
Reputation: 6,922

Post » Thu Aug 02, 2012 2:48 pm

You don't even need the "For each" condition, simply "Compare instance variable" is enough.
Nothing to see with the containers here.
This is just basic picking, and you can check the how do I FAQ in the section "Picking / Selecting instances" to see more examples and explanations.

Here is also a quick example capx for your issue.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Thu Aug 02, 2012 2:53 pm

THANKS SO MUCH @ Kyatric and @ rfisher ;)!
B
9
S
2
G
1
Posts: 14
Reputation: 1,377

Post » Thu Aug 02, 2012 2:58 pm

Here's even a more advanced example that kind of feels like what containers do with several type of object : Second example capx
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Thu Aug 02, 2012 3:31 pm

shweet-o :) oh but one more thing... i have my placement sprites and everything pretty much done now right.. but as soon as i REPLACE them with the sprites i made the collision for them doesnt work anymore?? and the sprites are the exact same size and height? I even made the collision polygons a simple square again but still nothing? please help...
B
9
S
2
G
1
Posts: 14
Reputation: 1,377


Return to How do I....?

Who is online

Users browsing this forum: Artpunk, gregorysforster, Matthew de and 1 guest