Jump to content
Sign in to follow this  
leondus

Addon help EventHandlers

Recommended Posts

I'm working on a addon that going to use arab_faces.sqs with 20 odd faces already done.

Here it is,

Quote[/b] ] class EventHandlers: ECP_EventHandlers

{

Init = "_this exec ""\reb\arab_faces.sqs""";

};

};

Now the above works fine, but I would like to add some grenades

Quote[/b] ] class Eventhandlers

{

init = "[_this select 0,0] exec ""\bd_grenadepack\AddNewUnit.sqs"""

};

};

But keep getting errors

Anyway to use both in the config without getting a error?

Thanks

Share this post


Link to post
Share on other sites

try adding a semicolon at the end

Quote[/b] ]init = "[_this select 0,0] exec ""\bd_grenadepack\AddNewUnit.sqs""";

Share this post


Link to post
Share on other sites

Nope, did not work like this

Quote[/b] ]init = "[_this select 0,0] exec ""\bd_grenadepack\AddNewUnit.sqs""";"[_this select 0,0] exec ""\bd_grenadepack\AddNewUnit.sqs"""

or like this

Quote[/b] ]

class EventHandlers: ECP_EventHandlers

{

Init = "_this exec ""\reb\arab_faces.sqs""";

init = "[_this select 0,0] exec ""\bd_grenadepack\AddNewUnit.sqs""";

};

};

Now OFP just crashes on startup  crazy_o.gif

Share this post


Link to post
Share on other sites

second does not work for sure

in the first you have the same script call twice???

Share this post


Link to post
Share on other sites

opps! first one was my bad, I ment init = "_this exec ""\reb\arab_faces.sqs""";"[_this select 0,0] exec ""\bd_grenadepack\AddNewUnit.sqs"""

But I used the only other command(?) I know and kind of got it somewhat working.

Quote[/b] ] Init = "_this exec ""\reb\arab_faces.sqs""";

fired = "[_this select 0,0] exec ""\bd_grenadepack\AddNewUnit.sqs""";

The first grenade has no FX effect when it goes off, ie frag effect, but everyone after that does!! strange, but it working wow_o.gif

I would use

Quote[/b] ]this removemagazines "HandGrenade"; this addmagazine "BD_M67"; this addmagazine "BD_M67"; [this,0] exec "\BD_GrenadePack\AddNewUnit.sqs"

but GDCEv110 only gives the Player the grenades and not the squad or replacements.

Thanks for helping biggrin_o.gif

Share this post


Link to post
Share on other sites

If you're putting this in an addon, this is how Big Dawg (KS) setup his grenade pack:

Quote[/b] ] class Eventhandlers: ECP_EventHandlers

{

init = "_this call (ECP_resources select 40); [_this select 0,0] exec ""\bd_grenadepack\AddNewUnit.sqs"""

};

};

I wanted to merge this with KM Int. Soldier which has it's own event handler. This is what I found that woked:

Quote[/b] ] class Eventhandlers: ECP_EventHandlers

{

init="_this call (ECP_resources select 40); [_this select 0,0] exec ""\bd_grenadepack\AddNewUnit.sqs""; [_this select 0] exec ""\KMMint\scripts\init.sqs""";

};

I think your problem might be you are missing this:

Quote[/b] ]="_this call (ECP_resources select 40);

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×