Announcement

Collapse
No announcement yet.

accessing data

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

    accessing data

    Hi
    I managed to begin my new game type mod. I have created 2 files, one for the gametype and one for a custom HUD. I have a STRING variable globally declared in my gametype class. I would like to draw the content of this string from within my Hud class but I don,t know how to access the variable. I tried to do something like this but it's not working:

    Code:
    drawtext( XDBM.MyString, false );
    any suggestions? I've searched in the game's .uc files but didnt find anything yet.

    thanks for any info

    #2
    XDBM(Level.Game).MyString

    Comment


      #3
      could you just not do.


      c.drawtext( "text", false ); ???

      that will display your text. or are you trying to have it display dynamic data?

      Comment


        #4
        I'm trying to display dynamic data!! I will try the method suggested above by Magus..

        Meanwhile I've found a dirty way to access it

        Code:
        foreach AllActors( class'xBDM',tempxbdm)
        it works but it's not very clean!

        Comment


          #5
          after doing some research. magus's way does work. it pulls what ever the mystring is.

          Comment


            #6
            it works but it's not very clean!
            It won't work as soon as you go online; your GameInfo actor isn't present on client-side. Put that data in a custom GameReplicationInfo subclass instead, replicate it and access it via the GRI variable in your HUD (and don't forget about typecasting).

            Comment

            Working...
            X