Jump to content

WAI: 1.0.0 - Alpha / Arma 3


itsatrap

Recommended Posts

I would be interested, I would just need to adapt something like this to the stock AH, which I can do, just time consuming.

 

MPMissions\epoch.Altis\init.sqf

//function to show server messages locally
[] execVM "custom\showMsg.sqf";
//vehicle actions
[] execVM "custom\vehicle_actions.sqf";

MPMissions\epoch.Altis\custom\showMsg.sqf

diag_log format["DEBUG::: showMsg EH loaded"];
"WAI_Mission_Message" addPublicVariableEventHandler {hint (_this select 1)};

MPMissions\epoch.Altis\custom\vehicle_actions.sqf

if (!isServer) then {

	waitUntil {!isNull player};
	waitUntil {player == player};
	systemChat(format["Start looking for Jammers"]);
	_jammerList = (getMarkerPos "center") nearObjects ["PlotPole_EPOCH",20000];
	{
		_x addAction ["<t color=""#008000"">I will go to the current mission</t>","custom\voteMission.sqf",[true],0,false,true,"",""];
		_x addAction ["<t color=""#ff0000"">I want another mission</t>","custom\voteMission.sqf",[false],0,false,true,"",""];
	} forEach _jammerList;
	systemChat(format["Finished looking for Jammers"]);		
	
};

 

@EpochHive\Addons\custom_server\compile\mission_message.sqf

_text = _this;
missionNamespace setVariable ["WAI_Mission_Message", _text];
publicVariable "WAI_Mission_Message";

 @EpochHive\Addons\custom_server\missions\missionIni.sqf

mission_votes = compile preprocessFileLineNumbers "\q\addons\custom_server\missions\missionVotes.sqf";

@EpochHive\Addons\custom_server\missions\missionVotes.sqf

missionNamespace setVariable ["WAIMissionVotes",[0,0]];
publicVariable "WAIMissionVotes";

_startTime = floor(time);
_voteCollectionInProgress = true;

while {_voteCollectionInProgress} do {
	_votes = missionNamespace getVariable "WAIMissionVotes";
	_countYesVotes = _votes select 0;
	_countNoVotes  = _votes select 1;
	
	//diag_log format["DEBUG: _YesVotes=%1 | _NoVotes=%2",_countYesVotes,_countNoVotes];
	
	_currTime = floor(time);
	if((_currTime - _startTime) > 300) then  //make the decision
	{
		if (_countYesVotes > 0) then
		{
			"At least one player want to go to the current mission. Good luck!!" spawn mission_message; //at least one voted to go to the mission
			uIsleep 5;
		}; 
		if ((_countYesVotes == 0) AND (_countNoVotes > 0)) then
		{
			"No one wanted to go to the current mission. Let's start the next one..." spawn mission_message;
			uIsleep 5;
			missiontimeout = false;
		};
		_voteCollectionInProgress = false;
	};
	
	_msg = format["Going to current mission: %1 \n Want to go to another mission: %2 \n Voting ends is: %3 min.",_countYesVotes,_countNoVotes,round((300-(_currTime - _startTime))/60)];
	_msg spawn mission_message;
	uIsleep 30;
};

@EpochHive\Addons\custom_server\missions\Missions.sqf

...
execVM format ["\q\addons\custom_server\missions\missions\%1.sqf",_mission];
...
uIsleep 30;
[] spawn mission_votes;
Link to comment
Share on other sites

I also re-worked WAI from Arma 2 to Arma 3 platform. I run something like 15 different missions.

 

I recently added voting for a mission that has just started. Voting is based on addAction mouse wheel command on a Jammer object. It allows players to say it they are going for the current mission or they want to skip to the next. After 5 minutes the polling is closed and mission system keeps current mission or skips to the next one.

 

I don't run BE and I don't use stock AH on my server, so it might be a hassle for some of you to adapt my script to your environment. Anyway, let me know if you are interested to see how it works.

You do know with the license WAI have you have to share code/ make it public?

Link to comment
Share on other sites

Getting script restriction #21, can anyone help?=) I didnt understand that script restriction in the log =/

 

EDIT: Like the adventurer i am, i just looked up in the sky and typed in the following: !="execVM "wai\nuke.sqf";"" and it worked somehow:p So if anyone else get this restriction, add this LINE 21 in scripts.txt (7 exec)

scripts.txt

scriptslog.txt

Edited by Moody
Link to comment
Share on other sites

thats just the vote part.

 

my WAI script has been re-worked and re-written so many times first on NAPF, then Taviana, Cherno and Altis that probably only variable names are remaining from the original version. Besides, most of the mission messages are in Russian and I cannot be bothered to translate all of it for the publication.

 

I have several cool things like "permanent" missions, e.g. Sector B and motorized groups that remind of Mad Max movie. I can publish the scripts if anyone's interested.

Link to comment
Share on other sites

my WAI script has been re-worked and re-written so many times first on NAPF, then Taviana, Cherno and Altis that probably only variable names are remaining from the original version. Besides, most of the mission messages are in Russian and I cannot be bothered to translate all of it for the publication.

 

I have several cool things like "permanent" missions, e.g. Sector B and motorized groups that remind of Mad Max movie. I can publish the scripts if anyone's interested.

I am interested , I have a taviana server that I would like to have something at sector b.

Also I have a problem with ikea mission, It calls out fix og something. I tryed to fix it by renaming it in the config file and I didnt work. I also tryed to add idems to the loot crate like cinderblock and mortor and it didnt take. Mission still runs but the items I have added are not showing up.

Link to comment
Share on other sites

This is what is in the rpt

 9:19:30 Error in expression <6],["KitStudWall",6],["CinderBlocks",20];
 
crate_items_vehicle_repair = ["Vehicl>
 9:19:30   Error position: <;
 
crate_items_vehicle_repair = ["Vehicl>
 9:19:30   Error Missing ]
 9:19:30 File x\addons\WAI\config.sqf, line 195
 9:19:30 Error in expression <6],["KitStudWall",6],["CinderBlocks",20];
 
crate_items_vehicle_repair = ["Vehicl>
 9:19:30   Error position: <;
 
crate_items_vehicle_repair = ["Vehicl>
 9:19:30   Error Missing ]
 9:19:30 File x\addons\WAI\config.sqf, line 195
Link to comment
Share on other sites

Working fine for me but I've no mission message on player screen when mission is available, mission just appear on map

 

This is exactly the problem I have. Not sure if it's WAI or the server itself doing this. I have another AI module that adds the Supply Drops and the messages from those missions won't appear either which is very annoying. Oddly enough I tested SEM 0.8.3 and their mission messages appear to work OK.

BTW my host is "Survival Servers" just in case.

Link to comment
Share on other sites

Mission anouncements come from the entries added to your init.sqf

Make sure you added everything correctly.

 

Not sure what that means since the only instructions on the page is to paste this...

 

[] execVM "wai\remote.sqf";

... inside the init.sqf for the mission pbo. I also made sure that the settings inside the  a3_epoch_WAI.pbo was set to radio but nothing happens. I also tried the other options like Global, text, Hint.... but non of them work as well.

Link to comment
Share on other sites

I'm having an issue :( I installed this as I want AI on my server but even my Drone AI do not spawn on Bornholm and I installed this so I could at least get some action but the AI wont spawn either, I have also tried Vamps AI but the same result my server dont seem to like any AI at all not even the standard Epoch AI... What's going on :( Could I get some help please :S

 

.RPT

http://pastebin.com/hJe4A23Q

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...