Announcement

Collapse
No announcement yet.

Need major help getting a mutator to work online.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Need major help getting a mutator to work online.

    If anyone who's good with network code has some free time between now and Saturday and would like to help me get a mutator working online for CBP2, please send me a pm. This one's really kicking my butt. :bulb:



    #2
    I think you should post a little bit more about the mutator or some code so we can give some suggestions.

    Comment


      #3
      You need to study "replication" to make sure "relevant" data is replicated on the servers (a lot of data isn't replicated by default because it can be simulted on the client-side, to preserve bandwidth). I've only coded replication for gametypes, not mutators, but I'm sure it's similar.

      Here are some links explaining the types of replication, and how to implement them (there are also other related links on the pages):

      http://wiki.beyondunreal.com/wiki/In...To_Replication

      http://wiki.beyondunreal.com/wiki/Replication

      Comment


        #4
        I would assume this is a rather complicated mutator as I've heard of Rachel Cordone before. Haven't you mad a few tutorials on emitters and the like? I'm assuming you probably know a bit about replication but you are just having trouble replicating the right things... right? Heh.. Either way if you post some code we can see what we can do for ya...

        Comment


          #5
          Yeah, the only thing that's really broken is I can't get it to replicate the skins for the Holograms from the client to the server. The client that owns the holograms sees them perfectly, but the server always has None for all the skins in the array, and passes those on to other clients, so they see the default texture on them.

          Code:
          replication
          {
              reliable if(Role == ROLE_Authority)
                  bHologramActive, DeployedBeacons;
              reliable if(Role < ROLE_Authority)
                  RealSkins, NumSkins;
              reliable if(Role == ROLE_Authority)
                  SpawnRecallEmitter, InitializeSkins;
          }
          
          simulated function InitializeSkins()
          {
              local int i;
          
              NumSkins = Clamp(Instigator.Skins.Length,2,4);
          
          	for ( i=0; i<NumSkins; i++ )
          		RealSkins[i] = Instigator.Skins[i];
          }
          The client owning the holocator has the right number for NumSkins and the RealSkins array, but the Server has 0 and None respectively. InitializeSkins is called from the FireMode class when the weapon is first fired.

          Comment


            #6
            I'm not sure if this is any help but I'm not sure if you can always replicate variables directly to the server from a client

            I think instead you may want replicate a functinon call from the client to the server - and in the variables passed to the function call called on the client will show up on the server

            http://wiki.beyondunreal.com/wiki/Replicated_Function

            Comment


              #7
              Is it a dynamic array? You can't replicate dynamic arrays. You might be better off using a replicated function to send the skins, since arrays in general can be troublesome for replication.

              Oh, and it looks a bit like the HoloClone:

              Comment


                #8
                OMG IDEA STEALORLOLOL



                Hmm, forgot about the dynamic array replication dealie. I'll try a static one and see if that fixes it.

                Comment


                  #9
                  Otherwise you do have to replicate variables to a server in a function. Maybe Call another function in the initialize skins if thats called on the client that replicates what the skins should be set to on the server..

                  Comment

                  Working...
                  X