Hiii I'm new

Reddoka

Member
Hi everyone, I'm new, I'm programming according to a tutorial but not as I like. In the tutorial, the character can move around as usual, but my character can't move left or right, only jump in directions.
Does anyone know why?? Please help me! Q^Q

Go beyond plastic - GameMaker Studio 2_ 1_30_2020 1_55_01 PM.png Go beyond plastic - GameMaker Studio 2_ 1_30_2020 1_55_19 PM.png Go beyond plastic - GameMaker Studio 2_ 1_30_2020 1_55_30 PM.png Made in GameMaker Studio 2 2020-01-30 13-55-54_Moment(2).jpg Made in GameMaker Studio 2 2020-01-30 13-55-54_Moment(3).jpg
~~~ Thanksss >w<
 

BB Scary

Member
I thing, line 21 is wrong. Because if you stand, x + sign(hsp) is 0.
try if (!place_meeting, x + (walksp / hsp), y, objground); // that return 1 or -1 for value X but i dont try in my pc, jist my idea
 

Reddoka

Member
I thing, line 21 is wrong. Because if you stand, x + sign(hsp) is 0.
try if (!place_meeting, x + (walksp / hsp), y, objground); // that return 1 or -1 for value X but i dont try in my pc, jist my idea
I don't know, but when I replaced to x + (walksp / hsp), an error appeared Q^Q
 

Slyddar

Member
What may be happening is the mask is getting stuck in the ground when you change sprites/masks. In the object there is a section where you can set the Collision Mask. Change it from "Same as Sprite" to a single sprite only, maybe the idle one.

I don't know, but when I replaced to x + (walksp / hsp), an error appeared Q^Q
The error is happening since hsp is 0, and dividing by zero is not possible.
 
Top