
deadlyfighter1000
Joined: Jan 11, 2009
Constantly a threat.
|
Posted: Aug 1, 2010 08:51 PM
Msg. 1 of 19
Is it possible to make a singleplayer level were you can respawn?
|
|
|

deadlyfighter1000
Joined: Jan 11, 2009
Constantly a threat.
|
Posted: Aug 1, 2010 09:31 PM
Msg. 2 of 19
I understand the checkpoint system (and I know how to do it), but what I want is for it to act like a multi-player map, where it respawns you at a spawn location when you die. I am mainly making it a single player map for more tag space.
|
|
|

Noobyourmom
Joined: Mar 23, 2010
|
Posted: Aug 1, 2010 11:44 PM
Msg. 3 of 19
Sure it's possible. Just make it a multiplayer map. You'll respawn like you do on all those ai maps. Multiplayer maps can be scripted just like singleplayer maps, the scripts just won't sync.
|
|
|

sierra117
Joined: Jan 10, 2008
If sex is good exercise, why are there fat sluts?
|
Posted: Aug 2, 2010 02:31 AM
Msg. 4 of 19
yes its very possible in sp... *hint* "cheat_deathless_player 1" *hint*
|
|
|

deadlyfighter1000
Joined: Jan 11, 2009
Constantly a threat.
|
Posted: Aug 2, 2010 11:20 AM
Msg. 5 of 19
i'd like to make it a multi-player map noob, but multi-player maps can't hold as many tags as single-player maps can. So that is why I want to make it respawnable.
|
|
|

XlzQwerty1
Joined: Aug 6, 2009
|
Posted: Aug 2, 2010 12:41 PM
Msg. 6 of 19
Quote: --- Original message by: Zira Vadum The variant of Sapien, a_hobo, should allow you to put in more tags than the stock one that comes with HEK. No, its tool pro that does that, but either way if you exceed the limited amount of tags, the map will probably exception here and there.
|
|
|

SlappyThePirate
Joined: Aug 24, 2009
You are irritating, I'll release nothing
|
Posted: Aug 2, 2010 04:06 PM
Msg. 7 of 19
Quote: --- Original message by: deadlyfighter1000 I understand the checkpoint system (and I know how to do it), but what I want is for it to act like a multi-player map, where it respawns you at a spawn location when you die. I am mainly making it a single player map for more tag space. Oh. I though you wanted a firefight with lives. You know how the flood forms come back to life? That's called "ressurrection" in the tag. That's how i would do it, plus scripts.
|
|
|

deadlyfighter1000
Joined: Jan 11, 2009
Constantly a threat.
|
Posted: Aug 2, 2010 04:17 PM
Msg. 8 of 19
Okay, but where in their tags is the ressurection? And could you explain how I could do it via scripts?
|
|
|

SlappyThePirate
Joined: Aug 24, 2009
You are irritating, I'll release nothing
|
Posted: Aug 2, 2010 04:36 PM
Msg. 9 of 19
Quote: --- Original message by: deadlyfighter1000 Okay, but where in their tags is the ressurection? And could you explain how I could do it via scripts? Well, script would have tom check when the player's health is too low, wait a couple secs, then teleport you to a flag and wive u weapons.
|
|
|

deadlyfighter1000
Joined: Jan 11, 2009
Constantly a threat.
|
Posted: Aug 2, 2010 04:41 PM
Msg. 10 of 19
Okay, so I made the script, and it should work, but it says that player0 is an invalid object, yet I have the script to make him an object. Here are the two scripts:
(script static "unit" player0 (unit (list_get (players )0 )))
(script continuous respawn (unit_get_health (player0)) (if (and (= (unit_get_health (player0)) 10))) (unit_set_current_vitality (player0) 25 0) (object_teleport (player0) respawn) (sleep 300) (unit_set_current_vitality (player0) 50 0) (sleep 300) (unit_set_current_vitality (player0) 75 0) (sleep 300) (unit_set_current_vitality (player0) 100 0) ) Edited by deadlyfighter1000 on Aug 2, 2010 at 11:00 PM
|
|
|

