Frictional Games Forum (read-only)
[SCRIPT] [SOLVED] Death Teleporting - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] [SOLVED] Death Teleporting (/thread-26235.html)

Pages: 1 2


[SOLVED] Death Teleporting - Straxedix - 09-20-2014

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 ...


RE: Death Teleporting - Amnesiaplayer - 09-20-2014

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..


RE: Death Teleporting - Straxedix - 09-20-2014

(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


RE: Death Teleporting - Radical Batz - 09-20-2014

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!


RE: Death Teleporting - Straxedix - 09-20-2014

I can't find it...


RE: Death Teleporting - Radical Batz - 09-20-2014

(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""""");    




RE: Death Teleporting - Straxedix - 09-20-2014

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??





RE: Death Teleporting - Radical Batz - 09-20-2014

No that's when you fall down and die and respawn, look at my updated reply!


RE: Death Teleporting - Straxedix - 09-20-2014

But monster is supposted to kill me not to suicide ???


RE: Death Teleporting - Radical Batz - 09-20-2014

(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.