Glad to hear! I wish you lots of fun with them :)!
Rob van Saaze
Creator of
Recent community posts
Hi Jose,
Thanks for reaching out. If you look in the script "motion" you will find all the states under the green comments (collapse all regions).
Instead of a classic switch statement, the script uses if statements and calls exit (exiting the code) after performing actions for a certain state.
If you want to use a classic switch statement, just add a switch statement and state variable, wrap the original code in another state that you call whatever you want and voila!
Indeed! The player never collides with anything. As you will find while you gain more knowledge, you generally want to prevent collisions rather than detect them and then fix them. You will have to use a floorcolor switch or write your own collision in the step event using place_meeting(x,y+1,objectocheckfor) {}. Good luck!
You need to put the code where the original code for drawing the player is. You will also want to draw image_index of -1 if the sprite is animated. For questions like these you should check out the r/gamemaker Discord server: https://discordapp.com/invite/By6u9pC
You can always ask questions! For simple stuff I recommend you join the r/gamemaker discord, there are always people willing to help there even when I won't be available (I work full-time). They will know how to use draw events and such. If you are on the latest update (recommended) you can easily add animations using the animstate variable!
This variable is found in the create event. The engine automatically updates it.
So in the draw event you could do the following:
if (animstate = 1) {
draw_sprite(sprite_player_moving_left,0,0,0);
//Notice how I use 0,0 as x and y, since the matrix_set is already translating the player.
}
This would draw the sprite for the player moving left if the animation state equals one (which means the player is moving left).
NOTE: I agree the draw event could use more comments. I'll add some for the next update. Thanks.
They are marginally faster (my way is really well-optimized), however they have a hard time allowing for slopes, moving (jump through) platforms and some of the other fancy stuff I'm doing. I reckon I could, but I am on the fence as I think the 10%+- performance gain that we can gain will complicate the engine by a lot. Additionally, as this runs at over 3000fps on my laptop, I think performance is not a problem right now.
Hey! It is used mostly for the sake of being lightweight. You can easily change it to another variable such as the object_index, sprite_index, or whatever you fancy. To find GML raw color values i generally use https://chrisanselmo.com/gmcolor/. If you want to change the image_blend in the room, double click an object and there should be a rectangle indicating the image_blend color. Double-click that and you can pick one that you like. Let me know if you have any more questions!