i need some help
by cloud · in General Discussion · 08/12/2002 (9:51 am) · 35 replies
For some odd reason, whenever i try to change the scripts in crossbow.cs, it never works. im thinking its became write protected or something like that, if u have any andswers or suggestions, plaese reply.
#2
Owen
08/13/2002 (5:03 am)
also make sure you have deleted the already compiled scripts as sometimes Torque doesn't always compile everything.Owen
#3
08/13/2002 (2:38 pm)
i checked my console and their are no errors, yes, it saved and i was trying to change the setting in my crossbow. if that helps any, i would like some help
#4
Did you delete crossbow.cs.dso, the compiled file?
08/13/2002 (2:43 pm)
What exactly were you trying to change? Post the line(s) you changed in a reply to this topic. How can we help if we don't see what you're trying to change?Did you delete crossbow.cs.dso, the compiled file?
#5
// Crossbow bolt projectile particles
datablock ParticleData(CrossbowBoltParticle)
{
textureName = "~/data/shapes/particles/smoke";
dragCoeffiecient = 0.0;
gravityCoefficient = 0.0; // rises slowly
inheritedVelFactor = 0.5;
lifetimeMS = 500; // lasts 0.7 second
lifetimeVarianceMS = 500; // ...more or less
useInvAlpha = false;
spinRandomMin = -10.0;
spinRandomMax = 10.0;
colors[0] = "0.0 0.0 1.0 1.0";
colors[1] = "0.0 0.0 1.0 1.0";
colors[2] = "0.0 0.0 1.0 1.0";
sizes[0] = 10.9;
sizes[1] = 10.9;
sizes[2] = 10.9;
times[0] = 20.4;
times[1] = 20.4;
times[2] = 20.4;
};
thats the first part
datablock ParticleEmitterData(CrossbowBoltEmitter)
{
ejectionPeriodMS = 10;
periodVarianceMS = 5;
ejectionVelocity = 0.75;
velocityVariance = 90.0;
thetaMin = 0.0;
thetaMax = 500.0;
particles = CrossbowBoltParticle;
};
thats the second
//-----------------------------------------------------------------------------
// Projectile Explosion
datablock ParticleData(CrossbowExplosionParticle)
{
textureName = "~/data/shapes/particles/smoke";
dragCoefficient = 2;
gravityCoefficient = 0.2;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 1700;
lifetimeVarianceMS = 1100;
colors[0] = "0.56 0.36 0.26 1.0";
colors[1] = "0.0 0.2 0.9 0.0";
sizes[0] = 2.0;
sizes[1] = 2.0;
};
third
// Dynamic light
lightStartRadius = 2;
lightEndRadius = 2;
lightStartColor = "0.5 0.5 0";
lightEndColor = "0 0 1";
};
fourth
//-----------------------------------------------------------------------------
// Projectile Object
datablock ProjectileData(CrossbowProjectile)
{
projectileShapeName = "~/data/shapes/crossbow/projectile.dts";
directDamage = 100;
radiusDamage = 20;
damageRadius = 2
explosion = CrossbowExplosion;
particleEmitter = CrossbowBoltEmitter;
muzzleVelocity = 400;
velInheritFactor = 1;
armingDelay = 0;
lifetime = 5000;
fadeDelay = 5000;
bounceElasticity = 0.999;
bounceFriction = 0;
isBallistic = true;
gravityMod = 0.10;
hasLight = true;
lightRadius = 2.5;
lightColor = "0 0 1";
};
function CrossbowProjectile::onCollision(%this,%obj,%col,%fade,%pos,%normal)
{
// Apply damage to the object all shape base objects
if (%col.getType() & $TypeMasks::ShapeBaseObjectType)
%col.damage(%obj,%pos,%this.directDamage,"CrossbowBolt");
// Radius damage is a support scripts defined in radiusDamage.cs
radiusDamage(%obj,%pos,%this.damageRadius,%this.radiusDamage,"CrossbowBolt",0);
}
fifth
// Fire the weapon. Calls the fire script which does
// the actual work.
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.05
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateSequence[3] = "Fire";
stateScript[3] = "onFire";
stateSound[3] = CrossbowFireSound;
// Play the relead animation, and transition into
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.05
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateEjectShell[4] = true;
stateSound[4] = CrossbowReloadSound;
thats it. thats wat i tryed changing
08/13/2002 (2:50 pm)
//-----------------------------------------------------------------------------// Crossbow bolt projectile particles
datablock ParticleData(CrossbowBoltParticle)
{
textureName = "~/data/shapes/particles/smoke";
dragCoeffiecient = 0.0;
gravityCoefficient = 0.0; // rises slowly
inheritedVelFactor = 0.5;
lifetimeMS = 500; // lasts 0.7 second
lifetimeVarianceMS = 500; // ...more or less
useInvAlpha = false;
spinRandomMin = -10.0;
spinRandomMax = 10.0;
colors[0] = "0.0 0.0 1.0 1.0";
colors[1] = "0.0 0.0 1.0 1.0";
colors[2] = "0.0 0.0 1.0 1.0";
sizes[0] = 10.9;
sizes[1] = 10.9;
sizes[2] = 10.9;
times[0] = 20.4;
times[1] = 20.4;
times[2] = 20.4;
};
thats the first part
datablock ParticleEmitterData(CrossbowBoltEmitter)
{
ejectionPeriodMS = 10;
periodVarianceMS = 5;
ejectionVelocity = 0.75;
velocityVariance = 90.0;
thetaMin = 0.0;
thetaMax = 500.0;
particles = CrossbowBoltParticle;
};
thats the second
//-----------------------------------------------------------------------------
// Projectile Explosion
datablock ParticleData(CrossbowExplosionParticle)
{
textureName = "~/data/shapes/particles/smoke";
dragCoefficient = 2;
gravityCoefficient = 0.2;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 1700;
lifetimeVarianceMS = 1100;
colors[0] = "0.56 0.36 0.26 1.0";
colors[1] = "0.0 0.2 0.9 0.0";
sizes[0] = 2.0;
sizes[1] = 2.0;
};
third
// Dynamic light
lightStartRadius = 2;
lightEndRadius = 2;
lightStartColor = "0.5 0.5 0";
lightEndColor = "0 0 1";
};
fourth
//-----------------------------------------------------------------------------
// Projectile Object
datablock ProjectileData(CrossbowProjectile)
{
projectileShapeName = "~/data/shapes/crossbow/projectile.dts";
directDamage = 100;
radiusDamage = 20;
damageRadius = 2
explosion = CrossbowExplosion;
particleEmitter = CrossbowBoltEmitter;
muzzleVelocity = 400;
velInheritFactor = 1;
armingDelay = 0;
lifetime = 5000;
fadeDelay = 5000;
bounceElasticity = 0.999;
bounceFriction = 0;
isBallistic = true;
gravityMod = 0.10;
hasLight = true;
lightRadius = 2.5;
lightColor = "0 0 1";
};
function CrossbowProjectile::onCollision(%this,%obj,%col,%fade,%pos,%normal)
{
// Apply damage to the object all shape base objects
if (%col.getType() & $TypeMasks::ShapeBaseObjectType)
%col.damage(%obj,%pos,%this.directDamage,"CrossbowBolt");
// Radius damage is a support scripts defined in radiusDamage.cs
radiusDamage(%obj,%pos,%this.damageRadius,%this.radiusDamage,"CrossbowBolt",0);
}
fifth
// Fire the weapon. Calls the fire script which does
// the actual work.
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.05
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateSequence[3] = "Fire";
stateScript[3] = "onFire";
stateSound[3] = CrossbowFireSound;
// Play the relead animation, and transition into
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.05
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateEjectShell[4] = true;
stateSound[4] = CrossbowReloadSound;
thats it. thats wat i tryed changing
#6
Also when you say it doesn't work, what exactly do you mean? It doesn't fire, it doesn't display etc...?
08/13/2002 (2:59 pm)
I'm still looking through your code, but did you notice any messages in the console that a value was out of range? I know that some weapon datablock variables have to be in a certain range.Also when you say it doesn't work, what exactly do you mean? It doesn't fire, it doesn't display etc...?
#7
08/13/2002 (3:01 pm)
????? it worked before
#8
08/13/2002 (3:02 pm)
Obviously it did. Ideally you should restore the original version of crossbow.cs and make ONE change at a time to see where the problem is.
#9
And I got several error messages in my console:
These error messages are all in grey text, so they are easy to spot.
So I imagine that you probably have several more errors in there.
Hopefully this will help you to begin with.
08/13/2002 (3:05 pm)
Okay, you need to bring down your console with the ' key and read through EVERYTHING. Your answers are in there. For example I changed my crossbow script with this from your code:Quote:datablock ParticleData(CrossbowBoltParticle)
{
textureName = "~/data/shapes/particles/smoke";
dragCoeffiecient = 0.0;
gravityCoefficient = 0.0; // rises slowly
inheritedVelFactor = 0.5;
lifetimeMS = 500; // lasts 0.7 second
lifetimeVarianceMS = 500; // ...more or less
useInvAlpha = false;
spinRandomMin = -10.0;
spinRandomMax = 10.0;
colors[0] = "0.0 0.0 1.0 1.0";
colors[1] = "0.0 0.0 1.0 1.0";
colors[2] = "0.0 0.0 1.0 1.0";
sizes[0] = 10.9;
sizes[1] = 10.9;
sizes[2] = 10.9;
times[0] = 20.4;
times[1] = 20.4;
times[2] = 20.4;
};
And I got several error messages in my console:
Quote:ParticleData(CrossbowBoltParticle) lifetimeVariance >= lifetime
Quote:ParticleData(CrossbowBoltParticle) times[3] < [times2]
These error messages are all in grey text, so they are easy to spot.
So I imagine that you probably have several more errors in there.
Hopefully this will help you to begin with.
#10
08/13/2002 (3:08 pm)
hey im not some smart scripter, i cant read all of this, i need to know wat to change.
#11
a) help yourself by looking through the console for error messages first
b) help yourself by learning the scripting language as you go
c) help people help you by being more descriptive in your problem, and not just say "it doesn't work, tell me what to change". I understand that you're not a scripter but you are the one scripting; if you're not prepared to struggle through things like this then you shouldn't be scripting.
I won't and can't just tell you exactly what to change because I don't have the time or patience. You haven't said what you're trying to do. This doesn't tell me anything:
08/13/2002 (3:14 pm)
Tough luck. If you want people to help you, you have to:a) help yourself by looking through the console for error messages first
b) help yourself by learning the scripting language as you go
c) help people help you by being more descriptive in your problem, and not just say "it doesn't work, tell me what to change". I understand that you're not a scripter but you are the one scripting; if you're not prepared to struggle through things like this then you shouldn't be scripting.
I won't and can't just tell you exactly what to change because I don't have the time or patience. You haven't said what you're trying to do. This doesn't tell me anything:
Quote:trying to change the setting in my crossbow
#12
08/13/2002 (3:16 pm)
harsh
#13
I explained to you where to find the error message and where the error lies.
Enough from me.
08/13/2002 (3:17 pm)
Probably, but necessary.I explained to you where to find the error message and where the error lies.
Enough from me.
#14
08/13/2002 (3:19 pm)
well then, thnx
#16
08/13/2002 (3:27 pm)
this isnt mine
#17
"Mark Moore
Activity:
Status: Member
Member Since: Jul 15, 2002
Last Login: Aug 13, 2002 at 23:44 CEST
Last Profile Update: Jul 22, 2002
Contact Information:
Location: newport news, VA - USA
E-Mail: mrpntbllmark@hotmail.com
Chat Client: AOL
Chat #/Id: xpaintbrawler
Development Skills:
Primary Skill: Scriptor/Mod - Skilled
Skill: Tester - Skilled
Talent Summary:
i create anything i feel. Whether its maps or new ai or just some scripting.
Forums:
Mark Moore has created 1 thread and made 9 posts on the forums. Follow the links to see all the related threads.
"
or are you saying "this account isn't mine"?
08/13/2002 (3:33 pm)
euh.. I'm not blind.. and I can read:"Mark Moore
Activity:
Status: Member
Member Since: Jul 15, 2002
Last Login: Aug 13, 2002 at 23:44 CEST
Last Profile Update: Jul 22, 2002
Contact Information:
Location: newport news, VA - USA
E-Mail: mrpntbllmark@hotmail.com
Chat Client: AOL
Chat #/Id: xpaintbrawler
Development Skills:
Primary Skill: Scriptor/Mod - Skilled
Skill: Tester - Skilled
Talent Summary:
i create anything i feel. Whether its maps or new ai or just some scripting.
Forums:
Mark Moore has created 1 thread and made 9 posts on the forums. Follow the links to see all the related threads.
"
or are you saying "this account isn't mine"?
#18
08/13/2002 (3:35 pm)
yeah, this account aint mine
#19
08/13/2002 (3:40 pm)
I'm confused. If you click on your name next to your posts in this topic, it takes you to the account that Warde listed. If you then click on the link to the other topic you posted in, the comment "Mark Moore" posted sounds just like you. Is you is, or is you ain't Mark Moore? If it isn't your account, who's is it, and why are you using it?????
#20
Also.. why not create your own account?
Is you're name even Mark Moore?
08/13/2002 (3:41 pm)
In that case I really hope you're not using the account of a licensee...Also.. why not create your own account?
Is you're name even Mark Moore?
Torque Owner Mike Stoddart
1) Have you checked your console to make sure there are no errors?
2) Did you re-check the script to make sure that the changes were saved? (You did save the changes I presume?).
3) What changes were you trying to make?
Question 1) is the most important one; if changes you made didn't appear to work, then this usually indicates that you introduced syntax errors into the script file.