Jump to content

Recommended Posts

Morning, 

 

Does anyone know how to restrict AI units from entering a zone? 

I have mines down and i want the premise that the enemies know where the mines are, of course they keep running over the mines, which is fun but a little silly, they should know where the mines are. I have them following waypoints around the mines areas that fine, but when they spot you i want them to be able to navigate around the mine zones without running straight through them..

 

Any ideas, can i put an invisible marker down with something in ithe init? To keep all AI units out?

Share this post


Link to post
Share on other sites
Just now, Gunter Severloh said:

Take a look at my AI compilation list under

AI Actions, Behavior, Movement, & Shooting

look under movement, there is some threads there that can help.

https://forums.bohemia.net/forums/topic/165560-ai-compilation-list-of-addonsmodsscripts-threads-for-arma3/

 

Thanks Gunter, just had a look at it 2 minutes before you replied, i found a thread there that says you must put the mines down from the side you want to avoid.. Will check that out later, but for interest sakes i still want to be able to make restricted zones that prevent AI from moving into the zone. Would be quite helpful on some of my other missions, Will check it out... Thanks Gunter

  • Like 1

Share this post


Link to post
Share on other sites

If you want some units/players avoiding an area (not air),  the simplest way, imho, is to build a surrounding invisible wall with multiple "Land_InvisibleBarrier_F" . You can disable the simulation and damage for better resource management.

Then, despite the fact these objects are already invisible, you can play with hide/show them in order to block or pass thru for the path of the units/players.

Example : {_x hideObject true} forEach (getpos thistrigger nearObjects ["Land_InvisibleBarrier_F",70]) in a act. field of a trigger  (area radius 70m) will disable the blocks and the units/players can pass thru.

You re-enable the wall by {_x hideObject false} forEach (getpos thistrigger nearObjects ["Land_InvisibleBarrier_F",70])

 

Other ways with waypoints or move orders, altering the engine calculated path seem to me overcomplicated.

  • Like 2

Share this post


Link to post
Share on other sites
3 minutes ago, pierremgi said:

If you want some units/players avoiding an area (not air),  the simplest way, imho, is to build a surrounding invisible wall with multiple "Land_InvisibleBarrier_F" . You can disable the simulation and damage for better resource management.

Then, despite the fact these objects are already invisible, you can play with hide/show them in order to block or pass thru for the path of the units/players.

Example : {_x hideObject true} forEach (getpos thistrigger nearObjects ["Land_InvisibleBarrier_F",70]) in a act. field of a trigger  (area radius 70m) will disable the blocks and the units/players can pass thru.

You re-enable the wall by {_x hideObject false} forEach (getpos thistrigger nearObjects ["Land_InvisibleBarrier_F",70])

 

Other ways with waypoints or move orders, altering the engine calculated path seem to me overcomplicated.

THanks Thats a clever idea, will give that a shot later.....

Share this post


Link to post
Share on other sites

Oh dear, i have placed the mines from the props menu, I didtn use the mine site from the sites module.

 

SO nobody owns the mines so nobody can see them.

 

I  did read that you can make mines visible to a side.

 

using west revealMine _mine;

 

 

I am using apers mines and the enemies are RHS russians i think.. 

So wonder what my code would look like, and where would i put it, in the int of each mine?

 

maybe something like rhs_faction_msv revealMine _apers;   

 

I messed around with it earlier and couldnt get it to work, I dont want to have to make inviable barriers either, the ammount of barriers i would have to make would be too many. 

 

 

 

Share this post


Link to post
Share on other sites
48 minutes ago, chrisbaker1981 said:

Oh dear, i have placed the mines from the props menu, I didtn use the mine site from the sites module.

 

SO nobody owns the mines so nobody can see them.

 

I  did read that you can make mines visible to a side.

 

using west revealMine _mine;

 

 

I am using apers mines and the enemies are RHS russians i think.. 

So wonder what my code would look like, and where would i put it, in the int of each mine?

 

maybe something like rhs_faction_msv revealMine _apers;   

 

I messed around with it earlier and couldnt get it to work, I dont want to have to make inviable barriers either, the ammount of barriers i would have to make would be too many. 

 

 

 

oh wait do all opfor factions fall uner east?

Share this post


Link to post
Share on other sites

OK so just replacing all the prop mines with mine sites from the  sites module,

setting them all to opfor owner, that works, just a bit of pain if you knew what else i have synced up with positions of the mines..

 

I wish you could draw a box for the mine site so you know exactly where they will be not have to keep going in game to see the actual site

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

×