• 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!

Legacy GM [GMS 1.4] Movement code that worked for one project won't work for this one

A

AngelofGamin

Guest
-I get no errors, it just simply refuses to move
-double checked if its the exact code i had for the previous project
-left out animations
-other inputs I made work such as using the arrows to launch projectiles
s3.png
 
A

AngelofGamin

Guest
What made you think checking keyboard input only in the Create event is a good idea?

Good code in a bad spot is bad code.
already tried that. didn't work in the step event either.
 

FrostyCat

Redemption Seeker
You also left out the part for incrementing x and y for the Step event.

Please, take some time tracing out and understanding the code you're copying.
 
A

AngelofGamin

Guest
You also left out the part for incrementing x and y for the Step event.

Please, take some time tracing out and understanding the code you're copying.
That's weird though, on other projects, it works just fine as it is. I could even give you what I had written out in the original.
 

TheouAegis

Member
Obviously it doesn't work just fine as is in other projects, because everybody here is telling you that code posted is garbage. And Frosty has been coding longer than most people here, so when Frosty says your code does not, will not, and cannot work, then it doesn't matter what you think your other projects did -- the code is still wrong and you are obviously mistaken. If code works in one project and not in another, then the two projects are not the same, so you messed the code up in the project where it doesn't work. Period.

Create event action 1 needs to be in the Step Event.

Create event action 2 needs to stay in the Create event.

The Step event or End Step event needs to add hsp to x and vsp to y.

Maybe you had key_left, et al defined as macros in the create event in the other project.
 
A

AngelofGamin

Guest
Obviously it doesn't work just fine as is in other projects, because everybody here is telling you that code posted is garbage. And Frosty has been coding longer than most people here, so when Frosty says your code does not, will not, and cannot work, then it doesn't matter what you think your other projects did -- the code is still wrong and you are obviously mistaken. If code works in one project and not in another, then the two projects are not the same, so you messed the code up in the project where it doesn't work. Period.

Create event action 1 needs to be in the Step Event.

Create event action 2 needs to stay in the Create event.

The Step event or End Step event needs to add hsp to x and vsp to y.

Maybe you had key_left, et al defined as macros in the create event in the other project.
oh whoops sorry i forgot, to reply to the first person, I had figured it out already, thank you anyways <3

i had my hsp/vsp application on the collision step event on my previous project
 
Top