R0J0's experiments

Show us your completed creations made in Construct 2

Post » Wed Jun 21, 2017 3:39 am

Just want to preface this post by saying that I'm a complete construct noob.

Now that that's out of the way, this ski terrain is really neat and I was wondering how I would go about making the terrain change every so often to be flatter/horizontal/steeper etc. and then resuming its wild and crazy hill-making shenanigans.

Also, there's a way to add working touch controls, right? When trying to stumble my way through it, It seems that no matter how many times I tap the screen the player only jumps once (probably to spite how noob I am) as opposed to jumping each time the screen is tapped.

Would love to get the hang of how all of this sorta works. Hopefully this isn't a tall order to fill.
Any and all help is appreciated :D

Side note: sorry for casting Thread Necromancy :mrgreen:
B
10
S
2
Posts: 4
Reputation: 558

Post » Wed Jun 21, 2017 5:19 pm

Hello,
Event number 8 defines the shape of the slope: random(480)+steepness*loopindex
Making steepness and 480 lower would make the terrain flatter.
I guess you could make a sub-event like the following to have the steepness change every five steps.
system: compare loopindex%5=0
--- set steepness to random(10,100)

At least that's the idea.

Controls at all don't make sense in this capx because it's non-interactive. I guess you'd put you control events above event 10 and in them change either ax,ay (acceleration) or vx,vy (velocity) instance variables of the skier.
B
91
S
31
G
103
Posts: 5,235
Reputation: 67,756

Post » Wed Jun 21, 2017 7:42 pm

@R0J0hound,

I've been a fan for years, but haven't seen this thread until now. This, and pretty much every other insightful comment you make, should be stickied for posterity.

Thank you, thank you, for this wonderful treasure trove!
www.simbucket.com - HTML5 Science Simulations / https://www.airconsole.com/#!play=com.n ... obotrumble - Robot Rumble on AirConsole
B
46
S
12
G
20
Posts: 363
Reputation: 14,299

Post » Thu Jun 22, 2017 12:41 am

@R0J0hound

Thanks a ton for the reply. That definitely helps with grasping some things.

Not sure if I'm doing something wrong, but for some reason when I add a sub-event to event #8, it only allows me to set the value of dot. Also I'm having trouble with adding a control event above event 10; I keep getting a pop-up message about the amount of triggers per event branch.
B
10
S
2
Posts: 4
Reputation: 558

Post » Fri Jun 23, 2017 3:11 am

@cjbruce
Thanks, I'm glad you enjoy it.

@pwnetheus
I don't know the cause for the first bit. For the second it sounds like you're adding another condition instead of another event. You may want to run through a few tutorials and maybe read the events section of the manual. I'm not that great at explaining that stuff.
B
91
S
31
G
103
Posts: 5,235
Reputation: 67,756

Post » Wed Jun 28, 2017 3:52 am

@R0J0hound

Thanks for the help.

I realized I had to change Steepness to a non-constant variable and that allowed me to tinker with things. I also moved touch controls way up (rather than directly above event 10 like I was previously doing for some reason) and construct doesn't give me any errors or issues. So it seems I'm making some sort of progress.

A neat thing I noticed is that adding platform behavior allowed the player to stay grounded on beziers (apart from control input) but it negated the effects of setting/changing ax/ay/vx/vy (making changes only granted a temporary burst of speed) and also only allowed 1 jump when simulating jump controls. Does this mean I'll be unable to have consistent jump control over the player so long as I've added the platform behavior?

I also noticed some odd behavior with the player lagging behind the middle sprite instance, but setting x to sprite.x seems to have solved that issue.

What I'm trying to figure out now is if there's a way to specifically set the player's fall speed without messing with everything else. Is that doable?

Lastly, I was wondering, in addition to modifying the Steepness, is there any way to actually pause the formation of beziers altogether?

Thanks again for taking the time to help and pointing me in the right direction

=)
B
10
S
2
Posts: 4
Reputation: 558

Post » Wed Jun 28, 2017 5:11 am

You may just need to do something different altogether for the terrain instead of using what I did. That array contains all the heights of the terrain which are interpolated to give a smooth terrain. All my function does is do random sized hills + a downward slope to keep everything mostly downhill.

Just dealing with arrays can be hard to visualize. Try to make another project that makes a Sprite go right and sometimes goes down to get some ideas.


Don't use the platform behavior, it clashes with the events. If you want it to jump then do "on touch" -> set vy to -100 or something.
B
91
S
31
G
103
Posts: 5,235
Reputation: 67,756

Previous

Return to Completed Creations

Who is online

Users browsing this forum: Google [Bot] and 1 guest