saildeep / SmmCaptureEvolve.Altis

Capture the Island Mission for ARMA3
2 stars 2 forks source link

improve unit spawn #6

Closed hanibalv2 closed 7 years ago

hanibalv2 commented 7 years ago

as described at : https://community.bistudio.com/wiki/Position#PositionASL

we coud maby detect surface object like trees and rock by using the correct getPos funkction

also getPosWorld should be forced to used. It is the fastes function. https://community.bistudio.com/wiki/Code_Optimisation

saildeep commented 7 years ago

We should implement a fallback, in case our current solution does not find any safe spot

hanibalv2 commented 7 years ago

fallback implemented. But it is not satisfactory in my opinion.

justcallmeduncan commented 7 years ago

-units still spawn in rocks

hanibalv2 commented 7 years ago

unit spawn optimize -> 94f3f8ea13126b81ede3a3312ff969ca455a9d06

but some units still spawn in the origin of the map.

I try to fix this via :

if( (_unit distance [0,0]) < 100)then{
diag_log (format ["Unit %1 spawn in origin of the map, setDamage 1",_x]);
_unit setDamage 1;
};

in on_zone_enter 60-65, but i can not trigger this. Maybe the code is faster execute than the unit spawn.

hanibalv2 commented 7 years ago

Visual test result: As i see on our server(15.06.2017-01:42:00) Units can still spawn in rocks. Maybe 20 Percent possiblitiy

It seems that they spawn on a rock wich is still inside another rock, or fall back agin through the objekt.

saildeep commented 7 years ago

New spawning system, tries to spawn units in nearby buildings and only uses the old method as a fallback. Moreover it is sufficient to hold the position at the zone center to conquer it. Therefore this is no longer relevant.