Jump to content

Scripting error


Recommended Posts

Hello all, so I have added a weapon to the game which I wanted to have a custom sound to play whilst it's reloading, so I added this via a script (I'm terrible at scripting)

I got a sound to play upon the reload, however the sound keeps looping over itself playing constantly until the reload is done, I only want the sound to play once. Could somebody look at my script and help me out?

 

____________________________________________________

scn PingerSoundeffect
begin ScriptEffectUpdate
ref rContainer
set rContainer to GetSelf
Playsound WPNPingerReload
endif
end
_____________________________________________________

Thank you for reading
Link to comment
Share on other sites

Use ScriptEffectStart instead of ScriptEffectUpdate. A ScriptEffectStart block runs exactly once. Whereas ScriptEffectUpdate runs once every frame that the effect is active.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...