RockeyRex's Script Depot

Fixious

Test Lead
I'm trying to add a music file to your FlagAlert script, but I've run into a weird issue. The song file is sped up really fast. Any idea why or how to fix this? Also, is it possible to end the sound file once the player drops the flag?

Code:
// FlagAlert by RockeyRex
 
// Gives you an unique sound when you get a hold of the enemy flag.
 
package FlagAlert
{
    function Audio::initialize( )
    {
        parent::initialize( );
        new SFXProfile(GotFlag)
        {
            filename = "mods/autoexec/FlagAlert/FlagAlert.wav";
            description = AudioGui;
            preload = true;
        };
    }
    function clientCmdAddVisibleItem(%this)
    {
        parent::clientCmdAddVisibleItem(%this);
        if(detag(%this) $= "Flag")
        {
            sfxPlayOnce(GotFlag);
        }
    }
};
activatepackage(FlagAlert);
 

k e v i n

Private Tester
i don't know if this was ever mentioned or not, but it would be nice if some of these scripts would be included when you download legions...i think these scripts should be included when you download legions;

FairyTrail, FlagAlert, FlagHud, rrMapNit, ScoreMatters, and TrackTor

these scripts don't affect the game, but i think they're nice to have, and i'm sure others who don't already have them may like it....so would it be possible to add these to the legions file so it's included when you download legions?
 

Delpicy

Member
There are only sounds for picking up, capping, and returning a flag; if you wanted to have your current sound be stopped when you throw the flag you would have to modify onPlayerThrowFlag in live/server/game/gameTypes/ctf.cs, which would make it a server mod where it would only work on a server you hosted. You would probably have to edit the method that deals when you die as well, in case you die with the flag. Still, it would unfortunately have to be a server mod.
 

Fixious

Test Lead
tumblr_m0sn66rVhk1qbnggp.jpg
 

RockeyRex

Legions Developer
Uhh...


Code:
package FlagAlert
{
    function Audio::initialize( )
    {
        parent::initialize( );
        new SFXProfile(GotFlag)
        {
            filename = "mods/autoexec/FlagAlert/FlagAlert.wav";
            description = AudioGui;
            preload = true;
        };
    }
    function clientCmdAddVisibleItem(%this)
    {
        parent::clientCmdAddVisibleItem(%this);
        if(detag(%this) $= "Flag")
        {
          $FlagAlertSfx = sfxPlayOnce(GotFlag);
        }
    }
    function clientCmdRemoveVisibleItem(%this)
    {
        parent::clientCmdRemoveVisibleItem(%this);
        if(detag(%this) $= "Flag")
        {
            sfxStop($FlagAlertSfx);
        }
  }
};
activatepackage(FlagAlert);


Should... do it...

Probably...
 
Top