Simple But Useful: Save Gravity
Posted: Mon Mar 07, 2011 1:03 am
This function is a simple one that allows you to save the xvelocity and yvelocity of the actor that applied the code. To use:
HOW TO:
Make an array variable like this:
This is useful for those who want to make a custom pause menu.
The code: (Place in Global Code)
- Code: Select all
SaveGrav();
UseSavedGrav();
HOW TO:
Make an array variable like this:
This is useful for those who want to make a custom pause menu.
The code: (Place in Global Code)
- Code: Select all
void SaveGrav() {
gravity[0]=xvelocity;
gravity[1]=yvelocity;
}
void UseSavedGrav() {
xvelocity=gravity[0];
yvelocity=gravity[1];
}