Quote:
- So now I want weaponboxes to keep that glow even when a player picks it up and drops it, so I hook FM_SetModel and retrieve pev_iuser2, get the color that we set before on the weaponbox and set it again. But unfortunately none of the IDs in FM_SetModel match the IDs of the weaponboxes that I create, as you can see in the debug log.
EDIT: FM_SetModel apparently isn't the right event to do this, but what else can I use?
|
Now I get it. What you don't know is that once a weaponbox is picked up that box is gone and the next time you drop the weapon a new weaponbox is being created. The only thing that remains the same is the weapon entity.
What you can do is when the player will touch the weaponbox apply the same flag from pev_iuser2 to the weapon entity. Next, when player tries to drop check if the item that's being dropped contains the pev_iuser2 flag and if that's true apply the flag to the new weaponbox.
__________________