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
Death areas / out of bounds
mitchell Offline
Junior Member

Posts: 8
Threads: 3
Joined: Sep 2010
Reputation: 0
#1
Death areas / out of bounds

Hi everyone, in my level ive got a massive stream. (which you currently just fall through forever)

is it possible to have areas which will kills you.

the only example is from the main game is when you die from falling off an edge.

thanks
09-19-2010, 11:59 PM
Find
Pandemoneus Offline
Senior Member

Posts: 328
Threads: 2
Joined: Sep 2010
Reputation: 0
#2
RE: Death areas / out of bounds

Yes, it is possible.
Create a script area and call it WhateverYouLike.

void OnStart()
{
AddEntityCollideCallback("Player", "WhateverYouLike", "KillThePlayer", false, 1);
}

void KillThePlayer(string &in asParent, string &in asChild, int alState)
{
/**
* Type can be: BloodSplat, Claws or Slash.
* void  GivePlayerDamage(float afAmount, string& asType, bool abSpinHead, bool abLethal);
*/

GivePlayerDamage(1000, "BloodSplat", true, true);
}

//player dies, number has to be 100+ to kill the player when he wasn't damaged yet
//1000 = Amount of Damage, "BloodSplat" = Animation played on the screen when getting damage
//first true = make the player spin when he gets damaged
//second true = makes it lethal damage so you actually die from it

[edit]
The developers actually used
AddPlayerHealth(-200);

Up to you how you want to do it. Big Grin

09-20-2010, 12:08 AM
Find




Users browsing this thread: 1 Guest(s)