Falken 0 Posted February 28, 2007 Hi, I made a mission recently which has been doing the rounds on the server I reside at. Basically an 8 man squad including pilots have been shot down in the middle of enemy territory, and they have to make their way out. Unfortunately there happens to be 144 enemy squads in the area. I used to run this mission on a 1.7ghz Centrino, 1024mb RAM, 128mb X700 laptop and it ran 20-24 FPS on low settings. My new C2D 6600 / EN8800GTX rig runs it about 30-35 on high. I want to rework it so that the enemies are using the Urban Patrol Script, and will be added/deleted if any player gets within say 1000 meters of their location. At the moment I have 144+ enemy squads (3 of the squads are chopper crews doing patrols with the UPS system) and the rest are infantry doing static waypoint determined patrols or vehicle convoys moving down roads. A couple of the squads are lead by an invisible South sahrani (sahrani are set to enemies, however you will never see them) Would having the UPS activate/deactivate on present squads all down to player locations help on CPU, over static waypoints for all 144+ squads? I'm really trying to optimise this. Share this post Link to post Share on other sites
iLL 0 Posted February 28, 2007 Yeah, you mite wanna do this specially with the ammount of squads you've added, it was the case in operation flashpoint with big CTIS to have a lag protection script that only acivated the AI when players are close to the town, or else theres alot of soldiers there doing a whole lot of nothing until a player comes close and its just wasting speed/resources/bandwidth. You'd need to script it pretty good though ...you dont want ai appearing out of know where inside the viewing distance (thats what let the script idea down in ofp). I take it you know how to script it? Share this post Link to post Share on other sites
-)rStrangelove 0 Posted February 28, 2007 You don't have to actually delete the whole group, just all units in a group but the leader. It will reduce lag. (DAC used that trick i think) Share this post Link to post Share on other sites
baddo 0 Posted February 28, 2007 You'd need to script it pretty good though ...you dont want ai appearing out of know where inside the viewing distance (thats what let the script idea down in ofp). One more reason for BIS to add a getViewDistance function into the scripting language. Or does someone know how to find out the current viewdistance? A way around is to set it in mission start to some value and then hope that the player doesn't touch the setting or set it again to the same value like every couple of minutes. Edit Added getViewDistance request into Biki wishlist. Share this post Link to post Share on other sites