Search the Community
Showing results for tags 'preinit'.
Found 4 results
-
Calling PreInit & Postinit functions from a @Mod
MitchJC posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Afternoon all, I'm after a bit of advice with calling postinit and preinit functions from a mod. I've created a mod which is basically a functions library. I have one rather inconvenient issue. My Postinit and preinit functions execute on Arma 3 start, for example: I have dynamic text appearing on the main menu, which whilst amusing, isn't particularly professional. My question: How do I execute postinit and preinit functions only on Mission start when called within a @mod? Thanks in advance! -
[SOLVED] Prevent function initialization in main menu
Leopard20 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello guys. Does anyone know a way to prevent functions from launching in the main menu? When I set up my functions as pre-init or post-init, they also execute in the main menu but I don't want this to happen. -
Understanding how preInit and postInit attributes work
cklymowsky posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
HI All, I'm trying to figure out how the preInit and postInit attributes work, and I've read a couple of threads and still am missing something... I thought the following would display "Hello BEAKO" before the mission start but nothing happens. I created: descrition.ext class CfgFunctions { class BEAKO { class preInit { file = "functions\preInit"; class test { preInit = 1; }; }; }; }; initServer.sqf [] call BEAKO_fnc_test; fn_test.sqf (inside folders "functions" sub-folder "preInit") hintC format ["Hello %1",name player]; -
Hello. I have a function, let's just call it add_addaction. Then I have another function, which is just Retriever. The Retriever finds a city, spawns civilians and cars. For each civilian spawned, the following command is used : [_unit] remoteExecCall ["JeyR_fnc_retrieve_addaction",0,true]; The add_addaction currently doesn't do anything special, just adds an action to the unit saying "helo". This works fine. However, for JIP players, the action is not showing up. I tried to fix the problem via this piece: class CfgFunctions { class JeyR { class Jey_public { class retrieve { file = "functions\retrieve.sqf"; preInit = 1; }; class retrieve_addaction { file = "functions\retrieve_helper.sqf"; preInit = 1; }; }; }; }; And to avoid the scripts to give any errors (because the add_addaction requires an object/unit, it gives you an error that it couldn't find the unit to add the action), I put this command to the top of the scripts : _asd = missionNamespace getVariable ["running_task",0]; if (_asd == 1) then { /* The other parts of the script */ } Now even the not JIP players can't see the add action, but the RPT log doesn't give any errors. I am totally out of ideas. How does the functions library work?
- 5 replies
-
- join in progress
- jip
-
(and 2 more)
Tagged with: