Gravity (style)

From Hedgewars Wiki
Jump to: navigation, search

Gravity is a simple style which changes the main gravity. You must use the script parameter in order to change it. Without the script parameter, this style does nothing.

Script parameters

The Script Parameter Standard Format is used.

Basic usage

Set g to set the gravity, the value is the desired gravity in percent.

Examples

Set the gravity to 200%:

g=200

Set the gravity to 50% (Note: The same effect can be achieved without styles, just activate Low gravity):

g=50

Advanced usage

If you set g, g2 and period, the script will change the gravity all the time, the gravity will start at g and will rise up to g2 and then go back to g, and so on. period is the time in milliseconds for one single period (that is, from g to g2 and then back).

If period is a negative value, the gravity will not oscillate but be random between the two bounds. In this case, the period is the absolute value of period.

Examples

Oscillating gravity from 50% to 150% (and back) with a period of 4 seconds.

g=50, g2=150, period=4000

Random gravity, changing between 50% and 150% with a period of 10 seconds.

g=50, g2=150, period=-10000


Known bugs

Low gravity does not work together with this style. It is ignored completely.