How do I spawn outside layout

  • hi guys... i have a little problem..

    i'm doing a vertical shooter, and i have to spawn something outside the top side of layer and then make it go downwards. now, when i do that with my objects i spawn them so that only 1 pixel is inside layout and they (even though they got destroy outside layout behaviour) they move to bottom and after leaving on bottom side they dissapear.

    but when i spawn my enemies (they have DoL, pathfinding, Timer, LoS and custom movement) so that only a bit is visible - they do not move or anything.

    example:

         -create object Enemy on layer 2 at (random(0,1280), 0)    - WORKS GOOD - enemy finds path and starts moving and everything is ok.
    
          -create object Enemy on layer 2 at (random(0,1280), -50)  - doesn't work- enemy appears (a bit of lower part) but only stands still.
    [/code:2ycnfoik]
    
    how do i fix this?  i want my enemies to appear on the edge (or outside the layout and then traverese into it, but i can't get any idea how to do it).  i thought about removing DoL but pathfinding won't work again because i think it checks inside layout objects only :/
    
    help, ty!
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How about making the layout bigger then the viewport and have the level stuff further inward on the layout ?

    This leaves you with all the space you accommodate for stuff happening outside of the screen.

  • i know, but how can i move window screen lower and leave a bit of layout on the top side?

    i've tried and both only increase their size on bottom side which doesn't work for me.

  • Use a dedicated layer with scale 0 and paralax 0,0 and place all your hud / ui stuff on this layer.

    Give the active player on the game layer the "scroll to" behavior, to keep the camera centered on it.

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