
Donut
Joined: Sep 30, 2006
I swear I'm not actually dead
|
Posted: Mar 2, 2009 03:23 PM
Msg. 1 of 23
in an sp map, could i script it so that when i die, i dont revert to saved, but rather teleport somewhere? if thats not possible, i was thinking that i could have a script that checks the player biped, and if it drops below 1 it teleports me somewhere and sets my health back to full. what im wondering is if my health is at 15 or something and i get shot with a bullet that does more damage than 15 (like the pistol), would the game read my health as less than 1 and teleport me before killing me? im trying to make a jailbreak style mod, like ut 2004's jailbreak. i want it in sp because i dont think you can use all of the script functions in mp, and i kinda dont want a bunch of kids pm'ing me asking me why the ai doesnt work
and if you dont know, dont post please. im looking for a direct answer here
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Mar 2, 2009 06:19 PM
Msg. 2 of 23
You probably know this, but you can't refer to dead players since they disappear off the (players) list once they die. But, in an SP map, there's only one player. So, if you test for the health of player 0 and he's dead, the fact that that player disappears off the list is actually perfect because the command returns "-1" instead of any health, meaning that you actually can test for the player's death in an SP map.
Only problem is, he's dead. So you can't revive him because scripts can't refer to dead players for the same reason in my first sentence, and because you can't revive bipeds anyways. And to answer your second question, no, the game would kill him, because the bullet wipes his health to 0 in the same tick as the script, making it impossible for the script to refer to the dead player to teleport him and set his health despite the fact that it will know that he died.
Also, when a player dies in SP, the game automatically reverts to last checkpoint or the start of the map. I don't think there's a way to stop that.
|
|
|

Donut
Joined: Sep 30, 2006
I swear I'm not actually dead
|
Posted: Mar 2, 2009 08:33 PM
Msg. 3 of 23
i knew all of that, what im asking is that if my isnt 0, but the bullet is going to hurt me for more health than i have, will the game realize that im dead before it realizes that my health is at 1? i want to simulate death in an sp map, but actually teleport somewhere else and be fully restored
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Mar 2, 2009 09:34 PM
Msg. 4 of 23
Quote: --- Original message by: Donut i knew all of that, what im asking is that if my isnt 0, but the bullet is going to hurt me for more health than i have, will the game realize that im dead before it realizes that my health is at 1? i want to simulate death in an sp map, but actually teleport somewhere else and be fully restored Oh. I answered it already: Quote: --- Original message by: Me KS And to answer your second question, no, the game would kill him, because the bullet wipes his health to 0 in the same tick as the script, making it impossible for the script to refer to the dead player to teleport him and set his health despite the fact that it will know that he died. But, to clear up any confusion, yes, the game will realize you're dead and it will never realize your health was at 1 because it never was. It will jump straight from whatever health down to 0 in one tick, killing the player.
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Mar 2, 2009 11:20 PM
Msg. 5 of 23
check how much health you have when deathless_player hits as low as it can go, and just simply make it check for that number, and use deathless_player. the moment you die, the system sends the data to restart, so just prevent them from dieing.
|
|
|

Donut
Joined: Sep 30, 2006
I swear I'm not actually dead
|
Posted: Mar 3, 2009 12:00 AM
Msg. 6 of 23
i dont wanna die though. what im trying to do is simulate multiplayer with bots in sp. i want it in sp so noobs dont try to play on the map in mp. i can use mp if its necessary though im trying to make jailbreak from ut 2004. Edited by Donut on Mar 3, 2009 at 12:01 AM
|
|
|

lil_bankhead
Joined: Dec 12, 2008
What you look'n at huh? I'll bit ya!
|
Posted: Mar 3, 2009 12:15 AM
Msg. 7 of 23
Quote: --- Nelson from "The Simpson"
*finder point* HAAW HAW
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Mar 3, 2009 12:24 AM
Msg. 8 of 23
Quote: --- Original message by: lil_bankheadQuote: --- Nelson from "The Simpson"
*finder point* HAAW HAW ^Most unconstructive post of all time.
|
|
|

Donut
Joined: Sep 30, 2006
I swear I'm not actually dead
|
Posted: Mar 3, 2009 12:30 AM
Msg. 9 of 23
Quote: --- Original message by: Donut and if you dont know, dont post please. im looking for a direct answer here i kinda said this for a reason.
|
|
|

lil_bankhead
Joined: Dec 12, 2008
What you look'n at huh? I'll bit ya!
|
Posted: Mar 3, 2009 12:41 AM
Msg. 10 of 23
sorry donut lol my fault :|
|
|
|

