OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Rysumm on 12 Jun 2004, 05:07:11

Title: Keep Ai from falling out of tower or building?
Post by: Rysumm on 12 Jun 2004, 05:07:11
Ok, how do you keep AI guys from getting on their bellys and falling out of towers and buildings when shot at. I just want them to stand still but look ready to fire,  
Title: Re:Keep Ai from falling out of tower or building?
Post by: Homefry31464 on 12 Jun 2004, 05:11:52
unitname setunitpos "up"

-Homefry
Title: Re:Keep Ai from falling out of tower or building?
Post by: cameronmc on 12 Jun 2004, 10:15:44
Additionally, use Homefry's suggestion and

nameofunit disableai move

that'll stop 'em moving at all.
Title: Re:Keep Ai from falling out of tower or building?
Post by: Rysumm on 12 Jun 2004, 19:27:25
Sounds good. I'll give it a try.  
Title: Re:Keep Ai from falling out of tower or building?
Post by: Rysumm on 24 Jun 2004, 02:34:46
Ok, guys any idea where i enter in setunitpos up or disableai move? I just got back in town so this is the first chance I have had to try this.
Title: Re:Keep Ai from falling out of tower or building?
Post by: Rysumm on 24 Jun 2004, 02:48:22
Well, I tried putting the "setunitpos up" in the intialization feild of the guy, but he still falls out of the tower when I shoot at him.  
Title: Re:Keep Ai from falling out of tower or building?
Post by: macguba on 24 Jun 2004, 11:59:02
You do indeed write the code in the init field of the unit.

this setunitpos "up"; this disableai move
 
(Order might be important.   Syntax not guaranteed - look it up in the command reference.) He will fall out of the tower when dead whatever you do.   You could use some fancy scripting to make the body stay up there, but it would look like it was supended in mid air and in any case I doubt its worth the trouble.
Title: Re:Keep Ai from falling out of tower or building?
Post by: Rysumm on 25 Jun 2004, 03:55:55
Thanks for the additional info it worked like a charm.