Results 1 to 6 of 6

Thread: accessing data

Hybrid View

  1. #1
    legacy-Slayerizer
    Guest

    Question 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. #2
    Skaarj
    Join Date
    Aug 2002
    Posts
    13

    Default

    XDBM(Level.Game).MyString

  3. #3
    legacy-wacko412
    Guest

    Default

    could you just not do.


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

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

  4. #4
    legacy-Slayerizer
    Guest

    Default

    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!


  5. #5
    legacy-wacko412
    Guest

    Default

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

  6. #6
    MSgt. Shooter Person
    Join Date
    Dec 2001
    Posts
    38

    Default

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


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.