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
54
S
10
Posts: 21
Reputation: 2,579

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
17
S
5
G
2
Posts: 43
Reputation: 1,328

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
33
G
47
Posts: 1,194
Reputation: 30,832

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
54
S
10
Posts: 21
Reputation: 2,579

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
23
S
13
G
135
Posts: 871
Reputation: 70,345


Return to How do I....?

Who is online

Users browsing this forum: Lordshiva1948 and 47 guests