Straxedix
Senior Member
Posts: 426
Threads: 52
Joined: Mar 2014
Reputation:
5
[SOLVED] Death Teleporting
I saw in CS called:A Late Night Drink,when you die there comes up death text and you teleport to a new map,how i make that ? i know for the:
void ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound);
Immediatly loads another map.
asMapName - the file to load
asStartPos - the name of the StartPos on the next map
asStartSound - the sound that is played when the change starts
asEndSound - the sound that is played when the new map is loaded
But how i make that when i die ...
(This post was last modified: 09-20-2014, 10:09 AM by Straxedix .)
09-20-2014, 09:21 AM
Amnesiaplayer
Senior Member
Posts: 539
Threads: 105
Joined: Jun 2014
Reputation:
0
RE: Death Teleporting
If you die... what die do you use ?
you're gettin punched by Grunt or Brute...
or a Script thing...
Because i did scripting... i used a cannon that shoots a ball , you will fall and die , And teleport to another map..
09-20-2014, 09:26 AM
Straxedix
Senior Member
Posts: 426
Threads: 52
Joined: Mar 2014
Reputation:
5
RE: Death Teleporting
(09-20-2014, 09:26 AM) Amnesiaplayer Wrote: If you die... what die do you use ?
you're gettin punched by Grunt or Brute...
or a Script thing...
Because i did scripting... i used a cannon that shoots a ball , you will fall and die , And teleport to another map..
Punched by grunt
09-20-2014, 09:27 AM
Radical Batz
Posting Freak
Posts: 953
Threads: 145
Joined: Dec 2013
Reputation:
25
RE: Death Teleporting
You mean the player will die and when the death hint comes up, you will change the map? That's petty easy to do imo, you could find that in the chancel's hps from atdd when the 3 grunts insta death kill you!
(This post was last modified: 09-20-2014, 09:34 AM by Radical Batz .)
09-20-2014, 09:28 AM
Straxedix
Senior Member
Posts: 426
Threads: 52
Joined: Mar 2014
Reputation:
5
RE: Death Teleporting
I can't find it...
09-20-2014, 09:34 AM
Radical Batz
Posting Freak
Posts: 953
Threads: 145
Joined: Dec 2013
Reputation:
25
RE: Death Teleporting
(09-20-2014, 09:34 AM) Straxedix Wrote: I can't find it...
It's in the main/maps/22_torture_chancel.hps
Well you can mess around with it, since you can't find it, it's something like this that you want.
void instakill ( string & in asParent , string & in asChild , int alState ) { GivePlayerDamage ( 110 , "Claws" , true , true ); } void CheckPoint ( string & in asName , int alCount ) { AddTimer ( "ChangeMap" , 5.0 , "TimerChangeMap" ); FadeOut ( 0.0f ); } void TimerChangeMap ( string & in asChangeMap ) { SetupLoadScreen ( "LoadingText" , "" , 1 , "" ); ChangeMap ( "" , "PlayerStartArea_1" , "" , "" ); }
(This post was last modified: 09-20-2014, 09:37 AM by Radical Batz .)
09-20-2014, 09:34 AM
Straxedix
Senior Member
Posts: 426
Threads: 52
Joined: Mar 2014
Reputation:
5
RE: Death Teleporting
This?
Spoiler below!
void CollideFallDeath ( string & in asParent , string & in asChild , int alState ) { ///////////////////////////////// //A respawn at random position. // If ambush is in progress, we need to use it's checkpoint! if( GetLocalVarInt ( "AmbushStarted" )== 0 ) { if( GetLocalVarInt ( "CPAltar" ) != 1 ) CheckPoint ( "checkpoint_default" , "PlayerStartArea_6" , "CPCallAltar" , "" , "" ); else{ int lRand = RandInt ( 0 , 2 ); if( lRand == 0 ) CheckPoint ( "checkFallDeath1" , "PlayerStartArea_1" , "CheckPointFallWell" , "Hints" , "DeathFall_21_TortureNave" ); if( lRand == 1 ) CheckPoint ( "checkFallDeath2" , "PlayerStartArea_5" , "CheckPointFallWell" , "Hints" , "DeathFall_21_TortureNave" ); if( lRand == 2 ) CheckPoint ( "checkFallDeath3" , "PlayerStartArea_6" , "CheckPointFallWell" , "Hints" , "DeathFall_21_TortureNave" ); } } PlaySoundAtEntity ( "fallaaaaaah" , "11_fall" , "Player" , 0 , false ); PlaySoundAtEntity ( "fallaaaaaah2" , "scare_male_terrified5" , "Player" , 0 , false ); FadeOut ( 1 ); AddTimer ( "death1" , 0.5f , "TimerFallDeath" ); AddTimer ( "death2" , 1 , "TimerFallDeath" ); } void TimerFallDeath ( string & in asTimer ) { if( asTimer == "death1" ){ PlaySoundAtEntity ( "bump1" , "player_bodyfall" , "Player" , 0 , false ); return; } DisableDeathStartSound (); AddPlayerHealth (- 200 ); PlaySoundAtEntity ( "pain" , "player_falldamage_max" , "Player" , 0 , false ); PlaySoundAtEntity ( "bump2" , "player_bodyfall" , "Player" , 0 , false ); } void CheckPointFallDeath ( string & in asName , int alCount ) { //Do nothing?? }
(This post was last modified: 09-20-2014, 09:37 AM by Straxedix .)
09-20-2014, 09:37 AM
Radical Batz
Posting Freak
Posts: 953
Threads: 145
Joined: Dec 2013
Reputation:
25
RE: Death Teleporting
No that's when you fall down and die and respawn, look at my updated reply!
09-20-2014, 09:38 AM
Straxedix
Senior Member
Posts: 426
Threads: 52
Joined: Mar 2014
Reputation:
5
RE: Death Teleporting
But monster is supposted to kill me not to suicide ???
09-20-2014, 09:39 AM
Radical Batz
Posting Freak
Posts: 953
Threads: 145
Joined: Dec 2013
Reputation:
25
RE: Death Teleporting
(09-20-2014, 09:39 AM) Straxedix Wrote: But monster is supposted to kill me not to suicide ???
But example if you don't want the player to run and put the grunt to patrol mode, you could always create an area so it can insta kill the player if he collides with it.
(This post was last modified: 09-20-2014, 09:41 AM by Radical Batz .)
09-20-2014, 09:40 AM