Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Uxie

Pages: [1] 2 3 4 5
1
Modification Help / Spheric 3d Model Texture differs in-game
« on: May 12, 2012, 09:21:41 AM »
I made a basketball vehicle, but as you will see, the bottom is all black, and the textures vary.





I use Milkshape if you didn't notice.

2
Modification Help / GUI keeps scaling the entire screen
« on: May 09, 2012, 04:57:44 PM »
My gui is normal size when i make it in the gui editor. When I turn it on and stuff now its scaled the wrong size to the entire screen stretched. How would I keep this from happening?

3
Modification Help / Player's Node Color
« on: April 28, 2012, 07:41:10 AM »
How would I get a player's node color?

4
Code: [Select]
//we need the jeep add-on for this, so force it to load
%error = ForceRequiredAddOn("Vehicle_Jeep");

if(%error == $Error::AddOn_Disabled)
{
   //A bit of a hack:
   //  we just forced the jeep to load, but the user had it disabled
   //  so lets make it so they can't select it
   JeepVehicle.uiName = "";
}

if(%error == $Error::AddOn_NotFound)
{
   //we don't have the jeep, so we're screwed
   error("ERROR: Vehicle_Le_Mans - required add-on Vehicle_Jeep not found");
}

datablock WheeledVehicleTire(LeMansTire)
{
   shapeFile = "./lemanstire.dts";

mass = 10;
    radius = 1;
    staticFriction = 5;
   kineticFriction = 5;
   restitution = 0.5;

   // Spring that generates lateral tire forces
   lateralForce = 18000;
   lateralDamping = 4000;
   lateralRelaxation = 0.01;

   // Spring that generates longitudinal tire forces
   longitudinalForce = 14000;
   longitudinalDamping = 2000;
   longitudinalRelaxation = 0.01;
};

datablock WheeledVehicleSpring(LeMansBackSpring)
{
   // Wheel suspension properties
   length = 0.2; // Suspension travel
   force = 3000; //2000; // Spring force
   damping = 1000; //1000; // Spring damping
   antiSwayForce = 2; //1; // Lateral anti-sway force
};

datablock WheeledVehicleSpring(LeMansFrontSpring)
{
   // Wheel suspension properties
   length = 0.3; // Suspension travel
   force = 3000; //2000; // Spring force
   damping = 1000; //1000; // Spring damping
   antiSwayForce = 6; //1; // Lateral anti-sway force
};

