Opposite of endless climber

Just started using Construct 2? Post your questions here

Post » Sat Oct 01, 2016 1:12 pm

I am making a game in which the player has to endlessly go down breaking floors.But I am having many problems in it.
The problems are as follows:-

1)I need help on creating a block of code such that when the player WAS falling and has landed on a floor,I want to change the floor's animation and remove its Solid behaviour to enable the player to go down to the next floor.However the problem is that the all the tiles are changing their animation instead of that particular tile.

2)I need help on making the screen scroll downwards whenever a floor breaks.I want to make the background image constant.I also need help in creating new instances of tiles at regular intervals.

Please help me as soon as you can.
B
5
Posts: 1
Reputation: 234

Post » Sat Oct 01, 2016 4:23 pm

I saw your request on my Twitter but no link... please post a link to your question next time.

For this, maybe you wanna show us your capx first so we can see what you did?

I am heading to bed now, but to move the needle, you might want to also request assistance on Discord channel: https://discord.gg/Xuj5WgP

Also, other people here, please help him.
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: http://www.newgrounds.com/portal/view/660664 (use Chrome on Windows for best performance)

My sites:
http://twinblazar.deviantart.com
http://twinblazar.newgrounds.com
https://twitter.com/twinblazar
http://www.pixiv.net/member.php?id=15072448
B
30
S
11
G
11
Posts: 411
Reputation: 8,459

Post » Sat Oct 01, 2016 10:07 pm

1)I need help on creating a block of code such that when the player WAS falling and has landed on a floor,I want to change the floor's animation and remove its Solid behaviour to enable the player to go down to the next floor.However the problem is that the all the tiles are changing their animation instead of that particular tile.

Use "Closest instance" filter in your platform decaying event. You have to tell Construct2 which one of the instances to act upon.. this is called "picking" in C2.

2)I need help on making the screen scroll downwards whenever a floor breaks.

Have you tried giving the player object the "Scroll To" behavior?

I want to make the background image constant.

Based on this I am assuming the background follows the player down.. give it the scroll to behavior as well.

I also need help in creating new instances of tiles at regular intervals.

Could be done many ways... you using physics or simulating gravity with bullet behavior?
You using a long vertical layout and letting player actually fall or keeping player locked in center and simulating that "falling" with objects rushing up from bottom?
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
65
S
17
G
8
Posts: 636
Reputation: 9,333

Post » Sat Oct 01, 2016 10:24 pm

chrisinfinger wrote:
1)I need help on creating a block of code such that when the player WAS falling and has landed on a floor,I want to change the floor's animation and remove its Solid behaviour to enable the player to go down to the next floor.However the problem is that the all the tiles are changing their animation instead of that particular tile.

Use "Closest instance" filter in your platform decaying event. You have to tell Construct2 which one of the instances to act upon.. this is called "picking" in C2.

Can you give an example of this in action? I'm working on a game build and I just learned about using the 'Pick Instance' event. So I want to know what other ways the 'Pick' event can be used. For my game I included having an object move towards another object with the least HP. I'm so proud of myself for figuring that out :)
B
197
S
110
G
7
Posts: 134
Reputation: 19,564

Post » Sun Oct 02, 2016 9:10 pm

Can the player break the floor at ANY spot?

In one of my unreleased games i have tiles that the player has to jump on to break them

(player is falling > play animation (block breaking) from beginning)
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Mon Oct 03, 2016 3:18 am

I think there's an "on landed" condition for the platform behavior, so knowing WHEN to do your actions should be doable.
Eh, Steve!
B
113
S
54
G
13
Posts: 112
Reputation: 16,090

Post » Mon Oct 03, 2016 1:27 pm

Here is an example from another forum, it would work for you.
I solution to this could be something like this; each planet has a value called "distance". Run a For Each loop on the planets and set the distance value to the distance between it and the player( the expression for that is distance(x,y,x2,y2) ). Then merely use the "Pick Object With Lowest Variable" condition to get the one you want.


Another easier option would be to pin an invisible sprite to your players feet that sticks down a bit below and then use an "is overlapping" AND "is falling (from platformer behavior)" event to choose the correct platform block.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
65
S
17
G
8
Posts: 636
Reputation: 9,333


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests