Jump to content
  • 0

auto claim missions


totis

Question

Recommended Posts

  • 0

No offense Totis, but asking for every little problem is not the right way then.

To be honest, you don't need any coding experience for sqf at all. It's better sometimes to understand the syntax but it's not necessary. I talked with a lot of oldies of this community and mostly they said that they never coded anything before.

ArmA scripting (sqf mostly) can be learned by doing. That's the easiest way. That's how I started too and I guess people like the Epoch Collaborators too (like ebay, icomrade, salival) and also the big guys that founded the Epoch-Mod and now develope it for ArmA 3.

Scripting is a pain in the ass sometimes. How Salival said yesterday on Discord "you can either fuck it or fix it" and that's the best description for it. Get yourself an idea what you want to do and then try around, read trough wikis and either fix it or fuck it and then if you really have no clue what to do anymore, ask the community. I am doing that on the dev discord when I have no clue how to do something and I swear if they know that you are trying yourself before, they will help you. Almost everyone here is a nice guy.

Link to comment
Share on other sites

  • 0
On 29/9/2017 at 6:20 AM, totis said:

Ok. Great advices from all  and works like a charm :)

Only thing i wanna change is, can i make name stay permanent and not unclaimed when someone gets out of the 1000m radius?? I mean until mission is cleared of course.

Maybe you guys can help me with 2 more issues i have also.

1. A player cant blood another player. Thought this was build in on epoch! I have self blood and works btw and

2. My static buildings are not precise where my coords are neither they have godmode. I call them from client side with a custom sqf. Is there a way to remedy this?

Tnx guys you are all super helpfull!!

 

Btw your code is installed in every mission itself Juan?

I think the most easier way is put a new local variable if thers neatest player..then use this var as condition when you check if thers nearest player. So if this var was changed as true at first time then no change the marker name again. Or just get and chech the player uid onces you did the marker change at first time.

Link to comment
Share on other sites

  • 0
3 hours ago, DAKA said:

So is this working. Would love it as well.

This is what I just threw together, probably more inefficient ways possible, but I am not going to go through testing for this:

 

In mission_init.sqf find the marker loop and replace with this:

while {_running} do {

	_type	= (wai_mission_data select _mission) select 1;
	
	if (isNil "_claimedby") then {
		_dis = 1000;
		{
			_dispos = _x distance _position;
			if (_dispos < 1000 && _dispos < _dis) then {
				_claimedby = name _x;
				_dis = _dispos;
			};
		} count playableUnits;
	};
	
	_marker 		= createMarker [_type + str(_mission), _position];
	_marker 		setMarkerColor _color;
	_marker 		setMarkerShape "ELLIPSE";
	_marker 		setMarkerBrush "Solid";
	_marker 		setMarkerSize [300,300];
	_marker 		setMarkerText _name + if (!isNil "_claimedby") then {"Claimed by: " + _claimedby} else {""};

	_dot 			= createMarker [_type + str(_mission) + "dot", _position];
	_dot 			setMarkerColor "ColorBlack";
	_dot 			setMarkerType "mil_dot";
	_dot 			setMarkerText _name + if (!isNil "_claimedby") then {"Claimed by: " + _claimedby} else {""};

	sleep 1;

	deleteMarker 	_marker;
	deleteMarker 	_dot;

	_running = (typeName (wai_mission_data select _mission) == "ARRAY");

};

 

This should get the closest player within 1000 meters of the mission and change the name to show he has claimed it. This could be quite intensive, so be cautious if you wish to increase the distance. Let me know if it works as I haven't tested.

Link to comment
Share on other sites

  • 1

Hi guys...
@DAKA,

first version of autoclaim system was done 10 days ago.
Since that time it's running on live populated server as testing sample.


Currently I'm working on upgraded version which will include some findings from the test. So stay tuned for couple next more days, public release is on the way :)
This is picture from older version - in two days new more advanced version will be ready for test run...

 

PS: In case, yes, passing players through mission zone - plotpoles inside zone - who will be first if... - what happen if claimer dies etc - all is considered :)

Cheers...

===

As promised, making public solution for mission autoclaim. If anyone interested, download source files from github.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...