Game Development Community

Defining crossbow ammo

by J Sears · in Torque Game Engine · 06/25/2006 (4:43 pm) · 2 replies

I am new with this and was trying to incoporate the rocket_launcher from the codewarrior tutorials into the main game (after getting it into the tutorials ok) the difference is the main game defines the ammo and limits so I was searching for where CrossbowAmmo from the crossbow.cs file is originally defined. it's listed twice in that file one in a function that pretty much defines the whole thing and one under the crossbow for what it uses to fire. I tried copying that all exactly but changing all the words for rocket ammo and it said it couldn't find it, so I figure CrossbowAmmo must be defined in another file first, I have been searching all the files for the words CrossbowAmmo and have been coming up blank can anyone help me? thank you

J

#1
06/25/2006 (5:36 pm)
It's listed in 2 other files.
server/scripts/aiPlayer.cs (line 239)
server/scripts/game.cs (line 306)

You also need to check out the common folder files. It's most likely set there too.
#2
06/26/2006 (4:28 pm)
Thank you for the help, turned out it was a whole different function that was called by crossbow::onfire at one point that I didn't notice and would never have thought it connected to the inventory unless the comments mentioned it