- 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];
}