Announcement

Collapse
No announcement yet.

How do you pass information from the GUI to a map?

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

    How do you pass information from the GUI to a map?

    Or how about between maps?

    For instance, if I end a map in a particular vehicle, I want to spawn in to the same vehicle in the next map.

    Any ideas?

    #2
    you would have to wright it to the int file. dont know how but i think thats how you would.

    Comment


      #3
      So it's not possible to pass the information through the player class or somekind of info class that is resident between maps?

      There's gotta be an easier way then to write to the disk...

      Comment


        #4
        hmm well now that i think about it some of the game types keep track. but whats so bad about wrighting to disc.

        Comment


          #5
          Because sometimes what you're playing on may not have a hard drive. hehehe

          Comment


            #6
            According to the UDN you can use the variable specifier 'travel' to keep information through a level change.
            travel: Advanced. "Travel" is supported only for the player's PlayerPawn derived class and Inventory-derived classes in his linked Inventory list. It means "this variable should be saved and restored when switching levels, so that it isn't forgotten". This is the mechanism that keeps your health and ammo counts intact when switching levels. The combination of "transient" and "travel" isn't sensible (and isn't used in Unreal), since transient objects are non persistent betweeen savegames, and "travel" implies the thing should persist between levels.
            There might be another way, but this is what I'd explore to start with (but I am a bit of a code monkey).

            Comment


              #7
              Cool! Sounds like a start!

              Comment


                #8
                I believe the player's GUIController persists between maps, you might be able to store stuff in there.

                Comment


                  #9
                  I know this was originally posted a month ago, but one option would be to use the ServerMutate member of PlayerController.

                  In every class I have tried, there is always a way to find the local PlayerController.

                  Viewport.Owner.Actor
                  GetLocalPlayerController()
                  and a few other methods

                  Code:
                  ctrlPlayer.ServerMutate( "Something" )
                  ... it might be ServerMutator(...) check Epics code before use.

                  That functon calls back to all mutators running on the Server.

                  Modify the Mutate function in your mutator to trap for the string you've sent and do something.

                  Code:
                  function Mutate (Playercontroller PC, string sMyString)  // or something like that
                  {
                     if ( sMyString = "Something" && PC != None )
                    {
                       // Do something fun here
                    }
                    super.mutate(PC,sMyString)
                  }
                  This was typed from memory so check Epics code before use.

                  For a working example, see the latest version of my UnevenTeams mutator which you can get from my web site:

                  http://games.DiscoverThat.co.uk

                  Hope this helps.

                  Comment

                  Working...
                  X