A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE Technical / Map Design »need some help with scripting and player stats

Author Topic: need some help with scripting and player stats (3 messages, Page 1 of 1)
Moderators: Dennis

TCGreflexhammer
Joined: Jul 5, 2016

"""Quality Content"""


Posted: Jul 11, 2016 06:47 PM    Msg. 1 of 3       
I'm currently trying to have something set up in single player were if an event happens the players maximum health will be halfed (or just reduced).

(if (= hollow true) (unit_set_maximum_vitality Player0 .5 1))

I thought this might work but it seems the player doesn't count as a unit? also how do I modify the players shield regen


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Jul 11, 2016 07:45 PM    Msg. 2 of 3       
Quote: --- Original message by: TCGreflexhammer
I'm currently trying to have something set up in single player were if an event happens the players maximum health will be halfed (or just reduced).

(if (= hollow true) (unit_set_maximum_vitality Player0 .5 1))

I thought this might work but it seems the player doesn't count as a unit? also how do I modify the players shield regen

player0 is defined elsewhere; where did you define it?
define it like this
(global unit player0 (unit (list_get (players) 0)))

Also, unit_set_maximum_vitality doesn't work with percentages, it works with the exact values from the collision (A unmodified cyborg tag would be 75 body, and 75 shield)


TCGreflexhammer
Joined: Jul 5, 2016

"""Quality Content"""


Posted: Jul 11, 2016 08:04 PM    Msg. 3 of 3       
ah thanks is there any way to modify the shield regen?

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 1:36 AM 125 ms.
A Halo Maps Website