$$ACTION Weather Turn lightning ON with frequency of [f:Seconds=5.0] and probability of [p:Probability=0.5] aLightningTurnOn Turn lightning ON Turns on the lightning Parameters: Seconds: How often to check to create lightning Probability: The chance of creating lightning at each check $$END */
| 1447 | $$END |
| 1448 | */ |
| 1449 | void aLightningTurnOn(float check_delay, float prob) { |
| 1450 | msafe_struct mstruct; |
| 1451 | |
| 1452 | mstruct.state = true; |
| 1453 | mstruct.scalar = check_delay; |
| 1454 | mstruct.randval = static_cast<int>(prob * static_cast<float>(RAND_MAX)); |
| 1455 | |
| 1456 | MSafe_CallFunction(MSAFE_WEATHER_LIGHTNING, &mstruct); |
| 1457 | } |
| 1458 | |
| 1459 | /* |
| 1460 | $$ACTION |