• Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse

Plutonium

How do you create a hud element?

Scheduled Pinned Locked Moved BO2 Client Support
4 Posts 3 Posters 252 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Vulture Aidundefined Offline
    Vulture Aidundefined Offline
    Vulture Aid Contributor
    wrote on last edited by
    #1

    As the title suggests, I want to know the function of a hud element in zombies that displays a counter from a variable

    Kalitosundefined 1 Reply Last reply
    0
  • Kalitosundefined Online
    Kalitosundefined Online
    Kalitos
    replied to Vulture Aid on last edited by
    #2

    Vulture Aid You can create it using this:

    self.Text = createFontString ("Objective", 1.7); // Only client-- to Server Message use createServerFontString
    self.Text setPoint ("CENTER", "TOP", 300, "CENTER"); // Position
    self.Text setText ("Your text here"); // Message
    
    Vulture Aidundefined 1 Reply Last reply
    0
  • Vulture Aidundefined Offline
    Vulture Aidundefined Offline
    Vulture Aid Contributor
    replied to Kalitos on last edited by
    #3

    Kalitos Can you specify the arguments for createFontString() and setPoint()?

    TheHiddenHourundefined 1 Reply Last reply
    0
  • TheHiddenHourundefined Offline
    TheHiddenHourundefined Offline
    TheHiddenHour Contributor
    replied to Vulture Aid on last edited by
    #4

    Vulture Aid createFontString(font, fontScale), setPoint(point, relativePoint, x, y).

    font has a few different options like "default", and "objective". fontScale is self explanatory, it's the scale of the font lol.

    point and relativePoint are a bit different though. There's "CENTER", "TOP", "BOTTOM", "LEFT", "RIGHT", "TOPRIGHT", "TOP_RIGHT", "TOPLEFT", "TOP_LEFT", "TOPCENTER", "BOTTOM RIGHT", "BOTTOM_RIGHT", "BOTTOM LEFT", "BOTTOM_LEFT".
    You can kind of think of these as anchors. If I made a HUD with points "RIGHT", "RIGHT" and I appended text to it constantly, the HUD would grow to the left to maintain its position on the right.

    1 Reply Last reply
    0

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Login

  • Don't have an account? Register

  • Login or register to search.