PDA

View Full Version : VBS2HK addon



HGuderian
Oct 8 2007, 11:30
Hi to All!
I've tried to make the HunterKiller vbs2hk.sqs script as an addon with this config:

class CfgPatches
{
class vbs2hk
{
units[] = {};
weapons[] = {};
requiredVersion = 0.100000;
requiredAddons = [] {"CAData","CACharacters"};
};
};

class CfgVehicles
{
/*extern*/ class Man;
class CAManBase: Man
{
class eventhandlers
{
init = "_this exec ""\vbs2hk\vbs2hk.sqs"""
};
};
};
__

It seem work well giving to AI more brain in searchin' enemy and cover (it seem, but I'm not really sure...if anyone also try would be good).

The actual problem is: why it interfere with Six_Tracers and MadMatt_Backblast effect (=they disappears)?

Thanks a lot and best regards

ricki
Oct 8 2007, 11:57
maybe try extended init eventhandler instead of adding init to class itself

Maddmatt
Oct 8 2007, 15:25
Ricki is correct.
As I said in my mod's readme, use the extended init addon. It keeps all our mods compatible. The addon comes with examples so you can see how it works. I guess my mod can also serve as an example.

HGuderian
Oct 8 2007, 19:04
Thanks. I'll try allthough I'm not a very "script-able".
I think I request help sooner. Going to study Extended_Init...
____-
I think I've solved, thanks

ricki
Oct 11 2007, 16:50
what is this for a script and where can i get it ?

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
class CfgPatches
{
class RCK_Effects
{
units&#91;&#93;={};
requiredVersion = 1.08;
requiredAddons&#91;&#93; = {&#34;Extended_Init_EventHandlers&#34;};
};
};
class Extended_Init_EventHandlers
{
class Plane
{
RCK_EffectsInit =&#34;_this execVM &#34;&#34;&#92;RCK_Effects&#92;s&#92;RCK_EffectsInit.sqf&#34;&#34;;&#34;;
};
};[/QUOTE]

this is working for me to attach different scripts to a unit.
this one is for planes. you would have to change Plane to Man

regards
rocko

HGuderian
Oct 11 2007, 18:43
Hi&#33; Thanks for this hint. I&#39;ve solved in a similar way.

class CfgPatches
{
class vbs2hk
{
units[] = {};
weapons[] = {};
requiredVersion = 0.100000;
requiredAddons[] = {"CAData","CACharacters","CAWeapons","Extended_Init_Eve

ntHandlers"};
};
};

class Extended_Init_EventHandlers
{
/*extern*/ class Man;
class CAManBase: Man
{
vbs2hk_init = "_this exec ""&#92;vbs2hk&#92;vbs2hk.sqs"""
};
};



I think you might write: RCK_Effects_Init

Best regards