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
- Number
floating-point
- Number
- Attachment
- none
INI example
[Actions]
<TriggerID>=1,71,0,<Number>,0,0,0,0,Writing a usable step
Section titled “Writing a usable step”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 write | Step | Moves the level by |
|---|---|---|
1028443341 | 0.05 | 5 hundredths |
1036831949 | 0.1 | 10 hundredths |
1048576000 | 0.25 | 25 hundredths |
1056964608 | 0.5 | 50 hundredths |
[Actions]SlowFade=1,71,0,1036831949,0,0,0,0, ; trigger SlowFade sets a step of 0.1The 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
1008981771to1148846080, read as the 32-bit pattern of a single-precision floating-point step from 0.01 to 1000. Decimal text such as.1does not give the step it names.
Caveats
- A decimal such as
.1is read as0and sets a step of zero. Any whole number from1to1008981770sets 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.