SilentHideButFine
Member
Posts: 156
Threads: 38
Joined: May 2012
Reputation:
6
|
How to make a area to dmg the player when enter (With static objects)
Hello i wanna make the sharp Barbarrier on dungeonbase and if player go to near the sharpy thing you get hurted.... any clue?=
|
|
06-26-2012, 04:35 PM |
|
Jagsrs28
Member
Posts: 101
Threads: 25
Joined: Jun 2012
Reputation:
0
|
RE: How to make a area to dmg the player when enter (With static objects)
(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)
Special Custom Story for 2 special people!
|
|
06-26-2012, 04:46 PM |
|
SilentHideButFine
Member
Posts: 156
Threads: 38
Joined: May 2012
Reputation:
6
|
RE: How to make a area to dmg the player when enter (With static objects)
(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?=
Put a script box around the barbarrier (Really close to it, like as close as you can get it)
Whats the script then , want it to be like it was on angrippa in the real amnesia game
|
|
06-26-2012, 04:49 PM |
|
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 |
|
Cruzore
Senior Member
Posts: 301
Threads: 2
Joined: Jun 2012
Reputation:
37
|
RE: How to make a area to dmg the player when enter (With static objects)
Just look how they did it then.
|
|
06-26-2012, 04:57 PM |
|
Jagsrs28
Member
Posts: 101
Threads: 25
Joined: Jun 2012
Reputation:
0
|
RE: How to make a area to dmg the player when enter (With static objects)
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.
Special Custom Story for 2 special people!
(This post was last modified: 06-26-2012, 05:07 PM by Jagsrs28.)
|
|
06-26-2012, 05:06 PM |
|
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)
(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...
(This post was last modified: 06-26-2012, 05:41 PM by ApeCake.)
|
|
06-26-2012, 05:40 PM |
|
MaZiCUT
Senior Member
Posts: 536
Threads: 31
Joined: Jun 2012
Reputation:
17
|
RE: How to make a area to dmg the player when enter (With static objects)
(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 .
Hi.
|
|
06-26-2012, 06:25 PM |
|
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)
(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 . Yeah I was just kidding. I didn't really think about the fact that OP was probably new...
|
|
06-26-2012, 07:13 PM |
|
Khyrpa
Senior Member
Posts: 638
Threads: 10
Joined: Apr 2011
Reputation:
24
|
RE: How to make a area to dmg the player when enter (With static objects)
You can also try using the slime areas and tweak the numbers and it could give a result quite similar to what you seek.
|
|
06-26-2012, 07:21 PM |
|
|