How do I add...

Get help using Construct 2

Post » Sun Apr 19, 2015 12:48 am

lets say lava or spikes in the runner Capx that comes with Construct2. I see there are random blocks spawning but when I try to add lava or spikes they always appear behind the player. I'm not sure the best way to approach this. Any tips or suggestions would be appreciated.
B
57
S
10
Posts: 22
Reputation: 2,656

Post » Sun Apr 19, 2015 4:12 am

I'm no shure i understand, but you can right-click on the lava or spikes to set their z-order.
Construct 2, an easy way to do great things.
B
18
S
5
G
2
Posts: 43
Reputation: 1,353

Post » Sun Apr 19, 2015 6:58 am

you can alter the z order of created objects "in code" - see z order at https://www.scirra.com/manual/132/common-actions
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Sun Apr 19, 2015 1:38 pm

Hi Dj and Ram

I did try the Z order method but the issue i run into the lava stays the same width, so if the blocks are randomly generated sometimes I'm running in the lava. Have included my CAPX so you can see exactly whats going on and if you have any ideas let me know.

CAPX
http://1drv.ms/1bguDeO
B
57
S
10
Posts: 22
Reputation: 2,656

Post » Sun Apr 19, 2015 2:22 pm

Hi,

Try this pseudo code:

"condition" --> create "block" object
--> Move "block" to object "behind" player

or

On "block" created --> Move "Block" behind "Player" (move to object action)
Image Image
B
25
S
14
G
138
Posts: 876
Reputation: 72,010


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests