Members | Sign In
All Forums > Mission Scripting
avatar

Play Sound only in Start tag?

posted Dec 11, 2011 20:42:23 by 5th_Wall_Gaming

<event Name="ActivateBorg">
<if_timer_finished name="ActivateBorg"/>
<if_variable name="Borg" comparator="=" value="0"/>
<set_variable name="Borg" value="1"/>
<create type="Enemy" x="50000" y="0" z="50000" name="BFD 39283-293"

eliteAIType="2" eliteAbilityBits="58" eliteAbilityState="1"/>
<play_sound_now filename="ActivateBorg.wav"/>
</event>

The following gives a crash error. When I remove the play_sound command, it works.

With additional testing, it appears that play_sound can only be played in the start tag. If it's not in the start tag, it crashes.
http://www.5thWallGaming.com
We make dreams reality
page   1
11 replies
avatar
ThomRobertson said Dec 11, 2011 20:54:23
First off, are you sure that ActivateBorg.wav is a mono sound and not stereo? I fixed this problem on my version, but not on the version you have.

If that's not the case, could you e-mail me the sound?
Creator of Artemis
avatar
5th_Wall_Gaming said Dec 12, 2011 15:37:39
Email sent. :)

Also, I'm finding that I play a sound file in the start loop, when I changed the file to a comm incoming message, it would show up without an error, but not make a sound when I clicked play. Remove the play in the start and it worked fine.
http://www.5thWallGaming.com
We make dreams reality
avatar
Mike_Substelny said Dec 12, 2011 21:00:32
Where is the sound ActivateBorg.wav located? You have nopt specified a path, so if you don't have it in the folder with the mission it will cause a crash.
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
avatar
5th_Wall_Gaming said Dec 12, 2011 21:12:34
All sound is in the same directory. In the mission directory.
http://www.5thWallGaming.com
We make dreams reality
avatar
Mike_Substelny said Dec 12, 2011 21:29:59
The behavior is definitely what you would see if the program failed to find the sound. I recommend experimenting by using a WAV file that you know works. For example, tractor.wav comes with Artemis and definitely works. Put a copy of tractor.wav in your mission folder and make sure your script can get it to play at the right moment.
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
avatar
edmundrw said Dec 13, 2011 17:16:04
Activate Borg, eh? Is there any point in resisting?
avatar
5th_Wall_Gaming said Dec 13, 2011 17:17:43
I used a copy of a known working wav. Same issue.

and yes. I'm using some sounds from the Borg for some "Oh Fuck" moments. :)
http://www.5thWallGaming.com
We make dreams reality
avatar
Mike_Substelny said Dec 13, 2011 18:56:50
That means the script is not finding the wav file. Put the path into your script. Something like this:

<play_sound_now filename="Dat/missions/MISS_Borg/ActivateBorg.wav"/>
</event>

I bet that fixes the problem.
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
avatar
5th_Wall_Gaming said Dec 13, 2011 19:22:01
Tried that. Now crashes as soon as the script loads.
http://www.5thWallGaming.com
We make dreams reality
avatar
Mike_Substelny said Dec 13, 2011 19:27:50
5th Wall, take a look at my script "The Pegasus Passage." I use a lot of play_sound_now commands in that.
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
avatar
5th_Wall_Gaming said Dec 13, 2011 19:34:52
I'm doing it right. I swear I am. The file just does not want to play.
http://www.5thWallGaming.com
We make dreams reality
Login below to reply: