Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help [SOLVED] Death Teleporting
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#1
[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
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#2
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
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#3
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
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#4
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
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#5
RE: Death Teleporting

I can't find it...

09-20-2014, 09:34 AM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#6
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.
PHP Code: (Select All)
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 post was last modified: 09-20-2014, 09:37 AM by Radical Batz.)
09-20-2014, 09:34 AM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#7
RE: Death Teleporting

This?

Spoiler below!
PHP Code: (Select All)
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??



(This post was last modified: 09-20-2014, 09:37 AM by Straxedix.)
09-20-2014, 09:37 AM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#8
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
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#9
RE: Death Teleporting

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

09-20-2014, 09:39 AM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#10
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
Find




Users browsing this thread: 4 Guest(s)