How do I spawn outside layout

Get help using Construct 2

Post » Sun Jun 28, 2015 3:19 pm

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:
Code: Select all
     -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.


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!
Sea Monsters template - Isometric
Also includes 40 pages PDF of optimizations and "how-to" for your games, and how the "sea monsters" template was built. Follow link for details :)

sea-monsters-templates-and-assets_t162705
B
42
S
14
G
12
Posts: 624
Reputation: 9,421

Post » Sun Jun 28, 2015 3:51 pm

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.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,567

Post » Sun Jun 28, 2015 4:18 pm

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.
Sea Monsters template - Isometric
Also includes 40 pages PDF of optimizations and "how-to" for your games, and how the "sea monsters" template was built. Follow link for details :)

sea-monsters-templates-and-assets_t162705
B
42
S
14
G
12
Posts: 624
Reputation: 9,421

Post » Sun Jun 28, 2015 4:28 pm

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.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,567


Return to How do I....?

Who is online

Users browsing this forum: tarek2 and 9 guests