Home   Help Search Login Register  

Author Topic: Executing Secop manager via trigger later in mission  (Read 2090 times)

0 Members and 1 Guest are viewing this topic.

Offline Pr0ph3t

  • Members
  • *
Hi everyone,

So for the first part of the mission I want you to be able to call in support but not get random missions.
So that part works fine, I've been reading extensively on nominesine's work..
However, when you hold a specific area, I want it to begin generating missions until 6am and then you can call exfil

So far we have

init.sqf
~~~~
Code: [Select]
waitUntil {!isNil {nomin_SOM1 getVariable "initDone"}};
waitUntil {nomin_SOM1 getVariable "initDone"};
this setVariable ["settings", [[], true, nil, nil, false]];

manual_secops.sqs
~~~~~~~~~~~~
Code: [Select]
_nowtime = 430
_timeofday = daytime
_timeleft = (_timeofday - 430)
\\ Basically what I'm trying to do here is say current time - 0430 since mission begins that time
\\ and when timeleft = 130 it means 1 1/2 hours have passed right? so then I want it to \\ stop                generating missions

for _timeleft > 130 do

{
_timeofday = daytime
_timeleft = (_timeofday - 430)

waitUntil {!isNil {nomin_SOM1 getVariable "initDone"}};
waitUntil {nomin_SOM1 getVariable "initDone"};

_randomMission = random 8
? _randomMission <= 1: ["destroy", true, nomin_SOM1] call BIS_SOM_requestSecOpFunc; 
? _randomMission > 1 AND _randomMission <= 2: ["ambush", true, nomin_SOM1] call BIS_SOM_requestSecOpFunc;
? _randomMission > 2 AND _randomMission <= 3: ["attack_location", true, nomin_SOM1] call BIS_SOM_requestSecOpFunc; 
? _randomMission > 3 AND _randomMission <= 4: ["trap", true, nomin_SOM1] call BIS_SOM_requestSecOpFunc; 
? _randomMission > 4 AND _randomMission <= 5: ["rescue", true, nomin_SOM1] call BIS_SOM_requestSecOpFunc; 
? _randomMission > 5 AND _randomMission <= 6: ["defend_location", true, nomin_SOM1] call BIS_SOM_requestSecOpFunc; 
? _randomMission > 6 AND _randomMission <= 7: ["search", true, nomin_SOM1] call BIS_SOM_requestSecOpFunc; 
? _randomMission > 7 AND _randomMission <= 8: ["escort", true, nomin_SOM1] call BIS_SOM_requestSecOpFunc;
? _randomMission > 8: ["patrol", true, nomin_SOM1] call BIS_SOM_requestSecOpFunc;
sleep (random 600)+60 \\ Maximum chance of 11 mins before receiving mission
};

IN-EDITOR
~~~~~~~
Code: [Select]
SOM synched with player
SOM INIT STRING: this setVariable ["settings", [ [], true, ["Swordsman", ["Swordsman"], "Battlemage", ["Battlemage"]], 120, false]];
SOM NAME: nomin_SOM1 \\ didn't feel like changing his values

RADIO ALPHA TRIGGER
~~~~~~~~~~~~~~
Code: Alpha
Activation:
[["transport", "aerial_reconnaissance", "supply_drop", "tactical_airstrike", "artillery_barrage"], player] call BIS_SOM_addSupportRequestFunc;

NOTE: I tried running this simply by activating the trigger.. is the ONLY way to start this up to radio alpha? (no big deal I can just integrate that into the mission)

RANDOM MISSIONS TRIGGER
~~~~~~~~~~~~~~~~~~
Condition: phase1=true
Activation: player execVM "manual_secops.sqs" <--- CANNOT CLICK OK says "expected script, type NOTHING"

So this is where I'm stuck..
First I have to determine if there's something wrong with the manual_secops.sqs script, and second I need it to start triggering missions between whatever time you capture a waypoint until 0600
« Last Edit: 25 Oct 2009, 14:34:27 by Planck »