Jump to content

Recommended Posts

Hey guys!

 

I’m trying to create a WWII POW Escape mission that features AI guards and some AI prisoners to make the prison lively.

 

Basically I want the camp AI prisoners to walk around the camp in the daytime but go into their huts and stay there at nighttime before then coming back out again in the morning and doing that whole day/night cycle over again indefinitely - is it possible do this? I can only seem to make them cycle in the yard indefinitely regardless of the time of day, but if they’re out at night (when they shouldn’t be) then the searchlights go mad and it kills the immersion. Any help appreciated!

  • Like 1

Share this post


Link to post
Share on other sites

https://community.bistudio.com/wiki/sunOrMoon

You can use sunOrMoon to check day/night. Sun Up is 1, and Sun Down is 0. Dawn/Dusk is in-between.

 

You'd have to run a loop and check that number every x min or so.

Or better, you can also try the BIS function sunrise as well.

https://community.bistudio.com/wiki/BIS_fnc_sunriseSunsetTime

 

  • Like 2

Share this post


Link to post
Share on other sites

Good idea... but not so easy to script. Do you already have a map, a camp, how many prisoners, how do you manage their positions at night?

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

×