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 - Grand Theif Fox

Pages: 1 [2]
16
Modification Help / collison error
« on: April 13, 2007, 12:09:03 AM »
ok i made a portabel base ( :cookieMonster:) and you can shoot though it...why i dont wan tthis to happen (i do have a custom collison box on it)


Code: [Select]
//porable base by grand theif fox
$hsinstall = 1;
datablock AudioProfile(BASEExplosionSound)
{
   filename    = "./sound/arrowHit.wav";
   description = AudioClose3d;
   preload = true;
};

datablock AudioProfile(BASEFireSound)
{
   filename    = "./sound/bowFire.wav";
   description = AudioClosest3d;
   preload = true;
};


//arrow trail
datablock ParticleData(BASETrailParticle)
{
dragCoefficient = 3.0;
windCoefficient = 0.0;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 2000;
lifetimeVarianceMS = 0;
spinSpeed = 10.0;
spinRandomMin = -50.0;
spinRandomMax = 50.0;
useInvAlpha = false;
animateTexture = false;
//framesPerSec = 1;

textureName = "base/data/particles/ring";
//animTexName = "~/data/particles/dot";

// Interpolation variables
colors[0] = "1 1 1 0.2";
colors[1] = "1 1 1 0.0";
sizes[0] = 0.2;
sizes[1] = 0.01;
times[0] = 0.0;
times[1] = 1.0;
};

datablock ParticleEmitterData(BASETrailEmitter)
{
   ejectionPeriodMS = 2;
   periodVarianceMS = 0;

   ejectionVelocity = 0; //0.25;
   velocityVariance = 0; //0.10;

   ejectionOffset = 0;

   thetaMin         = 0.0;
   thetaMax         = 90.0; 

   particles = BASETrailParticle;
};

//effects
datablock ParticleData(BASEExplosionParticle)
{
dragCoefficient      = 5;
gravityCoefficient   = 0.1;
inheritedVelFactor   = 0.2;
constantAcceleration = 0.0;
lifetimeMS           = 500;
lifetimeVarianceMS   = 300;
textureName          = "base/data/particles/chunk";
spinSpeed = 10.0;
spinRandomMin = -50.0;
spinRandomMax = 50.0;
colors[0]     = "0.9 0.9 0.6 0.9";
colors[1]     = "0.9 0.5 0.6 0.0";
sizes[0]      = 0.25;
sizes[1]      = 0.0;
};

datablock ParticleEmitterData(BASEExplosionEmitter)
{
   ejectionPeriodMS = 7;
   periodVarianceMS = 0;
   ejectionVelocity = 5;
   velocityVariance = 1.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 90;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "BASEExplosionParticle";
};

datablock ExplosionData(BASEExplosion)
{
   //explosionShape = "";
soundProfile = BASEExplosionSound;

   lifeTimeMS = 150;

   particleEmitter = BASEExplosionEmitter;
   particleDensity = 10;
   particleRadius = 0.2;

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

   shakeCamera = false;
   camShakeFreq = "10.0 11.0 10.0";
   camShakeAmp = "1.0 1.0 1.0";
   camShakeDuration = 0.5;
   camShakeRadius = 10.0;

   // Dynamic light
   lightStartRadius = 0;
   lightEndRadius = 2;
   lightStartColor = "0.3 0.6 0.7";
   lightEndColor = "0 0 0";
};


//projectile
AddDamageType("BASEDirect",   '<bitmap:add-ons/ci/star> %1',    '%2 <bitmap:add-ons/ci/arrow> %1',1,1);

datablock ProjectileData(BASEProjectile)
{
   projectileShapeName = "./shapes/por/pro.dts";

   directDamage        = 0;
   directDamageType    = $DamageType::BASEDirect;

   radiusDamage        = 0;
   damageRadius        = 0;
   radiusDamageType    = $DamageType::BASEDirect;

   explosion           = BASEExplosion;
   particleEmitter     = BASETrailEmitter;

   muzzleVelocity      = 500;
   velInheritFactor    = 1;

   armingDelay         = 0;
   lifetime            = 2000;
   fadeDelay           = 3500;
   bounceElasticity    = 0;
   bounceFriction      = 0;
   isBallistic         = true;
   gravityMod = 0.0;

   hasLight    = false;
   lightRadius = 3.0;
   lightColor  = "0 0 0.5";
};


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

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

//gui stuff
uiName = "Portable base Gun";
iconName = "./ItemIcons/BASE";
doColorShift = true;
colorShiftColor = "0.2 0.2 1 1.000";

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

////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(BASEImage)
{
   // Basic Item properties
   shapeFile = "./shapes/por/gun.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 10" );

   // 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 = "WeaponImage";

   // Projectile && Ammo.
   item = BASEItem;
   ammo = " ";
   projectile = BASEProjectile;
   projectileType = Projectile;

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

   doColorShift = true;
   colorShiftColor = BASEItem.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.5;
