![]() |
[LVL ED] How to make a area to dmg the player when enter (With static objects) - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: [LVL ED] How to make a area to dmg the player when enter (With static objects) (/thread-16509.html) |
How to make a area to dmg the player when enter (With static objects) - SilentHideButFine - 06-26-2012 Hello i wanna make the sharp Barbarrier on dungeonbase and if player go to near the sharpy thing you get hurted.... any clue?= RE: How to make a area to dmg the player when enter (With static objects) - Jagsrs28 - 06-26-2012 (06-26-2012, 04:35 PM)SilentHideButFine Wrote: Hello i wanna make the sharp Barbarrier on dungeonbase and if player go to near the sharpy thing you get hurted.... any clue?=Put a script box around the barbarrier (Really close to it, like as close as you can get it) RE: How to make a area to dmg the player when enter (With static objects) - SilentHideButFine - 06-26-2012 (06-26-2012, 04:46 PM)Jagsrs28 Wrote:(06-26-2012, 04:35 PM)SilentHideButFine Wrote: Hello i wanna make the sharp Barbarrier on dungeonbase and if player go to near the sharpy thing you get hurted.... any clue?= Whats the script then , want it to be like it was on angrippa in the real amnesia game RE: How to make a area to dmg the player when enter (With static objects) - ApeCake - 06-26-2012 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. RE: How to make a area to dmg the player when enter (With static objects) - Cruzore - 06-26-2012 Just look how they did it then. RE: How to make a area to dmg the player when enter (With static objects) - Jagsrs28 - 06-26-2012 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. RE: How to make a area to dmg the player when enter (With static objects) - ApeCake - 06-26-2012 (06-26-2012, 05:06 PM)Jagsrs28 Wrote: void OnStart() "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... RE: How to make a area to dmg the player when enter (With static objects) - MaZiCUT - 06-26-2012 (06-26-2012, 05:40 PM)ApeCake Wrote: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(06-26-2012, 05:06 PM)Jagsrs28 Wrote: void OnStart() ![]() RE: How to make a area to dmg the player when enter (With static objects) - ApeCake - 06-26-2012 (06-26-2012, 06:25 PM)CrazyArts Wrote:Yeah I was just kidding. I didn't really think about the fact that OP was probably new...(06-26-2012, 05:40 PM)ApeCake Wrote: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(06-26-2012, 05:06 PM)Jagsrs28 Wrote: void OnStart() RE: How to make a area to dmg the player when enter (With static objects) - Khyrpa - 06-26-2012 You can also try using the slime areas and tweak the numbers and it could give a result quite similar to what you seek. |