AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Rocket sound (https://forums.alliedmods.net/showthread.php?t=287116)

Walgrim 09-01-2016 08:23

Rocket sound
 
Hey !
I want to know if it's possible to get the rocket sound and add a sound on it, like a sound following the rocket (and stop it when the rocket explode), is this even possible?

KissLick 09-01-2016 12:44

Re: Rocket sound
 
I would
  1. hook rocket entity creation (sdkhooks)
  2. emit the sound you desire
  3. add the entity index to global adt array
  4. hook rocket entity destruction (sdkhooks)
    1. check if the destroyed entity is in our global array
      1. stop emitting your sound
      2. remove the entity from global array


You can emit and stop sound with
  • sound emit function + stop sound function // I am not sure how well this works
  • create sound entity and then destroy it

Walgrim 09-01-2016 13:23

Re: Rocket sound
 
Ok thanks for your reply ! I will try this :D


All times are GMT -4. The time now is 02:32.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.