# How do I create hills to automate continue?

Get help using Construct 2

### » Thu Jan 14, 2016 10:53 pm

Hi
I am new in construct 2. Can anyone create a sample project to create hills with this instruction( no plugin needed)
I cant create it. please send a sample
Thanks

R0J0hound wrote:What have you tried so far?

Minus the graphics, can you make that slope there with collisions?
One way often used is to use multiple sprites to define the slope. So say you have a circle sprite you could place them in a row on the grass level. More advanced ideas would be to stretch a rectangle sprite from circle to circle to make the surface smoother.

Anyway, to make the slope continue you just add sprites to the right of the last sprite.
In the simplest case you can do this:

Global x=0
Global y=0

While
compare: x < screenleft
--- set y to 100*sin(x)+320
--- create sprite at x,y

The "set y" expression is how your slope is defined, and you can do anything with it. Some examples:
100*sin(x)+320 is just a sine wave
100*sin(x)+50*sin(x*3+22)+320 is two sine wave combined to make a varied slope.
(noisejs.perlin2(x*0.44, 0.5)+1)*100+320 uses the noise plugin to use perlin noise.

Noise plugin:

terrain examples:

@R0J0hound
@IsPra
B
6
Posts: 13
Reputation: 278

need a help
Thanks
B
6
Posts: 13
Reputation: 278

### » Fri Jan 15, 2016 7:40 pm

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

### » Fri Jan 15, 2016 8:44 pm

I cant create it can you create a sample for me ?
B
6
Posts: 13
Reputation: 278

### Who is online

Users browsing this forum: Exabot [Bot], SuperSciFi and 12 guests