banky 4 Posted June 7, 2013 I'm just wondering, what is the most efficient, less taxing way to have a ton of stuff happen at once with a trigger? Like I have five or six things I want to happen when something is destroyed. Is it best to put all the commands in the OnAct of the trigger, put them all in an .sqf and have the trigger call it, or maybe even use game logic to string the commands together? Is any one way going to use less resources than another to keep performance optimal? Share this post Link to post Share on other sites
LoonyWarrior 10 Posted June 7, 2013 (edited) I'm just wondering, what is the most efficient, less taxing way to have a ton of stuff happen at once with a trigger? Like I have five or six things I want to happen when something is destroyed. Is it best to put all the commands in the OnAct of the trigger, put them all in an .sqf and have the trigger call it, or maybe even use game logic to string the commands together? Is any one way going to use less resources than another to keep performance optimal? it depends on what that "things" re.. and if the trigger can be activated multiple times.. anyway... basically u should create your own function... the native way to do so... 1. create .sqf file with your method and place it somewhere is your mission folder.. ( missionFolder\scripts\banky\BN_fnc_functionName.sqf ) 2. on mission initialization (init.sqf) compile the function BN_fnc_functionName = compileFinal preprocessFileLineNumbers "scripts\banky\BN_fnc_functionName.sqf"; 3. call or spawn your function with trigger http://community.bistudio.com/wiki/Code_Optimisation Edited June 7, 2013 by LoonyWarrior Share this post Link to post Share on other sites