• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Hey can someone help me

A

alphaslime13

Guest

alphaslime13Member
When i start up my game my character wont move it will like slightly move as its set when left key the sprite changes to a moving sprite and so on also when i start up my game the menu i created doesnt apear pls help anyone


Code:
if (sprite_index = Sans_Left){
sprite_index = Sans_Left_Moving;
}

if (sprite_index=Sans_Right){
sprite_index=Sans_Left_Moving;
}

if (sprite_index=Sans_Right_Moving){
sprite_index=Sans_Left_Moving;
}

if (sprite_index=Sans_Up){
sprite_index=Sans_Left_Moving;
}

if (sprite_index=Sans_Down){
sprite_index=Sans_Left_Moving;
}
 

XanthorXIII

Member
I'd recommend starting with the tutorials and going through them. The biggest issue I see here is nothing to modify the x/y coordinates of the object. Each object has a x/y property that needs to be changed for an object to move, for example to move right set x = x + 1. If the room is set to 30 speed, the obj will move 30 pixels per second. This might be too fast. If you want to move at say 15 pixels a second, the code would be x = x + (15/room_speed) although I would store 15 into a variable instead of hardcoding it. Try to use variables and not to hardcode it.
 

Cat

Member
Hmm... this thread looks a little familiar...

Anyway, this is just the animation code. XanthorXIII has some good advice, but bear in mind that we need to see how you are making the character actually move if you want help with a specific issue. Also, what event is the above code in? If it's at the end of the step event, you might have some problems with animation.
 
Top