Compare commits

...

2 Commits

Author SHA1 Message Date
f3c95322e9 change respawn button use warning to use ace_killed CBA event
All checks were successful
Generate testing snapshot / Create testing release (push) Successful in 41s
2024-02-19 16:11:42 -08:00
7d10d2622d adds leaflet support and missionGroup param for missionProfileNamespace 2024-02-19 16:11:10 -08:00
6 changed files with 74 additions and 28 deletions

39
custom_leaflets.hpp Normal file
View File

@@ -0,0 +1,39 @@
// This contains custom definitions for leaflets. It is not required to set this up, but you're welcome to if you want to use them.
// To use this, configure one or more of the below. Then use the pylon editor of a drone in EDEN to add the appropriate magazine type (like 1Rnd_Leaflets_Custom_01_F) to the drone. Then, when the drone is flying, do `drone1 fire "1Rnd_Leaflets_Custom_01_F";` to drop the leaflets. The leaflet will then be shown in the world, and can be picked up by players to read the text and see the image.
class Custom_01 // configuration for 1Rnd_Leaflets_Custom_01_F
{
text = "Leaflet text"; // text shown when previewing the leaflet full-screen. Ideally should be localized, so even player who cannot read the image can get the information
texture = "images\leaflets\leaflet_custom_01.paa"; // leaflet texture shown when previewing the leaflet full-screen
};
class Custom_02 // configuration for 1Rnd_Leaflets_Custom_02_F
{
text = "Leaflet text"; // text shown when previewing the leaflet full-screen. Ideally should be localized, so even player who cannot read the image can get the information
texture = "images\leaflets\leaflet_custom_02.paa"; // leaflet texture shown when previewing the leaflet full-screen
};
class Custom_03 // configuration for 1Rnd_Leaflets_Custom_03_F
{
text = "Leaflet text"; // text shown when previewing the leaflet full-screen. Ideally should be localized, so even player who cannot read the image can get the information
texture = "images\leaflets\leaflet_custom_03.paa"; // leaflet texture shown when previewing the leaflet full-screen
};
class Custom_04 // configuration for 1Rnd_Leaflets_Custom_04_F
{
text = "Leaflet text"; // text shown when previewing the leaflet full-screen. Ideally should be localized, so even player who cannot read the image can get the information
texture = "images\leaflets\leaflet_custom_04.paa"; // leaflet texture shown when previewing the leaflet full-screen
};
class Custom_05 // configuration for 1Rnd_Leaflets_Custom_05_F
{
text = "Leaflet text"; // text shown when previewing the leaflet full-screen. Ideally should be localized, so even player who cannot read the image can get the information
texture = "images\leaflets\leaflet_custom_05.paa"; // leaflet texture shown when previewing the leaflet full-screen
};
class Custom_06 // configuration for 1Rnd_Leaflets_Custom_06_F
{
text = "Leaflet text"; // text shown when previewing the leaflet full-screen. Ideally should be localized, so even player who cannot read the image can get the information
texture = "images\leaflets\leaflet_custom_06.paa"; // leaflet texture shown when previewing the leaflet full-screen
};

View File

@@ -89,18 +89,16 @@ minPlayerDistance = 500;
//-------------------------------------------BASE SETTINGS---------------------------------------------------------------// //-------------------------------------------BASE SETTINGS---------------------------------------------------------------//
class Params class Params {};
{
};
// CfgFunctions
class CfgFunctions { class CfgFunctions {
#include "framework\CfgFunctions.hpp" #include "framework\CfgFunctions.hpp"
#include "custom_scripts.hpp" #include "custom_scripts.hpp"
}; };
class CfgLeaflets {
#include "custom_leaflets.hpp"
};
class CfgDebriefingSections { class CfgDebriefingSections {
class acex_killTracker { class acex_killTracker {

View File

@@ -2,11 +2,12 @@
if ( !hasInterface ) exitWith {}; if ( !hasInterface ) exitWith {};
player addEventHandler["Respawn", ["ace_killed", {
{ params ["_unit", "_causeOfDeath", "_killer", "_instigator"];
params ["_unit", "_corpse"];
private _killer = _corpse getVariable ["ace_medical_causeOfDeath", "#scripted"]; if (!local _unit) exitWith {};
if (_killer == "respawn_button") then {
if (_causeOfDeath == "respawn_button") then {
private _timeWentUnconscious = _corpse getVariable [QGVARMAIN(lastTimeKnockedOut), -1]; private _timeWentUnconscious = _corpse getVariable [QGVARMAIN(lastTimeKnockedOut), -1];
private _durationSpentUnconscious = -1; private _durationSpentUnconscious = -1;
if (_timeWentUnconscious > -1) then { if (_timeWentUnconscious > -1) then {
@@ -23,8 +24,7 @@ player addEventHandler["Respawn",
] remoteExec [QEFUNC(common,log), 2]; ] remoteExec [QEFUNC(common,log), 2];
// format["%1 was unconscious then clicked the respawn button", name _unit] remoteExec["systemChat", 0]; // format["%1 was unconscious then clicked the respawn button", name _unit] remoteExec["systemChat", 0];
}; };
} }] call CBA_fnc_addEventHandler;
];
[ [

2
images/leaflets/.gitkeep Normal file
View File

@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 KiB

View File

@@ -1,4 +1,4 @@
author = "MISSION AUTHOR"; author = "MISSION AUTHOR";
onLoadName = "THIS APPEARS ON TOP OF THE LOADING SCREEN IMAGE"; onLoadName = "THIS APPEARS ON TOP OF THE LOADING SCREEN IMAGE";
loadScreen = "mission.jpg"; loadScreen = "mission.jpg";
onLoadMission = "THIS APPEARS BELOW THE LOADING SCREEN IMAGE"; onLoadMission = "THIS APPEARS BELOW THE LOADING SCREEN IMAGE";
@@ -9,6 +9,13 @@ overviewText = "THIS IS WHERE YOU DESCRIBE THE MISSION IN THE #MISSION LIST";
// The name for the series of missions of your campaign. Used for organizational and search purposes // The name for the series of missions of your campaign. Used for organizational and search purposes
missionSeries = "MY SERIES NAME"; missionSeries = "MY SERIES NAME";
// What kind of mission is this? (Use only one)
missionGroup = "Saturday Op";
// missionGroup = "Friday Op";
// missionGroup = "Wednesday Op";
// missionGroup = "FTX";
// missionGroup = "Training";
// Add waypoints to players' MicroDAGR devices // Add waypoints to players' MicroDAGR devices
// respawn locations (bases) are added by default, don't put them here // respawn locations (bases) are added by default, don't put them here