Frictional Games Forum (read-only)

Full Version: [SOLVED] Death Teleporting
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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 ...
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)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
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!
I can't find it...
(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.
PHP Code:
void instakill(string &in asParentstring &in asChildint alState)
{
    
GivePlayerDamage(110"Claws"truetrue);
}

void CheckPoint(string &in asNameint alCount)
{
    
AddTimer("ChangeMap"5.0"TimerChangeMap");
    
FadeOut(0.0f);
}

void TimerChangeMap(string &in asChangeMap)
{
    
SetupLoadScreen("LoadingText"""1"");
    
ChangeMap("","PlayerStartArea_1""""");    

This?

Spoiler below!
PHP Code:
void CollideFallDeath(string &in asParentstring &in asChildint 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==0CheckPoint("checkFallDeath1""PlayerStartArea_1""CheckPointFallWell""Hints""DeathFall_21_TortureNave");    
            if(
lRand==1CheckPoint("checkFallDeath2""PlayerStartArea_5""CheckPointFallWell""Hints""DeathFall_21_TortureNave");    
            if(
lRand==2CheckPoint("checkFallDeath3""PlayerStartArea_6""CheckPointFallWell""Hints""DeathFall_21_TortureNave");    
        }
    }
    
    
PlaySoundAtEntity("fallaaaaaah""11_fall""Player"0false);
    
PlaySoundAtEntity("fallaaaaaah2""scare_male_terrified5""Player"0false);
    
    
FadeOut(1);
    
    
AddTimer("death1"0.5f"TimerFallDeath");    
    
AddTimer("death2"1"TimerFallDeath");    
}

void TimerFallDeath(string &in asTimer)
{    
    if(
asTimer == "death1"){
        
PlaySoundAtEntity("bump1""player_bodyfall""Player"0false);
        return;
    }    
    
    
DisableDeathStartSound();
    
AddPlayerHealth(-200);
    
    
PlaySoundAtEntity("pain""player_falldamage_max""Player"0false);
    
PlaySoundAtEntity("bump2""player_bodyfall""Player"0false);
}    



void CheckPointFallDeath(string &in asNameint alCount)
{
    
//Do nothing??


No that's when you fall down and die and respawn, look at my updated reply!
But monster is supposted to kill me not to suicide ???
(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.
Pages: 1 2