S
shaan150
Guest
Hey guys. Right let me get straight to the point basically in my game it was working fine until i added a jump code.
Here's my code to create my floor:
Here's my code for my jumping:
I might include as well my floor is invisible after adding this code plus i fall through it.
I have attempted to search online for answers but i have been unable to find any.
Any help is useful. If need be i can provide screenshots of my game.
Here's my code to create my floor:
Code:
var rep = 1;
grass = d3d_model_create();
d3d_model_floor(grass,-32000,32000,0,32000,-32000,0,rep,rep);
ground_tex = background_get_texture(tex_ground1);
Code:
grav += 0.75;
z -= grav/1.5;
if place_meeting(x,y,grass)
{
if z < instance_nearest(x,y,grass).z + grav
{
if z > instance_nearest(x,y,grass).z - grav
{
z = instance_nearest(x,y,grass).z
grav = 0;
}
}
}
if(keyboard_check_pressed(vk_space))
{
if grav = 0{ grav = -30;}
}
I have attempted to search online for answers but i have been unable to find any.
Any help is useful. If need be i can provide screenshots of my game.