UT99 open clientside config menu

  • 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.

HappyFnCamper

New Member
Mar 23, 2005
1
0
0
Hi peeps. Noober at scriptin here. I made a sniper rifle that needs to have a config window that opens clientside using a key input. Clicked and opened alot of tuts, forums, and u files. I still don't get replication. When I try to script a replication, it is either a compile error or just doesn't work. I have gone to the Wiki and other sites to learn more about code. I'm missin somethin when it comes to takin the info and applyin it to the script. Most of the time its just variables definitions I see without code that relates to what I'm doing. I'm a lil lost when it comes to replication and open a Uwindow from a key input.
As an example to use a toggle input off the Wiki site:
Code:
exec function OpenMenu(optional float F)
{
  if(F == 1)
    // Run this line.
  else
    // Run this line.
}
My prob is what to put in "run this line" and what the target should be. The config window is a mod menu window.
The structure for the my config window is:

UMenuModMenuItem->UWindowFramedWindow->
UWindowDialogClientWindow->UWindowPageWindow

Nothing I can get to compile works. Do I have to call on anything other than the UWindowPageWindow. Does the UmodMenuItem still have to be the window I open in the code above to get to my pagewindow.

If only I could use an int file. With an int file in system folder and the rifle file in cache it works. However I'd like to skip a client shuttin down UT. Goin to a website and downloadin the int. Then to put the int in system folder, and start up UT & reconnect. All that to use a cache file.

MapVote, Xmaps and other mods and muts replicate. I have tried to understand the code in them. I don't even wanna mention how lost I am lookin at the ValHalla Avatar menu code (Doh!!). Most everywhere I read replication is "simple". Here I sit on a sniper rifle that I made with an option for 25 scope crosshairs you can select from to use in game (like the new UT's let you choose). "Simple" has brought me to a skreechin halt on network play. Please use the biggest cane of knowledge you can find, and beat it into me.

One more thing. Hit sounds. I have looked at alot of rifles that have additional sounds play when capped, or hitting an enemy. I notice that the sounds don't always play in an online game. It didn't for my rifle when I did the same code.

Example of some other rifles:
Code:
function ProcessTraceHit(Actor Other, Vector HitLocation, Vector HitNormal,
Vector X, Vector Y, Vector Z)
{
   //BlaBlaBla...Chopped out part of function UT_Shellcase.

   if (Other == Level)
      Spawn(class'UT_HeavyWallHitEffect',,, HitLocation+HitNormal, 
Rotator(HitNormal));

      else if ( (Other != self) && (Other != Owner) && (Other != None) )
       {
          if ( Other.bIsPawn )
           {
             Other.PlaySound(Sound 'ChunkHit',, 4.0,,100);
             Other.PlaySound(Sound 'UnrealI.Razorjack.BladeThunk',, 4.0,,100);
             PlayOwnedSound(Sound 'UnrealI.Razorjack.BladeThunk',, 4.0,,10);
           }

I have changed my code since hitting enemy sound did not play for client connected to a dedicated server.
The new code is:
Code:
function ProcessTraceHit(Actor Other, Vector HitLocation, Vector HitNormal,
Vector X, Vector Y, Vector Z)
 {
    if (Other == Level) 
        Spawn(class'UT_HeavyWallHitEffect',,, HitLocation+HitNormal,
Rotator(HitNormal));

  else if ( (Other != self) && (Other != Owner) && (Other != None) )
   {
     if ( Other.bIsPawn )
      {
        Other.PlaySound(Sound 'ChunkHit',, 4.0,,100);
        PlayerPawn(Other).ClientPlaySound
(Sound 'UnrealShare.General.GlassTink2',False,False);
        PlayerPawn(Owner).ClientPlaySound
(Sound 'UnrealShare.Stinger.StingerFire',False,False);
      }
It seems to work fine in network play. I would like to know if this is something I should not have done for server/cpu lag reasons. Will this affect a server performance when the game is full of clients? I choose ClientPlaySound over ClientReliablePlaySound. I thought that reliable might contribute to server load/lag. Any insight on this would be great.

Greatfull for any help to enlighten me.
Thank You
Frag YA Later
HappFnCamper