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


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Death areas / out of bounds
Author Message
mitchell Offline
Junior Member

Posts: 8
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Pandemoneus Offline
Senior Member

Posts: 328
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)