User Tools

Site Tools


arma:misc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
arma:misc [2009-02-06 16:09]
snakeman added aircraft scripts part.
arma:misc [2009-07-13 20:16]
snakeman added unpacked addons part.
Line 2: Line 2:
  
 Area where all misc stuff is placed, before proper place can be found them (if any). Area where all misc stuff is placed, before proper place can be found them (if any).
 +
  
 ====== Default Installation Files ====== ====== Default Installation Files ======
Line 7: Line 8:
   * [[arma:​default_files|Default files]]   * [[arma:​default_files|Default files]]
 Default installation files from your DVD. Default installation files from your DVD.
 +
  
 ====== User Interface ====== ====== User Interface ======
Line 58: Line 60:
 Now we have ported the SQS script into SQF format which ArmA likes. This is how it looks when its ported: Now we have ported the SQS script into SQF format which ArmA likes. This is how it looks when its ported:
 <code cpp> <code cpp>
 +
 private ["​_plane",​ "​_s",​ "​_alpha"​];​ private ["​_plane",​ "​_s",​ "​_alpha"​];​
  
Line 64: Line 67:
  
 // Alive and with the engine on? // Alive and with the engine on?
-while (alive _plane && isEngineOn _planedo+while {alive _plane && isEngineOn _planedo
 { {
  sleep 0.01;  sleep 0.01;
Line 71: Line 74:
  if (_s > 100) then  if (_s > 100) then
  {  {
- _alpha = 0.16 * (_s / 900));+ _alpha = 0.16 * (_s / 900);
  if (_alpha > 0.16) then  if (_alpha > 0.16) then
  {  {
  _alpha = 0.16;  _alpha = 0.16;
  };  };
- drop ["​\ca\data\cl_basic",​ "",​ "​Billboard",​ 1, 10, [0,-5,.1], [5-random 10, 5-random 10, 5-random 10], 0, 10, 1, 1, [5,15,40], [[.2,​.2,​.2,​_alpha/​10],​ [.2,​.2,​.2,​_alpha],​ [.2,​.2,​.2,​0]],​ [0,.2,1], 5, 5, "",​ "",​ _plane];+ drop["​\ca\data\cl_basic",​ "",​ "​Billboard",​ 1, 10, [0, -5, 0.1], [5 - random 10, 5 - random 10, 5 - random 10], 0, 10, 1, 1, [5, 15, 40], [[0.2, 0.2, 0.2, _alpha/10], [0.2, 0.2, 0.2, _alpha], [0.2, 0.2, 0.2, 0]], [0, 0.2, 1], 5, 5, "",​ "",​ _plane];
  };  };
 }; };
Line 83: Line 86:
 Next you need to run this script from your aircraft'​s config.cpp file. This is used with compatibility to Extended Eventhandlers (XEH) like this: Next you need to run this script from your aircraft'​s config.cpp file. This is used with compatibility to Extended Eventhandlers (XEH) like this:
 <code cpp> <code cpp>
-class Extended_Engine_EventHandler+class Extended_Init_EventHandlers
 { {
  class VTE_SomeClassName  class VTE_SomeClassName
  {  {
- vte_someclassname_smokefx = "if (_this select 1) then {_this execVM '​\path\to\smokey_script.sqf'​}";​+ VTE_F4_engine = "if (isEngineOn (_this select 0)) then {[_this select 0,true] execVM '​\path\to\script.sqf'​}";​ 
 + }; 
 +}; 
 + 
 +class Extended_Engine_EventHandlers 
 +
 + class VTE_SomeClassName 
 +
 + vte_someclassname_smokefx = "if (_this select 1) then {_this execVM '​\path\to\script.sqf'​}";​
  };  };
 }; };
 </​code>​ </​code>​
-And your aircraft is ready to run this smoke script.+And your aircraft is ready to run this smoke script. Notice how the extended_**init**_eventhandlers are used to start the script even if you place the aircraft flying in mission editor. The extended_**engine**_eventhandlers alone works OK if you start the aircraft on ground, so after mission start the engine is started by AI or player. 
 + 
 + 
 +====== Unpacked Addons ====== 
 + 
 +Using unpacked addons, meaning your "​My_soldier.pbo"​ is on directory (dir) instead of an addon. This method allows you to edit the addon while ArmA is still running so you can see changes ingame after mission restart (or new mission editor preview). 
 + 
 +**Usage** 
 + 
 +  - Place your My_soldier.pbo addon into any mod dir you want. 
 +  - Unpack the pbo and place this dir into ArmA ROOT dir. 
 +  - Make sure there is proper $PBOPREFIX$ file inside this dir.
  
 +Run ArmA and you should be able to edit the DIR contents and see edited results ingame after mission restart / new mission editor preview.
arma/misc.txt · Last modified: 2009-12-10 18:38 (external edit)