Make a Platform object jump while in the air?

Get help using Construct 2

Post » Fri Oct 07, 2011 11:25 am

It seems that when using the "Simulate control" expression for jumping, it only works when on the ground. Which makes sense, of course -- but I'm trying to make my Mario jump off of enemies' heads after landing on them, which means he isn't exactly on the floor, so in this case it's working against me.

How might I work around this?
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Fri Oct 07, 2011 11:27 am

I'm a beginner my self but maybe it would work to create a invisible object on top of the enemy that your character can jump off of.
B
14
S
3
G
2
Posts: 37
Reputation: 1,893

Post » Fri Oct 07, 2011 11:42 am

Well, it's certainly not ideal and it doesn't always work, but it'll have to do for now. Thanks for the idea mate!SullyTheStrange2011-10-07 11:42:46
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Wed Nov 16, 2011 8:17 am

I'm having the same problem, did anyone ever figure out a solution to this?

EDIT: the same effect can be achieved in platform behaviour by setting the Vector Y to the same number as the jump strength (make sure to make it negative though so the character actually travels up) Gotta admit, some of the naming conventions can be a bit unclear as to what they mean/do for the conditions/actions. Too bad there isn't a way to turn the visual representation off and just view the actual code, it'd be neat to be able to toggle between the two... then confusion like this might not happen so much maybebrent_hamel2011-11-16 09:01:41
B
64
S
8
G
9
Posts: 290
Reputation: 8,590

Post » Wed Nov 16, 2011 11:11 am

I done it by coding this:

Player On collision with Enemy > Player Set Platform vector Y - 150

The value depends on your physic world values.
Trial & error situation :)
B
18
S
4
G
5
Posts: 149
Reputation: 4,498

Post » Wed Nov 16, 2011 12:24 pm

Example it's basically what AngeloFernandes says, plus one more condition so it won't trigger everytime, only when jumping from above.
ImageImage
B
25
S
6
G
8
Posts: 773
Reputation: 6,643

Post » Wed Nov 16, 2011 6:11 pm

I believe this is atleast twice shown in "How do i" section for how to do a mario like jump over enemies in Platformer behavior

http://www.scirra.com/forum/how-do-ifrequently-asked-questions_topic45416.html?SID=6877528e-ed59-674eb254-40863-7471527778

The simulate control as i know is just doing same like when you press a button in default to jump or move.
So for what you are looking for, you definitely want to use the vector Y
to do any kind of jumps in anywhere than on solid ground in my opinion.
B
43
S
9
G
5
Posts: 231
Reputation: 7,291

Post » Wed Nov 16, 2011 7:11 pm

Yeah, that action wasn't available at the time I made this topic. Unfortunately the original solution was the only thing we could do at the time. You whippersnappers should be grateful that it's so easy for ya now.
B
20
S
9
G
6
Posts: 607
Reputation: 6,112


Return to How do I....?

Who is online

Users browsing this forum: spcsmrf and 26 guests