About: PlaySound   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

this command was added WAY back in LU04 to help UI modders test the recent addition of the ability to mod the sound effects in the game also. Added "/playsound " which plays 2d sounds locally. this means it only plays on your speakers, and the 2d part means since it isnt being generated from a 3d world object, it has no distance or direction, so it plays at full volume as if it was right in front of you.

AttributesValues
rdfs:label
  • PlaySound
  • Playsound
rdfs:comment
  • this command was added WAY back in LU04 to help UI modders test the recent addition of the ability to mod the sound effects in the game also. Added "/playsound " which plays 2d sounds locally. this means it only plays on your speakers, and the 2d part means since it isnt being generated from a 3d world object, it has no distance or direction, so it plays at full volume as if it was right in front of you.
  • function PlaySound (string sSoundName, int nMode = 0, float fDelay = 0.0) Play sSoundName * sSoundName: TBD - SS - * nMode: 0 - chat, 1 - 2d sound This will play a mono sound from the location of the object running the command. * Return type: void * Include file: nwscriptdefn
  • PlaySound does not play while you have an action enqueued. Any action at all. For example, if you have three actions enqueued it will wait for all three to end before it executes. If you're trying to play a battlecry or one of the "I am attacking you" grunts, I suggest you use PlayVoiceChat. Unlike PlaySound, PlayVoiceChat will execute its sound for a PC no matter what they're doing. P.S.: Best to create sound_ninja at the location of your target for those of us with 3d sound.
  • The PlaySound() NWScript command causes a monophonic sound resource — identified by its ResRef as a string — to be played from the location of the object running the command (OBJECT_SELF). This can be assigned with <a href="/mediawiki/AssignCommand" title="AssignCommand">AssignCommand</a>() if a different object than the one running the script is supposed to play the sound.
dcterms:subject
dbkwik:nwn2/proper...iPageUsesTemplate
returns
Name
  • PlaySound
param
  • string sSoundName
param1desc
  • The ResRef of the sound resource to play.
dbkwik:nwn/property/wikiPageUsesTemplate
abstract
  • The PlaySound() NWScript command causes a monophonic sound resource — identified by its ResRef as a string — to be played from the location of the object running the command (OBJECT_SELF). This can be assigned with <a href="/mediawiki/AssignCommand" title="AssignCommand">AssignCommand</a>() if a different object than the one running the script is supposed to play the sound. Monophonic sounds include many sounds heard while playing Neverwinter Nights, but they do exclude background music. They are also distinct from sound objects; sound objects are placed via the Toolset and serve as containers for sound resources, potentially many sound resources per sound object. For sounds that repeat or are used often in the same location, a sound object is likely more appropriate. PlaySound() is more for one-shot sounds, particularly those that are supposed to emanate from a visible object.
  • this command was added WAY back in LU04 to help UI modders test the recent addition of the ability to mod the sound effects in the game also. Added "/playsound " which plays 2d sounds locally. this means it only plays on your speakers, and the 2d part means since it isnt being generated from a 3d world object, it has no distance or direction, so it plays at full volume as if it was right in front of you.
  • PlaySound does not play while you have an action enqueued. Any action at all. For example, if you have three actions enqueued it will wait for all three to end before it executes. If you're trying to play a battlecry or one of the "I am attacking you" grunts, I suggest you use PlayVoiceChat. Unlike PlaySound, PlayVoiceChat will execute its sound for a PC no matter what they're doing. However, if PlayVoiceChat doesn't have what you're looking for and you absolutely must play your sound simultaneously with enqueued actions there is a workaround. In the toolset create a creature. We'll call it sound_ninja. For good form set sound_ninja's appearance to something like an Air Elemental or Will-o-the-Wisp (InvisibleMan ironically, seems to be laden with bugs so don't use it). Then go down to the behavior tab. Set 'Disable AI While Hidden' to False and 'Script Hidden' to True. Next, remove all of sound_ninja's default scripts and create your own script in the 'On Spawn In Script' slot. In that script run PlaySound for your sound and DestroyObject shortly after on sound_ninja. It is in this script that you want to think about DelayCommand if you need to use it. Instead of running PlaySound, run CreateObject in a wrapper and create sound_ninja at the part in your script where you want the sound run. Like a good little ninja, sound_ninja will be completely invisible, untargetable, execute his duty, and then kill himself out of sight without anyone ever being the wiser. Always destroy the creature that runs the sound as creatures tend to be more memory intensive than most other things. It will look exactly like your sound had played and you don't have to fret about the action queue. P.S.: Best to create sound_ninja at the location of your target for those of us with 3d sound.
  • function PlaySound (string sSoundName, int nMode = 0, float fDelay = 0.0) Play sSoundName * sSoundName: TBD - SS - * nMode: 0 - chat, 1 - 2d sound This will play a mono sound from the location of the object running the command. * Return type: void * Include file: nwscriptdefn
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software