Home   Help Search Login Register  

Author Topic: mission.sqf  (Read 6151 times)

0 Members and 1 Guest are viewing this topic.

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: mission.sqf
« Reply #15 on: 22 Feb 2009, 19:28:57 »
seems to be part of the VBS 3d editor i guess.
probably was left over code from pre arma or forgot to remove in a patch.

arma configs also contain the basic 3d editor interface

Offline Rommel92

  • Members
  • *
Re: mission.sqf
« Reply #16 on: 23 Feb 2009, 00:45:03 »
- You won't be able to use your gun without a finishMissionInit in your mission.sqf. [1]

Or if you push "F".  :P

- initAmbientLife creates all those insects and seagulls.

I can still hear the ambient noise however?

It'd be nice if BIS gave examples of all the capabilities of this game, and what exactly is run on Mission.sqm.

My findings:

Code: (MP) [Select]
setPlayable eunit1;
setPlayable eunit2;

setPlayable wunit1;

Allowed the player to use the units, otherwise he would have a blank screen.

Code: [Select]
activateAddons ["CaCharacters"]
Was needed to stop the error appearing.
« Last Edit: 23 Feb 2009, 01:20:01 by Rommel92 »

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: mission.sqf
« Reply #17 on: 23 Feb 2009, 02:35:57 »
I can still hear the ambient noise however?
Yes, the background noise seems to be always there. The initAmbientLife command probably reads the configFile >> "CfgWorlds" >> worldName >> "Ambient" section.

Was needed to stop the error appearing.
Uhm, the error? Could you provide some more details? The mission runs flawless here, even if started directly (C:\...\arma.exe -init=playMission["","true_sqmless.intro"]).
try { return true; } finally { return false; }

Offline Rommel92

  • Members
  • *
Re: mission.sqf
« Reply #18 on: 23 Feb 2009, 02:45:17 »
Was needed to stop the error appearing.
Uhm, the error? Could you provide some more details? The mission runs flawless here, even if started directly (C:\...\arma.exe -init=playMission["","true_sqmless.intro"]).

It did appear in singleplayer, however when attempted multiplayer it would fail when loading the addons required. Hence I needed to activate them via the code above.

 ;)

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: mission.sqf
« Reply #19 on: 23 Feb 2009, 21:39:44 »
Here is my knowledge about activateAddons:
http://dev-heaven.net/boards/8/topics/show/73#message-74

Here is some code from my vehicle DM.
At least to my tests this stuff works:

Code: [Select]
...

// Preload/Initialize the ambient life.
initAmbientLife;

// Disable environmental effects (ambient life + sound).
enableEnvironment false;

// Finish world initialization before mission is launched.
finishMissionInit;

// Global variable to signal that all briefing processing has been completed.
ACEIP_InitDone = true;

_marker = createMarker ["ACEIP_InitDone",[0,100]];
_marker setMarkerShape "ICON";
_marker setMarkerType "DOT";
_marker setMarkerColor "ColorGreen";
_marker setMarkerText "Initialization done.";

// mission briefing initialization ends here
sleep 1;

// wait until variable is synced
waitUntil{!(isNil "ACE_ISLAND_STARTPOS")};

...

if (isServer) then
{
ACEIP_Flag = createVehicle ["FlagCarrierNorth",ACE_ISLAND_STARTPOS,[],0,"FLY"];
call ACEIP_VehicleSetSelection;

// sync variables with clients
publicVariable "ACEIP_ActivateAddons";
publicVariable "ACEIP_GroundTypes";
publicVariable "ACEIP_AirTypes";
publicVariable "ACEIP_Flag";
};

// wait until variable is synced
waitUntil{!(isNil "ACEIP_Flag")};

// preload active cfgPatches
activateAddons ACEIP_ActivateAddons;

// preload active models
if !(isNull player) then
{
//{ _foo = _x createVehicleLocal[-100000,-100000,0]; if (!isNull _foo) then { deleteVehicle _foo; }; } forEach ACEIP_GroundTypes;
//{ _foo = _x createVehicleLocal[-100000,-100000,0]; if (!isNull _foo) then { deleteVehicle _foo; }; } forEach ACEIP_AirTypes;
{ waitUntil {50 preloadObject "_x"}} forEach ACEIP_GroundTypes;
{ waitUntil {50 preloadObject "_x"}} forEach ACEIP_AirTypes;
};

// wait for preloading to finish
titlecut ["Building mission, please wait","PLAIN"];
sleep 5;

...