Frictional Games Forum (read-only)

Full Version: [SOLVED] Is it possible ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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...
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 Smile
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 ","
Post the script then I guess, assuming theres something you've either accidently deleted or added.
(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.
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)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 Big Grin

No I mean did you change these? example
PHP Code:
SetPlayerSanity(float afSanity); 

did you change the last thing? to this?
PHP Code:
SetPlayerSanity(0); 

or any number, cause that can be the cause of the error
Spoiler below!
PHP Code:
AddEntityCollideCallback("Player""TunelMagic""FuckItUp"true1);
AddEntityCollideCallback("Player""TunelMagicEnd""ToNormality"true, -1);


void FuckItUp(string &in asParentstring &in asChildint alState)
{
SetPlayerSanity(1);
SetPlayerHealth(20);
PlaySoundAtEntity("insanity_whisper03""insanity_whisper.snt","Player"0false);

FadeImageTrailTo(0.2f1f);
FadeRadialBlurTo(0.4f1f);
FadePlayerFOVMulTo(2.3f0.5f);
FadePlayerAspectMulTo(2f0.2f);
}

void ToNormality(string &in...)
{
ChangePlayerStateToNormal();


(09-21-2014, 02:27 PM)Straxedix Wrote: [ -> ]
Spoiler below!
PHP Code:
AddEntityCollideCallback("Player""TunelMagic""FuckItUp"true1);
AddEntityCollideCallback("Player""TunelMagicEnd""ToNormality"true, -1);


void FuckItUp(string &in asParentstring &in asChildint alState)
{
SetPlayerSanity(1);
SetPlayerHealth(20);
PlaySoundAtEntity("insanity_whisper03""insanity_whisper.snt","Player"0false);

FadeImageTrailTo(0.2f1f);
FadeRadialBlurTo(0.4f1f);
FadePlayerFOVMulTo(2.3f0.5f);
FadePlayerAspectMulTo(2f0.2f);
}

void ToNormality(string &in...)
{
ChangePlayerStateToNormal();



Why is that a thing?
PHP Code:
void ToNormality(string &in...) 

It should be
PHP Code:
void ToNormality(string &in asParentstring &in asChildint alState

lol I guess chaser was too lazy to continue it Tongue
I noticed it

Spoiler below!
PHP Code:
AddEntityCollideCallback("Player""TunelMagic""FuckItUp"true1);
AddEntityCollideCallback("Player""TunelMagicEnd""ToNormality"true, -1);



void FuckItUp(string &in asParentstring &in asChildint alState)
{
SetPlayerSanity(1);
SetPlayerHealth(20);
PlaySoundAtEntity("insanity_whisper03""insanity_whisper.snt","Player"0false);

FadeImageTrailTo(0.2f1f);
FadeRadialBlurTo(0.4f1f);
FadePlayerFOVMulTo(2.3f0.5f);
FadePlayerAspectMulTo(2f0.2f);
}

void ToNormality(string &in asParentstring &in asChildint alState)
{
ChangePlayerStateToNormal();



Now it comes more errors say that these:

Spoiler below!
PHP Code:
FadeImageTrailTo(0.2f1f);
FadeRadialBlurTo(0.4f1f);FadePlayerAspectMulTo(2f0.2f); 


It says they need ")" or ","
Pages: 1 2