Sword problem
by Musashi · in Torque Game Engine · 08/09/2006 (7:02 am) · 14 replies
First of all, is anyone familiar with this tutorial?;
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5377
it is really good, and I have got quite far, everything has worked out from following people's advice, so the engine part has fully compiled, no errors and runs, heck the Orc has the sword equipped properly. The I came across the problem of there being no animation when clicking the mouse button for an attack. A couple of other TGE 1.4 users had the same problem, the solution was, delete your .dso's, I did, now there is no animation what-so-ever. I am confused why there are no more animations going on.
So I need to know how to fix the new problem, and max sure he animates a sword attack and damages any unsuspecting NPC.
Thanks.
[edit]
Fixed the new problem, where there is no animation what-so-ever, but the attack animation problem is still there...I think it could be about the setArmthread part, I am new to Torque, so cancelling down a problem for me is about as likely as Abba having a come back album in the next two weeks and immediately everyone (including me) liking it.
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5377
it is really good, and I have got quite far, everything has worked out from following people's advice, so the engine part has fully compiled, no errors and runs, heck the Orc has the sword equipped properly. The I came across the problem of there being no animation when clicking the mouse button for an attack. A couple of other TGE 1.4 users had the same problem, the solution was, delete your .dso's, I did, now there is no animation what-so-ever. I am confused why there are no more animations going on.
So I need to know how to fix the new problem, and max sure he animates a sword attack and damages any unsuspecting NPC.
Thanks.
[edit]
Fixed the new problem, where there is no animation what-so-ever, but the attack animation problem is still there...I think it could be about the setArmthread part, I am new to Torque, so cancelling down a problem for me is about as likely as Abba having a come back album in the next two weeks and immediately everyone (including me) liking it.
#2
08/11/2006 (3:33 am)
Can you post some code - or email me - I did manage to get swords working in my Skeleton Pack so I should be able to help you out.
#4
08/14/2006 (7:42 am)
Have you solved the problem?
#5
08/15/2006 (12:23 am)
I am looking into it for Musashi. Should have an answer in a few days
#6
a) The new animation for the sword attack doesn't show up
and
b) When you deleted the .dso's, your animation stopped working entirely
...I'd guess you have a syntax error in your 'player.cs' file (or whatever file you using to initialize the TSShapeConstructor datablock for the player). It didn't pick up the new animations the first time, due to the error, so it fell back and used the dso. Then when you deleted the .dso, it had no code at all to initialize the TSShapeConstructor. Hence, no animations.
I'd check your console.log for reports of a syntax error. As I said above, I'd guess it's in the file I where you create the TSShapeConstructor datablock for the player.
08/15/2006 (3:10 pm)
Given what you've described:a) The new animation for the sword attack doesn't show up
and
b) When you deleted the .dso's, your animation stopped working entirely
...I'd guess you have a syntax error in your 'player.cs' file (or whatever file you using to initialize the TSShapeConstructor datablock for the player). It didn't pick up the new animations the first time, due to the error, so it fell back and used the dso. Then when you deleted the .dso, it had no code at all to initialize the TSShapeConstructor. Hence, no animations.
I'd check your console.log for reports of a syntax error. As I said above, I'd guess it's in the file I where you create the TSShapeConstructor datablock for the player.
#7
Brian, I did a recompile through the Torsion IDE and the animations came back, except the attack animation that didn't work in the first place. If I remember correctly, when I looked in Torsion I didn't get any syntax errors, however that was a week ago and at the time of posting I've only just got home, so I will check that one later ;).
Cheers.
08/19/2006 (8:43 am)
Hello, I am back from holiday.Brian, I did a recompile through the Torsion IDE and the animations came back, except the attack animation that didn't work in the first place. If I remember correctly, when I looked in Torsion I didn't get any syntax errors, however that was a week ago and at the time of posting I've only just got home, so I will check that one later ;).
Cheers.
#8
In trying to remember my own troubles with the "setarmthread" error with that resource, i seem to recall that there was some confusion over the "lookde" and "h1root" animations. You HAVE to have an h1root for anything to work. Do you have one? Even just a file called h1root.dsq seemed to help.... If I am remembering correctly.
I remember something about lookde and h1root conflicting in code also....grrr. wish i could remember more specifically for you.
I'll try to rack my brain for more.... We did end up fixing the problem...
08/19/2006 (7:20 pm)
Have you scanned your console.log for errors? Usually, when my animations don't work, it will be listed in there with a reason why.In trying to remember my own troubles with the "setarmthread" error with that resource, i seem to recall that there was some confusion over the "lookde" and "h1root" animations. You HAVE to have an h1root for anything to work. Do you have one? Even just a file called h1root.dsq seemed to help.... If I am remembering correctly.
I remember something about lookde and h1root conflicting in code also....grrr. wish i could remember more specifically for you.
I'll try to rack my brain for more.... We did end up fixing the problem...
#9
In trying to remember my own troubles with the "setarmthread" error with that resource, i seem to recall that there was some confusion over the "lookde" and "h1root" animations. You HAVE to have an h1root for anything to work. Do you have one? Even just a file called h1root.dsq seemed to help.... If I am remembering correctly.
I remember something about lookde and h1root conflicting in code also....grrr. wish i could remember more specifically for you.
I'll try to rack my brain for more.... We did end up fixing the problem...
08/19/2006 (7:22 pm)
Have you scanned your console.log for errors? Usually, when my animations don't work, it will be listed in there with a reason why.In trying to remember my own troubles with the "setarmthread" error with that resource, i seem to recall that there was some confusion over the "lookde" and "h1root" animations. You HAVE to have an h1root for anything to work. Do you have one? Even just a file called h1root.dsq seemed to help.... If I am remembering correctly.
I remember something about lookde and h1root conflicting in code also....grrr. wish i could remember more specifically for you.
I'll try to rack my brain for more.... We did end up fixing the problem...
#10
[edit]
I have a player_h1root.dsq and player_lookde.dsq, but I assume you mean without the 'player_' part
08/20/2006 (2:42 am)
Alright, thanks for that, I'm gonna check that out, to see if it works, once this problem has been fully solved, I think I'll post it as a comment in the resource, so for future references.[edit]
I have a player_h1root.dsq and player_lookde.dsq, but I assume you mean without the 'player_' part
#11
My T script is knowledge low. I'm going to look through the resource page of it again, to see if people have had the same thing and have a solution. But I've pretty much done as much as my knowledge of Torque will take me.
Cheers in advance.
08/29/2006 (2:50 pm)
Has anyone solved this? Or have any idea? Torque didn't like me using the Realm Wars cs files, I tried differant models, but the same happens, so thats that solution gone.My T script is knowledge low. I'm going to look through the resource page of it again, to see if people have had the same thing and have a solution. But I've pretty much done as much as my knowledge of Torque will take me.
Cheers in advance.
#12
08/29/2006 (6:42 pm)
Sorry - been very busy - I'll review this for you tonite Musashi. The only concern I have is about the files you've sent me, in that I don't know where you want them to go, and I will need your 3d objects I guess as well. Please email me a description on how to get your scripts running on my machine.
#13
Would it be easier if I just sent the whole project? Saves time fussy how to get the code to work and then my problem, besides theres not much there I can get possesive of. ;)
08/30/2006 (3:31 am)
Cheers dude, I'll have to clear up something from my last edit, I think I didn't back up one of the files, so I'll have to sort that out.Would it be easier if I just sent the whole project? Saves time fussy how to get the code to work and then my problem, besides theres not much there I can get possesive of. ;)
#14
"Justin,
We had a crash when trying to play custom melee animations when calling: setArmThreadPlayOnce(%attack.seqName). Although the animations worked fine in the Show Tool.
The problem was that we didn't have an animation sequence named 'look'. While Josh's scripts have a field for a custom look animation, the engine is hardcoded to look for a sequence called 'look' when you use setArmThreadPlayOnce(). Without such a sequence you eventually crash when setArmThreadPlayOnce tries to access a null pointer. We just made a copy our root animation and called it look. Then we started swinging just fine."
09/21/2006 (9:47 am)
I don't know if you have solved your issue yet, but here is some info from a different thread that seems relevant:"Justin,
We had a crash when trying to play custom melee animations when calling: setArmThreadPlayOnce(%attack.seqName). Although the animations worked fine in the Show Tool.
The problem was that we didn't have an animation sequence named 'look'. While Josh's scripts have a field for a custom look animation, the engine is hardcoded to look for a sequence called 'look' when you use setArmThreadPlayOnce(). Without such a sequence you eventually crash when setArmThreadPlayOnce tries to access a null pointer. We just made a copy our root animation and called it look. Then we started swinging just fine."
Torque Owner Musashi
thanks.