custom spawn

  1. 9 years ago
    Edited 9 years ago by DaVidoSS

    Hi
    I wanna spawn 15 groups of hostile AI in 15 markers area with defend marker area task and virtualize them. How to achieve that?

  2. You can see how to in the ALiVE wiki.

    Spawn & Profile Group Script By Jman

    Greets.

  3. I dont knew how to use that code

  4. Edited 9 years ago by M4RT14L

    Put this on your init.sqf:

    ALIVE_spawnProfileGroup = compile (preprocessFileLineNumbers "fnc_spawnProfileGroup.sqf");

    Create fifteen Markers in example mkr_1, mkr_2 to mkr_15

    Now put this in your init.sqf or in a sqf file to run a script

    [getMarkerPos "mkr_1", false, getMarkerPos "mkr_1", "GROUPTYPE", "GROUPFACTION"] call ALIVE_spawnProfileGroup;
    getMarkerPos "mkr_2", false, getMarkerPos "mkr_2", "GROUPTYPE", "GROUPFACTION"] call ALIVE_spawnProfileGroup;
    getMarkerPos "mkr_3", false, getMarkerPos "mkr_3", "GROUPTYPE", "GROUPFACTION"] call ALIVE_spawnProfileGroup;
    getMarkerPos "mkr_4", false, getMarkerPos "mkr_4", "GROUPTYPE", "GROUPFACTION"] call ALIVE_spawnProfileGroup;
    getMarkerPos "mkr_5", false, getMarkerPos "mkr_5", "GROUPTYPE", "GROUPFACTION"] call ALIVE_spawnProfileGroup;
    getMarkerPos "mkr_6", false, getMarkerPos "mkr_6", "GROUPTYPE", "GROUPFACTION"] call ALIVE_spawnProfileGroup;
    getMarkerPos "mkr_7", false, getMarkerPos "mkr_7", "GROUPTYPE", "GROUPFACTION"] call ALIVE_spawnProfileGroup;
    getMarkerPos "mkr_8", false, getMarkerPos "mkr_8", "GROUPTYPE", "GROUPFACTION"] call ALIVE_spawnProfileGroup;
    getMarkerPos "mkr_9", false, getMarkerPos "mkr_9", "GROUPTYPE", "GROUPFACTION"] call ALIVE_spawnProfileGroup;
    getMarkerPos "mkr_10", false, getMarkerPos "mkr_10", "GROUPTYPE", "GROUPFACTION"] call ALIVE_spawnProfileGroup;
    getMarkerPos "mkr_11", false, getMarkerPos "mkr_11", "GROUPTYPE", "GROUPFACTION"] call ALIVE_spawnProfileGroup;
    getMarkerPos "mkr_12", false, getMarkerPos "mkr_12", "GROUPTYPE", "GROUPFACTION"] call ALIVE_spawnProfileGroup;
    getMarkerPos "mkr_13", false, getMarkerPos "mkr_13", "GROUPTYPE", "GROUPFACTION"] call ALIVE_spawnProfileGroup;
    getMarkerPos "mkr_14", false, getMarkerPos "mkr_14", "GROUPTYPE", "GROUPFACTION"] call ALIVE_spawnProfileGroup;
    getMarkerPos "mkr_15", false, getMarkerPos "mkr_15", "GROUPTYPE", "GROUPFACTION"] call ALIVE_spawnProfileGroup;

    Or simpliest way, create 15 groups in the editor and synch with ALiVE Profiles Module.

    Check Out ALiVE tutorials, they are very easy to understand and very comprehensive.

  5. Edited 9 years ago by DaVidoSS

    Thanks. Now i have other problem.

    While the marker area was cleared the marker is removed but if you reconnect the marker is back there.
    Why?
    How to prevent show marker if there are no profiled units inside?
    ((count ([getposATL thisTrigger, 50, ["EAST","entity"]] call ALIVE_fnc_getNearProfiles)) > 0);

  6. Edited 9 years ago by SavageCDN

    you could have a trigger check for profiled units in the marker area, then if none use setMarkerAlpha=0 to hide them (or I suppose you could delete the marker itself).

    https://community.bistudio.com/wiki/setMarkerAlpha

  7. Is there are any possibility to create tasks by script using ALiVE functions?

 

or Sign Up to reply!