black doom
Joined: Oct 4, 2008
we will never stop, we can win the "impossible"
|
Posted: Mar 3, 2009 10:21 AM
Msg. 11 of 23
Quote: --- Original message by: Donut
i dont wanna die though. what im trying to do is simulate multiplayer with bots in sp. i want it in sp so noobs dont try to play on the map in mp. i can use mp if its necessary though im trying to make jailbreak from ut 2004. Edited by Donut on Mar 3, 2009 at 12:01 AM you can use deathless_player so you cant go under 1 hp which will trigger the script and teleport you with full hp.
|
|
|

Koo294
Joined: Nov 30, 2008
How is she when she doesn't surf?
|
Posted: Mar 3, 2009 11:32 AM
Msg. 12 of 23
Quote: --- Original message by: Donut
i dont wanna die though. what im trying to do is simulate multiplayer with bots in sp. i want it in sp so noobs dont try to play on the map in mp. i can use mp if its necessary though im trying to make jailbreak from ut 2004. Edited by Donut on Mar 3, 2009 at 12:01 AM You could always make it so the map starts with deathless_player on automatically and when the health is as low as it can be the player teleports
|
|
|

Donut
Joined: Sep 30, 2006
I swear I'm not actually dead
|
Posted: Mar 3, 2009 08:14 PM
Msg. 13 of 23
im going to do the deathless thing. i cannot believe that didnt occur to me. thanks for the help guys.
now to make ai capture flags lol
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Mar 4, 2009 01:05 AM
Msg. 14 of 23
It wouldn't, because once the health reaches 0, the player dies, and it reverts to the last checkpoint.
|
|
|

MF Boom
Joined: Mar 5, 2007
I am the bone of my sword...
|
Posted: Mar 4, 2009 04:43 PM
Msg. 15 of 23
Quote: --- Original message by: l283023 I believe that with deathless, your health reaches to 0, and the unit does not die. Actually no. Cheat_deathless_player only sets it so your health cannot go below 1 bar. Your health never drops far enough to die, it just prevents you from taking any more fatal damage once you get to 1 bar. If your health does reach 0 by any means necessary with Deathless on, it generally causes an exception. I used a trigger volume that kills you instantly when walking into it (sorta like the killball; we all know how it works) for a pit, and forgot I had deathless on. Game crashed... But, 1 rather than 0 would probably work. 1 bar is low enough anyway that few people reach it unless they're in a fight they're about to lose, or just got really really lucky... Or they're using Deathless.
|
|
|

kai5888
Joined: Jun 29, 2008
Start the revolution
|
Posted: Mar 4, 2009 07:16 PM
Msg. 16 of 23
In that case, sheilds always beep when they are down. But with deathless on, even though the one bar is displayed, and the unit would be dead, why does the beeping and heartbeating stop?
|
|
|

Donut
Joined: Sep 30, 2006
I swear I'm not actually dead
|
Posted: Mar 4, 2009 09:18 PM
Msg. 17 of 23
Quote: --- Original message by: MF BoomQuote: --- Original message by: l283023 I believe that with deathless, your health reaches to 0, and the unit does not die. Actually no. Cheat_deathless_player only sets it so your health cannot go below 1 bar. Your health never drops far enough to die, it just prevents you from taking any more fatal damage once you get to 1 bar. If your health does reach 0 by any means necessary with Deathless on, it generally causes an exception. I used a trigger volume that kills you instantly when walking into it (sorta like the killball; we all know how it works) for a pit, and forgot I had deathless on. Game crashed... But, 1 rather than 0 would probably work. 1 bar is low enough anyway that few people reach it unless they're in a fight they're about to lose, or just got really really lucky... Or they're using Deathless. just thought i would point this out: considering halo HUD's are customization, health bars are not exactly a good unit of measurement somebody said the health ends up getting to 0.001 or something like that since 0 = 0% and 1 = 100%
|
|
|

black doom
Joined: Oct 4, 2008
we will never stop, we can win the "impossible"
|
Posted: Mar 5, 2009 06:44 AM
Msg. 18 of 23
Quote: --- Original message by: MF BoomQuote: --- Original message by: l283023 I believe that with deathless, your health reaches to 0, and the unit does not die. Actually no. Cheat_deathless_player only sets it so your health cannot go below 1 bar. Your health never drops far enough to die, it just prevents you from taking any more fatal damage once you get to 1 bar. If your health does reach 0 by any means necessary with Deathless on, it generally causes an exception. I used a trigger volume that kills you instantly when walking into it (sorta like the killball; we all know how it works) for a pit, and forgot I had deathless on. Game crashed... But, 1 rather than 0 would probably work. 1 bar is low enough anyway that few people reach it unless they're in a fight they're about to lose, or just got really really lucky... Or they're using Deathless. if you die while having deathless it dosent exeption. probaly your script dosent work as it supposted to.
|
|
|

