UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

[User Tutorial] Dynamically Add Songs In-Game

broken avatar :(
Created 10 years ago
by KDXDARK
0 Members and 1 Guest are viewing this topic.
5,081 views
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: al
Date Registered: 21 August 2011
Last active: 9 days ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
KDXDARK's Contact & Social Links
Hi i am KDXDARK and i have custom tutorial of how to add buyable song for the jukebox.
Hola soy KDXDARK y hoy les voy a mostrar como añadir canciones comprables al jukebox

Quote from Treminaor
Quote
It is also possible to have the Jukebox start with a limited amount of songs, and then by calling the add_song() function at any time during gameplay you could add a song to the menu, since it is dynamic. For instance, you could create an objective system for finding CD's scattered around the map - each CD unlocks a new song in the Jukebox! It's up to you to code these events, obviously.
--------------------------------------------------------------------------------------------------------------------
También es posible tener el inicio Jukebox con una cantidad limitada de canciones, y luego mediante una llamada a la función add_song() en cualquier momento durante el juego podría agregar una canción al menú, ya que es dinámica. Por ejemplo, podría crear un sistema objetivo para encontrar CD repartidos por todo el mapa - cada CD desbloquea una nueva canción en la rockola. Depende de usted para codificar estos eventos, obviamente.

First: Go to root/mods/mapname/maps and open you mapname.gsc or root/raw/maps/mapname.gsc
Primero: Vayan a root/mods/nombredelmapa/maps y abran el nombredelmapa.gsc o puede estar en root/raw/maps y abran nombredelmapa.gsc

and under the fuction maps\_zombiemode::main(); add this:
y debajo de la funcion maps\_zombiemode::main(); Añadan esto:

Code Snippet
Plaintext
//***********************************************************************/
//    JUKEBOX STUFF
//***********************************************************************/

song1_trig = getentarray( "song1","targetname" );
array_thread( song1_trig,::song1_buy );

//***********************************************************************/
//    JUKEBOX STUFF END
//***********************************************************************/

And bottom of the script add this
y debajo del script añadan esto:

Code Snippet
Plaintext
song1_buy()
{
    cd1 = getEnt("song1_cd","targetname");
    user = undefined;
    cost = 1000;                                        //change to cost that you want/cambiar precio

    self setCursorHint("HINT_NOICON");
    self UseTriggerRequireLookAt();

    self setHintString("press &&1 to buy a song [Cost: "+cost+"]");            //text hint trigger/texto del trigger

    while(1)
    {
        self waittill("trigger", user);
        if( is_player_valid(user) && user.score >= cost )
        {
            play_sound_at_pos( "cha_ching", self.origin );
            user thread maps\_zombiemode_score::minus_to_player_score( cost );
            self delete();

thread mapsugx_jukebox::add_song("SONG NAME", "soundaliasname");
wait(0.1);

cd1 delete();

        }
        else
        {
            play_sound_at_pos( "no_cha_ching", self.origin );
wait(0.1);
        }
wait(0.1);
    }
}

where it say SONG NAME you put the name of your song and where say soundaliasname put the file name of your song
Donde dice SONG NAME pones el nombre de la cancion y donde dice soundaliasname pones el nombre del archivo de la cancion

Example // Ejemplo:

Code Snippet
Plaintext
thread mapsugx_jukebox::add_song("Destroy it", "Destroy_it");
   
Now open the Radiant // Ahora abre el radiant

1)_ Create a trigger_use and give it this kvps = targetname : song1 // Crea un Trigger_use y dale este kvps = targetname : song1

2)_ Add the model what you want and give it this kvps= targetname : song1_cd // ahora añade el modelo que quieras y dale este kvps= targetname song1_cd

this is the result // este es el resultado

Dynamically Add Songs In-Game
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 4 years ago
Posts
942
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
al fin alguien que habla español :D lol
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
Gracias amigo! :D
Knowin' by name... SHEPERD OF FIRAAAAAHH
broken avatar :(
×
broken avatar :(
Former UGX Lead Asset Creator
Location: ca
Date Registered: 17 August 2012
Last active: 5 years ago
Posts
1,932
Respect
Forum Rank
Zombie Destroyer
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
Personal Quote
Eh?
Signature

(Click to enter portfolio)
×
SajeOne's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Gracias amigo! :D
Knowin' by name... SHEPERD OF FIRAAAAAHH
*Know me by name... SHEPERD OF FIRAAAAAHH
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
*Know me by name... SHEPERD OF FIRAAAAAHH
Oops....
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 8 years ago
Posts
2,790
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
Signature
Let's keep this thread on topic from here on in. -DBZ

+1 to off-topic reply -DBZ

lmao. Too funny.

Goliath Script Placer: http://ugx-mods.com/forum/index.php/topic,11234.msg125257/topicseen.html#new

"...Christ, people. Learn C, instead of just stringing random characters
together until it compiles (with warnings)..."

-Linus Torvalds
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
So, who's this Firah you guys are talking about? i mean, it is someone's name.
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
So, who's this Firah you guys are talking about? i mean, it is someone's name.
I was quoting the Avenged Sevenfold'd Shepherd of fire song which was in Dark's jukebox.

 
Loading ...