Need help?
Create a topic in the appropriate section
Don't write everything in the chat!Take a look at the marketplace
There you can buy
everything related to game serversDon't want a ban?
Please read our rules
Don't disturb the order!Sell or buy?
Use services of the guarantor
We will make your deal safe



- 0
-
Our picks
Проблема такова, сделал ловушку, всё для неё прописал, далее, требуется добавить звук Именно на клиенте после срабатывания ловушки.
Ловушка работает по такому принципу: 1) Ловушку разместили. 2)Задели тригер, она сработала.
Кусок кода
всё ли делаю правильно ?
class Tripwire_RGD5 extends TrapBase { private EffectSound m_Sound = NULL; private string m_SoundSetType = "Serdce_SoundSet"; override void OnSteppedOn(EntityAI victim) { if ( GetGame().IsClient() || !GetGame().IsMultiplayer()) { if ( GetGame().GetPlayer() ) { PlaySoundHeart(); } } } void PlaySoundHeart() { if ( GetGame().IsClient() || !GetGame().IsMultiplayer() ) { m_Sound = SEffectManager.PlaySoundOnObject( m_SoundSetType, this, 0, 0, true); m_Sound.SetSoundAutodestroy( true ); } } }
Share this post
Link to post
Share on other sites