Jump to content
zorrobyte

ZBE_Cache AI & Vehicle caching script/addon

Recommended Posts

I see this sort of thing made it into the A3 engine officially! 🍻

 

Happy to see some of you still around after all these years.

 

All the best,

zorro

  • Like 6
  • Thanks 1

Share this post


Link to post
Share on other sites

I prefer the ZBE_Cache script over the BIS engine solution. The fact that it does not cache the leader of a group make real-time simulation much more realistic. 

 

See you in a few years 😁

  • Like 2

Share this post


Link to post
Share on other sites

Not sure if forum is dead or not bc no post in over a year, but i'm trying to make ZBE uncache an entire side. If anybody knows a script that will do this and where/how to implement it, your help will be greatly appreciated. 

Share this post


Link to post
Share on other sites

I'm trying to make a limited zeus vs AI scenario, the only issue is everything zeus spawns in gets cached, rendering remote control of those units broken. 

Share this post


Link to post
Share on other sites

You can set the variable zbe_cacheDisabled to true for units that should not be cached. E.g. to exclude all blufor units:

{_x setVariable ["zbe_cacheDisabled", true]} forEach allUnits select {side _x == west};

 

Share this post


Link to post
Share on other sites

Awesome, should that go in the init of the mission file? 

Share this post


Link to post
Share on other sites
1 hour ago, kgp227 said:

Awesome, should that go in the init of the mission file? 

 

If you have a file "initServer.sqf" in your mission root folder then you can copy it in there. But the init.sqf will do as well. Player clients will ignore it. This would only work when all the blufor units have been created. If you create more units later in the game you would need set the variable for these units as well. In  the init of the group leader:

 

(group this) setVariable ["zbe_cacheDisabled", true];

 

Share this post


Link to post
Share on other sites

That's too bad, as the mission I'm making revolves around spawning units in with Zeus, and running a script on the init of every single group is rather un-intuitive for my purposes. Thanks for the help anyway, I still might be able to make use of it in a different type of mission. 

Share this post


Link to post
Share on other sites

The good news is I think I just found a workaround, it seems that splitting the ai apart and regrouping them uncaches the entire group. 

Share this post


Link to post
Share on other sites
On 9/7/2020 at 2:25 PM, comradeguy said:

Hello. Is is possible to make friendly AI stay cache even if player is nearby?

 

You want them to remain cached forever? Why just not delete them?

Share this post


Link to post
Share on other sites
On 9/9/2020 at 3:55 PM, whiztler said:

 

You want them to remain cached forever? Why just not delete them?

No. I want them unchache only if they engage hostile AI

Share this post


Link to post
Share on other sites
13 hours ago, comradeguy said:

No. I want them unchache only if they engage hostile AI

 

How can they engage anything while they are cached? It seems you're better off with a spawn-on-demand script that spawns AI's when required.

 

ZBE_Cache checks distance from players and caches/uncaches AI's based on pre-defined distance params.

Share this post


Link to post
Share on other sites

Another issue i found , chached motorized and mechanised groups refuse to move. Also if i try to load seperated infatry group into vehicle (which is part of different group) they won't do it. 

P.S. sorry for my english.

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

×