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.

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

About the author
#2
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.
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.
#4
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.
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.
#6
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.
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
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.
08/21/2004 (11:13 pm)
Why do i have a feeling I know who you are Tim... anywaysthese 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
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
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
Torque 3D Owner Billy L