Vdauphin / HeartsAndMinds

:heart::brain: 1.24.2 is out! 🎉
http://vdauphin.github.io/HeartsAndMinds/
108 stars 65 forks source link

Improve addWP.Sqf #1266

Closed Azraeel closed 2 years ago

Azraeel commented 2 years ago

This should cover generally everything including most situations that AI struggle with via path-finding. I made this PR because I feel generally Way-point managements and such is underwhelming in literally every mod or mission for Arma :(.

I did not test this because I couldn't due to current machine so if something doesn't work please point it out, but i'm very sure it should.

Included in depth commenting so you can read my code like a book <3 Also if performance is hit which i don't think it should especially on altis then hit me with a stick.

Vdauphin commented 2 years ago

Hello,

Thank you for your contribution

I made this PR because I feel generally Way-point managements and such is underwhelming in literally every mod or mission for Arma :(.

H&M already handle it. If you had take a look to the code and play the mission in debug you would notice it. https://github.com/Vdauphin/HeartsAndMinds/blob/9fa9e1705b43a010aeb1ad61775266c67abe5b04/%3DBTC%3Dco%4030_Hearts_and_Minds.Altis/core/fnc/patrol/WPCheck.sqf#L55-L67

I did not test this because I couldn't due to current machine so if something doesn't work please point it out,

It looks like you don't really uderstand how SQF works but the way you wrote it looks like you know other language. I highly recomend to join A3 Discord, plenty of people will be glad to help you. Also consider https://community.bistudio.com/wiki/Control_Structures https://community.bistudio.com/wiki/SQF_Syntax as a start.

but i'm very sure it should.

Many reason this should not works.... Basically isNull [_pos getPos [100, random 360], 100] doesn't make any sense as it will never be null You are putting private _newPos everywhere whih mean outside the {} this variable is underdefine. else if this doesn't exist in SQF isTerrainSurfaceTypeWater not define 🤷🏽‍♂️

Thank you again for your time

Cheers