Jump to content
Sign in to follow this  
PaperCut

Units die when placed inside buildings...

Recommended Posts

Hello all, this is my first post here regarding help with creating missions for Arma 2.

I have spent the last two days trying to figure out why my units die when I place them within a building.

I downloaded and printed the Arma Editing guide, googled for an answer, searched Armaholics.com and this site as well.

I've tried using scripts attained from the net, I've tried placing the units outsiode of the building then placing waypoints to the desired locations.

When using waypoints, the units do not die, but they also do not go where I would like them.

I've tried the "randombuildingPos" (which kills them)

I know what it means to clutter forums with useless questions which may or may not be already answered.

I really DID NOT want to post about this and I promise I searched.

Also I have read EVERY chapter in Mr.Murrays Arma Editing guide up to chapter 9. I really want5ed to figure this out for myself, I swear... but I'm at the end of my rope, and don't know where else to turn.

Thank you and I apologize in advance :(

!!!(EDIT)!!!

Again, I am very sorry for posting this question, shortly after posting I did one more search and found this from one of the communities members and it worked.

If an admin wishes to delete the thread please do so.

Here is a link to the solution I found, I figured I would post the link in case someone runs into the same problem, but again, to avoid clutterplease delete this thread if needed.

Link:http://forums.bistudio.com/showpost.php?p=1328174&postcount=4

(Thank you Tajin)

Edited by PaperCut

Share this post


Link to post
Share on other sites

The script in your link will still kill the AI for certain positions in certain buildings, so it's not a true solution :( It is necessary to use something like this though if you want to implement any kind of randomization.

The problem lies within BIS, though, as they made it so not all building positions are actually legal for the AI, and some of them simply start the AI clipped with a wall/object and thus they die soon after.

The only workaround I found was to make them move to that spot from the outside. That way I they will move as close as possible without killing themselves (I've yet to see AI killing themselves by moving to illegal spots, though who knows - that might be possible too).

Players don't seem to have such issues, as they seem to have some anti-clipping applied to them, while the AI is allowed to move through stuff and thus also be placed in illegal spots that get them killed (but again they don't seem to be moving to those places on their own - if they clip through stuff on their own mind it'll only be stuff that won't get them killed, at least as far as I've noticed).

Edited by galzohar

Share this post


Link to post
Share on other sites

Placing Objects and Units inside building is a bit of torture everytime.

I usually use : this setPos [(getPos this select 0),(getPos this select 1),10];

for all things,so you can get the unit exactly on the position you want it.

You allways have to try till all works good,sometimes they die cause of wrong height,but if you work with this bit more,its get fast easier.;)

Share this post


Link to post
Share on other sites

Try this one out...

http://www.armaholic.com/page.php?id=6078

It's true that a lot of buildings do have serious problems with building positions.

I might try to work around it in the future, but for now, this script does it pretty well for all buildings that have legit building positions.

Share this post


Link to post
Share on other sites

If you place the unit outside the building and remove the part in the house patrol script that setPos the unit inside then you should not have problems with your unit dying, and it will still patrol the building.

Another thing you can change with that script is to replace the doMove with giving them a waypoint and then every time the unit finishes moving it will move the waypoint, set current waypoint to the first (number 0) waypoint and then immediately set it back to the waypoint you moved (number 1). That way if the unit is in a group the entire group will patrol the house randomly, but of course the other group members will only follow and try stay in formation, which may or may not look good - but at least they will also patrol around.

Share this post


Link to post
Share on other sites

Wow!!!

thank you folks so much for the responses, as with most of my experiances with other websites I have to admit I didn't expect any responses at all. and totally expected to be flamed for asking a question that was almost certainly answered elsewhere.

What a great community!!!

The mission involved with my question is a mission I never plan to upload as I'm creating it just to practice with the editor.

The plan is to use the parking garage that a player starts in during the mission Razor 1, I beleive, in the Harvest Red Campaign.

I want to have a 10-man fire team holed up in the parking garage while being attacked by insurgents from all angles. No intro, outro, breifing or anything along those lines. I know I could physically move them into their respective positions upon the mission starting, but I figured I would use this mission to attempt to get some of the basics down which will be required in the mission I plan to upload entitled "Operation PaperCut"

As a matter of fact, I'm going to post the description of "Operation PaperCut" right now. I already wrote down in my notebook a rough draft of what I want to accomplish.

Now that I know this community actually cares about its members, I'm not worried about wether or not I'm wasting my time by posting my idea.

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  

×