Jump to content
Sign in to follow this  
billw

Positions and AI in/on buildings.

Recommended Posts

So I am trying to script an assault to capture a VIP in an office building. Firstly I UnitPlay some choppers to the roof and eject the passengers, this works okay. But the first thing they do is all walk off the roof, unless they are in one specific location right next to the skylight ladder. So I figured I would "stop" them so they don't move then teleport them to the good location. Only I can't get setPos to work for the life of me.

I have tried using markers, also game logic units to get a position from. Markers are no good they don't have height setting, so I can't put them on a roof, game logic has a height as it is a unit, but I can't seem to work out how to move my guys to the placed game logic unit.

Any help please?! Surely it should just be

{_x setPos getPos teleport1; _x stop false;} foreach units group groupleader1; 

Where teleport1 is a game logic unit at the desired position and height, and groupleader1 is the group leader of the unit whose soldiers I want to move.

On another note, the units seem to walk through walls quite often but I guess this is an AI bug? I hope... The building I drop them on has surrounding short walls, but they still just walk straight through them and fall to their death in stead of navigating to the ladder and walking down the stairs...

Share this post


Link to post
Share on other sites

I think you might need to take a look at this command buildingPos. You can use that to get a position in the building that you are trying to use. It would be a valid position to spawn or teleport your units to. Jester814 had a nice little video on how to get a unit to patrol a building he also covers how to find building positions. Take a look at his video

.

Hope it helps.

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  

×