GameMaker (2.3)
Icon

Motion Scripts

Avis

You must be logged in to obtain assets

Description

These scripts allow you to "replace" the following built-in variables in GMS2.

hspeed -> hsp (or whatever you want) vspeed -> vsp (or whatever you want) speed -> whatever you want direction -> whatever you want motion_set() -> motion_set_custom() motion_add() -> motion_add_custom() note: to make this work you need to add some code to any objects that use this.

to create event:

hsp = 0 vsp = 0

to step event (I usually put it at the end of the regular step, but you can put it in any step or draw event, or even in a script):

x += hsp y += vsp

main why you might want to use this:

1 - if you turn on the built-in physics system, it completely disables hspeed/vspeed/speed/direction, this lets you get around that.

2 - this gives you better control over speeds, which makes things like pausing the game a lot easier. An example of what makes this useful is if you are adding pausing to your game, to pause an objects movement all you need to do is check if the game is paused, if it is, do not run the x+=hsp and y+=vsp. This lets you pause your game while still preserving those values, rather than needing to save them and reset them like you would with the default system.

This is provided "as is". I do not guarantee it won't cause issues with your projects and I do not promise to provide support if you have issues with it. That being said, you can ask me questions on my Discord Server, or in the comments on this page.

End User Licence Agreement (EULA).

Age Rating: 4+

Version

GMS2.3 - Version 1.0.0. Published January 10, 2022

Loading, please wait

Package contents

Loading, please wait

What is the issue?

Loading, please wait