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
Level Editor Help How to make a area to dmg the player when enter (With static objects)
ApeCake Offline
Member

Posts: 116
Threads: 20
Joined: Jun 2012
Reputation: 4
#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
Find


Messages In This Thread
RE: How to make a area to dmg the player when enter (With static objects) - by ApeCake - 06-26-2012, 04:57 PM



Users browsing this thread: 1 Guest(s)