SOLVED: Weapon Drop

msmalik681

OpenBOR Developer
Staff member
I have managed to setup a weapon and the enemy can pick it up but when they are hit they do not drop the weapon for another player/enemy to pick it up again am I missing something.

I was thinking I could have a damage script spawn the weapon when hit but this should be handled by the engine can anyone help ?
 
My weapon was already the last entry in the models.txt so that did not work for me  but thanks for the suggestion.

I did come across your old post when initially looking for a answer.
 
I found the solution just had to add the line "shootnum  -1" ("shootnum  0" does not work and obviously if it is a shooting weapon you should set it to the amount of ammo you want.) into the header of the weapon item.  it is not documented anywhere that this is a mandatory field to re-spawn the item but I guess it is good you have a option not to re-spawn the weapon I guess.

I will flag this up to ilu to update the manuals "Using Weapons" sections about this.
 
Looks like this only works if the enemy who picked up the weapon.  If the weapon was applied by script nothing will be dropped so now i am using a take damage script to drop the weapon.
 
Back
Top Bottom