stateTransitionOnTimeout[0]       = "Ready";
stateSound[0] = weaponSwitchSound;

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

stateName[2]                    = "Fire";
stateTransitionOnTimeout[2]     = "Reload";
stateTimeoutValue[2]            = 0.05;
stateFire[2]                    = true;
stateAllowImageChange[2]        = false;
stateSequence[2]                = "Fire";
stateScript[2]                  = "onFire";
stateWaitForTimeout[2] = true;
stateSound[2] = BASEFireSound;

stateName[3] = "Reload";
stateSequence[3]                = "Reload";
stateAllowImageChange[3]        = false;
stateTimeoutValue[3]            = 0.5;
stateWaitForTimeout[3] = true;
stateTransitionOnTimeout[3]     = "Check";

stateName[4] = "Check";
stateTransitionOnTriggerUp[4] = "StopFire";
stateTransitionOnTriggerDown[4] = "Fire";

stateName[5]                    = "StopFire";
stateTransitionOnTimeout[5]     = "Ready";
stateTimeoutValue[5]            = 0.2;
stateAllowImageChange[5]        = false;
stateWaitForTimeout[5] = true;
//stateSequence[5]                = "Reload";
stateScript[5]                  = "onStopFire";


};

function BASEProjectile::onCollision(%this,%obj,%col,%fade,%pos,%normal)
{
if(isobject(%obj.client.BASEA) && isObject(%obj.client.BASEB)){
%obj.client.BASEA.delete();
%obj.client.BASEB.delete();
}
if(isObject(%obj.client.BASEA) && !isObject(%obj.client.BASEB)){
%pos2 = VectorAdd(%pos, "0 0" SPC 0.2);
%obj.client.BASEB = new StaticShape()
{
   position = %pos2;
   datablock = BASEB;
   scale = "2 2 2";
};
%obj.client.BASEB.otherBASE = %obj.client.BASEA;
%obj.client.BASEA.otherBASE = %obj.client.BASEB;
}

if(!isObject(%obj.client.BASEA) && !isObject(%obj.client.BASEB)){
%pos2 = VectorAdd(%pos, "0 0" SPC 0.2);
%obj.client.BASEA = new StaticShape()
{
   position = %pos2;
   datablock = BASEA;
   scale = "2 2 2";
};
}
}

datablock StaticShapeData(BASEA)
{
category = "BASE";   //Mission editor category
item = BASEbasea;
shapeFile = "./shapes/por/porb.dts";
};

datablock StaticShapeData(BASEB)
{
category = "BASE";   //Mission editor category
item = BASEbaseb;
shapeFile = "./shapes/por/porb.dts";
};

function ServerCmdDeleteBASEs(%client)
{
%client.BASEA.delete();
%client.BASEB.delete();
}
function baseA::onCollision(%this,%obj,%col,%fade,%pos,%normal)
{
}

function baseB::onCollision(%this,%obj,%col,%fade,%pos,%normal)
{
}

17
Modification Help / its it possible?
« on: April 06, 2007, 02:48:35 PM »
its it possible for a ingame gui button to open a out of game .exe???
if so..can i get the code?

18
Modification Help / How do you make a item admin only
« on: April 06, 2007, 12:34:34 PM »
How do you make a item admin only or super admin only?

19
Modification Help / Gui problems
« on: April 02, 2007, 08:42:26 PM »
ok i know i posted this before but that was mostly figureing out the code

anywas know the code doesent work at all
Code: [Select]
      };
      new GuiSliderCtrl(setZoomFOV) {
         profile = "GuiSliderProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "4 321";
         extent = "268 64";
         minExtent = "8 2";
         visible = "1";
         variable = "$Pref::Player::CurrentFOV;";
         command = "setZoomFOV";
         range = "1.000000 100.000000";
         ticks = "100";
         value = "1";
      };

so that slider should change the FOV(zoom) acording to the slider..so wtf it doesent work

20
Modification Help / Changing Variable when Slider changes?
« on: April 02, 2007, 07:33:24 PM »
how do i do that...i cant seem to get it to work

what i want it to do is change the FOV (zoom)
Code: [Select]
      new GuiSliderCtrl(setZoomFOV) {
         profile = "GuiSliderProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "4 321";
         extent = "268 64";
         minExtent = "8 2";
         visible = "1";
         command = "setFov( $Pref::player::CurrentFOV )";
         range = "1.000000 100.000000";
         ticks = "100";
         value = "1";
      };
and i cant get it to work

21
Modification Help / Codeing help .badspot can solve it!
« on: April 02, 2007, 06:45:06 PM »
how do i make it so the a commandtoserver('number'); changed a cameraZrot or a FOZ in a gui?

Pages: 1 [2]