Forum Jump :

Author Message

SPK  



Posts: 56
Rank:


Level: Member

Country: 00
Location: Planet LV-426
Occupation: Sargeant
Age:
In-game name: ||SGT|| Spunkmeyer \\/\//

 
#1 Posted at 2014-08-25 20:44        
     
Hey there. Can anyone test my script on a dedicated server?. I don't really know if it's working or not. It's made on a Xeno Domination mission. So pay attention to X.SETUP.SQF and X_MACROS.SQF files if you didn't get them on your mission. Then delete "#include "x_setup.sqf" from CANCELCALLINGHELP.SQF .

*It sends a help message to players giving the current grid position of the caller and it lets make a Green mark on the map where he needs these reinforcements.


Create a folder inside your mission called CALLINGPLAYERS.
Copy your X_setup.sqf and X-Macros.sqf files to CALLINGPLAYERS folder.

Make INITGRIDHELP.SQF:

// Player calls.
_caller = _this select 1;

// Reset the markers.
"dropstartYes" setMarkerPos [0,0,0];

// Declare the spawn point marker.
setfire = true;
//titletext ["Click on the map to set where you want the players to help you.","PLAIN DOWN"];
hint "Click on the map to set where you want the players to help you.";
onMapSingleClick "'dropstartYes' setMarkerPos _pos; setfire = false";

// Player selects a location
_dropyes = createMarker ["dropYes", [0,0,0]];
_dropyes setMarkerShape "ICON";
"dropYes" setMarkerType "selector_selectedEnemy";
"dropYes" setMarkerColor "ColorBlueFaded75";
"dropYes" setmarkerText " Support Needed!";
onMapSingleClick "'dropYes' setMarkerPos _pos, dropclick = true";
waitUntil {dropclick};
onMapSingleClick "";
dropclick = false;

// Thoughtful pause
sleep 0.5;

// Sending
_name = name (_this select 1);
_gridpos = mapGridPosition (_this select 1);
_message = format ["Here %1 ,calling for help from my grid %2 .I need reinforcements at the Blue circle mark. Ready and marked on the map!",_name,_gridpos];
titleText [_message, "PLAIN"];
player setVehicleInit _message;
processInitCommands;
clearVehicleInit player;
hint "Help Message was sent to all players. If you need you can change your request Waypoint or cancel your call using your Radio.";
saycode = nil;




Make CANCELCALLINGHELP.SQF


#include "x_setup.sqf"
_unit = player;


deleteMarker "dropYes";

_unit globalchat "Transmission send: Forget my request for help. I deleted my Green Circle Mark of help on the map. Out.";

sleep 1;


hint "Player Reinforcements Message Available"



Add this to your unit (a soldier) INIT:

this addaction ["Calling players for reinforcements...", "CallingPlayers\initGridHelp.sqf"];

and make a RADIO TRIGGER (Alpha,bravo,charlie...), click on REPEATEDLY, PRESENT and TIMEOUT.

Condition: (player == player); //PLAYER is every player on the game,or your UNIT NAME you want to use this option.
On Act: nul = [player] execVM "CallingPlayers\CancelCallingHelp.sqf";
Text: Cancel Help Call



And start. Any issue?

This post was edited by SPK (2014-08-28 20:56, ago)

\\//\\// Corp. ||U.S.C.M|| Division.

Author Message

SPK  



Posts: 56
Rank:


Level: Member

Country: 00
Location: Planet LV-426
Occupation: Sargeant
Age:
In-game name: ||SGT|| Spunkmeyer \\/\//

 
#2 Posted at 2014-08-27 02:12        
     
Note: When somebody dies he misses the option from the combat menu. Why??

\\//\\// Corp. ||U.S.C.M|| Division.

Advertisement


Author Message

SPK  



Posts: 56
Rank:


Level: Member

Country: 00
Location: Planet LV-426
Occupation: Sargeant
Age:
In-game name: ||SGT|| Spunkmeyer \\/\//

 
#3 Posted at 2014-08-28 20:30        
     
Wow!. please don't shoot out loud.
Should i make a Loop sequence?. If i do i get twice the "Addaction "Calling..."". How can i get it?

Added 25 minutes later:

*** If you die now you still keep the Calling menu when respawn... DONE!


1) Delete Init box from soldier:
"this addaction ["Calling players for reinforcements...", "CallingPlayers\initGridHelp.sqf"];" .Delete all this.

2) In INIT.sqf file:
execVM "CallingPlayers\loop.sqf";

3) Create LOOP.SQF in "CallingPlayers" Folder.
LOOP.SQF:
while {true} do
{
waitUntil {alive vehicle player};
[] execVM "CallingPlayers\initiate.sqf";


waitUntil {!alive player};
};


4) Create INITIATE.SQF inside "CallingPlayers" folder.
INITIATE.SQF:

waituntil {!alive player ; !isnull (finddisplay 46)};
if player then {
;
act = player addaction ["Calling players for reinforcements...", "CallingPlayers\initGridHelp.sqf","",-10,false,true,"",""];

};



Greets.

This post was edited by SPK (2014-08-28 20:55, ago)

\\//\\// Corp. ||U.S.C.M|| Division.

Author Message

SPK  



Posts: 56
Rank:


Level: Member

Country: 00
Location: Planet LV-426
Occupation: Sargeant
Age:
In-game name: ||SGT|| Spunkmeyer \\/\//

 
#4 Posted at 2014-09-07 23:40        
     
Ok, but...
how can this help calling be enabled in combat menu for everyone who connects to a dedicated server?.
Thank you.

\\//\\// Corp. ||U.S.C.M|| Division.