Game Development Community

Simple Datablock Problem -

by Ryan Scott · in General Discussion · 10/29/2003 (5:18 pm) · 7 replies

I'm running on the most recent recommended version of the engine, which I believe is 1.2.1.

I'm using a turret resource provided by Paul Dana. I've run into a small problem with one of my small datablocks.

First, here's the console error I'm seeing:

Loading compiled script starter.fps/server/scripts/genericTurret.cs.
Object 'RifleExplosion' is not a member of the 'ExplosionData' data block class
Object 'RifleProjectile' is not a member of the 'ProjectileData' data block class

Now, here's the file causing the problem:

datablock TurretData(GenericTurret)
{
	category						= "Turrets";
    numPoints                       = 100;
    
	shapeFile						= "~/data/shapes/turrets/smallTurret.dts";
    maxDamage                       = 110;
    explosion                       = RifleExplosion;
    destroyedLevel                  = 110;
    disabledLevel                   = 0.84;
	debrisShapeName		   	        = "~/data/shapes/turrets/smallTurret.dts";
    debris                          = TurretDebris;
    renderWhenDestroyed             = false;
  	mountPose[0]					= sitting;
	numMountPoints					= 2;
	isProtectedMountPoint[0]		= true;
	cameraMaxDist					= 10;
	cameraOffset					= 2.5;
	maxEnergy						= 280;
	rechargeRate					= 0.8;
 	heat                            = 1.0;

My question is, what relationship does the line "explosion = RifleExplosion;
" serve? Where should I begin to look for this?

Thanks -

R

#1
10/29/2003 (5:58 pm)
That specifies what explosion it ought to use... Can you show us the definitions for RifleExplosion and RifleProjectile?
#2
10/29/2003 (7:31 pm)
My guess is you removed or are not executing the rifle.cs script (which defines the RifleExplosion datablock). That or it has been renamed.
#3
10/29/2003 (9:28 pm)
I'm thinking you have executed this script : genericTurret.cs
before you have executed the rifle script.

being how there is a dependancy there, you will need to execute the turret script After the rifle one.
#4
10/30/2003 (7:01 am)
Wtong forum
#5
10/30/2003 (7:52 am)
Cmon Jarrod..
you could have at least Proof read that one..
:)
#6
10/30/2003 (7:56 am)
Thanks guys -- that was my problem.

I've just recently found out that the tutorial was written for what is now known as the "fps" mod in the newest version of the sdk. However, the default is starter.fps so that's where I've done all of my modding; hence, the reason that rifle.cs wasn't around, it's only in the fps mod.

And Jarrod -- if I might, if you are going to be that critical of someone for posting in the wrong forum, at least tell that person where the correct form is. :)
#7
10/30/2003 (9:40 am)
The correct forum is the Torque one.. check the lists.