
Da Moose
Joined: Jan 6, 2008
"We've got the Holy Hand Grenade of Antioch"
|
Posted: Apr 24, 2008 09:58 PM
Msg. 1 of 10
Does anyone know if it's possible to change your biped when you die? Is there a script or something for that?
|
|
|

Caboose117
Joined: Jul 23, 2006
Seriously guys?
|
Posted: Apr 24, 2008 10:11 PM
Msg. 2 of 10
Its possible to test for your death, and I believe you could change the model, or imitate it at least.
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Apr 25, 2008 04:02 PM
Msg. 3 of 10
Quote: --- Original message by: Caboose117 Its possible to test for your death No, it isn't. The "players" global variable only lists living player bipeds. There is no way to refer to a dead player's body, or test for a recent death due to this. If there was, the backpack biped in certain maps would not have had the glitch in which the backpacked weapon stays on the biped after the player dies.
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Apr 25, 2008 06:55 PM
Msg. 4 of 10
Doesn't matter. Without a way to refer to a dead player through a script, there's no way to change anything about them, including permutations.
|
|
|

Bokito
Joined: Oct 31, 2007
Playing ODST since 09-21-09
|
Posted: Apr 26, 2008 04:58 AM
Msg. 5 of 10
after u die u spawn as different biped? if you mean that, its possible, just look at wm_combo. thing is, u will change randomly, and they dont sync
|
|
|

Caboose117
Joined: Jul 23, 2006
Seriously guys?
|
Posted: Apr 27, 2008 12:11 PM
Msg. 6 of 10
You're right, you cant test exactly for a death, but I'm pretty sure you can check a players health.... If health = 0 then they're dead. Yep: Quote: From: hs_doc
(unit_get_health <unit>)
returns the health [0,1] of the unit, returns -1 if the unit does not exists
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Apr 27, 2008 06:05 PM
Msg. 7 of 10
That won't work either. You're missing the point. A dead player is not listed in the "players" variable. Meaning that testing for that player's health would return "-1" because that player no longer exists, according to the variable.
And anyways, deaths are usually tested for by unit_get_health.
|
|
|

Caboose117
Joined: Jul 23, 2006
Seriously guys?
|
Posted: Apr 27, 2008 06:20 PM
Msg. 8 of 10
Quote: --- Original message by: Caboose117You're right, you cant test exactly for a death, but I'm pretty sure you can check a players health.... If health = 0 then they're dead. Yep: Quote: From: hs_doc
(unit_get_health <unit>)
returns the health [0,1] of the unit, returns -1 if the unit does not exists Quote: --- Original message by: Me KS That won't work either. You're missing the point. A dead player is not listed in the "players" variable. Meaning that testing for that player's health would return "-1" because that player no longer exists, according to the variable.
And anyways, deaths are usually tested for by unit_get_health. Am I missing something here? Or are you just not paying attention? And if I remember correctly, I thought the health could be a decimal in some cases.... Where is kirby.... Edited by Caboose117 on Apr 27, 2008 at 06:21 PM
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Apr 27, 2008 06:56 PM
Msg. 9 of 10
Yeah, It looked like I contradicted myself there. What I meant by that was that deaths of any biped (not players) are usually tested by unit_get_health anyways, because you mentioned that there was no command to directly test for a death, and you're right (hypothetically something like unit_dead).
And yes, unit_get_health returns a decimal value, so when I said it returns "-1", it specifically returns "-1.000000".
But, to clarify this whole thing, to refer to a player, the only method is to use "(list_get (players) #)" or "(unit (list_get (players) #))". In order to test for a player's death with unit_get_health, you would have to use the command like this: "unit_get_health (unit (list_get (players) #))". The command returns "-1" if the unit does not exist, meaning that since the "players" variable does not list dead players, testing for that player's number in that command "#" would return -1, meaning that, according to the command, the player is not considered dead, but is considered to be inexistent.
You would not be able to change anything about the player if the player doesn't exist according to the variable. That was really the only point I was trying to make. Edited by Me KS on Apr 27, 2008 at 07:01 PM
|
|
|

Caboose117
Joined: Jul 23, 2006
Seriously guys?
|
Posted: Apr 27, 2008 07:00 PM
Msg. 10 of 10
I understand. If it returns a decimal, you could test for the health to be lower than a small number, and then change it. I can see how that would result in problems, considering the damage may go by that number too fast, and the script doesn't activate, or it activates when someone happens to still be alive, with low health. Would work, would be a tiny bit buggy though.
|
|
|
| |
|
|
 |
|