Need a little help here... I am trying to create something like what origins has in that instead of having large circles on the map displaying mission locations, you instead (if you have a radio) you have a pop stating that a new mission is available and to press 7 for details. I am doing this by using a public variable passed to the client each time a mission pops... Here is what I have MAYBE someone will see what I am doing wrong... Current test only allows for one mission running at a time.
systemChat "A mission is available press 7 to view details...";
uiSleep 120; //Change time here again - makes sure that the information gets reset every 2 minutes, if you put the Weapon/Item down, the Information will be removed after max. x seconds
if if(!("ItemRadio" in weapons player)
{
ActiveMissionText="";
ActiveMissionName="No Missions Available";
};
New code in dayz_spaceInterrupt.sqf
...
//Pressing 7 brings up Mission List
if (_dikCode == 0x08) then {
if("ItemRadio" in weapons player) then {
hintC format["Current Mission: %1 \n Description: %2",MissionName,MissionText];
//_hndl = createdialog "help_dialog";
};
};
...
Inside WAI's Marker.sqf:
//WAI Mission Notification
if(!isServer) exitWith {};
private ["_position","_name","_units","_text"];
_position = _this select 0;
_name = _this select 1;
_text = _this select 2;
_units = [];
WAIMissionMarker = [_position, _name, _text];
while{missionrunning} do {
{
_units = [];
if ((side _x) == West) then {
if("ItemRadio" in weapons _x) then { //Change Item/Weapon here use 'in magazines' if the item is no tool or weapon
_units set [count _units, _x];
};
};
} forEach allUnits;
{
(owner _x) publicVariableClient "WAIMissionMarker"
} foreach _units;
markerready = true;
uiSleep 120; //Change time here (in seconds) but dont make it too big or the script wont check for new players with the Item in inventory
};
Example Mission marker.sqf call:
...
//Get Nearby City
_nearestCity = nearestLocations [_position, ["NameCityCapital","NameCity","NameVillage","NameLocal"],750];
_textCity = "Wilderness";
if (count _nearestCity > 0) then {_textCity = text (_nearestCity select 0)};
_text = format["Bandit Base: A jungle task force have set up a temporary encampment near %1! Go and ambush it to make it yours!!",_textCity];
[_position,"Bandit Base",_text] execVM "\z\addons\dayz_server\WAI\missions\compile\markers.sqf";
...
Currently when I press 7 when it alerts me that there is a mission it posts a hint that says 'mission name: __cur_map description: any'
Question
Meowzors
Need a little help here... I am trying to create something like what origins has in that instead of having large circles on the map displaying mission locations, you instead (if you have a radio) you have a pop stating that a new mission is available and to press 7 for details. I am doing this by using a public variable passed to the client each time a mission pops... Here is what I have MAYBE someone will see what I am doing wrong... Current test only allows for one mission running at a time.
in my init.sqf I have:
Inside Custom\MissionInfo.sqf :
New code in dayz_spaceInterrupt.sqf
Inside WAI's Marker.sqf:
Example Mission marker.sqf call:
Currently when I press 7 when it alerts me that there is a mission it posts a hint that says 'mission name: __cur_map description: any'
Any help would be great! Thanks.
Link to comment
Share on other sites
8 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now