Is there any way to get the ID of the sprite that is playing the sound from within EVENT_SOUND (when applicable)?
RETURN is the sound #, sprite ID would seem like a natural fit for THISACTOR in the event. My apologies if this has already been implemented, I'm not in a position to check right now.
Without any context for the sound, the event is not nearly as useful as it could be.
Page 1 of 1
EVENT_SOUND "need sprite ID"
#1 Posted 25 July 2018 - 03:34 PM
#2 Posted 25 July 2018 - 04:20 PM
THISACTOR in EVENT_SOUND is the sprite from which the sound is being played. For sound, that's the sprite that called it. For globalsound, that's the player regardless of which actor called it. For screensound, it is arbitrarily also the player.
Note that EVENT_SOUND must not be used for any game logic.
Note that EVENT_SOUND must not be used for any game logic.
#3 Posted 25 July 2018 - 05:23 PM
Hendricks266, on 25 July 2018 - 04:20 PM, said:
THISACTOR in EVENT_SOUND is the sprite from which the sound is being played. For sound, that's the sprite that called it. For globalsound, that's the player regardless of which actor called it. For screensound, it is arbitrarily also the player.
Note that EVENT_SOUND must not be used for any game logic.
Note that EVENT_SOUND must not be used for any game logic.
Thanks, I should have noticed those facts earlier. I'm only using the event to stop sounds and/or play a different sound instead, so no worries about gameplay.
#4 Posted 25 July 2018 - 06:00 PM
Hey TD. I was going to try using this event to replace a sound only when in the menu, title screen,etc... not while in the game.
Example, during the title screen I want the explosion sound to play something different. How do I detect that the player is at some menu or loading and not in the game so the new sound plays?
Example, during the title screen I want the explosion sound to play something different. How do I detect that the player is at some menu or loading and not in the game so the new sound plays?
#6 Posted 25 July 2018 - 06:04 PM
Thanks. Will that include the opening title screen too. To be specific I want to replace the 3 explosion sounds when the Duke Nukem and Atomic logos pop in so its technically before the menu starts.
This post has been edited by Mark.: 25 July 2018 - 06:12 PM
Share this topic:
Page 1 of 1