Weapons state handling
by Lucus · in Technical Issues · 08/31/2008 (11:47 am) · 1 replies
Hello,
I have a few big errors with the weapons mod pack and script. I sent a e-mail to the developers to try and resolve the issue and its been about a month without a response so hopefully some one can help me here!
OK so the problem.
The problem happens when I pick up ammo for the weapon that is not mounted.
example:
I have a m16 mounted and it runs out of ammo so I switch to the rocket launcher.
When I pick up ammo for the m16 and the rocket launcher is mounted and then switch back to the m16 the weapon fires 1 shot and then reloads. If the ammo is suppose to be 50 the ammo value becomes 49 and screws up my clip count. My best guess is that the state machine code from the weapopnImage datablock is messed up.
I tried to reproduce the error with the script from the crossbow and m16 from the solder kit but both weapons worked fine. I think the problem comes from how the script is written and generated from the mod pack.
If you know of any good tutorials or documentation that would help me understand how the weapon state machine code worked that would be great.
Lucus
you can e-mail at lcp320@hotmail.com and I can show you the code.
I have a few big errors with the weapons mod pack and script. I sent a e-mail to the developers to try and resolve the issue and its been about a month without a response so hopefully some one can help me here!
OK so the problem.
The problem happens when I pick up ammo for the weapon that is not mounted.
example:
I have a m16 mounted and it runs out of ammo so I switch to the rocket launcher.
When I pick up ammo for the m16 and the rocket launcher is mounted and then switch back to the m16 the weapon fires 1 shot and then reloads. If the ammo is suppose to be 50 the ammo value becomes 49 and screws up my clip count. My best guess is that the state machine code from the weapopnImage datablock is messed up.
I tried to reproduce the error with the script from the crossbow and m16 from the solder kit but both weapons worked fine. I think the problem comes from how the script is written and generated from the mod pack.
If you know of any good tutorials or documentation that would help me understand how the weapon state machine code worked that would be great.
Lucus
you can e-mail at lcp320@hotmail.com and I can show you the code.
About the author
Torque Owner Andy Rollins
ZDay Game
Another annoying feature for me is that they tied the clip size to the Weapon Image and the editor creates a seperate image for each rate of fire (single, burst, full auto).. so you'll find if you have a clip size of 50 fire a few shots in single shot mode to take it to say 46 bullets and then switch modes it'll jump back to 50!!!
To be totally honest you're best throwing away their code and developing your own or using a resource on here.. you'll find a number of other problems in this pack too. One resource I found was the following:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2225
I've not used it but it might help you understand what you need to do.