Game Development Community

New weapon, Need Help

by Timothy Downs · in General Discussion · 08/04/2004 (6:41 pm) · 9 replies

I have been designing a new ranged weapon so I was wondering if I could use the pre-existing crossbow script and just modify it? WelI have tried it and I get this error:

Cannot re-declare data block cocoCannon with a different class.

Please help.
www.timothyadowns.com/cocoCannon.jpg

#1
08/05/2004 (4:59 am)
Have you changed the classnames on imagedata and shapebaseimagedata ?
#2
08/05/2004 (7:45 am)
No, but just I tried that and it cancels out the original crossbow so I can't start with it. I have weapon in the map as a pickup item right now for testing.

I have tried these things:
Taking the crossbow out of startup
Setting the weapon as the starting primary
Changing names of weapon files

I have a few more things I might try other than that I am stumped.
#3
08/05/2004 (4:48 pm)
Can you send up the weapon script?
Or send it to me by mail ?
#4
08/05/2004 (8:15 pm)
Sure I can send you the script. I'll send it along with now buggy but working one tomorrow and any needed files in a zip.

I got it to work using a pre-existing modified script for the crossbow I had, but it was ghosting the crossbow shape in the inventory.
#5
08/09/2004 (11:37 pm)
Have you guys, worked out this issue?

Or do you need some help?
#6
08/13/2004 (5:43 pm)
This issue is not fully resolved but I think it could be that I need to list out some nodes in the intial shape file so that it can work properly but I am not quite sure how the nodes need to be listed for the shape because it is exported from milkshape.

The shape has no animations as far as a string and bolt sequence like the crossbow. So it is possible that some of the script needs to be modified so that it will not call on those animations so that it will be able to compile properly.

When I tested it compiling without a previous pre-compiled file, it does not compile. This happens I because I have used a previous modified script that I don't need anymore.
#7
08/18/2004 (2:30 am)
Can you post the compiler error?
#8
08/21/2004 (11:13 pm)
Why do i have a feeling I know who you are Tim... anyways

these things:
stateSequence[4] = "Reload";

In the weapon image datablock calls the sequence to be played, so just remove those lines and the sequence wont be played.

The image in the inventory would always be crossbow because its just a image file put there. Its not dynamically generated or anything, so no worries...

A note about the "cannot redeclare..." error, basically it happens when you first assign a datablock with the name cocoCannon (lets say the datablock was an item datablock), and then you assign the name cocoCannon for another datablock (lets say the weapon image). This would cause evil bad things to happen. so if that's the case change the name for one of the conflicting DBs.
#9
07/06/2007 (10:52 pm)
Hi ,
I create a new weapon .. just take a modl in 3ds max of m249 of counter strike and
export as weapon to Torque , I create a animation when the weapon fire ,
but I cant put in the game , I cant find anyfigh of dsq in the crossbow script..
any body knows how change the animation?
Thanks