User Tools

Site Tools


prpl:playsound

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
prpl:playsound [2016/12/02 23:33] – external edit 127.0.0.1prpl:playsound [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 1: Line 1:
 <- [[.:prplreference| PRPL reference]] <- [[.:prplreference#everything_else_2|Everything Else 2]] <- [[.:prplreference| PRPL reference]] <- [[.:prplreference#everything_else_2|Everything Else 2]]
  
-=====  PLAYSOUND  =====+=====  PlaySound  =====
  
 ^Arguments^Result^Notation^ ^Arguments^Result^Notation^
-| | | [ - ] |+string none | [ s1 - ] |
  
  
 === Description === === Description ===
 +
 +Plays the sound effect ''s1'' from a predefined set of sounds. The stock sounds available are identical to those in Creeper World 3 (see CRPL's [[crpl:docs:playsound|PlaySound]] for the list), excluding CW3's unit-specific sounds. Note that unlike in CRPL, these names **are** case-sensitive.
 +
 +Two additional sounds are available in Particle Fleet: ''"JumpIn"'' and ''"JumpOut"''. More may become available in the future.
 +
 +
  
 === Examples === === Examples ===
 +<code prpl>
 +# Play the sound "Misc8" every time the spacebar is pressed
 +if("Space" GetKeyDown)
 +    PlaySound("Misc8")
 +endif
 +</code>
 <code> CustomSounds.Play(GetStringFromStack());  <code> CustomSounds.Play(GetStringFromStack()); 
    
 </code> </code>
  
prpl/playsound.1480721636.txt.gz · Last modified: 2025/02/14 14:56 (external edit)