Jump to content
Sign in to follow this  
bospor

Keep the chickens inside!

Recommended Posts

Making a mission where chickens on the farm need to stay inside the building. They keep walking through walls of the barn. I even put another wall around the barn, but these sons of bitches are still walking through that as well. What would you guys suggest to keep them in?

Share this post


Link to post
Share on other sites

hm. i know it may sound weird but simple stuff like that is actually hard to do in this engine.

here's what i would do.

put this inside the init line of the chicken

this disableAI "FSM"

you might need to turn off other parts of the AI. check here for more info http://community.bistudio.com/wiki/disableAI

now they will stay in place. if you need them to move you should run a script that gives them "moveto" or "domove" commands to postions (maybe place markers) in a loop.

http://community.bistudio.com/wiki/doMove

http://community.bistudio.com/wiki/moveTo

it's actually easy to do. if you need more help, feel free to ask here.

Share this post


Link to post
Share on other sites

I had this issue in my RP mission - I solved it by having any chickens that leave the area get deleted and respawn a new one - or maybe I teleported the chicken back to the location.

Share this post


Link to post
Share on other sites

Animals in this game are a kind of AI called agents. Agents are quite rigid and seem to be optimized for ambient life. There is another kind of ai called units. You could spawn unit chickens but they will act more like soldiers and not like chickens, but they should respect walls.

Share this post


Link to post
Share on other sites

Thanks guys. I'll try keeping them in cages and make them not move with disableAI comands. I think it's the easiest way

Share this post


Link to post
Share on other sites

You could put a rectanglular trigger that is activated by the chicken. Then when the chicken leaves, on deactivate issue a doMove back to a waypoint in the middle of the trigger.

Share this post


Link to post
Share on other sites

Rga_Noris could you elaborate please. I got the part about the trigger, about the deactivation field in the trigger, but what exactly whould you type for the doMove command in that field? what would happen after they move to the waypoint in the middle of the trigger? Please help man, I tried this disable "FSM" command, but it's not working. This disable "MOVE" just freezes the chicken, they look like porcelain chickens everywhere :)

I figured it out! For those who even remotely interested in the outcome of this topic in the future :) Rga_Noris was right. Inside the area that chicken (ambient life) needs to stay in, like a barn for example, make a trigger that is connected to chicken (group the chicken and the trigger with F2). Name the chicken for example Chk1 and make a marker inside the trigger. Name the marker ChkPoint. In deactivation (not activation) of a trigger type this: Chk1 doMove ChkPoint

Seems to be working fine. Thanks gents for your time!

Edited by Bospor

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  

×