// Vehicle //
/////////////
datablock WheeledVehicleData(LeMansVehicle)
{
category = "Vehicles";
displayName = " ";
shapeFile = "./lemans.dts"; //"~/data/shapes/skivehicle.dts"; //
emap = true;
minMountDist = 3;
   
   numMountPoints = 2;
   mountThread[0] = "sit";
   mountThread[1] = "sit";
maxDamage = 125.00;
destroyedLevel = 125.00;
speedDamageScale = 1.04;
collDamageThresholdVel = 20.0;
collDamageMultiplier   = 0.02;

massCenter = "0 0 0";
   //massBox = "2 5 1";

maxSteeringAngle = 0.4;  // Maximum steering angle, should match animation
integration = 2;           // Force integration time: TickSec/Rate
tireEmitter = VehicleTireEmitter; // All the tires use the same dust emitter


// 3rd person camera settings
cameraRoll = false;         // Roll the camera with the vehicle
cameraMaxDist = 13;         // Far distance from vehicle
cameraOffset = 7.5;        // Vertical offset from camera mount point
cameraLag = 0.0;           // Velocity lag of camera
cameraDecay = 0.75;        // Decay per sec. rate of velocity lag
cameraTilt = 0.4;
   collisionTol = 0.1;        // Collision distance tolerance
   contactTol = 0.1;

useEyePoint = false;

defaultTire = LeMansTire;
defaultSpring = LeMansFrontSpring;
//flatTire = jeepFlatTire;
//flatSpring = jeepFlatSpring;

   numWheels = 4;

// Rigid Body
mass = 300;
density = 5.0;
drag = 1.0;
bodyFriction = 0.6;
bodyRestitution = 0.6;
minImpactSpeed = 10;        // Impacts over this invoke the script callback
softImpactSpeed = 10;       // Play SoftImpact Sound
hardImpactSpeed = 15;      // Play HardImpact Sound
groundImpactMinSpeed    = 10.0;

// Engine
engineTorque = 3000; //4000;       // Engine power
engineBrake = 2000;         // Braking when throttle is 0
brakeTorque = 4000;        // When brakes are applied
maxWheelSpeed = 50;        // Engine scale by current speed / max speed

rollForce = 200;
yawForce = 300;
pitchForce = 1000;
rotationalDrag = 0.2;

   // Advanced Steering
   steeringAutoReturn = true;
   steeringAutoReturnRate = 3.0;
   steeringAutoReturnMaxSpeed = 10;
   steeringUseStrafeSteering = true;
   steeringStrafeSteeringRate = 0.1;

// Energy
maxEnergy = 100;
jetForce = 3000;
minJetEnergy = 30;
jetEnergyDrain = 2;



// Sounds
softImpactSound = slowImpactSound;
hardImpactSound = fastImpactSound;
//wheelImpactSound = slowImpactSound;

//   explosion = VehicleExplosion;
justcollided = 0;

   uiName = "Le Mans ";
rideable = true;
lookUpLimit = 0.65;
lookDownLimit = 0.45;

paintable = true;
   
   damageEmitter[0] = VehicleBurnEmitter;
damageEmitterOffset[0] = "0.0 0.0 0.0 ";
damageLevelTolerance[0] = 0.99;

   damageEmitter[1] = VehicleBurnEmitter;
damageEmitterOffset[1] = "0.0 0.0 0.0 ";
damageLevelTolerance[1] = 1.0;

   numDmgEmitterAreas = 1;

   initialExplosionProjectile = LeManloveplosionProjectile;
   initialExplosionOffset = 0;         //offset only uses a z value for now

   burnTime = 4000;

   finalExplosionProjectile = LeMansFinalExplosionProjectile;
   finalExplosionOffset = 0.5;          //offset only uses a z value for now

   minRunOverSpeed    = 4;   //how fast you need to be going to run someone over (do damage)
   runOverDamageScale = 8;   //when you run over someone, speed * runoverdamagescale = damage amt
   runOverPushScale   = 1.2; //how hard a person you're running over gets pushed
};

function LeMansVehicle::onAdd(%this,%obj)
{
parent::onadd(%this,%obj);
%obj.mountable = true;

%obj.setWheelSpring(0, LeMansFrontSpring);
%obj.setWheelSpring(1, LeMansFrontSpring);
%obj.setWheelSpring(2, LeMansBackSpring);
%obj.setWheelSpring(3, LeMansBackSpring);

}

I turn to the right and it flys to the right side of tires.
I turn to the left and it flys to the left side of tires.



So my question is, how would I keep this lovey thang on its four tires?

5
Is 8 the maximum amount of wheels able to be put on a vehicle?

