Author Topic: background menu  (Read 1610 times)

Offline utdfederation

  • Rank: Private
  • *
  • Posts: 74
background menu
« on: August 06, 2007, 04:27:43 am »
ok now i have a problem if anyone can help me.

now this has had me running around for ages so i would appreciate any help please.

ok in the:   x_treme_scripts_RCX.pk3/ui_mp/menu_background.menu i want to be able to put in my own background picture with the video intro when i replace the menu_background.menu with the one i made (which is named the same as the one i want to replace) it wont load when i launch the game,but it does load when i click on mods in the game menu and launch the mod,but i want to be able to launch the game and bang it's there not launch the menu vis mods.

please help.

also i want to use my own recticle but again when i go into : x_treme_gfx_RCX.pk3/gfx there is no recticle box there but if i put my own recticle box there with all the files i need it wont work again please help.

Offline Tally

  • Rank: Private
  • *
  • Posts: 65
background menu
« Reply #1 on: August 06, 2007, 06:36:09 am »
You need to make a second pk3 mod just for the menu, and place it in the 'uo' folder.

I made one for a mod I did, and it placed it in the clients 'uo' folder. It is an identical copy of the one in the mod, but it is seen as soon as you open UO (you still need the other on in the fs_game folder, as when you go to 'main menu' from the game, you want to be able to see it from there).

Once you've made the menu mod, and placed it in your server's 'uo' folder, you will need to make a 'uo' folder on your redirect site (if you dont have one already). Then, when the client connects to you, they not only get the RCX mod from the fs_game folder, but they also get the menu mod from your redirect site's  'uo' folder.

As for the recticle, COD and UO use different image files for them, and they are located in different places.

If you are editing the UO reciticles, you need to look at the folder/image structure of UO - not COD.

pakuo00.pk3 has some recticles, in the gfx\recticle folder.

If its a standard vCOD recticle you want to replace, they are all in pak5.pk3\gfx\recticle

Offline utdfederation

  • Rank: Private
  • *
  • Posts: 74
background menu
« Reply #2 on: August 06, 2007, 10:22:00 am »
gotcha i see what you mean i didn't think of that thanks tally.

one other thing though,......wait for it.

i want to enable the "prepare for battle" sound to play first then 2.5 seconds after the "good luck out there buddy" sound to play.now i have it all installed correctly and i have put this in the:

x_treme_scripts_RCX.pk3/extreme/_ex_welcome.gsc

Code: [Select]
main()
{
if(level.ex_modoff) return;

if(level.ex_exlite <= 2)
{
// turn off healthbar for cod2 health/damage system
if(level.ex_cod2health)
self setClientCvar("scr_healthbar", "0");
else
self setClientCvar("scr_healthbar", "1");
}

// turn off radar for dm, qdm, qtdm
if(level.ex_radaroff || level.ex_quadbased || level.ex_currentgt == "dm")
self setClientCvar("scr_radar", "0");
else
self setClientCvar("scr_radar", "1");

// turn of stance indicator (waste of space!)
if(level.ex_hudstance)
self setClientCvar("scr_stance", "1");
else
self setClientCvar("scr_stance", "0");

if(isDefined(self.pers["skipserverinfo"]))
return;

self.ex_welcome = newClientHudElem(self);
self.ex_welcome.alignX = "left";
self.ex_welcome.alignY = "top";
self.ex_welcome.x = 0;
self.ex_welcome.y = 0;
self.ex_welcome.alpha = 1;
self.ex_welcome.sort = 5;
self.ex_welcome SetShader("exwelcome/welcome.tga",640,480);

while(!self AttackButtonPressed())
{
wait 0.1;
continue;
}

if(isDefined(self.ex_welcome))
self.ex_welcome destroy();
}

announce()
{
if(isdefined(self.pers["PrepareBattleSound"]))
return;

if(level.awe_preparebattle == 1)
{
self playLocalSound("prepare");
wait 2.5;
self playLocalSound("goodluck");
}
else if(level.awe_preparebattle == 2)
{
self.pers["PrepareBattleSound"] = true;
self playLocalSound("prepare");
wait 2.5;
self playLocalSound("goodluck");
}
else
return;
}

you see at the bottom i have inserted the announce part?
this must be the correct place for it to be placed because it works just fine when i load the game,problem though, even though i have set it to play on spawn only in the audio.cfg file it keeps repeating the same announcement every time the player spawns,here is how i have scripted it:
Code: [Select]
//***************************************************************************************************
// Announcements, Obituary and Killing Spree Sounds // default 0, 0 = off, 1 = on
//***************************************************************************************************
// First kill per game/round
set ex_firstblood "1"

// Good luck - plays on first team spawn only
set ex_goodluck "1"
set ex_prepare "1"

// Players connecting/disconnecting sound
set ex_plcdsound "0"

// Play personal obituary sounds
set ex_playpsoundo "1"

// Play personal killspree sounds
set ex_playpsoundk "1"

// Announce result at end of map
set ex_anresult "1"


do you notice the good luck part?
i only want it to play when the player or client first joins the game not everytime he re-spawns.is there somewhere else i should be putting some sort of control code for this to work correctly?

cheers bud,sorry for hasstling you on this subject

Offline utdfederation

  • Rank: Private
  • *
  • Posts: 74
background menu
« Reply #3 on: August 07, 2007, 09:43:49 am »
no matter i figured it out.this is how i did it:

Code: [Select]
announce()
{
        level endon("ex_gameover");
self endon("teamchange");
wait 1.5;

if(isdefined(self.pers["PrepareBattleSound"]))
return;

if(level.ex_preparebattle == 1)
{
self playLocalSound("prepare");
wait 2.5;
self playLocalSound("goodluck");
           
                stp = "prepare";
                stp = "goodluck";
               
}
else if(level.ex_preparebattle == 2)
{
self.pers["PrepareBattleSound"] = true;
self playLocalSound("prepare");
wait 2.5;
self playLocalSound("goodluck");
                         
                stp = "prepare";
                stp = "goodluck";
               
}

        if(isdefined(stp))
{
self playLocalSound(stp);
self.ex_glplay = true;
}
}


if you compare the 2 scripts you will see what i did.

works like a charm now,only plays "prepare for battle" and "goodluck out there buddy" once from first spawn and not every time you respawn after that during the map game.