clone enemy every x seconds

  • hi

    im new to construct and have made a enemy with many objects and events attached to it. i would like multiple of this enemy to constantly spawn but keep the same events i have set up. any help is appreciated. thanks and have a nice day

  • what kind of objects and events its attached to it?

  • objects attached are sprites, two particles a variable

    and many events, hard to be specific on which type.

  • Insert the creation(and pinning...) in a function.

    Events like On mouse already work for every Object.

    Call this function every X seconds.

    Edit: Don?t forget to pick an instance if you call something like Object destroy.

  • thank you very much for your reply. please excuse my lack of knowledge but from what you said i have tried this.

    -create a family with all objects of enemy

    -create function(not familiar with these yet)

    -added a action to a event which when the function is called it spawns family

    -and i made another event with calls the function every x seconds.

    but nothing happens.

  • Make a sample .capx can't tell you like that what's wrong :D

  • very much appreciated but my project is in a bit of a mess, its been alot of experimenting and learning so i wouldnt want you to have to try and understand whats what. but thanks for the offer. is there any common ways to achieve what i want.

  • i just tried a global variable and every x seconds add 1 and when at 1 etc spawn family. but game just crashes... i think too much going on :(

  • you can keep posting all the outcomes but noone can help you without a .capx really..

  • Just make a small .capx with every x seconds and a sample of your function.

  • ok after some testing i got it working. it spawns the objects every 3 seconds not aligned very good but ill sort it out. but another thing is when i for example shoot one enemy with it also do damage to the others.

  • This what I said, you need to pick the right instances in your events.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i am really struggling. i have many animations and certain damage depending on body parts assigned to my enemy. please could you help me on getting the animations and damage to be specific to the target not all enemies. thank you for the help btw... sorry for being noob :)

  • Your no noob for sure you already do advanced stuff, but the problem is we can?t help you without any informations.

    You don?t have to send us your whole game but it would be nice if you give us screenshots from the event block which destroys or damage all objects so that we have anything to understand what you want from us. You can also make a black bar above your images but please give us anything :D

  • <img src="https://www.dropbox.com/s/dm0297y8p3zfaqd/construct%202%20forum.png" border="0" />

    this just is the damage i destroy after animations

    the three blocks are

    head

    body

    leg

    dropbox.com/s/dm0297y8p3zfaqd/construct%202%20forum.png

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