From SRB2 Wiki
Jump to: navigation, search

A_SetCustomValue is an action that changes the actor's custom value. Var1 and Var2 control how the custom value is modified:

Var2 New custom value
0 Var1
1 Old custom value - Var1
2 Old custom value + Var1
3 Apply modulo Var1 to old custom value
4 Old custom value ÷ Var1
5 Old custom value × Var1

Note that if an attempt is made to divide by zero (i.e.: Var1 is 0, and Var2 is 4), this action will do nothing. If development mode is enabled when this action is called, messages will be printed into the console stating the initial and new custom values.

This action originates from the v2.0 modification SRB2Morphed and was added to SRB2 itself in v2.1.

  Actions – Custom value [view]