Post: Health Bar On/Off Code?
01-31-2016, 03:30 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); im looking for the the on/off health bar gsc code for bo2 thx
01-31-2016, 11:29 AM #2
BullyWiiPlaza
Climbing up the ladder
You take the health bar script from You must login or register to view this content. and then you just make a regular toggle for it. Below are the on (drawHealthBar()) and off functions (destroyHealthBar()).
    drawHealthBar()
{
self.healthBar = self createBar( (1, 1, 1), 150, 11 );
self.healthBar setPoint( "CENTER", "TOP", 0, 42 );
self.healthText = self createFontString( "default", 1.5 );
self.healthText setPoint( "CENTER", "TOP", 0, 22 );
self.healthText setText( "^1H^2E^3A^4L^5T^6H ^1B^2A^3R" );

thread updateHealthBar();
}

updateHealthBar()
{
self endon("disconnect");
self endon("destroyHealthBar");

for(;Winky Winky
{
self.healthBar updateBar( self.health / self.maxhealth );

wait 0.5;
}
}

destroyHealthBar()
{
self notify("destroyHealthBar");

self.healthBar destroy();
self.healthText destroy();
}

The following user thanked BullyWiiPlaza for this useful post:

Guilhermex12
12-12-2017, 02:30 AM #3
For non host?
12-12-2017, 11:11 AM #4
Patrick
League Champion
Originally posted by AngelCorrea View Post
For non host?


no this is the gsc section meaning its host only :P

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo