Author Topic: Tree player  (Read 1852 times)

Please tell me if this is the wrong section.
I am making a tree player, but I cant get it to stop crashing blockland.  I would greatly appreciate some help in fixing the player, you will be credited.  Wether or not I actually post this depends on wether it is good or bad.
Pic:
Link:http://www.mediafire.com/download.php?wazjyt4zm2x (if you want to fix, or see it)
I know I am using an already existing model, but I am no good at modeling.

Checklist:
_learn how to use blender
_ make new model
learn what "nodes" are
_make the .dsq's for the tree
_make better script
_credit all the people who helped
_release (maybe) on July 28th
_release (maybe) onto RTB on July 28th

The (maybe) depends on whether this mod failed me or not.



« Last Edit: April 07, 2009, 10:41:08 AM by LaCuckooRacha »


i canut hal yau
Get out

Ontopic: It's ok to use a premade model for your first add-on, but after that make your own. Not to good at scripting but I'll take a look.

OK, what I do when I'm scripting is to compare my script to other scripts
So heres yours
Code: [Select]
// Load dts shapes and merge animations
datablock AudioProfile(RatJumpSound)
{
   fileName = "base/data/sound/jump.wav";
   description = AudioClose3d;
   preload = true;
};


datablock DebrisData( TreeDebris )
{
   explodeOnMaxBounce = false;

   elasticity = 0.15;
   friction = 0.5;

   lifetime = 4.0;
   lifetimeVariance = 0.0;

   minSpinSpeed = 40;
   maxSpinSpeed = 600;

   numBounces = 5;
   bounceVariance = 0;

   staticOnMaxBounce = true;
   gravModifier = 1.0;

   useRadiusMass = false;
   baseRadius = 1;

   velocity = 20.0;
   velocityVariance = 12.0;
};             

