Main Page
News
History
Limitations
Graphics
Music
Levels
Gameplay
Now Browsing
Links
Download

PlaySound

        PLAYSOUND                EffectNumber

Args:

  • EffectNumber: 1. shooting sfx; 2. explosion; 3. ting!
  • This function taps directly into the sound system (TED on the Plus/4) and lets you play a sound effect. The value passed is loaded in the to accumulator (A register) whereby it then calls PlaySFX. There are currently only 3 sound effects on the Plus/4. Shooting, Explosions and a Ting! for when you pick up a coin.


    Example: coin, coin!

    Coin falls after an explosion:

    FallingPath_BigCoin:
            DRIFT 0                                ; cancel any drift
            PLAYSOUND 1                    ; play BOOM sound effect
            SETANIM BoomAnim           ;  set animation
            PAUSE 1+6*2                       ; wait for animation to finish
            SETANIM CoinBigAnim        ; set animation
            MOVE 0,-4
            MOVE 0,-3
            MOVE 0,-2
            MOVE 0,-2
            MOVE 0,-1
            MOVE 0,-1
            MOVE 0,-1
            MOVE 0,0
            MOVE 0,1
            MOVE 0,1
            MOVE 0,1
            MOVE 0,2
            MOVE 0,2
            MOVE 0,3
            MOVE 0,4
            PFOR 50
                    MOVE 0,5
            PNEXT
            KILLSPRITE

    See also:
    MasterPath

    Main Table