OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: laggy on 28 Jan 2010, 20:29:57
-
Hi,
In a mission I found that the modules alice, silvie and animals where causing lag and jerkyness in a camera intro.
I decided to have them spawned as soon as the intro was over instead of placing them in the editor.
if (isServer) then {module1 = "BIS_animals_Logic" createVehicle [0,0,0]; module2 = "SilvieManager" createVehicle [0,0,0]; module3 = "AliceManager" createVehicle [0,0,0]};
However, this solution doesn't work because the spawned modules don't work at all, nothing is spawned by them.
Does anyone have any similar experiences or better, know why this is.
Those modules aren't even supposed to be synchronized with a unit, so that can't be the case.
Thanks in advance,
Laggy
-
I couldn't tell you the source, but I seem to remember reading somewhere that modules had to initialise within the first few seconds of a mission. Don't know if that's relevant, or even 100% correct - but, hey. :)
-
Maybe its because they are Logics and these have to be created using createunit or something? or was it createvehiclelocal i forget so much these days ;).
class BIS_animals_Logic : Logic
edit
infact i remember Giai said Create unit should be used as :
"Actualy, you should. Using createVehicleLocal for spawning logic units is not 'legal' way how to do it and could cause some unexpected errors. "
-
Thank you both,
I'll try it :good:
Laggy
-
Also beware that if your module is one that needs things synced to it, like the artillery module, you'll have to do these synchronizations within 0.5 seconds of creating the module.