Jump to content
brians200

Standalone JTAC Script

Recommended Posts

On 7/17/2021 at 1:27 AM, brians200 said:

Can you zip up your folder and share it? I will take a look

I don't if its ok with the author but here is code part anyways:

init of mission:

 

#include "Includes\common.inc"
call compile preprocessFileLineNumbers "EPD\VirtualJTAC\init.sqf";
enableSaving[false,false];
FIX_LINE_NUMBERS()
Info("Init Started");
//Arma 3 - Antistasi by Barbolani & The Official AntiStasi Community
//Do whatever you want with this code, but credit me for the thousand hours spent making this.
private _fileName = "init.sqf";
scriptName "init.sqf";

if (isNil "logLevel") then {logLevel = 2};
if (isNil "isSystemChatPostingAllowed") then {isSystemChatPostingAllowed = false};
Info("Init SQF started");

//Singleplayer is no longer supported
if (!isMultiplayer) then {
	["noSinglplayer",false,1,false,false] call BIS_fnc_endMission;
};

enableSaving [false,false];
mapX setObjectTexture [0, "Pictures\Mission\whiteboard.jpg"];

Info("Init Finished");

description:

#include "MissionDescription\master.hpp"

OnLoadName = $STR_antistasi_mission_info_panthera_mapname_short_text;
OnLoadMission = $STR_antistasi_mission_info_panthera_blurb_text;
briefingName = $STR_antistasi_mission_info_panthera_mapname_text;
overviewText = $STR_antistasi_mission_info_altis_description_text;
loadScreen = "Pictures\Mission\pic.jpg";
overviewPicture = "Pictures\Mission\pic.jpg";

class CfgDiscordRichPresence 
{
    applicationID="819852407265034260";
    defaultDetails="";
    defaultState="";
    defaultLargeImageKey="panthera";
    defaultLargeImageText="Antistasi Plus - Waterways";
    defaultSmallImageKey="arma_3_logo";
    defaultSmallImageText="Arma 3 Custom Scenario";
    useTimeElapsed=1;
};

class CfgFunctions 
{
    #include "MissionDescription\CfgFunctionsContents.hpp"
};

class CfgNotifications
{
    #include "MissionDescription\CfgNotificationsContents.hpp"
	class JtacReloadNotification
	{
		title = "JTAC";				// Title displayed as text on black background. Filled by arguments.
		iconPicture = "a3\ui_f\data\gui\cfg\communicationmenu\call_ca.paa";		// Small icon displayed in left part. Colored by "color", filled by arguments.
		iconText = "1";			// Short text displayed over the icon. Colored by "color", filled by arguments.
		description = "%1";		// Brief description displayed as structured text. Colored by "color", filled by arguments.
		color[] = {0.153, 0.933, 0.122, 1};	// Icon and text color
		duration = 5;			// How many seconds will the notification be displayed
		priority = 0;			// Priority; higher number = more important; tasks in queue are selected by priority
		difficulty[] = {};		// Required difficulty settings. All listed difficulties has to be enabled
	};
};

class CfgSounds
{
    #include "MissionDescription\CfgSoundsContents.hpp"
};

class CfgDebriefing
{
    #include "MissionDescription\CfgDebriefingContents.hpp"

	class End1
	{
		title = "V I C T O R Y";
		subtitle = "Panthera is Ours!";
		description = "The population of Panthera loves you!<br/>The brave rebel soldiers have proven their valour, and Petros, Panthera's new Prime Minister, could at last to have a nice holiday. A well deserved rest for everyone involved.";
		picture = "n_inf";
		pictureColor[] = {0.0,0.5,0.0,1};
	};
    class petrosDead
    {
        title = "Petros is Dead";
        subtitle = "Petros is Dead";
        description = "Congratulations! Petros is Dead. Now with rebels without a leader, you may think about joining them, and free Panthera";
        picture = "b_unknown";
        pictureColor[] = {0.5,0.0,0.0,1};
    };
    class destroyedSites
    {
        title = "Panthera is Destroyed";
        subtitle = "Panthera got Destroyed by CSAT";
        description = "One third of the population in Panthera has been murdered by OPFOR.<br/>Panthera no longer exists, nobody wants to live here.";
        picture = "b_unknown";
        pictureColor[] = {0.5,0.0,0.0,1};
    };
};

