Author Topic: Datablocks being a bitch  (Read 1882 times)

I have this
Code: [Select]
[b]datablock ExplosionData[/b](MedievalExplosion)
{
   //explosionShape = "";
   lifeTimeMS = 500;

   soundProfile = boomBitches;

   particleEmitter = burnbabyburnExplosionEmitter;
   particleDensity = 10;
   particleRadius = 0.2;

   faceViewer     = true;
   explosionScale = "1 1 1";

   shakeCamera = true;
   camShakeFreq = "20.0 22.0 20.0";
   camShakeAmp = "1.0 1.0 1.0";
   camShakeDuration = 0.5;
   camShakeRadius = 10.0;

   // Dynamic light
   lightStartRadius = 3;
   lightEndRadius = 0;
   lightStartColor = "00.0 0.2 0.6";
   lightEndColor = "0 0 0";
};

And the console shows this:
Code: [Select]
Object 'MedievalExplosion' is not a member of the 'ExplosionData' data block class
Console, y u no stahp trolling?!

Maybe you need a shape?

What do you mean by a shape? The tools work, the draw sound is heard when it is taken out but when fired, no sound nor explosion is seen/heard. And the console shows Object 'MedievalExplosion' is not a member of the 'ExplosionData' data block class

He means a shape for the explosion
Try parenting the cannonball explosion

The script is a bit ambigous. This is for a fiery axe item. (Melee)

I didn't understand the parent part. You mean add this
Code: [Select]
Parent::preFire(%this,%obj,%slot);[\code]
« Last Edit: July 29, 2013, 07:19:35 PM by Pie Crust »

No.

datablock ExplosionData(MedievalExplosion : whateverTheCannonballExplosio nNameIs)

Then how come the sword script doesn't have the parent but works eitherway?

datablock ExplosionData(MedievalExplosion : whateverTheCannonballExplosio nNameIs)

No-go

Is this the one where the B has to be capitalized in "dataBlock"? Or does that fix something else

^ Going to try that

EDIT: Syntax Error.

Code: [Select]
Object 'MedievalExplosion' is not a member of the 'ExplosionData' data block class
Object 'MedievalExplosion' is not a member of the 'ExplosionData' data block class
Object 'MedievalExplosion' is not a member of the 'ExplosionData' data block class
Object 'MedievalExplosion' is not a member of the 'ExplosionData' data block class
Object 'ShovelDrawSound' is not a member of the 'AudioProfile' data block class
Object 'ShovelDrawSound' is not a member of the 'AudioProfile' data block class
Object 'ShovelDrawSound' is not a member of the 'AudioProfile' data block class
Object 'ShovelDrawSound' is not a member of the 'AudioProfile' data block class
Add-Ons/Roleplays_MedievalRPG/Tools/Iron/wooden.cs Line: 47 - Syntax error.
>>> Some error context, with ## on sides of error halt:
   ejectionOffset   = 0.0;

   thetaMin         = 0;

   thetaMax         = 60;

   phiReferenceVel  = 0;

   phiVariance      = 360;

   overrideAdvance = false;

   particles = "MedievalExplosionParticle";



   uiName = "MedievalExplosion";

};



dataBlock ExplosionData(##M##edievalExplosion)

{

   //explosionShape = "";

   lifeTimeMS = 500;



   soundProfile = swordHitSound;



   particleEmitter = swordExplosionEmitter;

   particleDensity = 10;

   particleRadius = 0.2;



   faceViewer     = true;

   explosionScale = "1 1 1";
>>> Error report complete.

Executing Add-Ons/Roleplays_MedievalRPG/Tools/Iron/wooden.cs.
Add-Ons/Roleplays_MedievalRPG/Tools/Iron/wooden.cs Line: 47 - Syntax error.
>>> Some error context, with ## on sides of error halt:
   ejectionOffset   = 0.0;

   thetaMin         = 0;

   thetaMax         = 60;

   phiReferenceVel  = 0;

   phiVariance      = 360;

   overrideAdvance = false;

   particles = "burnbabyburnParticle";



   uiName = "burnbabyburnExplosionEmitter";

};



dataBlock ExplosionData(##M##edievalExplosion)

{

   //explosionShape = "";

   lifeTimeMS = 500;



   soundProfile = boomBitches;



   particleEmitter = burnbabyburnExplosionEmitter;

   particleDensity = 10;

   particleRadius = 0.2;



   faceViewer     = true;

   explosionScale = "1 1 1";
>>> Error report complete.
« Last Edit: July 29, 2013, 07:53:03 PM by Pie Crust »

I think that's for spawning objects


You should put the explosion data before you try to use it in another datablock.
Also "datablock" cannot have a capital B in it.

You should put the explosion data before you try to use it in another datablock.

This. Some types of datablock can be used before they're defined - otherwise the image/item pair system we use would go straight to hell - but the ExplosionData type is not one of them, so you have to define it before you use it.