961
Modification Help / Re: Gun Facing Backwards in 1st person
« on: October 06, 2008, 10:59:23 AM »
Still nothing D: (Updated code above)
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.
You probably changed the rotation in the weaponImage.I don't think I changed that, but here is the script.
datablock ParticleData(RifleSmokeParticle)
{
dragCoefficient = 3;
gravityCoefficient = -0.5;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 1525;
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.9";
colors[1] = "0.5 0.5 0.5 0.0";
sizes[0] = 0.15;
sizes[1] = 0.25;
useInvAlpha = false;
};
datablock ParticleEmitterData(RifleSmokeEmitter)
{
ejectionPeriodMS = 10;
periodVarianceMS = 0;
ejectionVelocity = 1.0;
velocityVariance = 1.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 90;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = false;
particles = "RifleSmokeParticle";
};
//bullet trail effects
datablock ParticleData(RiflebulletTrailParticle)
{
dragCoefficient = 3;
gravityCoefficient = -0.0;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 625;
lifetimeVarianceMS = 55;
textureName = "base/data/particles/thinRing";
spinSpeed = 10.0;
spinRandomMin = -500.0;
spinRandomMax = 500.0;
colors[0] = "0.3 0.3 0.9 0.4";
colors[1] = "0.5 0.5 0.5 0.0";
sizes[0] = 0.15;
sizes[1] = 0.25;
useInvAlpha = false;
};
datablock ParticleEmitterData(RiflebulletTrailEmitter)
{
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionVelocity = 0.0;
velocityVariance = 0.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 90;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = false;
particles = "RiflebulletTrailParticle";
};
AddDamageType("Rifle", '<bitmap:add-ons/Weapon_Rifle/CI_rifle> %1', '%2 <bitmap:add-ons/Weapon_Rifle/CI_rifle> %1',0.5,1);
datablock ProjectileData(RifleProjectile)
{
projectileShapeName = "./bullet.dts";
directDamage = 150;
directDamageType = $DamageType::Rifle;
radiusDamageType = $DamageType::Rifle;
brickExplosionRadius = 0;
brickExplosionImpact = true; //destroy a brick if we hit it directly?
brickExplosionForce = 25;
brickExplosionMaxVolume = 200; //max volume of bricks that we can destroy
brickExplosionMaxVolumeFloati ng = 200; //max volume of bricks that we can destroy if they aren't connected to the ground
impactImpulse = 1200;
verticalImpulse = 1400;
explosion = GunExplosion;
particleEmitter = RiflebulletTrailEmitter;
muzzleVelocity = 2000;
velInheritFactor = 1;
armingDelay = 00;
lifetime = 4000;
fadeDelay = 3500;
bounceElasticity = 0.5;
bounceFriction = 0.20;
isBallistic = false;
gravityMod = 0.0;
hasLight = false;
lightRadius = 3.0;
lightColor = "0 0 0.5";
};
//////////
// item //
//////////
datablock ItemData(RifleItem)
{
category = "Weapon"; // Mission editor category
className = "Weapon"; // For inventory system
// Basic Item Properties
shapeFile = "./rifle.dts";
rotate = false;
mass = 1;
density = 0.2;
elasticity = 0.2;
friction = 0.6;
emap = true;
//gui stuff
uiName = "Rifle";
iconName = "./icon_rifle";
doColorShift = true;
colorShiftColor = "0.25 0.25 0.25 1.000";
// Dynamic properties defined by the scripts
image = RifleImage;
canDrop = true;
};
////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(RifleImage)
{
// Basic Item properties
shapeFile = "./rifle.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.2 0.55 -0.35";
rotation = eulerToMatrix( "0 0 0" );
eyeRotation = 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 = "WeaponImage";
// Projectile && Ammo.
item = BowItem;
ammo = " ";
projectile = RifleProjectile;
projectileType = Projectile;
casing = GunShellDebris;
shellExitDir = "1.0 -1.3 1.0";
shellExitOffset = "0 0 0";
shellExitVariance = 15.0;
shellVelocity = 7.0;
//melee particles shoot from eye node for consistancy
melee = false;
//raise your arm up or not
armReady = true;
minShotTime = 2000; //minimum time allowed between shots (needed to prevent equip/dequip exploit)
doColorShift = true;
colorShiftColor = RifleItem.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";
stateTransitionOnTimeout[2] = "Smoke";
stateTimeoutValue[2] = 0.14;
stateFire[2] = true;
stateAllowImageChange[2] = false;
stateSequence[2] = "Fire";
stateScript[2] = "onFire";
stateWaitForTimeout[2] = true;
stateEmitter[2] = GunFlashEmitter;
stateEmitterTime[2] = 0.05;
stateEmitterNode[2] = "muzzleNode";
stateSound[2] = GunShot1Sound;
stateEjectShell[2] = true;
stateName[3] = "Smoke";
stateEmitter[3] = RifleSmokeEmitter;
stateEmitterTime[3] = 2.00;
stateEmitterNode[3] = "muzzlePoint";
stateTimeoutValue[3] = 2.00;
stateTransitionOnTimeout[3] = "Reload";
stateWaitForTimeout[3] = true;
stateName[4] = "Reload";
stateSequence[4] = "Reload";
stateTransitionOnTriggerUp[4] = "Ready";
//stateSequence[4] = "Ready";
};
function RifleImage::onFire(%this,%obj,%slot)
{
if(%obj.getDamagePercent() < 1.0)
%obj.playThread(2, shiftAway);
Parent::onFire(%this,%obj,%slot);
}
I vote Beta realese.
Yes, I know :P
Everyone the peice of stuff FAIL BIN power pistol overrites your default pistol don't
DON'T DL IT!
i did that and it wont work in the Terminal it says this when i press apple+mWeird.... It works for me :/
Executing editor/cursors.cs.
Executing editor/editor.bind.cs.
Executing editor/ObjectBuilderGui.gui.
exec: invalid script file ./EditorGui.gui.
exec: invalid script file ./EditorGui.cs.
exec: invalid script file ./WorldEditorSettingsDlg.gui.
exec: invalid script file ./TerrainEditorVSettingsGui.gui.
editor/editor.cs (67): Unable to find object: 'EWorldEditor' attempting to call function 'ignoreObjClass'
editor/editor.cs (70): Unable to find object: 'EditorGui' attempting to call function 'init'
Executing editor/editorRender.cs.
editor/editor.cs (103): Unable to find object: 'EditorGui' attempting to call function 'getId'
editor/editor.cs (0): Unknown command open.
Object editor(6844) editor -> EditManager -> GuiControl -> SimGroup -> SimSet -> SimSet -> SimObject
Our cat was about 20 years old but passed away while we were on holidays.D: