HELP: the platform thru jump

Non-platform specific questions.

HELP: the platform thru jump

Postby savvy » Sat Oct 02, 2010 7:56 am

i have noticed a lot of you want to know how to make a platform which you can jump through, and onto...
this is the simplest way to do it:

collision with top side of platform -> script editor
Code: Select all
if(yvelocity>=0)
{
physicalresponsething;
}


hope it helps :)

PS: i advise setting the platforms zdepth to behind the players, to make it look better.
--> For my help, i ask for a simple +1 if it helps! ^-^
--> I dont code, I type art which you dont understand.
--> I keep winning the 3D model challenge at college, teacher says: "you keep winning im not giving you prizes".
User avatar
savvy
 
Posts: 494
Joined: Wed Jun 03, 2009 11:55 am
Location: England
Score: 44 Give a positive score

Re: HELP: the platform thru jump

Postby CybrKidX » Sun Oct 03, 2010 4:43 pm

A better way would be to make it so the physical response only occurs when the down key isn't pressed. Here's an example to apply to a collision event of player and ground.
Code: Select all
char *key = GetKeyState(); // This will tell you what keys are being pressed

if(key[KEY_DOWN] == 0) // Test if down key is not pressed
{
    PhysicalResponce(...); // Now the physical response only occurs when the down key is not pressed
}


I would suggest having the collision event only occur when player collides on top of ground so if the down key is released while your still dropping through the floor, your character won't jump positions. You'll see what I mean. (If you do this, make sure you have a separate collision event for the left/right if your ground shall be used as walls later)
CybrKidX
 
Posts: 11
Joined: Fri May 15, 2009 12:35 am
Score: 0 Give a positive score

Re: HELP: the platform thru jump

Postby savvy » Sun Oct 03, 2010 4:53 pm

no, because it would make it so you cant press/have to press that key to be able to land on the platform.
--> For my help, i ask for a simple +1 if it helps! ^-^
--> I dont code, I type art which you dont understand.
--> I keep winning the 3D model challenge at college, teacher says: "you keep winning im not giving you prizes".
User avatar
savvy
 
Posts: 494
Joined: Wed Jun 03, 2009 11:55 am
Location: England
Score: 44 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest