Solved "Behind the curtains" weapon drop and pick up help.

Question that is answered or resolved.

PS_VITA

Active member
Hi,


So I've included a feature that with a press of a button the player can drop a wepon and if he chooses he can pick it up as well. Now, I noticed that every time I drop a weapon via using the weapon drop button (not getting hit) the engine puts that weapon in a hardcoded z position but in reality it's creating multiple versions of that same weapon item, so if the player was to pick and drop the weapon over and over, he could literally create a billion.

My question is, how can I control how many weapons are being created "behind the curtains"
Typically a baseball bat will be spawned and needed 3 times on stage , so having a limit of say 5 baseball bats would be nice.
 
Solution
The native system does not create multiple items like that. You are doing something to break the information chain it uses to track who dropped objects belong to. We need to see your text and or scripts. If I were to guess, I imagine you are spawning/picking up a weapon, but not populating the entity's weapon item property. I wrote about all of this in detail already:

The native system does not create multiple items like that. You are doing something to break the information chain it uses to track who dropped objects belong to. We need to see your text and or scripts. If I were to guess, I imagine you are spawning/picking up a weapon, but not populating the entity's weapon item property. I wrote about all of this in detail already:

 
Solution
If I were to guess, I imagine you are spawning/picking up a weapon, but not populating the entity's weapon item property. I wrote about all of this in detail already:

Thanks @DCurrent ,
This is exactly what I was doing wrong, I'm marking this as solved because I just need to rework my attempt at dropping and picking up an item and I have enough info to do it now.
 
Back
Top Bottom