Add individual actions to objects spawned by many enemies

0 favourites
  • 6 posts
From the Asset Store
Add SubRip (SRT) subtitles to your videos in Construct 3
  • Hello,

    I am working on a 2D game (side view) since many hours and nights and I love the motor I created (but less than the moto YOU created!) .

    BUT. I am blocked with an important part and I lost much time with it. So I will try to ask you if someone has a good tip for me.

    I want to do these actions, my enemies are included in a family enemies :

    • Put a skin animated on each obj_enemy in the layer (on a personalized point, not origin) ;
    • Put a ! or a ? on the top of the head of each enemy depending of the alert status variable (which is correctly managed). I did it correctly for one enemy, but not for 2 or more ;

    In fact the only problem is when I use the for each system condition, objects family enemies and objects created by them are not really linked. For example, when my player is in the line of sin of one enemy, the "!" is put on all my enemies in the layer. Too bad

    I could show you a screen shot if necessary, but if you have any idea I will be very happy

    Thanks.

  • What would be most useful here is an isolated example capx of your issue.

    From your general description, it seems like you just have picking problems in your conditions. Unfortunately without seeing your existing approach, it will be difficult to pin down the issue.

    Going to put this here ahead of time - If your project is fairly large and advanced already (which it sounds like it is), it could also be difficult to help even if we see the whole thing, which is why an isolated example would be best as I mentioned above.

  • What oosyrag stated is true. A .capx will be better to get accurate help.

    In the mean while, may i suggest you look up 'containers', if you want to tackle those things yourself.

    https://www.scirra.com/manual/150/containers

    And ImagePoints

    https://www.scirra.com/manual/63/image-points

    Bring the 'marks' in a container with the enemy, and it will pick the right 'mark' when you do a 'for each enemy'.

    Use 'imagepoints' to set a 'mark' to the position of an enemy, in that action you will see that you can choose an imagepoint.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello,

    Of course. I created a clean exemple especialy for you , my project is too big unfortunatly: drive.google.com/file/d/0Bx5piAZ0fLB_ckU2QVMxaVJ0REk/view?usp=sharing

    I already tried the container solution but it not work.

    You can see that all my enemies have a skin but the mirroring is depending of only on enemy.

    But it's funny because when I made my example, the alert icon is working

    Thank you.

    Sorry, I can not add URL because I am too newbee here I broke my Google doc link, I hope it's not a problem...

  • 99Instances2Go you are a genius!

    You played with the UID so the for each condition is able to link all objects to an specific enemy.

    I tried with the IID but without success.

    Thans you very much, you save my night.

    I will try to adapt it with weapons, other parts of the body and with objects which my player is able to carry.

    ++

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