Creating Enemys OUTSIDE the layout

This forum is currently in read-only mode.
  • hello,

    so i got a 1280x720 playground and want to spawn every xxx random seconds 1 enemy OUTSIDE the layout. I tried alot of combinations but im confused if i have to use "scripts" like "system: create "enemy" on layer 1 at random x (xxx), random y (xxx).

    I just dont know how i define the area outside the layout and neither if i should use sprites to spawn them there and just place them around my playground.

    Since its an survival game i cant just allow them to spawn near my player.

    Thx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you want them to kinda spawn around the center of the stage you could just spawn them in the centre and as the next action use Move at an angle with a random angle and enough distance to put them outside. Then make them turn towards the middle and off you go.

  • Thx for the Answer,

    but im not sure if i understand you correctly.

    Could you give me an example on how it should look like ? :S

  • I don't have Construct Classic on this system, but just make the actions like I'm saying:

    System: Create Sprite at the middle of your layout, say, 640x480

    Sprite, move at an angle: Angle random(360), distance, 720

    Sprite, set angle towards position: 640x480

    Something like that, some of the wording may be different, haven't used CC in a while.

  • well move at angle isnt aviable for me or CC in generell.

    Now i tried something else and it kinda works exepct for the distance. Maybe you could help me fix this instead.

    i just made it like this: Create "enemy" on layer 1 at "X: Random(1280) Y: random(720)" and they spawn just like i want, expect for the distance.

  • Yes there is a MOVE AT ANGLE , you will find it at SIZE and POSITION under your sprite actions.

  • Well, what is this then?

    It's under position.

    And if that really isn't there, make sure you have the latest version:

  • oooooh you are right ! im so sorry, and finaly it works !!! sorry for the effort guys

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