takealready 1 Posted October 28, 2007 What is the proper format for an init (like in ofp's eventhandlers)? I've tried ofpec forum and wiki and still I can't find an answer. Where does it go in the cpp? I don't get an error message (when I start arma) and when the addon loads in the game..nothing happens. This is what I have: class EventHandlers { init = [_this] execVM "\Spboats\scripts\common_init.sqs"; }; I'm trying to master arma's new style of init so that I can write a random weapons sqf for my soldiers I'm porting to arma. I had one on my ofp soldiers that worked perfectly. Thanks in advance for someones expret advice. Share this post Link to post Share on other sites
DBO_ 0 Posted October 28, 2007 Its the quote inside that are different and i dont think you need the [] with _this class EventHandlers { init = "_this execVM ""\Spboats\scripts\common_init.sqs"""; }; Edit ,it goes there <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class MYSaboteurbc1: SoldierWSaboteur { scope = 2; displayName = "Spec Op "; vehicleClass="MY_Addons"; weapons[] = {"M4A1SD","M9SD","Throw","Put","NVGoggles"}; magazines[] = {"30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD"}; class EventHandlers { init = "_this execVM ""\Spboats\scripts\common_init.sqs"""; }; }; or try what madmatt sugested for easier future additions Share this post Link to post Share on other sites
Maddmatt 1 Posted October 28, 2007 If you're going to add custom eventhandlers to your addon, please use the extended eventhandler addon by Solus. That way your addon can still inherit eventhandlers from mods as well as have it's own. Look here for more info. So far several addons and mods are using it, including mine. Share this post Link to post Share on other sites