Calling DTS helper animations.
by Matthew Jones · in Torque Game Engine · 07/24/2002 (7:59 pm) · 4 replies
I was trying to add a "noammo" animation to my pistol. I have a "Fire" animation in the model and basically I did the same thing used a DTShelper and named it "NoAmmo" and marked the part of the animation (using the trek veiw) that "noammo" will cover. I am positive everything is good in the model.
My question is how does the engine know where or what to look for when the "Fire" action takes place. I looked in the scripts at the "STATES" scripts and tried to play with some combinitions of that but with no luck.
If its not in the script where in the sdk is this controlled.
Also Is there anyway to adjust where the shell casings eject from.
Any help is appriciated. Thanks
Matt
My question is how does the engine know where or what to look for when the "Fire" action takes place. I looked in the scripts at the "STATES" scripts and tried to play with some combinitions of that but with no luck.
If its not in the script where in the sdk is this controlled.
Also Is there anyway to adjust where the shell casings eject from.
Any help is appriciated. Thanks
Matt
#2
I did search and found 1 post that pertained to the casing eject. It recomended using
("shellExitDir", TypePoint3F, Offset(shellExitDir, ShapeBaseImageData));
I could use a little more explaination if anyone could spare the time. I don't understand what the fields in the line explain. Call me slow, I am, I don't mind.
Thanks for the help though.
Matt
07/25/2002 (4:17 am)
Ya I have already tried somthing like this. The problem is not where the script goes. I am pretty sure to use #6. Basically what I am looking for though is the script(or function) that handles calling the animation when the fire function is used. Reading through it would help alot. I did find some stuff in the ShapeImage.cc but I am not sure if it pertains or not. I did search and found 1 post that pertained to the casing eject. It recomended using
("shellExitDir", TypePoint3F, Offset(shellExitDir, ShapeBaseImageData));
I could use a little more explaination if anyone could spare the time. I don't understand what the fields in the line explain. Call me slow, I am, I don't mind.
Thanks for the help though.
Matt
#3
07/26/2002 (10:05 am)
ANYBODY?
#4
07/30/2002 (9:17 am)
OK I finally figured it out and its so simple I feel embarest.stateName[5] = "NoAmmo"; stateTransitionOnAmmo[5] = "Reload"; stateSequence[5] = "DryFire";///renames this to match my sequence stateAllowImageChange[5] = true; stateTransitionOnTriggerDown[5] = "DryFire";And it works pretty good. I need to get the time set up on it.
Torque Owner Mike Stoddart
and then add a function similar to this, using the appropriate weapon name:
function RifleImage::onDryFire(%this, %obj) { // Action to take on dry fire .... }I make no promises that this is right, as I'm both working from memory and guessing as I'm still learning this area.
As for your last question: there are other threads in the forums on this, so you'll need to do a search. I really can't remember the answer.
I hope this all helps!