matriax's Forum Posts

  • Actually you have containers that add some objects in the same time other is created, but if you want the object created follow the other object/s in the container you have to create an event for it.

    So will be great that in the object properties, inside the container add maybe the "Pin-To-Pin" icon for each object added and pressing the icon will enable/disable the Pin-To-Pin function, in case you only want some of the objects created follow others.

  • I guess you could work with the pickedcount expression..

    Than the event would become something like:

    family compare variable = 0

    System compare two values: family.pickedcount = 5

    > family destroy

    Worked Perfect! A lot of thanks!

    Can you explain a bit? I not understand very well what is really doing this condition

  • I think you're using families wrong here, unless you're planning to have more creature types in future? You can set up the worm as a 'container', this then means that when one part is destroyed, they will all be destroyed. They're useful for this. Families are for affecting a family of objects at once i.e. a number of different kinds of worms rather than parts of a single object. If they're a container then this logic might work because if you pick a part of the worm to check against then it will pick every other part of the worm as well.

    The problem is that i only want to destroy the enemy when all the parts have life=0 .

    I mean, i can hit until the head of the worm get life=0 but only when all the parts of the worm have life=0, this means head and the 4 body parts be destroyed.

    I can do that when the head or the body is life=0 destroy, but the problem is how destroy the entire worm only when all the parts are life=0.

    Which expresion i have to use in Construct2 to compare a serie/group of instance objects that when match some criteria do X action?

    I mean, i also tried to use expresions without family only direct to the object, body and head=0 then do action with the same result.

  • Already the family have life=0. And the parts are in the family. All the morning lost for this thing XD

    If i say

    (Family) Enemies | Life = 0 -> Destroy

    He not get all, he only get that when one of the parts get life=0 do the action.

    So, how check if all the objects in the family match the same criteria? Or a group of objects or something instead only one? ¿?

  • I have a familly called worm that have an instance variable called "life" that is set at 2. Actually i only have a one worm. And a worm is based on: 1 head and 4 body parts.

    So the idea is: when head and body parts have life=0 -> then do the action.

    This have to be a silly thing but i can't find the solution. I tried with "Pick all instances + Enemy.life=0 -> do action" etc... but nothing all the expresion and things fails :S , in the moment one of the objects/parts have life 0 is destroyed instead wait until all the parts of the worm is=0.

  • I have a family called WORM.

    Worm is made by two object. Head and body.

    Each one have an instace called Life=2

    How i sai that when the family worm life is 0 = Destroy

    ¿? I'm stuck all the day, and sure will be a silly thing, but i search on forums and the documentation and i can't find it :S and sure is commented several times .

  • I see, thanks for the info!

  • Yes, i know, i guess you not saw but previous solution. Then for this case i have to use some parameter to identify.

    I tried with "trigger once while true", "Repeat 1",etc... and other things but nothing, the only way i get this working is using the parameters.

  • I "solved" the problem but not like it.

    I added an instance variable on the bulled called: "Collide" that is 0 and 1 when impacts with the walls. On the function i added the condition "Shoot collide=1".

    Works, but is ther any other form that can save this condition or another way to do that more simple?

  • Sorry for the general title but i don't know how explain it.

    I'm trying to use functions but seems i'm doing something wrong (https://www.scirra.com/manual/149/function)

    I have a condition that says:

    WHen bullet collides with wall -> Destroy and spawn a few particles.

    So i can shoot 5 bullets and when each one collides with the walls the bullet is destroyed and the particles appears.

    If i put the events on a function and call it from the condition if i shoot 5 times, every time that the bullet collides on the wall spawn particles on all the bullets that appears in the screen.

    What i'm missing?

  • Ah! i don't know that, now worked! thanks!

  • Yes, i deactivate the collisions in the "properties" but when runs the "link" the sprite that creates the wire collides with other from others chain_boxes ¿? Or i'm doing something wrong ¿?

  • Thanks guys!

    But if i create another chain_box not works equal. The same if i import this into the game or erase the actual and create other :S .

    I think this is for the UniqueID that appears "7". And only works on that.

    How i can create all the chain_boxes i want and this one create the size of the wire depending of the chain_box like now and some instace number that say "electric" , and 1 for put the electricty and 0 to normal. I thought create a rope/wire was more easy .

    Maybe there is any other rope example more easy to use that can be capable to create all that you want of any size,etc.. ? I looked in the forums but the only that works good was this one by R0J0hound .

    Edit: Also how can i erase the wire colisions? i want the swing and move beetween them without collision.

    Edit2: Scirra, create a Rope Behaviour please!

  • I'm using the R0J0hound example of rope to do something to my game.

    Here is the example of what i'm trying to do.

    https://dl.dropboxusercontent.com/u/659 ... ueba3.capx

    Problems:

    The electric point is not ajusted correctly to the final part of the wire.

    When i press R to restart the layout the physics are not working ¿? .

    Things to improve:

    The first part of the wire/rope have to be by default inamovable. Actually i put a "blue-squared" that if is touched set inamovable. Works but will be great know how to do it automatically.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Remember to change the Window resolution in the parameters to fix that. If i remember well, is explained in the comments at the provided document.

    If you not set the correct window size in the parameters things like that will happens.