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
Check when a player Died?
laser50 Offline
Member

Posts: 242
Threads: 22
Joined: Apr 2011
Reputation: 0
#1
Check when a player Died?

Hey guys. I had this great idea in mind but i've come across a problem on making it.

In fact, I wanna make a monster kill a player and then make him "Wake Up"
How can i make this?
05-10-2011, 08:49 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: Check when a player Died?

How about you check to see if the player has the health of 10 or lower and if it's true, fade out the screen, teleport the player, fade back in, and then play a coughing or breathing sound and reduce sanity to 20 for "sleepy" effects.

05-10-2011, 09:16 PM
Find
laser50 Offline
Member

Posts: 242
Threads: 22
Joined: Apr 2011
Reputation: 0
#3
RE: Check when a player Died?

Any way to check health?
05-10-2011, 09:30 PM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#4
RE: Check when a player Died?

(05-10-2011, 09:30 PM)laser50 Wrote: Any way to check health?

GetPlayerHealth();
Though an alternate approach may be to add a collision call back on a script area which is also over the area where the player re-spawns, or just make him respawn where you want him to wake up?
(This post was last modified: 05-11-2011, 12:13 AM by Apjjm.)
05-10-2011, 09:41 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#5
RE: Check when a player Died?

float GetPlayerHealth();

For example:

void OnStart()
{
     Function01();
}
void Function01()
{
     if (GetPlayerHealth() <= 10)
     {
          Function02();
          return;
     }
}

05-10-2011, 09:43 PM
Find
Viperdream Offline
Member

Posts: 124
Threads: 16
Joined: Jan 2011
Reputation: 0
#6
RE: Check when a player Died?

Maybe use a checkpoint? I don't know if this would work but:
void Check1(string &in asName, int alCount)    
         {
             ChangeMap("random.map", "PlayerStartArea_1", "", "");
         }

05-10-2011, 11:09 PM
Find
Russ Money Offline
Senior Member

Posts: 360
Threads: 25
Joined: Dec 2010
Reputation: 4
#7
RE: Check when a player Died?

Thought of a work around, as that's what I'm good at, haha.

But, just as suggested, make a check point. The check point spawns the player in a blank spot outside your map, somewhere with just a floor would be alright. Then once the player dies and is sent to that check point, have an area script to teleport the player where you want.

05-11-2011, 01:31 AM
Find




Users browsing this thread: 1 Guest(s)