Straxedix
Senior Member
Posts: 426
Threads: 52
Joined: Mar 2014
Reputation:
5
[SOLVED] Is it possible ?
Is it possible to make when player enter the area:
-He gains low sanity,low hp,he start to hear sounds,camera is fu*ked up,sensitivity is smaller...Until he reach another area when all that stops...
And if it is...How i tried few thinks but ...I am still new in this stuff,i can do some scripts alone but...
(This post was last modified: 09-21-2014, 07:05 PM by Straxedix .)
09-21-2014, 01:33 PM
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
RE: Is it possible ?
Yeah, it's pretty possible:
Add two "AddEntityCollideCallback". One should look like this:
AddEntityCollideCallback("Player", "InsArea", "FuckItUp", true, 1);
AddEntityCollideCallback("Player", "InsArea", "ToNormality", true, -1);
There's one thing that I need to know tho: will the player be able to get that event as many times as it wishes?
Then:
void FuckItUp (string &in asParent, string &in asChild, int alState)
{
SetPlayerSanity(float afSanity);
SetPlayerHealth(float afHealth);
PlaySoundAtEntity("WhateverSound", "Sound.snt","Player", 0, false);
FadeImageTrailTo(float afAmount, float afSpeed);
FadeRadialBlurTo(float afSize, float afSpeed);
FadePlayerFOVMulTo(float afX, float afSpeed);
FadePlayerAspectMulTo(float afX, float afSpeed);
}
void ToNormality (string &in...)
{
ChangePlayerStateToNormal();
}
That should be it. There are more ways to customize it, so if this isn't all you need just tell us
THE OTHERWORLD (WIP)
Aculy iz dolan.
09-21-2014, 01:56 PM
Straxedix
Senior Member
Posts: 426
Threads: 52
Joined: Mar 2014
Reputation:
5
RE: Is it possible ?
Hmm if ask me do i wanna event work only when enter then yeah i wanna (so it don't goes back and same happens) and the script has a problem...It says expected ")" or ","
09-21-2014, 02:10 PM
Neelke
Senior Member
Posts: 668
Threads: 82
Joined: Apr 2013
Reputation:
26
RE: Is it possible ?
Post the script then I guess, assuming theres something you've either accidently deleted or added.
Derp.
09-21-2014, 02:15 PM
Radical Batz
Posting Freak
Posts: 953
Threads: 145
Joined: Dec 2013
Reputation:
25
RE: Is it possible ?
(09-21-2014, 02:10 PM) Straxedix Wrote: Hmm if ask me do i wanna event work only when enter then yeah i wanna (so it don't goes back and same happens) and the script has a problem...It says expected ")" or ","
Show me the script you put in your hps file, I hope you put the numbers and everything and not just copied the one that chase gave you and just pasted it like that.
09-21-2014, 02:16 PM
Straxedix
Senior Member
Posts: 426
Threads: 52
Joined: Mar 2014
Reputation:
5
RE: Is it possible ?
LOOOOOL ofc i didn't...okay maybe a little...okay i copied and pasted it -.- I am so lazy atm xD
But i will change it atm :D
09-21-2014, 02:21 PM
Radical Batz
Posting Freak
Posts: 953
Threads: 145
Joined: Dec 2013
Reputation:
25
RE: Is it possible ?
(09-21-2014, 02:21 PM) Straxedix Wrote: LOOOOOL ofc i didn't...okay maybe a little...okay i copied and pasted it -.- I am so lazy atm xD
But i will change it atm
No I mean did you change these? example
SetPlayerSanity ( float afSanity );
did you change the last thing? to this?
or any number, cause that can be the cause of the error
09-21-2014, 02:25 PM
Straxedix
Senior Member
Posts: 426
Threads: 52
Joined: Mar 2014
Reputation:
5
RE: Is it possible ?
Spoiler below!
AddEntityCollideCallback ( "Player" , "TunelMagic" , "FuckItUp" , true , 1 ); AddEntityCollideCallback ( "Player" , "TunelMagicEnd" , "ToNormality" , true , - 1 ); void FuckItUp ( string & in asParent , string & in asChild , int alState ) { SetPlayerSanity ( 1 ); SetPlayerHealth ( 20 ); PlaySoundAtEntity ( "insanity_whisper03" , "insanity_whisper.snt" , "Player" , 0 , false ); FadeImageTrailTo ( 0.2f , 1f ); FadeRadialBlurTo ( 0.4f , 1f ); FadePlayerFOVMulTo ( 2.3f , 0.5f ); FadePlayerAspectMulTo ( 2f , 0.2f ); } void ToNormality ( string & in ...) { ChangePlayerStateToNormal (); }
09-21-2014, 02:27 PM
Radical Batz
Posting Freak
Posts: 953
Threads: 145
Joined: Dec 2013
Reputation:
25
RE: Is it possible ?
(09-21-2014, 02:27 PM) Straxedix Wrote:
Spoiler below!
AddEntityCollideCallback ( "Player" , "TunelMagic" , "FuckItUp" , true , 1 ); AddEntityCollideCallback ( "Player" , "TunelMagicEnd" , "ToNormality" , true , - 1 ); void FuckItUp ( string & in asParent , string & in asChild , int alState ) { SetPlayerSanity ( 1 ); SetPlayerHealth ( 20 ); PlaySoundAtEntity ( "insanity_whisper03" , "insanity_whisper.snt" , "Player" , 0 , false ); FadeImageTrailTo ( 0.2f , 1f ); FadeRadialBlurTo ( 0.4f , 1f ); FadePlayerFOVMulTo ( 2.3f , 0.5f ); FadePlayerAspectMulTo ( 2f , 0.2f ); } void ToNormality ( string & in ...) { ChangePlayerStateToNormal (); }
Why is that a thing?
void ToNormality ( string & in ...)
It should be
void ToNormality ( string & in asParent , string & in asChild , int alState )
lol I guess chaser was too lazy to continue it
(This post was last modified: 09-21-2014, 02:32 PM by Radical Batz .)
09-21-2014, 02:31 PM
Straxedix
Senior Member
Posts: 426
Threads: 52
Joined: Mar 2014
Reputation:
5
RE: Is it possible ?
I noticed it
Spoiler below!
AddEntityCollideCallback ( "Player" , "TunelMagic" , "FuckItUp" , true , 1 ); AddEntityCollideCallback ( "Player" , "TunelMagicEnd" , "ToNormality" , true , - 1 ); void FuckItUp ( string & in asParent , string & in asChild , int alState ) { SetPlayerSanity ( 1 ); SetPlayerHealth ( 20 ); PlaySoundAtEntity ( "insanity_whisper03" , "insanity_whisper.snt" , "Player" , 0 , false ); FadeImageTrailTo ( 0.2f , 1f ); FadeRadialBlurTo ( 0.4f , 1f ); FadePlayerFOVMulTo ( 2.3f , 0.5f ); FadePlayerAspectMulTo ( 2f , 0.2f ); } void ToNormality ( string & in asParent , string & in asChild , int alState ) { ChangePlayerStateToNormal (); }
Now it comes more errors say that these:
It says they need ")" or ","
09-21-2014, 02:33 PM