ApeCake
Member
Posts: 116
Threads: 20
Joined: Jun 2012
Reputation:
4
|
RE: How to make a area to dmg the player when enter (With static objects)
Like Jagsrs28 said, put a script area around the "sharpy thing". I called the script area hurtarea.
void OnStart()
{
AddEntityCollideCallback("Player", "hurtarea", "NAMEofFUNCTION", false, 1);
}
void NAMEofFUNCTION(string &in asChild, string &in asParent, int alState)
{
GivePlayerDamage(10, BloodSplat, false, false);
}
//You can change the "10". That is the amount of damage dealt. The player has 100 health in total. BloodSplat stands for what kind of "hit" you see on your screen. You can choose BloodSplat, Claws or Slash. The false is for if you want the players head to turn on hit. The second false is for lethalness - set to true if you want your player to die from it.
I am not entirely sure this will work, I haven't tested it, but it should.
|
|
06-26-2012, 04:57 PM |
|