OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: 456820 on 26 Sep 2005, 18:03:08
-
okay im kind of creating an addon more like editing one but ive struck a problem
ive got an addon wich is just a few scripts how can i get one script called init.sqs for example to run straight away once ofp has started ?
secondly how can i run scripts through the init.sqs ?
for example the path to run the script like
addons/myaddon.pbo/folder/script.sqs
i think thats how its done but im not sure i dont know anything about addons im just editing it to suit my own needs
any help would be great
-
For any CfgVehicle entry in a config, you can add eventhandlers. Using the init eventhandler, the script will execute (locally of course) for each unit as soon as it is created (or at the start of the mission). It looks like this:
      class Eventhandlers
      {
         init="_this exec {\path\script.sqs}";
      };
The path will allways start with a "\" if it is inside of a .pbo file. The rest of the path is simple, just treat the .pbo file as a folder.
-
thanks for that i think it seems to work so topic solved thanks
-
little prob does what you suggested run the script on vechiles aswell or just units ?
-
little prob does what you suggested run the script on vechiles aswell or just units ?
Oh please, don't make me have to answer this for you, re-read my post and you'll be able to answer yourself...