Beware ordnance modules
Posted: Sat Nov 21, 2015 8:05 am
In my latest mission Tea Time I used about a dozen ordnance modules each synced to their own trigger with slightly different delays in order to make a pre-attack artillery barrage.
This broke the spectator scripts as well as the script that allows players to become zeus mid-mission.
How? no idea... But it does. If I remove the triggers or the ordnance or their synchronization everything works again.
So instead I removed all but one of the triggers and replaced the ordnance modules with cartridge modules with this code in their init:
Then I have a trigger that on activation does:
And a function in my init.sqf that does:
So instead it dynamically creates the ordnance modules which then fire immediately.
Why does this fix it? no idea... but after I did this the barrage stopped breaking zeus so whatever.
This broke the spectator scripts as well as the script that allows players to become zeus mid-mission.
How? no idea... But it does. If I remove the triggers or the ordnance or their synchronization everything works again.
So instead I removed all but one of the triggers and replaced the ordnance modules with cartridge modules with this code in their init:
Code: Select all
if(isNil ""artillery"") then {artillery = [];};z = artillery pushBack this;
Code: Select all
[] call goArty;
Code: Select all
goArty = {
{
_x spawn {
sleep (random 10);
_pos = "ModuleOrdnanceHowitzer_F" createVehicle (position _this);
};
} forEach artillery;
};
Why does this fix it? no idea... but after I did this the barrage stopped breaking zeus so whatever.