How do I make my game act like stick hero

Get help using Construct 2

Post » Fri Nov 28, 2014 3:42 am

In the game stick hero you have a platform that is a random distance away, a random size, and scrolls into view whenever you land on the next platform
I would like to create platform generation just like this. How could this be achieved?
Last edited by MrBadAtThis on Fri Nov 28, 2014 9:24 pm, edited 1 time in total.
B
9
S
4
G
2
Posts: 39
Reputation: 1,805

Post » Fri Nov 28, 2014 5:42 pm

Check this capx, that's basically one way to do it. Probably needs some tweeking.

You'll need the plugin MoveTo.
You do not have the required permissions to view the files attached to this post.
B
75
S
29
G
17
Posts: 256
Reputation: 15,250

Post » Fri Nov 28, 2014 8:25 pm

Xavier wrote:Check this capx, that's basically one way to do it. Probably needs some tweeking.

You'll need the plugin MoveTo.



Thanks for the reply and thanks for the cap, However I'm having trouble understanding how each section works.
For example the hero moving to the target I don't see where the target is specified.
B
9
S
4
G
2
Posts: 39
Reputation: 1,805

Post » Fri Nov 28, 2014 9:22 pm

Alright I decided I'll upload what I have

In the game the longer you hold the mouse button down the higher the character jumps,
As stated earlier I want the platforms to work like they do in stick hero ( nothing currently happens upon touching the platform in this game as I had taken out all previous attempts.)

I also have a couple other issues such as my character can jump off the screen Vertically by holding the button down to long (Can I cap this?)

And I need a way to specify to the player the current strength of the jump.
I planned for an arrow to grow with the strength of the jump however I can not find a way to do this without the arrow getting all blurry and distorted.
You do not have the required permissions to view the files attached to this post.
B
9
S
4
G
2
Posts: 39
Reputation: 1,805

Post » Fri Nov 28, 2014 9:44 pm

You are probably refering to the condition "On MoveTo hit target", that just means when the hero reaches the target, do the actions on the right.

The actions that moves the hero is the one that says "Hero MoveTo move to (platform.BBoxRight, self.y).
I've modified it a little and commented it so you can understand it better.
You do not have the required permissions to view the files attached to this post.
B
75
S
29
G
17
Posts: 256
Reputation: 15,250

Post » Sat Nov 29, 2014 1:18 am

Thank you so much You've helped me immensely
B
9
S
4
G
2
Posts: 39
Reputation: 1,805

Post » Sat Nov 29, 2014 1:36 am

Sorry to be a bother even more but is there a way to make the spawned platforms a random distance away from the previous?
B
9
S
4
G
2
Posts: 39
Reputation: 1,805

Post » Sat Nov 29, 2014 11:23 am

Yes no problem. Added another action to randomize position right below the action where the width is randomized. Also modified the scrolling.
You do not have the required permissions to view the files attached to this post.
B
75
S
29
G
17
Posts: 256
Reputation: 15,250

Post » Sat Nov 29, 2014 7:55 pm

Thanks again. My new issue seems to be whenever I try and use my hero. and make him jump to the next platform he isn't Technically "Overlapping" it so the platforms do not move. Would I be able to use a compare to command to achieve the same effect?
B
9
S
4
G
2
Posts: 39
Reputation: 1,805

Post » Sat Nov 29, 2014 7:59 pm

Use "is overlapping at offset" instead. Set it at Y -5 for example.
B
75
S
29
G
17
Posts: 256
Reputation: 15,250

Next

Return to How do I....?

Who is online

Users browsing this forum: 25games and 6 guests