Changes to play_sound?
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Changes to play_sound?
Hi I'm in the process of trying to debug my old mod conquest+ based on the original conquest, I am getting a missing file/macro error and references to PLAY_SOUND, looking at the macro reference it looks like this has changed but I can't see any clear instructions how to play a sound now, I want to convert the following to whatever the new format is, any ideas?
e.g.
this stuff is causing the errors I am seeing when trying to run the mod locally, thanks for any knowledge of the new way to play a sound...
e.g.
Code: Select all
#define BUILD_SOUND
{PLAY_SOUND ("staff.wav")}
{DELAY 100}
{PLAY_SOUND ("pincers.ogg")}
{DELAY 160}
{PLAY_SOUND ("sling.ogg")}
#enddef
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
Re: Changes to play_sound?
looks like this works, although I'm still testing...
#define BUILD_SOUND
[sound]
name="staff.wav"
immediate="yes"
[/sound]
[sound]
name="pincers.ogg"
immediate="yes"
[/sound]
[sound]
name="sling.ogg"
immediate="yes"
[/sound]
the delay macro looks deprecated so I just removed it
#define BUILD_SOUND
[sound]
name="staff.wav"
immediate="yes"
[/sound]
[sound]
name="pincers.ogg"
immediate="yes"
[/sound]
[sound]
name="sling.ogg"
immediate="yes"
[/sound]
the delay macro looks deprecated so I just removed it
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
Re: Changes to play_sound?
immediate=yes
does not mean anything in [sound] tags. It’s only used in [music], [set_global_variable], and [clear_global_variable].Also, the nonexistent DELAY macro that code referred was presumably (expected to be) defined as follows:
Code: Select all
#define DELAY TIME
[delay]
time={TIME}
[/delay]
#enddef
(Also, while this topic deals with sound effects, it doesn’t belong in Music & Sound Development because it’s about WML assistance and not about the actual music and sounds! Moved to WML Workshop.)
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.