spawning with physics enabled

Get help using Construct 2

Post » Mon Sep 30, 2013 8:08 pm

hey guys

im having trouble figuring out how the spawn new object action works whith physics enabled....
1st, if your spawning a new instance, you need an instance of the object already somewhere on the layout but can bee off screen, correct? how do you keep that instance that is hidden off screen from falling if you want the new one that spawns to fall?

thanks
Dan
B
8
S
3
G
1
Posts: 87
Reputation: 1,493

Post » Mon Sep 30, 2013 8:24 pm

The one that is off screen you can destroy on start of layout!
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187

Post » Mon Sep 30, 2013 8:56 pm

Or you can add the "Destroy outside layout" behavior to it, works every time
HARMLESS SIGNATURE THAT IS VIEWED BY OTHERS AS OFFENSIVE AND CONTROVERSIAL
B
14
S
3
G
3
Posts: 356
Reputation: 4,377

Post » Mon Sep 30, 2013 11:03 pm

I usually have a seperate layout called objectdump where I place any objects that would normally be left off screen
B
46
S
14
G
7
Posts: 603
Reputation: 8,106

Post » Tue Oct 01, 2013 12:54 am

thanks guys...that worked...but now I have a second question

I want the player to only be able to spawn a new instance when there isn't not one already on the screen...the object has to leave before a new one can be spawned...

I have an event that looks like:

keyboard - on space is pressed | Spawnerobject | Spawn Sprite1
Sprite1 - X is on-screen


its simple enough but isn't working.
any ideas?
thanks
B
8
S
3
G
1
Posts: 87
Reputation: 1,493


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests