• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Sound and cinematic speaking:

Status
Not open for further replies.
Level 8
Joined
Feb 20, 2007
Messages
338
  • Sound - Set volume of WispReady1 <gen> to 100.00%
  • Cinematic - Send transmission to Player Group - Player 9 (Gray) from a Player 4 (Purple) Earth Spirit Heal named Earth Spirit at (Position of Earth Spirit Heal 0058 <gen>): Play WispReady1 <gen> and display ...(Musical tones u.... Modify duration: Add 4.00 seconds and Wait
Why is the WispReady1 not playing?

Is there something else I have to do to set up the sound in order for it to play during cinematics?
 
Level 8
Joined
Feb 20, 2007
Messages
338
Well you must make a trigger which says:
play sound/music - WispReady1 <gen>

You must make a variable of this, named WispReady1 and hit the type of file as music/sound data. Then try the whole thing again.

So the cinematic command to play sound is not enough?

And just having Wispready1 as a usable sound is not enough I also have to make a variable for it?

Odd.

I'll give it a go and see what happens.

Cheers
 
Level 8
Joined
Feb 20, 2007
Messages
338
That was a no go.

I also have
  • Sound - Play Night Elf Defeat
as part of this trigger. I also have sound playing in a few regions, one being the water fall loop for a rushing stream of water falls, the other being BattleNetWindSteroLoop1 - these two are tied into regions and only play when the camera is within viewing range of the region. Could those be stopping my cinematic wisp sound?

It is a lapsed time event (0.5 seconds) being the first cinematic sequence of the map. So it is not an issue of Map initialization.
 
Simply setting the volume isn't enough because it wasn't started in the first place. Play Sound is used to start the sound, and automatically kills the sound when done. If you read the JASS of PlaySoundBJ function, you'll notice it starts the sound and kills the sound when done.

The sound does not need to be set as a variable. It just adds more lines. First, open the sound editor. Right-click the sound you would like to use, and click "Use as Sound". Then right-click it or double-click it (I forgot which) so that options come up. Then uncheck "3D Sound" part. As well as the one below it (Something like play sound when nearby or something such as that) unless it already becomes grayed out.

Now open the trigger editor, and use "play sound".

Why the sound doesn't need to be set to a variable:

I bet more than half the people in the GUI coding area don't know what <gen> means. Well, now you can know!

<gen> = Generated

If you convert a trigger to JASS, you'll notice in the initialization function, it reads "gg_" before the trigger name. This is what the <gen> means.

gg_ stands for Generated Global

As the world editor parses the code, it generates the global. The only thing that is required is the type after the underscore in "gg"... Well, the acronym in most cases.

Generating globals is fast and easy, but you need "gg_type_name" as the layout of it each time it is used.

So <gen> generates the sound variable. When the sound is used in the sound editor, it creates that as a generated global. Thus, it is a variable itself so it does not need to be set to a variable. It is basically setting a variable to a variable.

I hope this not only helps you, Wraith, but other people out there too. :thumbs_up:
 
Level 8
Joined
Feb 20, 2007
Messages
338
Simply setting the volume isn't enough because it wasn't started in the first place. Play Sound is used to start the sound, and automatically kills the sound when done. If you read the JASS of PlaySoundBJ function, you'll notice it starts the sound and kills the sound when done.

The sound does not need to be set as a variable. It just adds more lines. First, open the sound editor. Right-click the sound you would like to use, and click "Use as Sound". Then right-click it or double-click it (I forgot which) so that options come up. Then uncheck "3D Sound" part. As well as the one below it (Something like play sound when nearby or something such as that) unless it already becomes grayed out.

Now open the trigger editor, and use "play sound".

Why the sound doesn't need to be set to a variable:

I bet more than half the people in the GUI coding area don't know what <gen> means. Well, now you can know!

<gen> = Generated

If you convert a trigger to JASS, you'll notice in the initialization function, it reads "gg_" before the trigger name. This is what the <gen> means.

gg_ stands for Generated Global

As the world editor parses the code, it generates the global. The only thing that is required is the type after the underscore in "gg"... Well, the acronym in most cases.

Generating globals is fast and easy, but you need "gg_type_name" as the layout of it each time it is used.

So <gen> generates the sound variable. When the sound is used in the sound editor, it creates that as a generated global. Thus, it is a variable itself so it does not need to be set to a variable. It is basically setting a variable to a variable.

I hope this not only helps you, Wraith, but other people out there too. :thumbs_up:

Yes I am using WispReady1 as a sound, I went to the sound editor and transfered it over to used sounds that is why it is able to be "played" in the cinematic message trigger function.

I am using it in the cinematic message line:

Cinematic - Send transmission to Player Group - Player 9 (Gray) from a Player 4 (Purple) Earth Spirit Heal named Earth Spirit at (Position of Earth Spirit Heal 0058 <gen>): Play WispReady1 <gen> and display ...(Musical tones u.... Modify duration: Add 4.00 seconds and Wait


This way when the Wisp 'Speaks' (Called Earth Spirit in this story) I wanted to have the musical sound that wisps make. This particular map will have the wisp speak a lot. The story hinges on the fact that the protagonist (Oraen) is human and doesn't speak elfish/wispish language.

Are you saying that I need to play sound in the cinematic and play sound with another trigger function sort of like this:

  • Sound - Play WispReady1 <gen>
  • Cinematic - Send transmission to Player Group - Player 9 (Gray) from a Player 4 (Purple) Earth Spirit Heal named Earth Spirit at (Position of Earth Spirit Heal 0058 <gen>): [COLOR="DarkRed"]Play WispReady1 <gen> [/COLOR]and display ...(Musical tones u.... Modify duration: Add 4.00 seconds and Wait
???

Or is there something fundamentally wrong with my cinematic transmission?
 
Status
Not open for further replies.
Top