1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

UE2 - UT2kX Pretty irrelevant question now, but...

Discussion in 'Programming' started by madspacemarine02, Jul 31, 2014.

  1. madspacemarine02

    madspacemarine02 random access user

    Joined:
    May 2, 2014
    Messages:
    36
    Likes Received:
    0
    there was no way to change the music, stop,
    pause, et cetera from Uscript, right?

    There is no way to turn the .ogg music off and
    start a sound, or is it?


    How did modders back then even made changes
    to the gameplay with Uscript, if pretty much
    nothing was documented?
    I have only basic oop knowledge, did everyone
    just look at everything, until they had a clue?

    There had to be some documentation of all the
    interfaces and objects somewhere! I can't say
    I feel smart about this.
     
    Last edited: Jul 31, 2014
  2. forrestmark9

    forrestmark9 New Member

    Joined:
    Aug 6, 2009
    Messages:
    56
    Likes Received:
    0
    There's a set of funtions somewhere meant for what you just said, I can't remember if they are in the gametype or elsewhere
     
  3. Wormbo

    Wormbo Administrator Staff Member

    Joined:
    Jun 4, 2001
    Messages:
    5,913
    Likes Received:
    36
    UT2004's Actor.uc, lines 1045+:
    Code:
    // only used for level music - will be stopped when level changes
    // Song parameter should not include extension (assumes .ogg)
    native final function int PlayMusic( string Song, optional float FadeInTime );
    
    native final function StopMusic( int SongHandle, optional float FadeOutTime );
    native final function StopAllMusic( optional float FadeOutTime );
    
     
  4. Jefe

    Jefe The Dark Rat

    Joined:
    Nov 11, 2008
    Messages:
    157
    Likes Received:
    6
    Maybe I don't understand your question completely, but yes, you can change music in-game. If you look at my latest map, I have working "jukeboxes" in the level. Press E and it activates a scripted trigger that changes to a specific song.

    Although I'd prefer to have some sort of menu pop up to select from a group of songs, at least it works.
     
  5. madspacemarine02

    madspacemarine02 random access user

    Joined:
    May 2, 2014
    Messages:
    36
    Likes Received:
    0
    @Jefe
    If you want something like a menu, you could
    create a few simple pictures/textures that look
    like a menu. The menu looks like a tracklist with
    one song selected. Everytime the player
    activates the trigger the picture/texture
    switches to the next one, where the next song
    is selected and and the same time of course
    the song will change.

    It's a bit primitive, but it would work.

    Keep it simple stupid.
     

Share This Page