f3cuk / WICKED-AI

Wicked AI missions for your server
30 stars 59 forks source link

[REQUEST] Progress based Heli Patrols #104

Closed RivenNZ closed 7 years ago

RivenNZ commented 10 years ago

How about a Heli Patrol that spawns only once certain conditions are met?

Here is my dirty hack I put into a static mission. It checks for when the number of static weapon placements have been reduced to less than 12 (18 to start with) and then at sometime in the next minute it will spawn a heli patrol.

[[13620.5,2946.62,0],[15144.0,232.000,0],200,10,"UH60M_EP1_DZ","hard","Random","Bandit"] spawn {
    private ["_undeployed","_patrolpos","_spawnpos","_patrolrad","_waypoints","_heli","_skill","_skin","_type","_condition","_value"];

    _undeployed = true; // Heli Patrol has not been deployed

    _patrolpos = _this select 0;
    _spawnpos = _this select 1;
    _patrolrad = _this select 2;
    _waypoints = _this select 3;
    _heli = _this select 4;
    _skill = _this select 5;
    _skin = _this select 6;
    _type = _this select 7;

    _value = 12;

    while {_undeployed} do {
        _condition = ai_emplacement_units;
        if(debug_mode) then { diag_log format["WAI: Skalisty mission heli-patrol test for %1 < %2", _condition, _value]; };
        if (_condition < _value) then {
            if(debug_mode) then { diag_log format["WAI: Skalisty mission heli-patrol spawning for %1 < %2", _condition, _value]; };
            [
                _patrolpos,
                _spawnpos,
                _patrolrad,
                _waypoints,
                _heli,
                _skill,
                _skin,
                _type
            ] spawn heli_patrol;
            _undeployed = false; // Heli Patrol has been deployed, do not deploy another
        };
        sleep 60;
    };  
};

I'm only a dirty hacker (copy/paste/debug) but I assume you could add _condition & _value and the loop into the heli_patrol code?

nerdalertdk commented 10 years ago

I like this idea, but think Ai killed count would be better, i don't have a mission with 18 static weapons :O

RivenNZ commented 10 years ago

Yep, I have one for number of AI ground troops left alive, which spawns more AI ground troops as backup. Another one for AI ground troops left alive that spawns more heli patrols.

Pretty much a progressive battle to take over Skalisty that gets harder the further in the players get, without having to initially spawn in over 200 AI, 35 Static Weapons, 4 Heli Patrols & 2 Para Drops which would kill the server near instantly.

Also looking into audible alarms that go off when the island is attacked and when reinforcements are deployed.

f3cuk commented 10 years ago

I think it might be best to do this the way you have done this. People already find it hard enough to build a static mission. Building a dynamic mission is probably only for the few that are able to do stuff like this.

What might come in handy is a place where we can share stuff like this for people that really take an interest in the mod and mission building.

Havoc302 commented 9 years ago

Now this sounds interesting, is it going to be added to the main mission system with a couple of examples that run which can be toggled on and off? Something like a dynamicmission = true / false?

f3cuk commented 9 years ago

RIght now i have no plans for creating any content. We could however make a functions that allows for better "progress based mission" support, without making stuff overcomplicated for the admins.