Jeffrey "botman" Broome wrote:
Raiko wrote:
Hello all,
I'm wondering how I can create a weapon that is thrown at enemies to do damage. However, I want the weapon to stay active in game so it can be picked up and be thrown again.
How would I go about doing this?
Have 2 different states for the weapon (with separate Think and Touch functions).
When the weapon is thrown, it's in the "FlyingThroughTheAir" state and you would have a FlyingThink() and FlyingTouch() state. If the weapon hits someone in this state, do damage to them.
When the weapon hits the ground and comes to rest, change to the "RestingOnTheGround" state (with RestingThink and RestingTouch). These would do the same stuff a current weapon Touch function does (gives the weapon to the toucher).
-- Jeffrey "botman" Broome
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Would I need to create a second entity (a la Crossbow Bolt) to do this? Meaning, would I have to make the weapon "fire" this entity to do damage and then be deleted and remade as a weapon that can be picked up? Is that what you mean?
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