datablock PlayerData(TreeArmor)
{
   renderFirstPerson = false;
   emap = false;
   
   className = Armor;
   shapeFile = "./pinetree.dts";
   cameraMaxDist = 7;
   cameraTilt = 0;//0.174 * 2.5; //~25 degrees
   cameraVerticalOffset = 0;
   computeCRC = false;
 
   canObserve = true;
   cmdCategory = "Clients";

   cameraDefaultFov = 90.0;
   cameraMinFov = 5.0;
   cameraMaxFov = 120.0;
   
   //debrisShapeName = "~/data/shapes/player/debris_player.dts";
   //debris = horseDebris;

   aiAvoidThis = true;

   minLookAngle = -1.5708;
   maxLookAngle = 1.5708;
   maxFreelookAngle = 3.0;

   mass = 60;
   drag = 0.1;
   maxdrag = 0.52;
   density = 0.7;
   maxDamage = 100;
   maxEnergy =  10;
   repairRate = 0.33;
   energyPerDamagePoint = 75.0;

   rechargeRate = 0.4;

   runForce = 28 * 90;
   runEnergyDrain = 0;
   minRunEnergy = 0;
   maxForwardSpeed = 12;
   maxBackwardSpeed = 12;
   maxSideSpeed = 12;

   maxForwardCrouchSpeed = 12;
   maxBackwardCrouchSpeed = 12;
   maxSideCrouchSpeed = 12;

   maxForwardProneSpeed = 0;
   maxBackwardProneSpeed = 0;
   maxSideProneSpeed = 0;

   maxForwardWalkSpeed = 12;
   maxBackwardWalkSpeed = 12;
   maxSideWalkSpeed = 12;

   maxUnderwaterForwardSpeed = 12;
   maxUnderwaterBackwardSpeed = 12;
   maxUnderwaterSideSpeed = 12;

   jumpForce = 0; //8.3 * 90;
   jumpEnergyDrain = 0;
   minJumpEnergy = 0;
   jumpDelay = 0;

   minJetEnergy = 0;
jetEnergyDrain = 0;
canJet = 0;

   recoverDelay = 0;
   recoverRunForceScale = 1.2;

   minImpactSpeed = 250;
   speedDamageScale = 0;

   boundingBox = vectorScale(".8 .8 .8", 4); //"2.5 2.5 2.4";
   crouchBoundingBox = vectorScale(".8 .8 .8", 4); //"2.5 2.5 2.4";
   proneBoundingBox = vectorScale("2.5 2.5 2.4", 4); //"2.5 2.5 2.4";

   pickupRadius = 0.75;
   
   // Damage location details
   boxNormalHeadPercentage       = 0.83;
   boxNormalTorsoPercentage      = 0.49;
   boxHeadLeftPercentage         = 0;
   boxHeadRightPercentage        = 1;
   boxHeadBackPercentage         = 0;
   boxHeadFrontPercentage        = 1;

   // Foot Prints
   //decalData   = HorseFootprint;
   //decalOffset = 0.25;

   jetEmitter = "";
   jetGroundEmitter = "";
   jetGroundDistance = 4;
 
   //footPuffEmitter = LightPuffEmitter;
   footPuffNumParts = 10;
   footPuffRadius = 0.25;

   //dustEmitter = LiftoffDustEmitter;

   splash = PlayerSplash;
   splashVelocity = 4.0;
   splashAngle = 67.0;
   splashFreqMod = 300.0;
   splashVelEpsilon = 0.60;
   bubbleEmitTime = 0.1;
   splashEmitter[0] = PlayerFoamDropletsEmitter;
   splashEmitter[1] = PlayerFoamEmitter;
   splashEmitter[2] = PlayerBubbleEmitter;
   mediumSplashSoundVelocity = 10.0;   
   hardSplashSoundVelocity = 20.0;   
   exitSplashSoundVelocity = 5.0;

   // Controls over slope of runnable/jumpable surfaces
   runSurfaceAngle  = 65;
   jumpSurfaceAngle = 66;

   minJumpSpeed = 20;
   maxJumpSpeed = 30;

   horizMaxSpeed = 68;
   horizResistSpeed = 33;
   horizResistFactor = 0.35;

   upMaxSpeed = 80;
   upResistSpeed = 25;
   upResistFactor = 0.3;
   
   footstepSplashHeight = 0.35;

   //NOTE:  some sounds commented out until wav's are available

   JumpSound = RatJumpSound;

   // Footstep Sounds
//   FootSoftSound        = HorseFootFallSound;
//   FootHardSound        = HorseFootFallSound;
//   FootMetalSound       = HorseFootFallSound;
//   FootSnowSound        = HorseFootFallSound;
//   FootShallowSound     = HorseFootFallSound;
//   FootWadingSound      = HorseFootFallSound;
//   FootUnderwaterSound  = HorseFootFallSound;
   //FootBubblesSound     = FootLightBubblesSound;
   //movingBubblesSound   = ArmorMoveBubblesSound;
   //waterBreathSound     = WaterBreathMaleSound;

   //impactSoftSound      = ImpactLightSoftSound;
   //impactHardSound      = ImpactLightHardSound;
   //impactMetalSound     = ImpactLightMetalSound;
   //impactSnowSound      = ImpactLightSnowSound;
   
   impactWaterEasy      = Splash1Sound;
   impactWaterMedium    = Splash1Sound;
   impactWaterHard      = Splash1Sound;
   
   groundImpactMinSpeed    = 10.0;
   groundImpactShakeFreq   = "4.0 4.0 4.0";
   groundImpactShakeAmp    = "1.0 1.0 1.0";
   groundImpactShakeDuration = 0.8;
   groundImpactShakeFalloff = 10.0;
   
   //exitingWater         = ExitingWaterLightSound;
   
   observeParameters = "0.5 4.5 4.5";

   // Inventory Items
maxItems   = 0; //total number of bricks you can carry
maxWeapons = 0; //this will be controlled by mini-game code
maxTools = 0;

uiName = "Tree";
rideable = true;
lookUpLimit = 0.6;
lookDownLimit = 0.2;

canRide = true;
showEnergyBar = false;
paintable = true;

brickImage = RatBrickImage; //the imageData to use for brick deployment

};
To me, it looks like you don't have the sounds and particles you used in the file you put in the download
Thats the best you'll get from me

Ya, there's still some parts of the code i.e sounds that I have to work on, but right now I want to work on it not crashing blockland if there are 2 trees in the map.  There is a problem with not seeing the whole tree too, you only see half of the tree.  Fixable?
Also, there's the problem with not having the .dsq's for the crouching building jumping and stuff, how to make those?
« Last Edit: April 02, 2009, 03:08:20 AM by LaCuckooRacha »

sorry for double post, but does anyone know how to make a .dsq for the animations?

Is that a v0002 tree I spy?

Is that a v0002 tree I spy?
You mean the model?  I guess so.  I might try to find the newer tree model so you can use it as a disguise.

sorry for double post, but does anyone know how to make a .dsq for the animations?

If you are using milkshape, go to torque exporter plus then export dts, then export dsq.

The pine tree model doesn't have the right nodes to be a player model.
If you want to make a tree player model, you need to model it yourself and add in the nodes. For an example in blender, google "torque game engine orange guy."

The pine tree model doesn't have the right nodes to be a player model.
If you want to make a tree player model, you need to model it yourself and add in the nodes. For an example in blender, google "torque game engine orange guy."
So, you are saying that the model is the problem?  I guess I can fix that...




Alright, found out I have no Idea how to use milkshape :P so this may take a while.  And what are those "nodes" you were speaking of?
The pine tree model doesn't have the right nodes to be a player model.
If you want to make a tree player model, you need to model it yourself and add in the nodes. For an example in blender, google "torque game engine orange guy."
I also have blender, but I can't figure that one out either •_º  can anyone help model a tree for me?  I will try to do it on my own, but a little help would be nice.