Jump to content
Zenophon

Zenophon's ArmA 3 Co-op Mission Making Framework

Recommended Posts

Hi @Zenophon

 

I have a bit of an odd issue. When I use Zen_AddGiveMagzine and Zen_AddRepackMagazines functions, and place the unit on the ship deck, the functions don't work. But when I move the units to land, it works as expected. 

 

I don't think the issue is your function per si, but an Arma issue, and it does not see the deck of the ship as a solid object, or something like that. 

 

Any ideas? or Anybody see this before? 

 

 

Share this post


Link to post
Share on other sites

Are you spawning the units on the deck (or placing them in the editor) and then using a loadout function?  There might be a delay for ArmA to create/initialize units on the ship; try adding a second or two wait before the functions run.  In general, units can have their equipment changed even if they are e.g. skydiving, in a vehicle, etc.; though, as you say, being on a ship might be a special case that is bugged.

 

The second fix is to spawn/place them on land, apply the loadout, wait/check that it is applied, then move them onto the boat.  Sometimes setup like this requires a short 'mission loading' black screen so that the player doesn't see units teleporting or changing equipment.

Share this post


Link to post
Share on other sites

Hi Zenophon

I just wanna say thanks for all of your arma 3 scripting framwork. I do know how to use modules and triggers to make mission but I'm struggling with Arma 3 scripts. your tutorials helps me a lot. Thank you so much !

Share this post


Link to post
Share on other sites

Hello.

 

Has anyone used findgroundposition with scripted markers?

 

It seems this is set up for editor placed markers only.

 

Was hoping for a work around so that function could follow markers placed from scripts.

 

Thanks.

Share this post


Link to post
Share on other sites
On 9/18/2020 at 2:06 PM, jandrews said:

Has anyone used findgroundposition with scripted markers?

Hi @jandrews   This is fairly random snipped of code I use - _this select 0 is the string name of the area marker. Marker can be map placed or created using Zen_SpawnMarker

 

while {!(_ok)} do
	{
	switch (tolower(_this select 1)) do {
		case "boat" :
			{
			_randomPos =  [_this select 0,0,[],2] call Zen_FindGroundPosition; // must be water
			_return = _randomPos findEmptyPosition [0,10,"O_Boat_Armed_01_hmg_F"];
			if ((count _return) > 0) then {
				_nObject = nearestObject [_return, "AllVehicles"];
				if !(isNull _nObject) then {_nObjectDist = _nObject distance2d _return} else {_nObjectDist = 50;};
//				if !(isNull _nObject) then {systemchat format ["Type of %1 at %2",typeof _nObject,_nObjectDist]}; // DEBUG
				if (_nObjectDist > 15) then {_ok = _return call DSC_isOutdoorsWet};
				};
			};
		case "inf" :
			{
			_randomPos = [_this select 0] call Zen_FindGroundPosition; // any land position
			_return = _randomPos findEmptyPosition [0,8,"Box_East_AmmoVeh_F"];
			if ((count _return) > 0) then {	_ok = _return call DSC_isOutdoorsDry};
			};
		case "static" :
			{
			_randomPos = [_this select 0,0,[],1,[3,15]] call Zen_FindGroundPosition; // off roads by 3m min (15-12)
			_return = _randomPos findEmptyPosition [0,12,"B_Truck_01_Repair_F"];

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×