Jump to content
Sign in to follow this  
Maximus-Sniper

add .sqs and sqf into config.cpp

Recommended Posts

Hi smile_o.gif

How do I add script into my cinfig.cpp, well some Bullet Camera into, eks, if i fire, then i like to see the bullet in slow veiw. I have the script for Bullet camra, but i have to copy them all into a mission and put some trigger at activate with the radio,, its that posible to do it another way, some put into config.cpp smile_o.gif

I got a eks:

class UserActions

{

class Selfheal

{

displayName = "First Aid";

position = "axisgoggles";

radius = 1.00000;

condition = "(Format [{%1},BaB_heal] != {false}) && (player == this) && ((getdammage this)>=0.5)";

statement = "this exec {\bab\script\heal.sqs}";

};

};

So how do I do the same thing with bullet camra, so I can use the User menu down the right cornor to activate and deactivate the camera for my sniper shoot ?? smile_o.gif

Share this post


Link to post
Share on other sites

I have no idea what the answer is but it may be better if you reposted this in the Mission editing and scripting forum.

PH

Share this post


Link to post
Share on other sites

Fancy that, I saw a thread mentioning this in one of those sections a few days ago.

Haven't done too much scripting yet myself, but it would be an event handler. I don't remember too specifically but for the bullet action addon:

init = "(this select 0) exec {/addonname/bulletcamaction.sqf}";

However, installing a new addon just for script functionality in a mission is a bit much when it doesn't need to be done that way.

Share this post


Link to post
Share on other sites

Tnx!

I added to script now and they work, but not the bullet cam script, take a look:

.

.

.

class UserActions

{

class Selfheal

{

displayName = "First Aid";

position = "axisgoggles";

radius = 1.00000;

condition = "(Format [{%1},BaB_heal] != {false}) && (player == this)";

statement = "this exec {\bab\script\heal.sqs}";

};

class sniperslow

{

displayName = "Sniper Slow";

position = "axisgoggles";

radius = 1.00000;

condition = "(Format [{%1},sniper_slow] != {false}) && (player == this)";

statement = "this exec {\bab\script\sniperslow.sqs}";

};

class sniperbulletcam

{

displayName = "Sniper Bullet Camera";

position = "axisgoggles";

radius = 1.00000;

condition = "(Format [{%1},sniper_bullet_camera] != {false}) && (player == this)";

statement = "this exec {\bab\script\init.sqs}";

};

.

.

.

And the bullet script its not only one file its 4 files, init.sqs,fired.sqs, PosBullCam.sqf and the last description.ext

What should I do now?rock.gif

Share this post


Link to post
Share on other sites

Any scripts that you want to load when the mission loads need to be in the eventhandlers section of the config, and they don't need animation attributes. The init eventhandler is what you'd be looking at. It's detailed in the BIS comref.

Oh, if that is out of the bullet addon/pbo which only serves to load scripts, the player would never == this.

Share this post


Link to post
Share on other sites

Hi smile_o.gif

How do i chance every thing to eventhandler???

Need eksemple smile_o.gif

And this is mye own addon, not a script addon, i only make a new folder in my addon called script, than i copy all those script files from the bullet cam.. into it.. If i like to use that bullet cam, i have to copye all those file into all my new mission and make some trigger sad_o.gif So i hope it a another way to do that, exemple copy them into my own addon, and make them run from my .cpp file smile_o.gif

You can find the script here Bullet Camera

The are two missionwith it, i like to use exemple 2 (Bullet CamreaII)

So how do I fix my problem? smile_o.gif

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  

×