I have an entity that I want to play a sound when it is used, but I want the sound to only play once at all, or to only play once when you hold it down
Code:
[CODE]function ENT:Use(activator, caller)
-- Whenever a player uses the entity
self:SetMoveType(MOVETYPE_NONE)
self:SetCollisionGroup(COLLISION_GROUP_PASSABLE_DOOR)
sound.Play("UI/buttonclick.wav", self:GetPos(), 75, 100)[/CODE]
Thank you, Endus322
Put
[code]
self:SetUseType(SIMPLE_USE)
[/code]
inside ENT:Initialize.
Sorry, you need to Log In to post a reply to this thread.