How do I Pick all the intances on a family

0 favourites
  • 10 posts
From the Asset Store
Pick Up Items Sound effects for your game, Take them for a ride right now and you will worry no more.
  • 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

  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

  • 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

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

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

  • 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..

  • 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.

  • 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.

  • 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 >(

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)