@grungegames First Question answer: It isn't necessary to write Obj_hero.Hspeed, but I did it because it looks better. :) But you would have to refer to the player, if you were writing codes on another objects.
Second Question answer: If I didn't setted the hspeed to 0, would the hspeed continued going down, which means that I would begun to accelrate backwards. Also when the Hspeed reaches 0 after the sliding will the player stop untill you are moving again. Last Question comes at a new comment
@grungegames Third Question answered: If you mean this line; "Friction = 0.10", can I explain it easily. I dont really know why I wrote that. actually It isn't necesarry to type 0 after the 1. It is enough to just type in this "Friction = 0.1".
You know; 0.1 = 0.10 = 0.100 = 0.1000 = 0.100000 etc.
@rastinder If you're talking about the line between "friction = 0.01" and "if obj_hero.hspeed" then it would be because it looks cleaner and is easier to read. I do it all the time, it separates the blocks of code that don't belong with each other; what belongs is up to you.
Yo, it's claiming my object doesn't exist...the name is Player, I write it like 'obj_player' in the execute code and when I touch the ice it gives me a error pop-up.
@Supertoad25 Well I am pretty sure I can help you out, but first you have to show me all the codes that you typed in that's involving sliding. Then will I most likely find whats wrong ;)
When I saying show the codes, I mean that you are duplicating your codes from game maker into a comment as a reply.
when i run the friction stops me in my tracks but when i run a little bit and then let go i slide but if i hold down run i stop and can't move if you cold help me with that would be great if not i probably could figure it out.
thanks, I like this Video and it helps me a lot to create a better game
DarkXSam 5 months ago
how did you program your hero's default movement. i mean, how is he going to move when he's not on ice?
heriMasterOfPuppets 6 months ago
I have 3 questions:
Why do you refer to 'obj_hero' from within obj_hero?
Why would you set the hspeed to 0 if hspeed is already 0?
And why do you put a 0 after the 1 when setting friction?
I'm not trying to be mean I sincerely want to know why.
grungegames 11 months ago
@grungegames First Question answer: It isn't necessary to write Obj_hero.Hspeed, but I did it because it looks better. :) But you would have to refer to the player, if you were writing codes on another objects.
Second Question answer: If I didn't setted the hspeed to 0, would the hspeed continued going down, which means that I would begun to accelrate backwards. Also when the Hspeed reaches 0 after the sliding will the player stop untill you are moving again. Last Question comes at a new comment
lalabEsjen 11 months ago
@grungegames Third Question answered: If you mean this line; "Friction = 0.10", can I explain it easily. I dont really know why I wrote that. actually It isn't necesarry to type 0 after the 1. It is enough to just type in this "Friction = 0.1".
You know; 0.1 = 0.10 = 0.100 = 0.1000 = 0.100000 etc.
lalabEsjen 11 months ago
@grungegames u havent asked why he skipped 3rd line in coding
rastinder 2 weeks ago
@rastinder If you're talking about the line between "friction = 0.01" and "if obj_hero.hspeed" then it would be because it looks cleaner and is easier to read. I do it all the time, it separates the blocks of code that don't belong with each other; what belongs is up to you.
grungegames 2 weeks ago
Yo, it's claiming my object doesn't exist...the name is Player, I write it like 'obj_player' in the execute code and when I touch the ice it gives me a error pop-up.
Please help.
Supertoad25 11 months ago
@Supertoad25 Well I am pretty sure I can help you out, but first you have to show me all the codes that you typed in that's involving sliding. Then will I most likely find whats wrong ;)
When I saying show the codes, I mean that you are duplicating your codes from game maker into a comment as a reply.
lalabEsjen 11 months ago
@lalabEsjen Well, I discussed this somewhere else...so I don't have it, but I can retype it:
hspeed = -4
friction = 0.10
if obj_Player.hspeed = 0
{
hspeed = 0
}
;Player moves at a speed of 1, also I renamed him 'Hero' to see if that would work, but it didn't.
Also I took the liberty of writing vspeed for up and down.
Supertoad25 11 months ago
never mind i fixed it no need to strain your fingers im good
skat3forfun 1 year ago
when i run the friction stops me in my tracks but when i run a little bit and then let go i slide but if i hold down run i stop and can't move if you cold help me with that would be great if not i probably could figure it out.
skat3forfun 1 year ago