How do I Pick all the intances on a family

Get help using Construct 2

Post » Mon Oct 06, 2014 12:27 am

hi!! :) i have an enemy done with spriter, i wan to apply an effect to all the parts of my enemy... how do i pick all the instances of a family on collison with something?

it would be easier if you could apply effects to the SCML object so it would affect all the parts...sadly is not possible
B
23
S
6
G
3
Posts: 316
Reputation: 3,461

Post » Mon Oct 06, 2014 3:08 am

if the enemy is made of multiple parts, you should use containers to manage it as one "object".

https://www.scirra.com/manual/150/containers
B
43
S
12
G
6
Posts: 446
Reputation: 6,802

Post » Mon Oct 06, 2014 5:32 am

@Sargas
thanks a lot... but the problem is that if i use continer to pick it, that means that i will need to give the effect to ALL the parts... if only the SCML object could hold effects.
B
23
S
6
G
3
Posts: 316
Reputation: 3,461

Post » Mon Oct 06, 2014 5:34 am

Lunatrap wrote:@Sargas
thanks a lot... but the problem is that if i use continer to pick it, that means that i will need to give the effect to ALL the parts... if only the SCML object could hold effects.


You said you wanted to apply an effect to all of the parts... Make up your mind.
B
56
S
15
G
13
Posts: 826
Reputation: 17,645

Post » Mon Oct 06, 2014 9:26 am

Tekniko i want to affect all the parts... but what i meant to say int the las post... is that if i can manage the effect to 1 instace (lets say you have a SCML file and you want to pin it to other sprite, and you dont need to set the position of all the parts, just the SCML and they will be picked to be on that position) then i will need to give and turn off/on the effect on every single part.

soryy if i dotn make sense...
this is very hard for me to explain on words :D
B
23
S
6
G
3
Posts: 316
Reputation: 3,461

Post » Mon Oct 06, 2014 9:38 am

Doesn't the system pick all event work for families?

Or just giving the family the effect instead of it's members?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Oct 06, 2014 9:56 pm

@LittleStain

"Doesn't the system pick all event work for families?"

no it will just pick ALL the enemies

"Or just giving the family the effect instead of it's members?"

thats the problem, if i give the effect to the family, it works, but when i want to activate the effects on collision with my player... only the parts on collision will trun on the effect... i want that on collision all the parts of my enemy will turn on/off the effect..
B
23
S
6
G
3
Posts: 316
Reputation: 3,461

Post » Mon Oct 06, 2014 10:52 pm

Might not be the most elegant solution, but cant you just make it so when you create an enemy you select one of the pieces, maybe torso, if there is one like that, and make that the "master". Then you copy its UID into a variable called Master_OBJ or something, that all the parts for an enemy have and whenever you have a collision you just select all family objs that share the Master_OBJ value and apply the effect to those objects.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Tue Oct 07, 2014 9:43 am

Apply the effect to the family. You could probably then take the parameters from Scml for instance when all the parts are already in its container. Picking instances should be easier this way.
B
34
S
9
G
3
Posts: 517
Reputation: 5,226

Post » Wed Oct 08, 2014 5:12 am

@Katala
@nimos100

thanks... but i need perfect collision... i was forced to apply the effect and micromanage all the parts individually, thanks for all your repplies >(
B
23
S
6
G
3
Posts: 316
Reputation: 3,461


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, Phacanu, richcoz81, Txchaser and 34 guests