how to make a sprite ignore solids?

Discussion and feedback on Construct 2

Post » Thu Jan 02, 2014 5:40 am

Can't post in the "How do I?" forum for some reason... Got an "authentication error" so can one of the mods move this over there? Sorry.

I'm messing around and trying to recreate one of those running games where a cloud or some other instant-death-causing thing is chasing you, and you have to escape. I have everything set up, but with the platforms in the way, either the "cloud" object doesn't show up at all, or it doesn't move because it's overlapping other solids.

I've played a game on here that used this system so I know it's possible. I just don't know how to get around this problem. I pretty much just need it to float above all the other layers.

Any help is appreciated, thanks :).DrSilva2014-01-02 05:41:32
B
6
S
2
Posts: 11
Reputation: 539

Post » Thu Jan 02, 2014 5:43 am

Can you post a capx so we can see how you're trying to set it up?
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,991

Post » Thu Jan 02, 2014 6:07 am

Keeps saying only members with sufficient privileges can post here... I dunno.

I basically just need a big square to slide over the layout. It will pretty much be covering everything as it follows the player to the goal. I can figure out how to set up everything else. I just don't know how to get the "big square" layer to move without interacting with the platforms.

For some reason I can't post links.DrSilva2014-01-02 06:11:41
B
6
S
2
Posts: 11
Reputation: 539

Post » Thu Jan 02, 2014 4:44 pm

If it needs to collide with player only (no other object) you could do

every tick -> bigsquare: set x to self.x+10*dt

where 10 - is the speed of movement (can put anything you want here)

This will make that sprite move to the right. And then set only "on collision" or "is overlapping" with player to test collision.


For posting links you need to increase you Rep point - by making more posts for example.
ImageImageImageImage
B
158
S
67
G
43
Posts: 2,603
Reputation: 35,968

Post » Thu Jan 02, 2014 5:29 pm

You don't need to give the death cloud any behaviour like solid.

You just need to update the position(size if needed) and check for player overlap.

is this a Level Runner or an Endless Runner. The design patterns between them are different.

An Endless Runner has it that the level moves from one side of the screen to the other. While the player and deathcloud will be relativly stationary.

A Level runner has it that the the player actually travels along the X axis as would the cloud.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,038


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests