Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help [SOLVED] Is it possible ?
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#1
[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
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
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 Smile

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
09-21-2014, 01:56 PM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#3
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
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#4
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
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#5
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
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#6
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
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#7
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 Big Grin

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

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

or any number, cause that can be the cause of the error

09-21-2014, 02:25 PM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#8
RE: Is it possible ?

Spoiler below!
PHP Code: (Select All)
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
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#9
RE: Is it possible ?

(09-21-2014, 02:27 PM)Straxedix Wrote:
Spoiler below!
PHP Code: (Select All)
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: (Select All)
void ToNormality(string &in...) 

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

lol I guess chaser was too lazy to continue it Tongue

(This post was last modified: 09-21-2014, 02:32 PM by Radical Batz.)
09-21-2014, 02:31 PM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#10
RE: Is it possible ?

I noticed it

Spoiler below!
PHP Code: (Select All)
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: (Select All)
FadeImageTrailTo(0.2f1f);
FadeRadialBlurTo(0.4f1f);FadePlayerAspectMulTo(2f0.2f); 


It says they need ")" or ","

09-21-2014, 02:33 PM
Find




Users browsing this thread: 3 Guest(s)