Hey guys, Im using 2.49b and i used this bullethole script but i cannot get the ammo system to work, Thank You!
[ATTACH=CONFIG]144976[/ATTACH]
its best to give a little more info
I suggest that you somehow link the firing script and the bullethole script, it would make applying the constraints a lot easier.
Disregarding that:
Create a property called “ammo”
add “and ammo > 0” to the “if fire.positive” line
This assumes that you are changing the value of ammo in your firing script.
I can’t imagine why a “bullethole” script would look for ammo.
It has nothing to do with it. All it does is placing an object at the end of a ray. You need to define when to execute it.
Ammo belongs to firing, which is discussed a lot in this forum. Infinite’s post should help you already.
You should not mix this two things together, or you get a unmanagable logic.
Actually, all you do is create a system whereby if you have ammo, a variable is set to true, otherwise false.