Jump to content
Sign in to follow this  
abs

Turret Problems

Recommended Posts

Hello gurus!

I turn to you for help after four days of struggling with this on my own. I am trying to get the RWS on this vehicle to work:

rglightsry3.th.jpg

...but I run into various errors, since configuring addons is really beyond me.

Here is my config.cpp: config.cpp

Here is my model.cfg: model.cfg

The current error I get when trying to start the game is:

Quote[/b] ]File ons_armoured\config.cpp, line 57:

/CfgVehicles/ONS_Nyala.Turrets: Undefined base class 'Turrets'

Now, my understanding is that since I'm inheriting from the HMMVW50 class, I should be able to make my own turret, right?

If you can tell me where I'm going wrong, or even better, fix my problem for me (I mean in the config. You can't educate a fool.) I would really appreciate it.

Thanks in advance,

Abs

Share this post


Link to post
Share on other sites

It says that because you haven't written a Turrets class in your file. In your case it is in some other file so you have to tell it like this

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class Turrets;

class Foobar : Turrets {

  // something...

};

Share this post


Link to post
Share on other sites

So do I need to define all the base classes in order to define that as well?

Abs

Share this post


Link to post
Share on other sites

The ones which Turrets inherits? No, you shouldn't have to.

Basicly if you refer to a class which is not defined in the file or it is defined after where it refered, you should write before using it...

class xyz;

...if teh class name is xyz.

Share this post


Link to post
Share on other sites

Thanks Aqu! I put it in just before I had the turret defined, and it worked (sorta). I'll keep hacking away at the rest. smile_o.gif

Abs

Share this post


Link to post
Share on other sites

So I think I'm learning a bit (okay, that's a lie...) but it seems that I now have two turrets.

I'm so embarrassed even asking this, but can someone tell me how to remove the one that won't fire my weapons?

Pastebin

Thanks in advance.

Abs

Share this post


Link to post
Share on other sites

Try something like this

Quote[/b] ]class CfgVehicles

{

class HMMWV50; // External class reference

class ABSCar1 : HMMWV50

{

scope=protected;

class NewTurret;

class Turrets;

class AnimationSources;

};

class ONS_Nyala: ABSCar1

{

scope=public;

........

........

........

driverCanSee = 31;

......

.......

.......

class Turrets {

class Main1Turret : NewTurret {

body = "main1turret";

gun = "main1gun";

animationSourceBody = "main1turret";

animationSourceGun = "main1gun";

......

......

.....

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  

×