sierra117
Joined: Jan 10, 2008
If sex is good exercise, why are there fat sluts?
|
Posted: Aug 3, 2010 02:37 AM
Msg. 11 of 19
Quote: --- Original message by: deadlyfighter1000
Okay, so I made the script, and it should work, but it says that player0 is an invalid object, yet I have the script to make him an object. Here are the two scripts:
(script static "unit" player0 (unit (list_get (players )0 )))
(script continuous respawn (unit_get_health (player0)) (if (and (= (unit_get_health (player0)) 10))) (unit_set_current_vitality (player0) 25 0) (object_teleport (player0) respawn) (sleep 300) (unit_set_current_vitality (player0) 50 0) (sleep 300) (unit_set_current_vitality (player0) 75 0) (sleep 300) (unit_set_current_vitality (player0) 100 0) ) Edited by deadlyfighter1000 on Aug 2, 2010 at 11:00 PM remove the bold. and change "unit" to "object" (though i think i had one map where it was still "unit" and the script still worked.... though i would still change it just in case) (script static "object" player0 (list_get (players ) 0 ))
|
|
|

deadlyfighter1000
Joined: Jan 11, 2009
Constantly a threat.
|
Posted: Aug 3, 2010 10:27 AM
Msg. 12 of 19
I fixed that problem(I added brackets around player0), now it says that (if (and (= (unit_get_health (player0)) 10)))
it expected if condition then else What do I do? Edited by deadlyfighter1000 on Aug 3, 2010 at 10:27 AM
|
|
|

deadlyfighter1000
Joined: Jan 11, 2009
Constantly a threat.
|
Posted: Aug 3, 2010 12:45 PM
Msg. 13 of 19
Hmm, it compiled but it didnt work. Here is the script:
(script continuous respawn (unit_get_health (player0)) (if (>= (unit_get_health (player0)) 10) (begin (unit_set_current_vitality (player0) 25 0) (object_teleport (player0) respawn) (sleep 300) (unit_set_current_vitality (player0) 50 0) (sleep 300) (unit_set_current_vitality (player0) 75 0) (sleep 300) (unit_set_current_vitality (player0) 100 0) ) ) ) Edited by deadlyfighter1000 on Aug 3, 2010 at 12:53 PM
|
|
|

