Comrades in Arms Discussion Board

Full Version: Scripting wishlist
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Since I'm not sure what to cover next, I'll just open this topic and let you ask: If you need some script for some common task, post it here, and I'll try to dig out something I already have
Enemy reinforcements script ie. spawned enemies that get cleaned up after death, so you don't need a battalion's worth of pre-placed ones. Optional mode of their insertion ie. by ground, by air, on foot.

A snow/snowstorm script that has decent effects quality and can be freely used? :p
This is a modified script which I use for snow in my winter missions. Change parameter in line 32 to affect intensity. This script is run on a local client.  Original script is for A2 Eagle Wing campaign to simulate ash. I found it from Kylanias website and modified it a bit.


Code:
sleep 1;
snowEffect = [] spawn {
   
    _pos = position player;
    _parray = [
    /* 00 */        ["A3\Data_F\ParticleEffects\Universal\Universal", 16, 12, 8, 1],
    /* 01 */        "",
    /* 02 */        "Billboard",
    /* 03 */        1,
    /* 04 */        8,
    /* 05 */        [0,0,0],
    /* 06 */        [0,0,0],
    /* 07 */        1,
    /* 08 */        0.000001,
    /* 09 */        0,
    /* 10 */        1.4,
    /* 11 */        [0.05,0.05],
    /* 12 */        [[1,1,1,1]],
    /* 13 */        [0.5,1],
    /* 14 */        0.2,
    /* 15 */        1.2,
    /* 16 */        "",
    /* 17 */        "",
    /* 18 */        vehicle player
    ];
   
  _snow = "#particlesource" createVehicleLocal _pos; 
    _snow setParticleParams _parray;
    _snow setParticleRandom [0, [10, 10, 7], [0, 0, 0], 0, 0.01, [0, 0, 0, 0.1], 0, 0];
    _snow setParticleCircle [0.0, [0, 0, 0]];
    _snow setDropInterval 0.001; // Adjust this for intensity of the effect

    _oldPlayer = vehicle player;
    while {true} do {
        waituntil {vehicle player != _oldPlayer};
        _parray set [18,vehicle player];
        _snow setParticleParams _parray;
        _oldPlayer = vehicle player;
        sleep 0.5;
    };
};
Wish (probably trivial)

What is proper way to check that ALL playable units + AI in players groups have been properly initialized at mission start? It is for a teleport script meant to be ran at mission start on dedicated. I.e I don't want the script to fire if half of players are still in loading screen. I was thinking player == player as condition but player is null on dedicated.