Jump to content
  • 0

auto claim missions


totis

Question

Recommended Posts

  • 0

@totis you should setup a test server on your pc and make the changes on your pc instead of the live server. This way you can test things right away without affecting the players.

Theres a detailed guide somewhere in these forums. do a search for "70 detailed steps" and im sure you'll find it.

Link to comment
Share on other sites

  • 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

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
  • Discord

×
×
  • Create New...