Skip to content

71 — Set ambient step...

Replaces the ambient light fade step in the loaded rules, reading the number as the raw bits of a floating-point value.

Editor data
Numeric ID
71
Engine ID
TACTION_SET_AMBIENT_STEP
Editor name
Set ambient step...
Need token
NEED_FLOAT
Parameters
  1. Numberfloating-point
Attachment
none
INI example
[Actions]
<TriggerID>=1,71,0,<Number>,0,0,0,0,

To set a step, write the whole number whose bit pattern is the single-precision float of that step. Each step moves the ambient level by whole hundredths, rounded down.

Number to writeStepMoves the level by
10284433410.055 hundredths
10368319490.110 hundredths
10485760000.2525 hundredths
10569646080.550 hundredths
map file
[Actions]
SlowFade=1,71,0,1036831949,0,0,0,0, ; trigger SlowFade sets a step of 0.1

The single-precision float nearest 0.01 is slightly below it, so its bit pattern, 1008981770, moves the level by nothing. The smallest number that moves the level is 1008981771.

Valid values

  • A whole number from 1008981771 to 1148846080, read as the 32-bit pattern of a single-precision floating-point step from 0.01 to 1000. Decimal text such as .1 does not give the step it names.
Caveats
  • A decimal such as .1 is read as 0 and sets a step of zero. Any whole number from 1 to 1008981770 sets a step too small to move the light. Either way the ambient light stops changing, and a fade to a new level never arrives.
  • A negative number breaks the fade. A step between 0 and -0.01 stops the light as a step of zero does. Any other negative number can move the light away from its target at every change, with no limit.
  • A step much larger than 1000 can move the light far out of range.
  • The action changes the rules value [AmbientChangeStep](/keys/ambientchangestep/), so it applies to every fade from then on, including an [ion storm](/systems/ion-storms/)'s, and a saved game keeps it. The key page says how long the change lasts.