Balloon effect

Get help using Construct 2

Post » Mon Feb 06, 2012 1:10 pm

I've been trying a platformer balloon effect. When the player stands above the balloon, the balloon goes down... After it went down, if the player is not above any more, it should go up...

How far i've got:

On layout start -> Gravity 0 Speed 0
Player stands above -> It goes down (gravity 100)
Player NOT above -> It goes down (gravity -20) (This triggers the gravity -20 even when de game starts since it fits the requirement of not beeing above... need other way)


But I can't figure out how to make it stop at the first position, avoiding it going too up.

Concept:


I hope I did not confuse you too much.

Thanks for reading.
B
7
S
1
G
1
Posts: 37
Reputation: 1,159

Post » Mon Feb 06, 2012 1:36 pm

The sine did 80% of the job, now how can I save the first position so I can then return the balloon there?
B
7
S
1
G
1
Posts: 37
Reputation: 1,159

Post » Mon Feb 06, 2012 1:55 pm

double check his position (original_ballon_pos and ballon_pos), after it, make him follow to the first position, tracing the route.
ImageImageImageImageImageImage
B
92
S
19
G
12
Posts: 1,192
Reputation: 18,276

Post » Mon Feb 06, 2012 1:58 pm

You mean i can do that smoothly with the sine?
B
7
S
1
G
1
Posts: 37
Reputation: 1,159

Post » Mon Feb 06, 2012 2:12 pm

Unstable platforms
For those, you hardly need a behavior (only the solid, it's enough).
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Mon Feb 06, 2012 2:31 pm

What does the function lerp() stand for?
B
7
S
1
G
1
Posts: 37
Reputation: 1,159

Post » Mon Feb 06, 2012 2:36 pm

lerp is a way of making interpolation between objects.

For example, if i want to tween something's x position then I will interpolate it using lerp.

Same with y, size, angle etc.
B
29
S
12
G
7
Posts: 740
Reputation: 7,839

Post » Mon Feb 06, 2012 2:39 pm

Awesome. And how can I set the value of a boolean to <varies>? It just rejects it.
B
7
S
1
G
1
Posts: 37
Reputation: 1,159

Post » Mon Feb 06, 2012 3:18 pm

Anything can be changed in another thing, like a number in a string, str(number), etc, if I'm not wrong =]

I really suggest to you to read all the manual first too.

About the behavior, you'll need it for everything else, the exception are static scenarios and canvas ^^

Good luck.TELLES08082012-02-06 15:19:20
ImageImageImageImageImageImage
B
92
S
19
G
12
Posts: 1,192
Reputation: 18,276

Post » Mon Feb 06, 2012 3:24 pm

No need for manual (in this, case) just forum search:

That means different instances have different initial values. If you click on an individual instance, you can set initial values for its variables on the left bar. If all the instances have the same value, it'll show you the value in that screenshot, but if any are different, it'll say "<varies>" like that.

http://www.scirra.com/forum/varies-for-number-in-instance_topic48764.html
B
7
S
1
G
1
Posts: 37
Reputation: 1,159

Next

Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests