Jump to content
Sign in to follow this  
Madmunchkin

AI Patrol inside inserted Building

Recommended Posts

Hi there,

I have a problem that kept me up last nights. I want an AI unit to patrol specific positions of a building inserted via GID Positioning System or editor upgrades (such as CJTF101 Editor Mod). The problem is that buildings inserted by player don't have a static ID and have no buildingpos options in the waypoint menu like at preplaced buildings, so I can't just place waypoints at this building and tell them "move from buildingpos 1 to buildingpos 3" via the dropdown menu at the waypoints section. I have to do this via init line or script but I have no idea how and google seems to have less information about my problem. Or maybe I just have no clue what to search at.

I told an AA-Soldier to move in my building (Military Cargo Tower 1 named as building1) using this setpos (building1 buildingpos 13);. Now I want him to patrol at the top of that building from his spawn location buildingpos 13 to buildingpos 14 of building1 and so on with having the option to tell him in "SAFE" Mode, waiting time, fire at sight etc.. I set up the tower using CJTF101 Editor Mod, so I have the option to edit the towers init line as well.

I hope finding some help here. Thank you!

Edited by Madmunchkin

Share this post


Link to post
Share on other sites
Hi there,

I have a problem that kept me up last nights. I want an AI unit to patrol specific positions of a building inserted via GID Positioning System or editor upgrades (such as CJTF101 Editor Mod). The problem is that buildings inserted by player don't have a static ID and have no buildingpos options in the waypoint menu like at preplaced buildings, so I can't just place waypoints at this building and tell them "move from buildingpos 1 to buildingpos 3" via the dropdown menu at the waypoints section. I have to do this via init line or script but I have no idea how and google seems to have less information about my problem. Or maybe I just have no clue what to search at.

I told an AA-Soldier to move in my building (Military Cargo Tower 1 named as building1) using this setpos (building1 buildingpos 13);. Now I want him to patrol at the top of that building from his spawn location buildingpos 13 to buildingpos 14 of building1 and so on with having the option to tell him in "SAFE" Mode, waiting time, fire at sight etc.. I set up the tower using CJTF101 Editor Mod, so I have the option to edit the towers init line as well.

I hope finding some help here. Thank you!

Have you considered using somthing like UPSMON AI script to help with this issue?

In a very very brief description it can allow you to place a unit in the editor and have it randomly patrol in a defined area (via marker) including limiting it to buildings. I know that this includes buildings placed via editor scripts or Zeus/MCC.

Share this post


Link to post
Share on other sites
Have you considered using somthing like UPSMON AI script to help with this issue?

In a very very brief description it can allow you to place a unit in the editor and have it randomly patrol in a defined area (via marker) including limiting it to buildings. I know that this includes buildings placed via editor scripts or Zeus/MCC.

Thanks for this information. I will have a look at the upsmon script. Thank you very much! :)

Share this post


Link to post
Share on other sites

My simple solution to solving this for myself was to just use MCC to place my units inside the building with Zeus, then go back into the 2D editor to find their height and place waypoints appropriately. It works, but I have to really micro-manage where the waypoints are so they don't end up trying to leave the building and go around the outside, entering another area to reach it because it was slightly too close to a wall.

Share this post


Link to post
Share on other sites

I put units with a % chance to spawn. I set them in aware, diamond formation and engage at will then plug the lead unit into a spot I think is good to be in.

I put a 30sec this set is PRESENT trigger on top of the building.

Then the main unit that is peaking out of the window gets a "doStop <unit name>" put in the aforementioned trigger.

-That keeps the lead unit in place until he dies or has morale failure.

-His pals get sic'd on whatever enemies are detected.

-You get a unpredictable emergence of units in buildings.

You can also setup a patrol to hit all the buildings in a given area spending 10minutes here or 5 minutes there.

Sometimes switching positions within the buildings.

I came back to a mission I setup months ago. I was roaming around. I give layered randomly placed waypoints so sometimes my units find their ways into buildings and setup camp.

I had one hell of a nice CQB incident. I was like: "Oh shi- contact!" frag... frag... boom boom... then clear... frag.. clear... frag... clear.... then perimeter check.

It was nice.

I was happy.

Then I got capped 10minutes later by a roving sniper with full skill settings.

(glad this is a sim)

When I'm having a nice hump in the woods... sometimes I think of Arma... then go... all of the treelines here are like <300m "I'm fucked.''

It's sometimes a pain scrambling the spawn chance values.

You don't know when your hard work double checking pathing is going to pay off.

Then there is that golden moment of !

This is priceless.

Maybe this will help?

Maybe it won't.

Hopefully, it will.

Share this post


Link to post
Share on other sites

Gaia stand alone, UPSMON both allow this, personally Gaia AI acts a bit better, I know UPSMON is being updated too so keep an eye on that. VCOMAI is getting some love but may not be for a while, try using those as well. You can manage some parameters too. Good stuff.

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  

×