Jump to content
Sign in to follow this  
fabrizio_t

How to find nearby cover (stone walls, trees, ...)

Recommended Posts

Hi,

i'm struggling to find any way to find nearby objects suitable for cover.

NEAROBJECTS, NEARESTOBJECTS seem not capable to find them, in the open they normally match things like powerlines and insects, but not what's needed ...

Also FINDCOVER, SETHIDEBEHIND, ... seem not implemented yet, judging from .rpt error :(

Share this post


Link to post
Share on other sites

Did you check the AI fsm?

http://dev-heaven.net/boards/37/topics/show/1595

Mainly these

ca\characters\scripts\danger.fsm

ca\characters\scripts\formationC.fsm

ca\characters\scripts\formationCDanger.fsm

ca\characters\scripts\formationEntity.fsm

From what I recall, it is done in there.

Share this post


Link to post
Share on other sites

by defaul in A2 bots using walls,trees, etc.. as a corners so what is wrong with it??

I'm tried earlier use some a1 script for a2 covering and don't have any errors in rpt/// but by lack of testing can't confirm good work for "sethidebihind", etc//

try use

_covers = NEARESTOBJECTS [getpos _unit, ["house", "landvehicle", "trees"], _distance]

check wiki for sintax)

http://community.bistudio.com/wiki/nearEntities

http://community.bistudio.com/wiki/nearestObject

http://community.bistudio.com/wiki/nearestObjects

http://community.bistudio.com/wiki/nearObjects

Edited by nikita320106

Share this post


Link to post
Share on other sites
by defaul in A2 bots using walls,trees, etc.. as a corners so what is wrong with it??

I'm tried earlier use some a1 script for a2 covering and don't have any errors in rpt/// but by lack of testing can't confirm good work for "sethidebihind", etc//

try use

_covers = NEARESTOBJECTS [getpos _unit, ["house", "landvehicle", "trees"], _distance]

check wiki for sintax)

http://community.bistudio.com/wiki/nearEntities

http://community.bistudio.com/wiki/nearestObject

http://community.bistudio.com/wiki/nearestObjects

http://community.bistudio.com/wiki/nearObjects

I did try with NEAROBJECTS/NEARESTOBJECTS (NEARENTITIES too), as i wrote above ...

try with the command you posted, you'll see it does not work as expected (it did work in ArmA).

Also see: http://dev-heaven.net/issues/show/2016

For some findcover/ setHideBehind documentation.

IMHO there's plenty of cases in which "manually" choosing a better cover position is needed.

...

Thx kju i'll take a look to the .FSM files.

Edited by fabrizio_T

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
Sign in to follow this  

×