Nick der mit hut
Member
Hi, I made a short video to explain my problem a bit better:
As you can see in the video the player jumps a bit when shooting down after being in the air for a bit and then shooting downwards the player doesn't really move much. However when the player jumps and then shoots downwards directly after he jumps he reaches a much higher point.
It is a bit hard for new players to get the timing right on that however since shooting just before jumping also has little to no effect.
I want the kick to always be the same or have a simmilar effect even without jumping at the exact right moment.
I have a gunkicky variable (displayed directly above the player), the min&max depends on the weapon, the shotgun has a range of 5 and -5 and the pistols are 2 and -2. I'm pretty sure the problem isn't here.
Then theres a grv and a vsp.
My code for mooving vertically looks like this:
create
step
Jumping is basically just
But its fine since the player is on the ground and vsp is 0.
I can't do
It would be awesome if you could help me!
As you can see in the video the player jumps a bit when shooting down after being in the air for a bit and then shooting downwards the player doesn't really move much. However when the player jumps and then shoots downwards directly after he jumps he reaches a much higher point.
It is a bit hard for new players to get the timing right on that however since shooting just before jumping also has little to no effect.
I want the kick to always be the same or have a simmilar effect even without jumping at the exact right moment.
I have a gunkicky variable (displayed directly above the player), the min&max depends on the weapon, the shotgun has a range of 5 and -5 and the pistols are 2 and -2. I'm pretty sure the problem isn't here.
Then theres a grv and a vsp.
My code for mooving vertically looks like this:
create
GML:
vsp = 0;
grv = 0.3;
GML:
vsp += grv + gunkicky;
gunkicky = 0;
//Vertical Collision
if (place_meeting(x,y+vsp,oWall))
{
while(!place_meeting(x,y+sign(vsp),oWall))
{
y= y + sign(vsp);
}
vsp = 0;
}
//Mooving vertically
y += vsp;
vsp += -jumpspeed;
But its fine since the player is on the ground and vsp is 0.
I can't do
vsp = gunkicky;
since that would allow the player to fly.It would be awesome if you could help me!