Global Mobilization Script Snippets: Difference between revisions
Lou Montana (talk | contribs) m (Some wiki formatting) |
(→Searchlight Guard Towers: updated guard tower script snippet) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 164: | Line 164: | ||
class gm_teletype_stroke_01 | class gm_teletype_stroke_01 | ||
{ | { | ||
name = ""; | |||
titles[] = {}; | |||
sound[] = { "@gm\gm_missions\gm_campaign_01\missions\gm_campaign_intro.gm_weferlingen_summer\sounds\gm_teletype_stroke_01.ogg", 3, 1, 100 }; | |||
}; | }; | ||
class gm_teletype_stroke_02 : gm_teletype_stroke_01 | class gm_teletype_stroke_02 : gm_teletype_stroke_01 | ||
{ | { | ||
sound[] = { "@gm\gm_missions\gm_campaign_01\missions\gm_campaign_intro.gm_weferlingen_summer\sounds\gm_teletype_stroke_01.ogg", 3, 0.98, 100 }; | |||
}; | }; | ||
class gm_teletype_stroke_03 : gm_teletype_stroke_01 | class gm_teletype_stroke_03 : gm_teletype_stroke_01 | ||
{ | { | ||
sound[] = { "@gm\gm_missions\gm_campaign_01\missions\gm_campaign_intro.gm_weferlingen_summer\sounds\gm_teletype_stroke_01.ogg", 3, 1.02, 100 }; | |||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 350: | Line 350: | ||
if isServer then | if isServer then | ||
{ | { | ||
gm_fr_guardTowerCrew = ["gm_gc_army_rifleman_mpiak74n_80_str"]; // change the classnames in here to the type of soldier you want | |||
gm_fr_alarmSirenSound = "gm_alarmHorn"; // you can change this to other sounds | |||
gm_fr_alarmFlareAmmoType = "gm_flare_illum_red"; // you can change this to other flare sounds | |||
gm_fr_side_friendly = west; // use the appropriate side for your enemies | |||
gm_fr_side_enemy = east; // use the appropriate side for your enemies | |||
gm_fr_extendedDebugMode = 0; // leave it as 0 | |||
{ | gm_alias_fr_fnc_debugMarker = [{ "" }]; // leave this the way it is | ||
gm_alias_fr_fnc_raiseAlarm = [gm_fr_fnc_raiseAlarm]; | |||
gm_alias_fr_fnc_shootFlare = [gm_core_fnc_shootIllumFlare]; | |||
{ | |||
_x call gm_fr_fnc_makeBorderTurret; | |||
} forEach allMissionObjects "gm_missionHelper_guardtower"; // you can change the logic type to any object you want, best to leave it this way | |||
};</sqf> | };</sqf> | ||
Latest revision as of 17:24, 13 January 2024
This page serves as a place to collect all smaller known script snippets (and other tricks) related to using the content of Global Mobilization.
Destroy specific chunks of a house
Use this code on an invisible object nearby the house. chunk_01_hp to chunk_11_hp. But most homes only have 3-4 chunks.
Extend a vehicle's large antenna
To lower it again, set the second parameter from 1 to 0. If you want to have a slow assembly/disassembly animation, omit the last parameter that is set to true in this example.
Close the XSW-30 target searchlight on the Leopard tanks
Set the second parameter to 1 to open it again. Warning: This doesn't affect the searchlight functionality. It will shine through closed doors.
Open doors and hatches on a vehicle
Animate the M113's main rear hatch:
All doors and hatches in GM follow a unified naming standard:
<type>_<row>_<side>_source
A list of most commonly found doors and hatches:
- hatch_1_1_source
- hatch_1_2_source
- hatch_2_1_source
- hatch_2_2_source
- door_1_1_source
- door_1_2_source
- door_2_1_source
- door_2_2_source
It varies per asset, so you may have to try a few combinations until you find the right animation.
Set a vehicle's tactical sign
The array is in format [preIconNumber, preIconNumberFont, tacticalSymbol, postIconNumber, postIconNumberFont]:
- preIconNumber: String - pre-icon number
- preIconNumberFont: String - pre-icon number font
- tacticalSymbol: String - tactical symbol; for available tactical symbols browse configFile >> "gm_tacticalSigns"; possible values:
- "gm_tacticalSign_nato_armored"
- "gm_tacticalSign_nato_armoredEngineer"
- "gm_tacticalSign_nato_armoredRecon"
- "gm_tacticalSign_nato_artillery"
- postIconNumber: String - post-icon number
- postIconNumberFont: String - post-icon number font
GM flags present on a flagpole
Place an existing flagpole, and write the following into the init-field of this object:
The following flags are available from within GM:
- gm_flag_au_co.paa
- gm_flag_be_co.paa
- gm_flag_bu_co.paa
- gm_flag_ca_co.paa
- gm_flag_cs_co.paa
- gm_flag_cz_co.paa
- gm_flag_dk_co.paa
- gm_flag_fi_co.paa
- gm_flag_fr_co.paa
- gm_flag_gc_co.paa
- gm_flag_ge_co.paa
- gm_flag_gr_co.paa
- gm_flag_hu_co.paa
- gm_flag_ic_co.paa
- gm_flag_it_co.paa
- gm_flag_lu_co.paa
- gm_flag_nato_co.paa
- gm_flag_nl_co.paa
- gm_flag_no_co.paa
- gm_flag_pl_co.paa
- gm_flag_po_co.paa
- gm_flag_ro_co.paa
- gm_flag_se_co.paa
- gm_flag_sp_co.paa
- gm_flag_tu_co.paa
- gm_flag_uk_co.paa
- gm_flag_ur_co.paa
- gm_flag_us_co.paa
They are assigned via the NATO 2-Letter Nation code from STANAG 1059 7th Edition.
Find the 9th edition (which differs) here: List of NATO country codes
GE = West Germany GC = East Germany
Toggle vehicle beacons and sirens
gm_beacons_org for the orange one, and gm_beacons_blu for blue. Leave it empty "" as secondary method.
To toggle beacons on a car via script: (also possible gm_beacons_orn on vehicles with orange beacon lights).
Toggle on: [this, "gm_beacons_blu", true] call gm_core_vehicles_fnc_beaconSwitch;
Toggle off: [this, "gm_beacons_blu", false] call gm_core_vehicles_fnc_beaconSwitch;
Sirens on: [this, "CustomSoundController1", 1, 0.2] remoteExec ["BIS_fnc_setCustomSoundController"];
Sirens off: [this, "CustomSoundController1", 0, 0.4] remoteExec ["BIS_fnc_setCustomSoundController"];
Use the teletype effect from the Campaign Intro
1) Include this in your description.ext in class RscTitles
"\gm\gm_missions\gm_campaign_01\missions\gm_campaign_intro.gm_weferlingen_summer\resources.inc"
2)
Include this in CfgSounds:
class gm_teletype_stroke_01
{
name = "";
titles[] = {};
sound[] = { "@gm\gm_missions\gm_campaign_01\missions\gm_campaign_intro.gm_weferlingen_summer\sounds\gm_teletype_stroke_01.ogg", 3, 1, 100 };
};
class gm_teletype_stroke_02 : gm_teletype_stroke_01
{
sound[] = { "@gm\gm_missions\gm_campaign_01\missions\gm_campaign_intro.gm_weferlingen_summer\sounds\gm_teletype_stroke_01.ogg", 3, 0.98, 100 };
};
class gm_teletype_stroke_03 : gm_teletype_stroke_01
{
sound[] = { "@gm\gm_missions\gm_campaign_01\missions\gm_campaign_intro.gm_weferlingen_summer\sounds\gm_teletype_stroke_01.ogg", 3, 1.02, 100 };
};
3)
Create script called typeText.sqf.
4)
Call the script via "My Text Is This" execVM "typeText.sqf". You can also make it a function and spawn it.
Add helmet camo to any unit
You can use these types:
- gm_hmd_foliage_summer_grass_01
- gm_hmd_foliage_summer_grass_02
- gm_hmd_foliage_summer_grass_03
- gm_hmd_foliage_summer_grass_04
- gm_hmd_foliage_autumn_grass_01
- gm_hmd_foliage_autumn_grass_02
- gm_hmd_foliage_autumn_grass_03
- gm_hmd_foliage_autumn_grass_04
- gm_hmd_foliage_summer_forest_01
- gm_hmd_foliage_summer_forest_02
- gm_hmd_foliage_summer_forest_03
- gm_hmd_foliage_summer_forest_04
Eject parachutists out of a vehicle
Inside "On Activation" of a waypoint for the plane (not the squad to jump out!)
Mi-2Ch Smoke Generator control
Turn On: [this] call gm_countermeasures_fnc_engine_smoke_toggle;
Turn Off: [this, true] call gm_countermeasures_fnc_engine_smoke_toggle;
Override Bridge Laying Restrictions
If you want to override the red indicator and deploy/pickup the bridge regardless:
Start a bridge deployment
[yourBridgeLayer] spawn gm_core_vehicles_fnc_bridge_deploy;
Once activated you can force the process into the next phase of actively deploying it via the above mentioned lines:
Spawn a bridgelayer without bridge
Nuclear Warhead for the 2P16 Luna
To quickly change the 2P16 over to the nuclear missile use the following code to circumvent the long reload time the missile otherwise would have:
myLuna is the given variable name of the vehicle. You can use this instead when pasting this into the vehicle's init line.
Searchlight Guard Towers
To easily turn the BT-6 and BT-11 guard towers in functioning towers that scan with search lights, raise alarm and shoot flares:
Paste this code into your init.sqf:
Then go around the map in Weferlingen and place the Guard Tower Mission Context object gm_missionHelper_guardtower near any of the guard towers you wish to equip.