ItsMods

Full Version: Custom gametype HUD
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Could you explain a bit more how you made: Survivors left: 1? I know you have done something with a client dvar but that's it.
(11-09-2011, 23:29)Cyborgking Wrote: [ -> ]Could you explain a bit more how you made: Survivors left: 1? I know you have done something with a client dvar but that's it.

Yeah sure

here's the itemDef, it gets the text from a dvar
Code:
itemDef    
{
    type            ITEM_TYPE_TEXT
    rect            (BAR_START_X+FACTION_BG_WIDTH/2) -22 1 BAR_HEIGHT_TOP WAGER_SUMMARY_ALIGN
    dvar            "ui_zom_allies_alive"
    textstyle        ITEM_TEXTSTYLE_SHADOWED    
    textalign        ITEM_ALIGN_MIDDLE_LEFT
    textfont        UI_FONT_EXTRABIG
    textscale        TEXTSIZE_LARGE
    forecolor        1 1 1 0.65    
    visible            1
    decoration
}

this itemDef will get its text from a dvar "ui_zom_allies_alive", I set the dvar with a GSC script
Code:
self setClientDvar( "ui_zom_allies_alive", "Survivors left: " + level.alivePlayers[ "allies" ].size );

.. thats it


another way of doing this could be with:
Code:
text ( dvarString( "ui_zom_allies_alive" ) )
and the $ ?
UNRECOVERABLE ERROR:
duplicate menu name 'mod_gamemessages'


Linker will now terminate.
********************************************************************************

==================================================
Linker summary:

There were 0 warnings and 3 errors.

Errors:
Menu load error: ui_mp/hud_tdm.menu, line 117: unknown menu item keyword \
Menu load error: ui_mp/hud_tdm.menu, line 117: unknown menu item keyword \
(!) UNRECOVERABLE ERROR: duplicate menu name 'mod_gamemessages'

Arguments passed to linker:
-nopause -language english -moddir mp_modname mod

==================================================
ahh i see what the problem is..... can you make it alse ready for my point system with: self.bounty and delete all the zombie stuff?

(upper = bounty lower = score overal like tdm:7400 @pic)
self setClientDvar( "ui_zom_allies_alive", "Survivors left: " + level.alivePlayers[ "allies" ].size );
Where to paste it?
Probably on a thread?
I don't know. Where and in what file paste it?
self setClientDvar( "ui_zom_allies_alive", "Survivors left: " + level.alivePlayers[ "allies" ].size );
You need to make function which detects any death or kill... Or just make loop. It is all in GSC scripts.
As first try, you can paste it in file called _rank.gsc, find line 'self waittill("spawned_player");' and paste your code. I'd recommend you to learn modding and gsc basics first if you don't understand. Good luck!

Sorry can't post my code there since I am @ipod.
Pages: 1 2