deadlyfighter1000
Joined: Jan 11, 2009
Constantly a threat.
|
Posted: Aug 3, 2010 01:06 PM
Msg. 14 of 19
Hmm, I have it as you show it in your first quote. But it still refuses to work. It only has one variable.
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Aug 3, 2010 01:13 PM
Msg. 15 of 19
I did a conversion of beavercreek MP to SP once, and I believe it had respawning. Here's the script I used. (global boolean teleport false) (global boolean onAdventure false) (global boolean jTele false)
(script startup begin (set cheat_deathless_player true) )
(script static void teleport_to_spawn (begin_random (if (= teleport true) (begin (set teleport false) (object_teleport (list_get (players) 0) spawn1) ) ) (if (= teleport true) (begin (set teleport false) (object_teleport (list_get (players) 0) spawn2) ) ) (if (= teleport true) (begin (set teleport false) (object_teleport (list_get (players) 0) spawn3) ) ) (if (= teleport true) (begin (set teleport false) (object_teleport (list_get (players) 0) spawn4) ) ) (if (= teleport true) (begin (set teleport false) (object_teleport (list_get (players) 0) spawn5) ) ) (if (= teleport true) (begin (set teleport false) (object_teleport (list_get (players) 0) spawn6) ) ) (if (= teleport true) (begin (set teleport false) (object_teleport (list_get (players) 0) spawn7) ) ) (if (= teleport true) (begin (set teleport false) (object_teleport (list_get (players) 0) spawn8) ) ) (if (= teleport true) (begin (set teleport false) (object_teleport (list_get (players) 0) spawn9) ) ) (if (= teleport true) (begin (set teleport false) (object_teleport (list_get (players) 0) spawn10) ) ) (if (= teleport true) (begin (set teleport false) (object_teleport (list_get (players) 0) spawn11) ) ) (if (= teleport true) (begin (set teleport false) (object_teleport (list_get (players) 0) spawn12) ) ) (if (= teleport true) (begin (set teleport false) (object_teleport (list_get (players) 0) spawn13) ) ) ) )
(script continuous tele1 (sleep_until (volume_test_objects tele1 (players)) 15) (if (not (= jTele true)) (begin (set jTele true) (object_teleport (list_get (players) 0) teleporter1) (sound_impulse_start "sound\sfx\ui\teleporter_activate" none 1) (sleep_until (not (volume_test_objects tele2 (players))) 15) (set jTele false) ) ) )
(script continuous tele2 (sleep_until (volume_test_objects tele2 (players)) 15) (if (not (= jTele true)) (begin (set jTele true) (object_teleport (list_get (players) 0) teleporter2) (sound_impulse_start "sound\sfx\ui\teleporter_activate" none 1) (sleep_until (not (volume_test_objects tele1 (players))) 15) (set jTele false) ) ) )
(script continuous healthcheck (sleep_until (= (unit_get_health (unit (list_get (players) 0))) 0) 1) (if (= onAdventure false) (begin (sound_impulse_start "sound\dialog\chief\deathviolent" none 1) (fade_out 0 0 0 0) (sleep 15) (sound_impulse_start "sound\sfx\ui\countdown_for_respawn" none 1) (sleep (* (sound_impulse_time "sound\sfx\ui\countdown_for_respawn") 14)) (sound_impulse_start "sound\sfx\ui\countdown_for_respawn" none 1) (set teleport true) (teleport_to_spawn) (sleep (* (sound_impulse_time "sound\sfx\ui\countdown_for_respawn") 14)) (sound_impulse_start "sound\sfx\ui\countdown_for_respawn" none 1) (sleep (* (sound_impulse_time "sound\sfx\ui\countdown_for_respawn") 14)) (sound_impulse_start "sound\sfx\ui\player_respawn" none 1) (player_add_equipment (unit (list_get (players) 0)) player true) (fade_in 0 0 0 0) ) ) )
The reason I used begin random and all these flags was for random respawn locations.
|
|
|

deadlyfighter1000
Joined: Jan 11, 2009
Constantly a threat.
|
Posted: Aug 3, 2010 01:21 PM
Msg. 16 of 19
Okay, I kinda understand your script gamma, but how can a deathless player's health be at 0? Or does it go to 0 but not kill them?
Btw its working now, thanks guys. And thanks for showing me the script, I understand how it works, but I'm making my guy respawn at a fixed location. Edited by deadlyfighter1000 on Aug 3, 2010 at 01:44 PM
|
|
|

deadlyfighter1000
Joined: Jan 11, 2009
Constantly a threat.
|
Posted: Aug 3, 2010 03:45 PM
Msg. 17 of 19
Kk, thanks, at first I thought that the get_health would be their health, like 100 or 50. But its fixed now. Ok, how do I remove a players equipment? When I try giving them another set of equipment via (player_add_equipment (player0) player true)
It still keeps one weapon. Edited by deadlyfighter1000 on Aug 3, 2010 at 04:40 PM
|
|
|

deadlyfighter1000
Joined: Jan 11, 2009
Constantly a threat.
|
Posted: Aug 3, 2010 10:11 PM
Msg. 18 of 19
Okay, my player starting equipment has one assault rifle and one pistol. When my character "dies" he "respawns" and he has the assault rifle and the pistol. But he also keeps one weapon he had before he died.
|
|
|

deadlyfighter1000
Joined: Jan 11, 2009
Constantly a threat.
|
Posted: Aug 4, 2010 10:02 PM
Msg. 19 of 19
Okay, I tried your idea, but you still respawn with one of your weapons. How do I fix this?
|
|
|