part of mission.sqf (unit I play):


				class Item14
				{
					dataType = "Object";
					class PositionInfo
					{
						position[] = {5534.9717,61.62156,5433.2886};
					};
					side = "Independent";
					flags = 5;
					class Attributes
					{
					    init = "this setVariable [""JTAC"",true];";
						description = "For king and country";
						isPlayable = 1;
						class Inventory
						{
							map = "ItemMap";
						};
					};
					id = 50;
					type = "I_G_medic_F";
					atlOffset = 0.00012207031;
				};

rite now  I am playing antistasi , but all multiplier missions doesn't call in the ordinance,

I placed the epd file in the mission folder, unchanged from the download.

Thanks a plenty.

 

Share this post


Link to post
Share on other sites

Hi Craig, sorry for the delay.


I cannot see anything obviously wrong with your files that you posted.

What messages do you see in the corner of your screen?

If you are able to use the action menu, it sounds like it is having trouble getting permission from the server to fire.

 

If you are trying to fire two times in quick succession, does it tell you that another jtac fired or the guns are still reloading? (Line 36, 38)

https://github.com/Brians200/EPD-JTAC/blob/master/EPD/VirtualJTAC/jtacfirecontrol.sqf#L36

 

 

Can you try playing with this set to true?

https://github.com/Brians200/EPD-JTAC/blob/master/EPD/VirtualJTAC/jtacsettings.sqf#L3

Can you tell me which messages you are seeing?

 

 

Without the mission on my computer, it is hard to tell from here.

Share this post


Link to post
Share on other sites
On 9/4/2021 at 12:06 PM, brians200 said:

Hi Craig, sorry for the delay.


I cannot see anything obviously wrong with your files that you posted.

What messages do you see in the corner of your screen?

If you are able to use the action menu, it sounds like it is having trouble getting permission from the server to fire.

 

If you are trying to fire two times in quick succession, does it tell you that another jtac fired or the guns are still reloading? (Line 36, 38)

https://github.com/Brians200/EPD-JTAC/blob/master/EPD/VirtualJTAC/jtacfirecontrol.sqf#L36

 

 

Can you try playing with this set to true?

https://github.com/Brians200/EPD-JTAC/blob/master/EPD/VirtualJTAC/jtacsettings.sqf#L3

Can you tell me which messages you are seeing?

 

 

Without the mission on my computer, it is hard to tell from here.

Hi Sir, no worry for delay ;

 

The hint say "Rounds inbound. take cover (you can turn off your laser now)" but the fire mission doesn't occur ; Only guided missiles work perfectly ,even the Fnf option.

Others like HE grenades, bombs, smokes, flares etc doesn't spawn .

 

If you  can download any antistasi mission from steam workshop and test it ; Would be great!

I don't mind waiting.

 

Thank you for your reply.

Share this post


Link to post
Share on other sites

Hi,

Is there any other way to "setVariable ["JTAC", true];" ,apart from going in the editor?

Like maybe code something in initPlayerLocal.sqf ...

Please advice.

Thank you.

Share this post


Link to post
Share on other sites
On 12/15/2021 at 2:44 AM, craig29592 said:

Hi,

Is there any other way to "setVariable ["JTAC", true];" ,apart from going in the editor?

Like maybe code something in initPlayerLocal.sqf ...

Please advice.

Thank you.

 

You can can set it like this:

player setVariable ["JTAC",true];

 

or if you have a reference to the unit

_unit setVariable ["JTAC",true];

 

 

That will work as long as the the initPlayerLocal.sqf gets run before this line

https://github.com/Brians200/EPD-JTAC/blob/master/EPD/VirtualJTAC/init.sqf#L25-L30

 

Which I think is true based off of this:

https://community.bistudio.com/wiki/Initialization_Order

Share this post


Link to post
Share on other sites

I try to convert this into a mod but it didn't work)

image.png

Spoiler

 

 initPlayer Local.sqf

call compile preprocessFileLineNumbers "EPD\VirtualJTAC\init.sqf";
player setVariable ["JTAC",true];

 

 

Share this post


Link to post
Share on other sites

@brians200 In update to version 1.6 of this script, you added "the ability to call in firemissions using a map". How do I get rid of that, with laser designators as the only option to request firesupport as a JTAC?

 

Share this post


Link to post
Share on other sites

Yep, I fell into the ], trap, classic 😄
Thank you man, you're awesome!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×