Clocks cans you help
by Anthony Rosenbaum · in Torque Game Engine · 10/25/2001 (6:14 am) · 8 replies
when I spawn my wepaon it won't attach, and if I spawn the default rifle it won't shoot?!?!?! I have a big long post about it called "adding new weapon to dev stable" I 'm asking you cause you seem confident in adding wepons?!?! can you help?
Anthony
Anthony
About the author
#2
10/25/2001 (6:32 am)
do you ever use the "command to server" with the console to spawn items. . . BTW I had forgotten the inv list . . .silly me
#3
10/25/2001 (6:37 am)
I got it to attach but it won't fire?!?!?!
#4
Does the console write anything after you try to fire?
// Clocks out
10/25/2001 (6:41 am)
No I never use the "command to server".Does the console write anything after you try to fire?
// Clocks out
#5
YEAH . . .say isn't there a what to set an ammo amount when you pick up a weapon?!?!?! anyway thanks for the help with the inv list Anthony
10/25/2001 (6:41 am)
im stupid . . .I forgot to spawn ammo . . .WORKS NOW YEAH . . .say isn't there a what to set an ammo amount when you pick up a weapon?!?!?! anyway thanks for the help with the inv list Anthony
#6
maxInventory = 30;
This sets the amount of ammo in the ammo your pick up.
The number ste in player.cs inventory are the max amount of ammo you can have for that type.
// Clocks out.
10/25/2001 (7:22 am)
In your weaponname.cs under Ammo you will a line like this:maxInventory = 30;
This sets the amount of ammo in the ammo your pick up.
The number ste in player.cs inventory are the max amount of ammo you can have for that type.
// Clocks out.
#7
Anthony
10/25/2001 (7:28 am)
yeah I had that I think cause I wasn't "picking it up" but having it spawing in my hand that the variable was been ignored . . .BTW have you or is there a code to throw the current weapon to the ground?Anthony
#8
I haven't really tried either :)
But I think that there is a onThrow function somewhere, maybe in items.cs
// Clocks out
10/25/2001 (7:45 am)
No Im haven't gotten the throw function to work yet.I haven't really tried either :)
But I think that there is a onThrow function somewhere, maybe in items.cs
// Clocks out
Torque Owner Karsten "Clocks" Viese
The way I do it is make the weaponname.dts and the weaponname.cs.
Make ammo, projectile, particles, etc...
Then add it to the player.cs inventorylist.
And to the game.cs exes part.
Then I go into the editor and add the weapons on the ground along with some ammo.
Save the mission and restart it.
Then I walk over the weapons and ammo and it works.
I don't have any weapons when the player spawn at the moment as I going to have the weapons restricted to certain classes later according to weight, etc....
So for now they are just added to the mission file.
// Clocks out