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
#9
RE: How to make a area to dmg the player when enter (With static objects)

(06-26-2012, 06:25 PM)CrazyArts Wrote:
(06-26-2012, 05:40 PM)ApeCake Wrote:
(06-26-2012, 05:06 PM)Jagsrs28 Wrote: void OnStart()

{
AddEntityCollideCallback("Player", "ScriptArea_1", "NearHurt", true, 1);
}

void NearHurt (string &in asParent, string &in asChild, int alState)
{
GivePlayerDamage(30, BloodSplat, false, false);
PlaySoundAtEntity("", "hurt_pant.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_pant1.snt", "Player", 0, false);
}


Now all you have to do is set up a script area around the barbarrier and call it ScriptArea_1 then you should be good to go (I never played the real Amnesia game so I wouldnt know what it would be like but I made it as good as i can)

Need any help just post back here.

Mine gives sounds of pain. Unlike ApeCakes script.

"Mine gives sounds of pain. Unlike ApeCakes script."


That sounds like a challenge. I accept.
void OnStart()

{
AddEntityCollideCallback("Player", "hurtarea", "NearHurt", true, 1);
}

void NearHurt (string &in asParent, string &in asChild, int alState)
{
GivePlayerDamage(30, BloodSplat, false, false);
PlaySoundAtEntity("", "hurt_pant.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_pant1.snt", "Player", 0, false);
StartScreenShake(0.3, 0.3, 0, 0.3);

}


MINE SHAKES THE SCREEN. UNLIKE JAGSRS. I KNOW IT TOTALLY WASN'T NEEDED BUT I STILL ADDED IT TO SHOW THAT I'M BETTER THAN OTHER PEOPLE ON THE INTERNET!!!!!!

Seriously Jagsrs...
He is a beginner at scripting, he just learned some basic stuff so he thinks that kind of stuff is important. Please be more serious, the OP chooses what script he would prefer anyways Smile .
Yeah I was just kidding. I didn't really think about the fact that OP was probably new...
06-26-2012, 07:13 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, 07:13 PM



Users browsing this thread: 8 Guest(s)