Jump to content
SpaydCBR

How to do the UAV sitrep thing?

Recommended Posts

Thanks SavageCDN, I took your advice and just put "mymusic" before the spawn and works, however I am trying the spawn this way and nothing.

[] spawn {

scriptName "initMission.hpp: mission start";

// set side colors

private ["_colorWest", "_colorEast"];

_colorWest = WEST call BIS_fnc_sideColor;

_colorEast = EAST call BIS_fnc_sideColor;

// set transparency for colors

{_x set [3, 0.73]} forEach [_colorWest, _colorEast];

[

[1219.54,8842.99,0.00143909],

"Nato Amphibious Assault,|something here,|something here," // SITREP text

50, // 50m altitude

100, // 100m radius

120, // 120 degrees viewing angle

1, // Clockwise movement

[ // add Icon at player's position

["a3ui_fdatamapmarkersnatob_inf.paa", _colorWest, markerPos "nato", 1, 1, 0, "nato", 0],

] spawn BIS_fnc_establishingShot;

};

Share this post


Link to post
Share on other sites

Nothing as in you don't get the intro at all? Perhaps try removing the color stuff temporarily and see if it works then. I'm not sure of the syntax for that and I can't check my game PC.

Share this post


Link to post
Share on other sites

I suggest you use notepad++ you would have discovered the issue fairly quickly. Too many comas or comas not in the right place.

[] spawn {
scriptName "initMission.hpp: mission start";

//start intro music
playMusic "mymusic"; 
10 fadeMusic 0.8; 

//set side colors
private ["_colorWest"];
_colorWest = WEST call BIS_fnc_sideColor;

//set transparency for colors
_colorWest set [3, 0.73];

//start establishing shot
[
	[1219.54,8842.99],
	"Nato Amphibious Assault,|something here,|something here", // SITREP text
	50, // altitude
	100, // radius
	120, // viewing angle
	1, // movement
	[
		["a3ui_fdatamapmarkersnatob_inf.paa", _colorWest, markerPos "nato", 1, 1, 0, "nato", 0]
	]
] spawn BIS_fnc_establishingShot;

waitUntil {!isnil "BIS_fnc_establishingShot_playing" && {!BIS_fnc_establishingShot_playing}}; 
8 fadeMusic 0;
};

Edited by cobra4v320

Share this post


Link to post
Share on other sites

Thanks Cobra yeah Notepad ++ with the Arma syntax installed is your best friend

Share this post


Link to post
Share on other sites

I'm trying to use this more than once in a mission as a kind of task complete thing.

 

Not sure if its a bug or if its written to just be activated in the intro but if you use it more than once the second time never creates the camera and just blacks the screen out indefinitely.

 

// set side colors
private ["_colorWest", "_colorEast"];
_colorWest = WEST call BIS_fnc_sideColor;
_colorEast = EAST call BIS_fnc_sideColor;


// set transparency for colors
{_x set [3, 0.50]} forEach [_colorWest, _colorEast];
[
    markerPos "taskMarker", // Target position (replace MARKERNAME)
    "MISSION COMPLETE",  // SITREP text
    250,                     // m altitude
    150,                     // m radius
    10,                       // degrees viewing angle
    1,                      // Clockwise movement
    [   //add Icon at player's position
        ["\a3\ui_f\data\map\markers\nato\b_inf.paa", _colorWest, getPos player, 1, 1, 0, "Alpha TEAM", 0]
    ]
] spawn BIS_fnc_establishingShot;

waitUntil {!isnil "BIS_fnc_establishingShot_playing" && {!BIS_fnc_establishingShot_playing}};

Share this post


Link to post
Share on other sites
waitUntil {!isnil "BIS_fnc_establishingShot_playing" && {!BIS_fnc_establishingShot_playing}};

This looks kinda weird to me. You are waiting until the variable is nil AND you are waiting until the variable is false.

 

Both conditions can't be met so far I know.

Share this post


Link to post
Share on other sites

Must be a bug. Just tried it with one or the other and none at all. Still fails on the second execution. Black screen with squares. I can press esc and abort mission but thats it.
 
Maybe something is created that doesn't get cleaned up after allowing for it to be run again.
 
I'd post the function but I still cant work out there the spoiler tag is.

Share this post


Link to post
Share on other sites

There is a thread about issues which were caused by the new forum update. I think there was a solution for the missing spoiler tag.

Share this post


Link to post
Share on other sites

Hi,

 

Must be a bug. Just tried it with one or the other and none at all. Still fails on the second execution. Black screen with squares. I can press esc and abort mission but thats it.

 

I second this, I also get a black screen on second execution of the BIS_fnc_establishingShot function.

I would like to use personal uav's for my mission.

 

Regards,

Patrick

Share this post


Link to post
Share on other sites

Hmm not a bug as I've just found a personal UAV script based off the same function so it is possible to edit the function to repeat I just cant work out how. There is SO much extra gubbins like thermal cameras on the numbpad :)

 

Here you go specie,

 

https://github.com/code34/hardcore_insurgency.Altis/blob/master/INS_revive/personal_uav/functions.sqf

 

Cool as hell but I want to keep it simple and understand it at the same time.

 

Seems camera creation is dependent on a global variable BIS_missionStarted being nil which the function sets to true after it's done.

 

Tried a few things but I'm In over my head.  :blink:

Share this post


Link to post
Share on other sites

after reading through personal uav link you posted i tried some things.

Define this on top of your script:

 

BIS_fnc_establishingShot_fakeUAV = nil;

 

worked for me!

Share this post


Link to post
Share on other sites

That works but I get a script error doing that. Did you put it at the top of the function just before the call?

 

I tired commenting out the line 

 

//camDestroy BIS_fnc_establishingShot_fakeUAV;

 

which works with no script errors. Not sure what the upshot or overheads not destroying the camera of are however? 

 

EDIT: specie yours works perfectly at the top of the function and is probably much cleaner.

 

High fives all round.

Share this post


Link to post
Share on other sites
private ['_colorWest', '_colorEast', '_uavtext'];
BIS_fnc_establishingShot_fakeUAV = nil;
_uavtext = _this select 0;
//true setCamUseTi 1; // Turns thermal vision on
_colorWest = [west] call BIS_fnc_sideColor;
_colorEast = [east] call BIS_fnc_sidecolor;
[
	getpos player,
	_uavtext,//spawns the text
	250,//height
	200,//radius
	180,//angle
	(random 1),//clockwise\anit-clock
	[
	['\a3\ui_f\data\map\markers\nato\b_inf.paa', _colorWest, getPos player, 1, 1, 0, '', 0]
	],
	0
] call BIS_fnc_establishingShot;
//false setCamUseTi 1; // Turns thermal vision on

You can call this with: ['Personal UAV'] execvm 'DR\functions\fnc_personaluav.sqf';

(Im unable to call my function from the setTriggerStatements hence the execvm.)

 

This should work, no errors here.

Share this post


Link to post
Share on other sites

Is it a bit buggy for you? Sometimes uses the previous position the camera was spawned on subsequent uses.

Share this post


Link to post
Share on other sites

Yup, I noticed this while testing on the dedicated server. I didnt spot this while testing in development. Im trying to figure out what is causing this.

Share this post


Link to post
Share on other sites

Tested it with removing the cam create line in the function again and seems to work 10/10 times I tested.

 

I'm clueless as to what, if any, overheads there are of not destroying the camera.

Share this post


Link to post
Share on other sites

I copy and pasted the establishing shot function out of the functions viewer in the editor into a new sqf called MPBIS_fnc_establishingShot.sqf

 

Comment out the cam destroy line.

 

The call sqf looks like this

MPBIS_fnc_establishingShot = compile preprocessFileLineNumbers "MPBIS_fnc_establishingShot.sqf";

// set side colors
private ["_colorWest", "_colorEast"];

_uavtext = param [0,"OBJECTIVE COMPLETE",""];

_colorWest = WEST call BIS_fnc_sideColor;
_colorEast = EAST call BIS_fnc_sideColor;

// set transparency for colors
{_x set [3, 0.80]} forEach [_colorWest, _colorEast];

//true setCamUseTi 1; // Turns thermal vision on

[
    getPos player,           // Target position (replace MARKERNAME)
    _uavtext,                // SITREP text
    120,                     // m altitude
    20,                      // m radius
    180,                     // degrees viewing angle
    1,                       // Clockwise movement
    [   
        //add Icon at player's position
        ["\a3\ui_f\data\map\markers\flags\UK_ca.paa", _colorWest, getPos player, 1, 1, 0, "", 0]
    ]
] call MPBIS_fnc_establishingShot;

//false setCamUseTi 1; // Turns thermal vision off

Share this post


Link to post
Share on other sites

Thanks for this magicpanda.

 

I went for your solution because I couldn't get it to work properly with the variables.

I did however encouter an error calling the function multiple times during the mission with line 245 of the BIS_fn_establishingShot. So my following script adds the var "BIS_missionStarted = false;" too which seems to make it work properly now.

private ['_colorWest', '_colorEast', '_uavtext', '_uavheight', '_uavangle'];
_uavtext = _this select 0;
_uavheight = _this select 1;
_uavangle  = _this select 2;

BIS_missionStarted = false;

//true setCamUseTi 1; // Turns thermal vision on
_colorWest = [west] call BIS_fnc_sideColor;
[
	getpos player,
	_uavtext,//spawns the text
	_uavheight,//height
	200,//radius
	_uavangle,//angle
	(random 1),//clockwise\anit-clock
	[
	['\a3\ui_f\data\map\markers\nato\b_inf.paa', _colorWest, getPos player, 1, 1, 0, '', 0]
	],
	0
] spawn DR_fnc_bisestablishingShot;
//false setCamUseTi 1; // Turns thermal vision on

['Personal UAV', 75, 80] execvm 'DR\functions\fnc_personaluav.sqf';

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

×