Chapter 5 Crossbow Collision Problem
by Stefan Caplat · in Torque Game Engine · 09/14/2005 (10:38 pm) · 3 replies
Ok so After debugging and writing this chapter for the past three days, I now have Emaga 5 running but the Avatar is unable to grab the crossbow.
Also I get this message in console.log
Compiling control/server/weapons/crossbow.cs...
Loading compiled script control/server/weapons/crossbow.cs.
Error: shape control/data/models/weapons/boltclip.dts-collision detail 0 (Collision-3) bounds box invalid!
Anybody know what I can do about this, I even tried the CD's crossbow.cs, and got the same message.
I'm gonna try swapping weapon and player.cs to see if the problem is there but if anybody else has encountered this please help.
Thanks
Also I get this message in console.log
Compiling control/server/weapons/crossbow.cs...
Loading compiled script control/server/weapons/crossbow.cs.
Error: shape control/data/models/weapons/boltclip.dts-collision detail 0 (Collision-3) bounds box invalid!
Anybody know what I can do about this, I even tried the CD's crossbow.cs, and got the same message.
I'm gonna try swapping weapon and player.cs to see if the problem is there but if anybody else has encountered this please help.
Thanks
About the author
#2
So a lesson has been taught to me and should this be an example to many that a lot of the mistakes we make in this book will be typos and completly missing entire functions statements etc. because if you sit there and type this whole thing out, your eyes can so easily wander to the wrong line if you've been doing it too long.
I'm just glad I got passed this. Thanks to Billy L for pointing out the collision on the bolt clip.
Chapter 5 works, so keep at it.
09/19/2005 (4:11 am)
Ok so after a few days of resting from trying to figure out my problem, i copied the CH5 folder from the cd directly to drive C: and ran it. I didn't even change the folder name. I ran Emaga 5 from the folder and it ran 100% as it should. Then I ran mine and still nothing, so with my gut feeling that i had I backed up all three files in control/server/players folder and copied the chapter 5 ones over. Then i ran Emaga 5 from my folder. It worked. Then I copied over my player.cs back over. This time the collision wouldn't work. It seems that in Player.cs I mistyped onCollision as onCollission and I missed an entire if statement.So a lesson has been taught to me and should this be an example to many that a lot of the mistakes we make in this book will be typos and completly missing entire functions statements etc. because if you sit there and type this whole thing out, your eyes can so easily wander to the wrong line if you've been doing it too long.
I'm just glad I got passed this. Thanks to Billy L for pointing out the collision on the bolt clip.
Chapter 5 works, so keep at it.
#3
09/20/2005 (9:09 am)
You are soooo right Stefan. I too had made a lot of type o's when trying to type in the code from the book. One benefit though would be the experience gained at debugging, which you will do a lot of anyway in the course of programming a game. Sometimes though you just have to copy the code from the CD and see where you went wrong. Problems like this will get easier to solve as you become more familiar with debugging the code using the console.log file.
Torque 3D Owner Billy L