OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Maximus-Sniper on 22 Jul 2004, 15:54:02

Title: Bullet camera into config.cpp file
Post by: Maximus-Sniper on 22 Jul 2004, 15:54:02
Hei!
I was woundring about how to make a script or a config.cpp file to activate bullet camera when i fire a shoot, or use the user menu down ringht cornor, its that possible??
Title: Re:Bullet camera into config.cpp file
Post by: WizzyWig on 22 Jul 2004, 16:03:34
look in editors depot undder bullet
Title: Re:Bullet camera into config.cpp file
Post by: Maximus-Sniper on 22 Jul 2004, 16:19:09
Tnx :)
But i have looked there, but did't fine that i was looking for. I only want to add those script into my addon config.cpp under class CfgVehicles. I got one 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}";
      };
   };

and this script work.  But how do i the same with a bullet camera script????
Title: Re:Bullet camera into config.cpp file
Post by: Dubieman on 22 Jul 2004, 17:28:53
In the editor depot, there are bullet scripts, apply them when you want by

[this] exec "bulletcam.sqs" or whatever it is.

Then the script catches the bullet and follows it.  ;)

If you make .cpp its a new addon? Why would you do that when you can use a script.

And why make another for the selfheal? ???

Use
player addaction "heal"
My syntax is probably wrong but then you can specify what that action does via script.

Unless you're totally going for an addon which doesn't really go here... :P :-\
Title: Re:Bullet camera into config.cpp file
Post by: Maximus-Sniper on 22 Jul 2004, 18:03:29
Tnx :)
But i like to have the script file into my addon and than put inn the .cpp file like a new class or something i show later :)
Title: Re:Bullet camera into config.cpp file
Post by: Dubieman on 22 Jul 2004, 18:10:46
So this would be an addon in the end...

I have no expierence with addons so I'm of no help. ::)

But this should be in the addons part of the forum then shouldn't it? :P
Title: Re:Bullet camera into config.cpp file
Post by: DBR_ONIX on 22 Jul 2004, 19:22:12
You could put the bullet cam scripts in a PBO, along with a CPP for what ever weapon you wait, Say, "Sniper - Bullet Cam"
Then you just run the files (With a INIT class in the CPP) from something like
/pboname/bulletcam.sqs

- Ben
Title: Re:Bullet camera into config.cpp file
Post by: Maximus-Sniper on 22 Jul 2004, 20:29:05
OK
But i try this, and did not work becuse he need a condition!
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}";
      };
      class bulletcam
      {
         displayName = "Sniper Bullet Cam";
         position = "axisgoggles";
         radius = 1.00000;
         //condition = "(Format [{%1},sniperbulletcam] != {false}) && (player == this) && ((getdammage this)>=0.5)";
         statement = "this exec {\bab\script\TrackEryx.sqs}";
      };

so what is the right condition for this bullet cam???? I disabled it, because i dont know the condition. Someone heellpp me?? :) or this way:
.
.
.
class EventHandlers{};
class CfgVehicles
{
.
.
.
.

class sniperbulletcam: EventHandlers
      {
      init = "_this exec ""\BAB\script\init.sqs""; [] exec {\BAB\script\fired.sqs};_this exec ""\BAB\script\TrackEryx.sqs """;

      };

I don't know
Those tree files work fine if i copy them to my mission folder.
So I like to add them into my addon folder and configurer the .cpp file. Because i dont want to copy those files every time a make a mission... Plaese help me :)

Is this correct:

class sniperslow: EventHandlers
      {
      init = "player AddAction ["Sniper Slow","BAB\script\sniperslow.sqs"];
      };
Or? Please help me
Title: Re:Bullet camera into config.cpp file
Post by: DBR_ONIX on 23 Jul 2004, 14:22:37
What about the Fired event handler thing?
(From another thread)
::
      class EventHandlers
      {
        Fired=[_this select 0]exec "\Epl_Gr3\Scripts\Fired.sqs";
      }; //End the class EventHandlers

- Ben