wontial 10 Posted December 9, 2010 (edited) I am fairly new to mission making, but by searching around this forum and implementing many useful scripts and ideas I've finally made my first Coop MP mission. And for what its worth, I'm quite proud of what I've come up with and looking forward to sharing with my clan. The thing is though, I've been overly enthusiastic and made lots and lotsa enemy units. About 500 units or so. Er...maybe more. I thought the game would be capable of handling this puny numbers but I guess I'm wrong. I get 7~10 FPS at preview :( Now, with the exception of some roaming patrol groups, nearly every AI units are in perfect ambush spots, in building balconies, barricades, blindspots, open windows and rooftops. Since there were so many units I had to group them all together and also use doStop and doWatch command. These ambushing units are located in four seperate towns. Basically, what the players have to do is make their way through these towns and reach the friendly base on the other side. I really don't want to reduce the numbers of AI units as they make an excellent killzone(and I've put way too much time and effort placing them) So naturally I'm trying to find a suitable spawn script, so that I only get one set of enemies in town at a time. These are the scripts I found to be promising but doesn't seem to work for me - Editor based AI spawns (http://forums.bistudio.com/showthread.php?t=103004) Not compatible with Norrin's Revive script... RMM Reducer (http://forums.bistudio.com/showthread.php?t=91232) Cached Units with Vehicle Support (http://www.armaholic.com/page.php?id=10103) Is there any spawn script that retains individual unit's init line, so that I could spawn them in their intended location? Or even better, is there any script that directly stems from mission.sqm file? It seems the mission sqm file has the exact information necessary, such as position, skill and etc. It would be swell if I could use that information to just create units in their intended places. Any suggestions would be grateful. Thanks in advance. Edited December 9, 2010 by wontial Share this post Link to post Share on other sites
Big Dawg KS 6 Posted December 9, 2010 Just deleteVehicle or enableSimulation false on all the units you don't want to spawn. Of course, you can also add a condition to their Condition of Presence field (this is evaluated only once, so you can't have them spawn during a mission, only at initialization), but that's a lot of copy/pasting. Share this post Link to post Share on other sites
wontial 10 Posted December 9, 2010 BigDawg / Thanks for the reply! If I use deleteVehicle, wouldn't that just delete the unit permanently off the map and deny any possibilities of spawning them again? Thing is, I 'do' want all of those units to be spawned eventually even if I don't want them to be there in the beginning. As for the enableSimulation false, I've used them to freeze some fighters in midair but other than that I'm not so sure if that will solve my problem. Other than freezing a unit, I'm not aware of any other functions it has. Will disabling simulation decrease the lag issues I am currently having? If I may stress again, the main problem I'm having is the lag issue - too many units -> too much lag, which is why I'm looking for 'position-retaining spawn script'. If enableSimulation false helps the lag issue, then I can chuck away the spawn option and go with that one but I'm doubtful. And as for the condition of presence field, yeah since it's only one time thing it really wouldn't help with what I need. Share this post Link to post Share on other sites
Big Dawg KS 6 Posted December 9, 2010 BigDawg / Thanks for the reply!If I use deleteVehicle, wouldn't that just delete the unit permanently off the map and deny any possibilities of spawning them again? Thing is, I 'do' want all of those units to be spawned eventually even if I don't want them to be there in the beginning. As for the enableSimulation false, I've used them to freeze some fighters in midair but other than that I'm not so sure if that will solve my problem. Other than freezing a unit, I'm not aware of any other functions it has. Will disabling simulation decrease the lag issues I am currently having? If I may stress again, the main problem I'm having is the lag issue - too many units -> too much lag, which is why I'm looking for 'position-retaining spawn script'. If enableSimulation false helps the lag issue, then I can chuck away the spawn option and go with that one but I'm doubtful. And as for the condition of presence field, yeah since it's only one time thing it really wouldn't help with what I need. Well, I would imagine enableSimulation false would turn off any resource consuming simulations (such as AI, physics, etc..) on those units. So yes, it should reduce the lag. You can also use hideObject true to make them hidden (so the game doesn't even half to render the models). And both of these are reversable. Share this post Link to post Share on other sites
TRexian 0 Posted December 9, 2010 Isn't he going to bump up against the 112-group limit, though? I thought the only way around that was to delete groups? Share this post Link to post Share on other sites
wontial 10 Posted December 9, 2010 Isn't he going to bump up against the 112-group limit, though? I thought the only way around that was to delete groups? Well, there are roughly over a total of 700~800 individual units in the mission but I grouped them together well enough that the EAST side has exactly 144 groups! So no bump there fortunately :) Well, I would imagine enableSimulation false would turn off any resource consuming simulations (such as AI, physics, etc..) on those units. So yes, it should reduce the lag. You can also use hideObject true to make them hidden (so the game doesn't even half to render the models). And both of these are reversable. Thanks for the suggestion, I'll try this right away! Helluva copy-paste work to do but I'll get there eventually! Share this post Link to post Share on other sites
Big Dawg KS 6 Posted December 9, 2010 Thanks for the suggestion, I'll try this right away! Helluva copy-paste work to do but I'll get there eventually! Er, I would try an approach that does not use copy/paste. You said you they are divided up among different towns right? Can't you use a trigger that simply executes it on all of them? It would save you the trouble of copy/pasting, especially if in the end you find out it isn't an effective solution. Share this post Link to post Share on other sites
wontial 10 Posted December 9, 2010 Er, I would try an approach that does not use copy/paste.You said you they are divided up among different towns right? Can't you use a trigger that simply executes it on all of them? It would save you the trouble of copy/pasting, especially if in the end you find out it isn't an effective solution. Something like, executing it within a trigger radius? That would be really useful, how do I do that??? And by the way, disabling the simulation actually did improve the framerate! What used to run with 7~10 fps now runs with 20~23 fps! The framerates are marginally lower than what I had hoped for, but this still is something. Now I can literally spam the map with enemy units! Thanks again for the great idea! Share this post Link to post Share on other sites
Big Dawg KS 6 Posted December 10, 2010 Something like, executing it within a trigger radius? That would be really useful, how do I do that??? Well, the thislist command (used inside of a trigger) returns an array of all units in the trigger. Then you can just use foreach... Share this post Link to post Share on other sites