6
Modification Help / Uxie and Brian Smith - Team - Modification Topic
« on: December 27, 2011, 08:44:39 PM »





    Me and Brian Smith have started a team and are willing to make a bunch of mods. I model, Brian scripts.

    Here is our To-do list:
    • Smithway
      (Racing Mod)
    • Vehicle Customization
    (Mod that colors and hides/unhides nodes)
    • Turbo Boost Car
    (A turbo boosted car; http://www.youtube.com/watch?v=qI7liObIQuY)
    [/list]



    SMITHWAY - DONE



    Our little kart racing mod thats pretty neat. It hat item pickups from mario kart, etc. The kart is very easy to maneuver.



    VEHICLE CUSTOMIZATION - JUST STARTING

    Our little customization mod where you can customize vehicles with spoilers, colors in multiple places that can be different, logos, and stuff like that.

    No pictures yet because we are just startint to work on it. We will have pictures later on like tomorrow or the next day.



    TURBO BOOST CAR - NOT STARTED

    Yeah I was jusst looking around for something and I came accross a video.
    I thought the vehicle was so cool I just had to make it.

    http://www.youtube.com/watch?v=qI7liObIQuY



    MOVIE MAKING

    We would like a person to make us some movies for each of out mods we make. So if you want to, please post here, telling us your Blockland Forums account, BL_ID, In-Game name, and a good movie you have made before.



                                                                                                      

    7
    Modification Help / Steering Animation
    « on: December 24, 2011, 08:10:42 PM »
    Can someone tell me how to make steering animation for vehicles? Ive made some before but they wont work. What I am talking about is like Racer's Racing Buggy. It's steering wheel turns. Thats what im trying to do, but it wont work. I've made an animation steering from left to right and exported it naming it "steer". I've also tried "turn". Bushido wont tell me. :c So can someone tell me how I make this animation work?

    Hint: I use Milkshape 3D.

    8
    General Discussion / YoungRotations's DJ
    « on: December 04, 2011, 08:59:35 AM »
    YOUNGROTATIONS'S DJ

    Yep YoungRotations made a DJ as some of you may know.





    Yeah its pretty sick, but Its a lot better when you see the actual thing. And if you do, its kind of hard to believe he's controlling every button, which has roughly 120 buttons! Man, I don't know how he does it so fast. He can manipulate 125 buttons so easily.

    And Thanks to Pablo for filming our Trailer!
    Here it is! http://www.youtube.com/watch?v=cnTcLXTfQvs

    Credits:
    YoungRotations/Robin Ihoodl - Building the Stage, Doing the DJ
    Phantom Knight - Building the YoungRotations DNB Arena (Will be unveiled on Friday)
    Big Brother - Always there for eventing advice
    Tomaz - Building BlockFest
    Uxie - Animations, Camera, And other stuff.
    Pablo - Filming the trailer, dancing for the show!


    Donate for Young's dedi servers of this!


    Kalphiter's a richard who changed his mind about us having this in the new years party claiming it "doesnt fit".

    9
    Help / My Jet Goes Away
    « on: November 27, 2011, 06:45:56 PM »
    Yes. And many other problems. As you might have seen at my server that is up right now, there are many problems with playertypes.

    When you open and close the inventory, the following problems occured:
    The Prisoner's heads that are black then go to the right avatar,
    The playertype changes back in a minigame,
    when not in a minigame, jet goes away.

    Why are these things happening? Is it an add-on?

    10
    Modification Help / cannot change namespace.... -Solved By Myself :P -
    « on: November 19, 2011, 07:39:47 PM »
    Title says console error.

    Code: [Select]
    //Clap.cs

    //audio
    datablock AudioProfile(ClapSound)
    {
       filename    = "./Clap.wav";
       description = AudioClose3d;
       preload = true;
    };


    //////////
    // item //
    //////////
    datablock ItemData(ClapItem)
    {
    category = "Item";  // Mission editor category
    className = "Item"; // For inventory system

    // Basic Item Properties
    shapeFile = "./Player_Clap_Hands.dts";
    rotate = false;
    mass = 1;
    density = 0.2;
    elasticity = 0.2;
    friction = 0.6;
    emap = true;

    //gui stuff
    uiName = "Hand Clap";
    iconName = "./icon_Clap";
    doColorShift = true;
    colorShiftColor = "0.25 0.25 0.25 1.000";

    // Dynamic properties defined by the scripts
    image = ClapImage;
    canDrop = true;
    };

    ////////////////
    //weapon image//
    ////////////////
    datablock ShapeBaseImageData(ClapImage)
    {
       // Basic Item properties
       shapeFile = "./Player_Clap_Hands.dts";
       emap = true;

       // Specify mount point & offset for 3rd person, and eye offset
       // for first person rendering.
       mountPoint = 0;
       offset = "0 0 0";
       eyeOffset = 0; //"0.7 1.2 -0.5";
       rotation = eulerToMatrix( "0 0 0" );

       // When firing from a point offset from the eye, muzzle correction
       // will adjust the muzzle vector to point to the eye LOS point.
       // Since this weapon doesn't actually fire from the muzzle point,
       // we need to turn this off.  
       correctMuzzleVector = true;

       // Add the WeaponImage namespace as a parent, WeaponImage namespace
       // provides some hooks into the inventory system.
       className = "ItemImage";

       //melee particles shoot from eye node for consistancy
       melee = false;
       //raise your arm up or not
       armReady = true;

       doColorShift = true;
       colorShiftColor = ClapItem.colorShiftColor;//"0.400 0.196 0 1.000";

       //casing = " ";

       // Images have a state system which controls how the animations
       // are run, which sounds are played, script callbacks, etc. This
       // state system is downloaded to the client so that clients can
       // predict state changes and animate accordingly.  The following
       // system supports basic ready->fire->reload transitions as
       // well as a no-ammo->dryfire idle state.

       // Initial start up state
    stateName[0]                     = "Activate";
    stateTimeoutValue[0]             = 0.15;
    stateTransitionOnTimeout[0]       = "Ready";
    stateSound[0] = weaponSwitchSound;

    stateName[1]                     = "Ready";
    stateTransitionOnTriggerDown[1]  = "Fire";
    stateAllowImageChange[1]         = true;
    stateSequence[1] = "Ready";

    stateName[2]                    = "Fire";
    stateTimeoutValue[2]            = 0.14;
    stateFire[2]                    = true;
    stateAllowImageChange[2]        = false;
    stateSequence[2]                = "Fire";
    stateScript[2]                  = "onFire";
    stateWaitForTimeout[2] = true;
    stateSound[2] = ClapSound;
    stateEjectShell[2]       = true;

    stateName[3] = "Smoke";
    stateEmitterTime[3] = 0.05;
    stateEmitterNode[3] = "muzzleNode";
    stateTimeoutValue[3]            = 0.01;
    stateTransitionOnTimeout[3]     = "Reload";

    stateName[4] = "Reload";
    stateSequence[4]                = "Reload";
    stateTransitionOnTriggerUp[4]     = "Ready";
    stateSequence[4] = "Ready";

    };

    function ClapImage::onFire(%this,%obj,%slot)
    {
    if(%obj.getDamagePercent() < 1.0)
    %obj.playThread(2, Player_Clap);
    Parent::onFire(%this,%obj,%slot);
    }

    function ClapImage::onMount(%this,%obj,%slot)
    {
    Parent::onMount(%this,%obj,%slot);
    %obj.hideNode("RHand");
    %obj.hideNode("RHook");
    %obj.hideNode("LHand");
    %obj.hideNode("LHook");
    }

    function ClapImage::onUnMount(%this,%obj,%slot)
    {
    Parent::onMount(%this,%obj,%slot);
    %obj.unHideNode("ALL");
    if(isObject(%obj.client))
    {
    %obj.client.applyBodyParts();
    %obj.client.applyBodyColors();
    }
    else
    applyDefaultCharacterPrefs(%obj);
    }

    11
    Help / Screenshots
    « on: October 31, 2011, 02:25:15 PM »
    Where do screenshots go? I take screenshots, check the new directory, and nothing new appears.


    12
    Off Topic / My Birthday! Finally 13
    « on: October 18, 2011, 06:11:50 AM »
    Yep. About time. Well, in 4 hours. 11:20 AM. Off to school. :(

    13
    Help / Dedicated Server Amount of Add-Ons
    « on: October 09, 2011, 09:12:59 AM »
    Yeah, I figured out how to do dedicated servers, but the problem is, all my add-ons are enabled. I only set a few add-ons to be enabled. I checked my ADD_ON_LIST and most of them are -1. Even though that may be, all my add-ons remain enabled on my dedicated server.
    Any tips of how to fix this?

    14
    Modification Help / The Well Known Animation Problem (Solution)
    « on: August 16, 2011, 11:49:32 PM »
    As alot of animaters of Milkshape 3D come across a problem with animations.

    This will be:
    When you make your animation, most often happens when your moving a joint that has one or more joints that are assigned to other parts of the model. Its just so irritating.

    I was animation a model I just happened to finish today (Sonic - Dont ask for release, not going to happen), and every time i try to animate "death", "sit", and "walk". I get that same problem as it moves the entire model in previous and future animations you create.


    So, would anyone know some tips to fix this common issue?


    Heres a little edit: This also occurs when your moving something when animating.

    Heres a little solution that helped me.
    Looks like I came up with a little tip while experimenting with animations. Its similiar or the same thing as to:

    What Blastdown said in his JVS Content tutorial.
    Quote
    Sometimes the handle may start to come upward/download while you rotate the door, this has bothered me to no end.
    The only way I can remember to fix it, is to rotate it forward then backward back to the same position (don't take a keyframe during this). Of course, by the time you realize the odd handle rotation, you will probably have undo some of the animations you just did to fix it.
    Well, you select all joints and move them once and then move them back, but you DO set a keyframe when doing this. This sets all the joints into that place and cannot be moved out of place by anything else.

    15
    What the title says. When my vehicle's turret shoots as far down as possible, it adds velocity going the exact same was the bullets are going. (Heres something that's not a problem, but helps describe this. It doesn't look all the way down when shooting.) Why?
    Heres the code. I can't seem to figure out why.

    Code: [Select]
    datablock TSShapeConstructor(MCTVMGDts)
    {
    baseShape  = "./MCTVMG.dts";
    sequence0  = "./M_root.dsq root";

    sequence1  = "./M_root.dsq run";
    sequence2  = "./M_root.dsq walk";
    sequence3  = "./M_root.dsq back";
    sequence4  = "./M_root.dsq side";

    sequence5  = "./M_root.dsq crouch";
    sequence6  = "./M_root.dsq crouchRun";
    sequence7  = "./M_root.dsq crouchBack";
    sequence8  = "./M_root.dsq crouchSide";

    sequence9  = "./M_look.dsq look";
    sequence10 = "./M_root.dsq headside";
    sequence11 = "./M_root.dsq headUp";

    sequence12 = "./M_root.dsq jump";
    sequence13 = "./M_root.dsq standjump";
    sequence14 = "./M_root.dsq fall";
    sequence15 = "./M_root.dsq land";

    sequence16 = "./M_root.dsq armAttack";
    sequence17 = "./M_root.dsq armReadyLeft";
    sequence18 = "./M_root.dsq armReadyRight";
    sequence19 = "./M_root.dsq armReadyBoth";
    sequence20 = "./M_root.dsq spearready";  
    sequence21 = "./M_root.dsq spearThrow";

    sequence22 = "./M_root.dsq talk";  

    sequence23 = "./M_root.dsq death1";

    sequence24 = "./M_root.dsq shiftUp";
    sequence25 = "./M_root.dsq shiftDown";
    sequence26 = "./M_root.dsq shiftAway";
    sequence27 = "./M_root.dsq shiftTo";
    sequence28 = "./M_root.dsq shiftLeft";
    sequence29 = "./M_root.dsq shiftRight";
    sequence30 = "./M_root.dsq rotCW";
    sequence31 = "./M_root.dsq rotCCW";

    sequence32 = "./M_root.dsq undo";
    sequence33 = "./M_root.dsq plant";

    sequence34 = "./M_root.dsq sit";

    sequence35 = "./M_root.dsq wrench";
    };    


    datablock PlayerData(MCTVMGPlayer)
    {
       renderFirstPerson = true;
       emap = false;
      
       ShootOnClick=1;
       ShootOnClick_Hold=1;
    ShootOnClick_ShootDelay=120;
    ShootOnClick_ReShootDelay=120;//exec("add-ons/vehicle_MCTVMG/vehicle_MCTVMG.cs");
    ShootOnClick_ProjectileCount=1;
    ShootOnClick_RequiredSlot=0;
    ShootOnClick_Sound=gunshot1Sound;

    ShootOnClick_Projectile[0]=gunProjectile;
    ShootOnClick_Position[0]="3 0 2";
    ShootOnClick_Velocity[0]="200 0 0";
    ShootOnClick_Scale[0]="1 1 1";


       className = Armor;
       shapeFile = "./MCTVMG.dts";
       cameraMaxDist = 8;
       cameraTilt = 0.261;
       cameraVerticalOffset = 2.3;
       computeCRC = false;
      
       canObserve = true;
       cmdCategory = "Clients";

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

       aiAvoidThis = true;

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

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

       rechargeRate = 0.4;

       runForce = 0 * 0;
       runEnergyDrain = 0;
       minRunEnergy = 0;
       maxForwardSpeed = 0;
       maxBackwardSpeed = 0;
       maxSideSpeed = 0;

       maxForwardCrouchSpeed = 0;
       maxBackwardCrouchSpeed = 0;
       maxSideCrouchSpeed = 0;

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

       maxForwardWalkSpeed = 0;
       maxBackwardWalkSpeed = 0;
       maxSideWalkSpeed = 0;

       maxUnderwaterForwardSpeed = 0;
       maxUnderwaterBackwardSpeed = 0;
       maxUnderwaterSideSpeed = 0;

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

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

       recoverDelay = 0;
       recoverRunForceScale = 1.2;

       minImpactSpeed = 250;
       speedDamageScale = 3.8;

       boundingBox = vectorScale("2.5 2.5 1.7", 4);
       crouchBoundingBox = vectorScale("2.5 2.5 1.7", 4);
       proneBoundingBox = vectorScale("2.5 2.5 1.7", 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 = playerJetEmitter;
       jetGroundEmitter = playerJetGroundEmitter;
       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  = 85;
       jumpSurfaceAngle = 86;

       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 = HorseJumpSound;

       // 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      = ImpactLightWaterEasySound;
       //impactWaterMedium    = ImpactLightWaterMediumSound;
       //impactWaterHard      = ImpactLightWaterHardSound;
      
       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   = 10; //total number of bricks you can carry
    maxWeapons = 5; //this will be controlled by mini-game code
    maxTools = 5;

    //uiName = "MCTV MG";
    rideable = true;
       lookUpLimit = 0.6;
       lookDownLimit = 0.7;

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

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

       numMountPoints = 1;
       mountThread[0] = "armreadyboth";

       //protection for passengers
       protectPassengersBurn   = true;  //protect passengers from the burning effect of explosions?
       protectPassengersRadius = true;  //protect passengers from radius damage (explosions) ?
       protectPassengersDirect = false; //protect passengers from direct damage (bullets) ?
    };

    datablock ParticleData(MCTVSmokeParticle)
    {
    dragCoefficient      = 3;
    gravityCoefficient   = -1;
    inheritedVelFactor   = 0.6;
    constantAcceleration = 0.0;
    lifetimeMS           = 850;
    lifetimeVarianceMS   = 55;
    textureName          = "base/data/particles/cloud";
    spinSpeed = 10.0;
    spinRandomMin = -500.0;
    spinRandomMax = 500.0;
    colors[0]     = "0.5 0.5 0.5 0.2";
    colors[1]     = "0.5 0.5 0.5 0.0";
    sizes[0]      = 0.6;
    sizes[1]      = 0.8;

    useInvAlpha = true;
    };

    datablock ParticleEmitterData(MCTVSmokeEmitter)
    {
       ejectionPeriodMS = 10;
       periodVarianceMS = 4;
       ejectionVelocity = 3;
       velocityVariance = 2;
       ejectionOffset   = 0;
       thetaMin         = 0;
       thetaMax         = 50;
       phiReferenceVel  = 0;
       phiVariance      = 360;
       overrideAdvance = false;
       particles = "MCTVSmokeParticle";


    };

    datablock ShapeBaseImageData(MCTVSmokeImage)
    {
    shapeFile = "base/data/shapes/empty.dts";
    emap = false;

    mountPoint = 1;

    stateName[0]                  = "Ready";
    stateTransitionOnTimeout[0]   = "FireA";
    stateTimeoutValue[0]          = 0.01;

    stateName[1]                  = "FireA";
    stateTransitionOnTimeout[1]   = "FireB";
    stateWaitForTimeout[1]        = True;
    stateTimeoutValue[1]          = 0.05;
    stateEmitter[1]               = vehicleFinalExplosionEmitter3;
    stateEmitterTime[1]           = 0.05;

    stateName[2]                  = "FireB";
    stateTransitionOnTimeout[2]   = "FireC";
    stateWaitForTimeout[2]        = True;
    stateTimeoutValue[2]          = 0.05;
    stateEmitter[2]               = vehicleExplosionEmitter;
    stateEmitterTime[2]           = 0.05;

    stateName[3]                  = "FireC";
    stateTransitionOnTimeout[3]   = "Done";
    stateWaitForTimeout[3]        = True;
    stateTimeoutValue[3]          = 0.850;
    stateEmitter[3]               = MCTVSmokeEmitter;
    stateEmitterTime[3]           = 0.850;

    stateName[4]                  = "Done";
    stateScript[4]                = "onDone";
    };
    function MCTVSmokeImage::onDone(%this,%obj,%slot)
    {
    %obj.unMountImage(%slot);
    }

    // Vehicle //
    /////////////
    datablock WheeledVehicleData(MCTVVehicle)
    {
    category = "Vehicles";
    displayName = " ";
    shapeFile = "./MCTV.dts"; //"~/data/shapes/skivehicle.dts"; //
    emap = true;
    minMountDist = 3;
      
       numMountPoints = 16;
       mountThread[0] = "sit";
       mountThread[1] = "sit";
       mountThread[2] = "sit";
       mountThread[3] = "root";
       mountThread[4] = "root";
       mountThread[5] = "root";
       mountThread[6] = "root";
       mountThread[7] = "sit";
       mountThread[8] = "sit";
       mountThread[9] = "sit";
       mountThread[10] = "root";
       mountThread[11] = "root";
       mountThread[12] = "root";
       mountThread[13] = "root";
       mountThread[14] = "root";
       mountThread[15] = "armreadyboth";

    maxDamage = 600.00;
    destroyedLevel = 600.00;
    speedDamageScale = 1.04;
    collDamageThresholdVel = 5.0;
    collDamageMultiplier   = 0.01;

    massCenter = "0 0 0";
       //massBox = "2 5 1";

    maxSteeringAngle = 0.8;  // Maximum steering angle, should match animation
    integration = 4;           // Force integration time: TickSec/Rate
    tireEmitter = VehicleTireEmitter; // All the tires use the same dust emitter

    // 3rd person camera settings
    cameraRoll = false;         // Roll the camera with the vehicle
    cameraMaxDist = 13;         // Far distance from vehicle
    cameraOffset = 7.5;        // Vertical offset from camera mount point
    cameraLag = 0.4;           // Velocity lag of camera
    cameraDecay = 0.75;        // Decay per sec. rate of velocity lag
    cameraTilt = 0.4;
       collisionTol = 0.1;        // Collision distance tolerance
       contactTol = 0.1;

    useEyePoint = false;

    defaultTire = jeepTire;
    defaultSpring = jeepSpring;
    //flatTire = jeepFlatTire;
    //flatSpring = jeepFlatSpring;

       numWheels = 6;

    // Rigid Body
    mass = 300;
    density = 5.0;
    drag = 1.6;
    bodyFriction = 0.6;
    bodyRestitution = 0.6;
    minImpactSpeed = 10;        // Impacts over this invoke the script callback
    softImpactSpeed = 10;       // Play SoftImpact Sound
    hardImpactSpeed = 15;      // Play HardImpact Sound
    groundImpactMinSpeed    = 10.0;

    // Engine
    engineTorque = 9500; //4000;       // Engine power
    engineBrake = 1500;         // Braking when throttle is 0
    brakeTorque = 15000;        // When brakes are applied
    maxWheelSpeed = 30;        // Engine scale by current speed / max speed

    rollForce = 600;
    yawForce = 400;
    pitchForce = 800;
    rotationalDrag = 0.2;

       // Advanced Steering
       steeringAutoReturn = true;
       steeringAutoReturnRate = 0.9;
       steeringAutoReturnMaxSpeed = 10;
       steeringUseStrafeSteering = true;
       steeringStrafeSteeringRate = 0.1;

    // Energy
    maxEnergy = 100;
    jetForce = 3000;
    minJetEnergy = 30;
    jetEnergyDrain = 2;

    splash = vehicleSplash;
    splashVelocity = 4.0;
    splashAngle = 67.0;
    splashFreqMod = 300.0;
    splashVelEpsilon = 0.60;
    bubbleEmitTime = 1.4;
    splashEmitter[0] = vehicleFoamDropletsEmitter;
    splashEmitter[1] = vehicleFoamEmitter;
    splashEmitter[2] = vehicleBubbleEmitter;
    mediumSplashSoundVelocity = 10.0;  
    hardSplashSoundVelocity = 20.0;  
    exitSplashSoundVelocity = 5.0;

    //mediumSplashSound = "";
    //hardSplashSound = "";
    //exitSplashSound = "";

    // Sounds
    //   jetSound = ScoutThrustSound;
    //engineSound = idleSound;
    //squealSound = skidSound;
    softImpactSound = slowImpactSound;
    hardImpactSound = fastImpactSound;
    //wheelImpactSound = slowImpactSound;

    //   explosion = VehicleExplosion;
    justcollided = 0;

       uiName = "MCTV ";
    rideable = true;
    lookUpLimit = 0.65;
    lookDownLimit = 0.45;

    paintable = true;
      
       damageEmitter[0] = VehicleBurnEmitter;
    damageEmitterOffset[0] = "0.0 0.0 0.0 ";
    damageLevelTolerance[0] = 0.99;

       damageEmitter[1] = VehicleBurnEmitter;
    damageEmitterOffset[1] = "0.0 0.0 0.0 ";
    damageLevelTolerance[1] = 1.0;

       numDmgEmitterAreas = 1;

       initialExplosionProjectile = MCTVExplosionProjectile;
       initialExplosionOffset = 0;         //offset only uses a z value for now

       burnTime = 4000;

       finalExplosionProjectile = MCTVFinalExplosionProjectile;
       finalExplosionOffset = 0.5;          //offset only uses a z value for now

       minRunOverSpeed    = 4;   //how fast you need to be going to run someone over (do damage)
       runOverDamageScale = 8;   //when you run over someone, speed * runoverdamagescale = damage amt
       runOverPushScale   = 1.2; //how hard a person you're running over gets pushed

       //protection for passengers
       protectPassengersBurn   = false;  //protect passengers from the burning effect of explosions?
       protectPassengersRadius = false;  //protect passengers from radius damage (explosions) ?
       protectPassengersDirect = false; //protect passengers from direct damage (bullets) ?
    };

    function MCTVVehicle::onAdd(%this,%obj)
    {
       // 4 wheel steering
       %obj.setWheelSteering(0,1);
       %obj.setWheelSteering(1,1);
       %obj.setWheelSteering(2,0);
       %obj.setWheelSteering(3,0);
       %obj.setWheelSteering(4,0);
       %obj.setWheelSteering(5,0);

       // 4 wheel drive
       %obj.setWheelPowered(0,true);
       %obj.setWheelPowered(1,true);
       %obj.setWheelPowered(2,true);
       %obj.setWheelPowered(3,true);
       %obj.setWheelPowered(4,true);
       %obj.setWheelPowered(5,true);

       %obj.setWheelTire(0, jeepTire);
       %obj.setWheelTire(1, jeepTire);
       %obj.setWheelTire(2, jeepTire);
       %obj.setWheelTire(3, jeepTire);
       %obj.setWheelTire(4, jeepTire);
       %obj.setWheelTire(5, jeepTire);

       %obj.setWheelSpring(0, jeepSpring);
       %obj.setWheelSpring(1, jeepSpring);
       %obj.setWheelSpring(2, jeepSpring);
       %obj.setWheelSpring(3, jeepSpring);
       %obj.setWheelSpring(4, jeepSpring);
       %obj.setWheelSpring(5, jeepSpring);

       // turret
     %t = new AIPlayer()
     {
         dataBlock = MCTVMGPlayer;
     };
     MissionCleanup.add(%t);
     %obj.mountObject(%t, 15);
    %obj.turret = %t;

    %obj.creationTime = getSimTime();
    %t.schedule(15,"rigTurret");
    }
    function Player::rigTurret(%obj)
    {
       if(%obj.dataBlock !$= MCTVMGPlayer)
      return;

       if(!isObject(%obj))
      return;

       %parent = %obj.getObjectMount();
       if(!isObject(%parent))
      return;

       %obj.spawnBrick = %parent.spawnBrick;
       %obj.brickGroup = %parent.brickGroup;
    }

    function MCTVVehicle::onRemove(%this,%obj)
    {
       if(isObject(%obj.turret))
      %obj.turret.delete();
    }

    function MCTVMGPlayer::onDriverLeave(%this,%obj)
    {
       %obj.setTransform("0 0 0 0 0 0 0");
    }
    function MCTVMGPlayer::onDriverLeave(%this,%obj)
    {
      
    }

    Pages: [1] 2 3 4 5