MF Boom
Joined: Mar 5, 2007
I am the bone of my sword...
|
Posted: Mar 5, 2009 08:16 PM
Msg. 19 of 23
Quote: --- Original message by: black doomQuote: --- Original message by: MF BoomQuote: --- Original message by: l283023 I believe that with deathless, your health reaches to 0, and the unit does not die. Actually no. Cheat_deathless_player only sets it so your health cannot go below 1 bar. Your health never drops far enough to die, it just prevents you from taking any more fatal damage once you get to 1 bar. If your health does reach 0 by any means necessary with Deathless on, it generally causes an exception. I used a trigger volume that kills you instantly when walking into it (sorta like the killball; we all know how it works) for a pit, and forgot I had deathless on. Game crashed... But, 1 rather than 0 would probably work. 1 bar is low enough anyway that few people reach it unless they're in a fight they're about to lose, or just got really really lucky... Or they're using Deathless. if you die while having deathless it dosent exeption. probaly your script dosent work as it supposted to. Wasn't my script. Worked fine without deathless on. So, no, it worked fine... Also had someone unit_kill me when he had deathless turned on, exceptioned on my end. Also, I still hear the beeping while I have deathless on, even with one bar. You beep with low shields, regardless of your health; I've had full health, but no shields, and it beeps. But, yeah, that makes sense, Donut. Though it'd be 0.01, that does make more sense than a scale of 1 through 8, a scale of 0 through 1 using 0.01 integers.
|
|
|

Vick Jr
Joined: Jun 26, 2008
Well enough alone...
|
Posted: Mar 5, 2009 08:58 PM
Msg. 20 of 23
Maybe when their health goes really low and they are being shot at*, you emediatly save a checkpoint (game_save_totally_unsafe) -something like that, then they will die and the game will revert to that checkpoint that was just saved (so you don't lose anything really), and then you emediatly telleport the player somewhere and reset their health and stuff.
*you can see if they are in a dangerous situation with a script. I forget it, but it has to to with checking if it's safe to save a checkpoint. You could also check the state of the ais to see if they are shooting stuff or use some other method.
Unfortunatly, i don't think it's possible to really do anything with scripts after the player dies in sp. It's automaticly scripted, in an ungangable way, to revert to last checkpoint, so no scripts can prevent that, which is why you might have to use that in your somution.
|
|
|

Donut
Joined: Sep 30, 2006
I swear I'm not actually dead
|
Posted: Mar 5, 2009 10:28 PM
Msg. 21 of 23
Quote: --- Original message by: lazygamer123 Ummm.. its seen to me that forcing on cheat and moding. Who don't make a gametype for it or make a server to whatever map you want on. If not possible then stick with cheat or mod, oh when I mean by server, I mean did what Ablly did to zombie. yeah there is a reason im making this in an SP map
|
|
|

lil_bankhead
Joined: Dec 12, 2008
What you look'n at huh? I'll bit ya!
|
Posted: Mar 6, 2009 09:55 AM
Msg. 22 of 23
Quote: --- Original message by: Vick Jr Maybe when their health goes really low and they are being shot at*, you emediatly save a checkpoint (game_save_totally_unsafe) -something like that, then they will die and the game will revert to that checkpoint that was just saved (so you don't lose anything really), and then you emediatly telleport the player somewhere and reset their health and stuff.
*you can see if they are in a dangerous situation with a script. I forget it, but it has to to with checking if it's safe to save a checkpoint. You could also check the state of the ais to see if they are shooting stuff or use some other method.
Unfortunatly, i don't think it's possible to really do anything with scripts after the player dies in sp. It's automaticly scripted, in an ungangable way, to revert to last checkpoint, so no scripts can prevent that, which is why you might have to use that in your somution. I agree I should have sworn I heard it from somewhere but donut I don't think it would be possible for any of those stuff to happen on sp not like those halo co-op on xbox
|
|
|

UnevenElefant5
Joined: May 3, 2008
its been fun yall, i'll never forget this site :')
|
Posted: Mar 6, 2009 10:11 PM
Msg. 23 of 23
Quote: --- Original message by: DonutQuote: --- Original message by: lazygamer123 Ummm.. its seen to me that forcing on cheat and moding. Who don't make a gametype for it or make a server to whatever map you want on. If not possible then stick with cheat or mod, oh when I mean by server, I mean did what Ablly did to zombie. yeah there is a reason im making this in an SP map So, what is the logic behind making this an SP?
|
|
|
| |
|
|
 |
|