DUWS-R-Team / DUWS-R

ArmA 3 Dynamic Universal War System - Rebirth
42 stars 18 forks source link

I've added safe spawns and've safely tested them ;) - the files are attached. #156

Closed TuxuHolyland closed 6 years ago

TuxuHolyland commented 7 years ago

Hi, regarding my previous post: "Manned APC Spawned inside Command building" https://github.com/DUWS-R-Team/DUWS-R/issues/153

I've tried to fix that spawn issue in "request_vehicle.sqf" and "request_squad.sqf" into safe spawning by using BIS_fnc_findSafePos and by changing:

_spawnPos = getpos player; _spawnPos = [(_spawnPos select 0)+30, _spawnPos select 1];

into this: request_vehicle.sqf:

//_spawnPos = getpos player; Blocked by Tuxu _spawnPos = [getpos hq_blu1, 100, 250, 20, 0, 20, 0] call BIS_fnc_findSafePos; //changed by tuxu _spawnPos = [(_spawnPos select 0)+30, _spawnPos select 1];

"request_squad.sqf":

//_spawnPos = getpos hq_blu1; blocked by Tuxu _spawnPos = [getpos hq_blu1, 80, 250, 20, 0, 20, 0] call BIS_fnc_findSafePos; _spawnPos = [(_spawnPos select 0)+15, _spawnPos select 1];

I wasn't sure about upping those into the build so I won't mess up something for you, also - I was trying to adhere to your own style of coding to make your life easier with my intervention. Also - I've commented to make it easier to find my edits.

I hope this helps,

Regards.

dialog.zip

ultranoobian commented 7 years ago

Very good. Looks like it will work.

I'll test it and make a commit that is attributed to you so we know that you contributed once I get back to work.

TuxuHolyland commented 7 years ago

250 appears to be way far, ive changed the squad values to be 40..70 and the vehicle values to be 70..110

Also - tasks doesn't form on maps like kerama Islands By [Vétérans]

My guess is that the script can't find a suitable place to setup as a mission area, which is a shame because duws-r truly shines in a non consistent environment where players have to adapt and be creative about insertions to the AO.

I wasn't sure about messing with scripts that locate area for missions so in case that my suspicion has merit I'd thought I'd ask you where should I look for the relevant code.

http://steamcommunity.com/sharedfiles/filedetails/?id=682140680

edit: I was wrong, it was ace that's lagging my system. it does ever since the Malden update.

ultranoobian commented 6 years ago

Okay, some things we need to address

Even better would probably be to use findEmptyPosition since it just returns empty array instead of the map center, and we can actually pass the vehicle class to it as well.