UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Setting player health?

broken avatar :(
Created 11 years ago
by ProRevenge
0 Members and 1 Guest are viewing this topic.
2,268 views
broken avatar :(
×
broken avatar :(
Location: gbEast Midlands
Date Registered: 7 February 2015
Last active: 5 years ago
Posts
643
Respect
Forum Rank
Zombie Enslaver
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Donations massively appreciated: paypal.me/DanT98
Signature
Stranded
Nacht Der Untoten: Reimagined
Encampment
Encampment V2: BO3 Mod

Mapper and Weapon Porter - I release what I can of my work for the community to enjoy :)
×
ProRevenge's Groups
Mapper Has released one or more maps to the UGX-Mods community.
ProRevenge's Contact & Social LinksProRevenge
I cannot find where to set player health, as in the default health the player has upon spawning, before downing. I think its set to 100 default.

best I can do is using Harry's perk script to set it to different health, but then you need to buy jug and die with it once for the effect to take place.
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
Signature
Let's keep this thread on topic from here on in. -DBZ

+1 to off-topic reply -DBZ

lmao. Too funny.

Goliath Script Placer: http://ugx-mods.com/forum/index.php/topic,11234.msg125257/topicseen.html#new

"...Christ, people. Learn C, instead of just stringing random characters
together until it compiles (with warnings)..."

-Linus Torvalds
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
These two variables set the players health:

Code Snippet
Plaintext
<player>.health
<player>.maxhealth

values should be an integer.

Don't know if its SinglePlayer only or not, but i ran into a bug with setting player health that would prevent the health from regenerating fully. Might want to play around with it a little and make sure you don't run into the same issue.
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Signature
If you want scripts / features made for you, then contact me by PM or email / skype etc
it will cost you tho so if you have no intention of reciprocating don't even waste my time ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
These two variables set the players health:

Code Snippet
Plaintext
<player>.health
<player>.maxhealth

values should be an integer.

Don't know if its SinglePlayer only or not, but i ran into a bug with setting player health that would prevent the health from regenerating fully. Might want to play around with it a little and make sure you don't run into the same issue.
he needs to know where to set them

I assumed DLC3_code.gsc but apparently its not set there
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
he needs to know where to set them

I assumed DLC3_code.gsc but apparently its not set there

Well, you could probably set it anytime after the player has spawned.

However there is a spot in _load.gsc:

Code Snippet
Plaintext
onPlayerSpawned()
Last Edit: October 31, 2015, 08:26:26 am by daedra descent
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
Well, you could probably set it anytime after the player has spawned.

However there is a spot in _load.gsc:

Code Snippet
Plaintext
onPlayerSpawned()
I might add it to the start of my perks initialize, my only concern was if another script is setting it again later down the line ( recently had this issue with stupidly using the same variable for my powerup drop rate that treyarch did  :'( )
Last Edit: October 31, 2015, 08:44:14 am by Harry Bo21
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
I might add it to the start of my perks initialize, my only concern was if another script is setting it again later down the line ( recently had this issue with stupidly using the same variable for my powerup drop rate that treyarch did  :'( )

onPlayerSpawned() is called in _load.gsc's main function. Calling it again(or changing where it is called) probably wouldn't be very smart.

broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
onPlayerSpawned() is called in _load.gsc's main function. Calling it again(or changing where it is called) probably wouldn't be very smart.
i meant setting the variable again, not calling the function again

I have my own "on spawn" function anyway, needed for most things in my perks to work
Last Edit: October 31, 2015, 09:41:22 am by Harry Bo21

 
Loading ...