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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved]How to make unsettling events?
Danny Boy Offline
Posting Freak

Posts: 2,718
Threads: 85
Joined: Mar 2011
Reputation: 81
#1
[Solved]How to make unsettling events?

Hello every one once again! as i am the greatest noob there is can some one please tell me how to make unsettling events? i realy need to know that
and also how do i make the player focus on a object for some time?

thank you
(This post was last modified: 03-14-2011, 08:40 PM by Danny Boy.)
03-13-2011, 11:19 PM
Website Find
Russ Money Offline
Senior Member

Posts: 360
Threads: 25
Joined: Dec 2010
Reputation: 4
#2
RE: How to make unsettling events?

For the events
GiveSanityDamage(float afAmount, bool abUseEffect);

"float afAmount" is how much damage you want to give.

"bool abUseEffect" is the tunnel vision the player goes through when he sees the event.

For forcing the player to look
StartPlayerLookAt(string& asEntityName, float afSpeedMul, float afMaxSpeed, string &asAtTargetCallback);

"string& asEntityName" is what the player will look at.

"float afSpeedMul" how fast the player turns their head

"float afMaxSpeed" how fast the max speed the player turns

"string &asAtTargetCallback" what string triggers when the player is centered on the target.

What they look like in use:
//25% Insanity given and the scared effect
GiveSanityDamage(25, true);

//Player would look at the entity named monster, nothing else happens immediately
StartPlayerLookAt("monster", 6, 6, "");
(This post was last modified: 03-13-2011, 11:45 PM by Russ Money.)
03-13-2011, 11:43 PM
Find
Danny Boy Offline
Posting Freak

Posts: 2,718
Threads: 85
Joined: Mar 2011
Reputation: 81
#3
RE: How to make unsettling events?

in the float afAmount what do i put? numbers? or something else?
what about "bool abUseEffect"? its to put true? right?
and i don't understand what "string &asAtTargetCallback" is =/
03-13-2011, 11:55 PM
Website Find
Russ Money Offline
Senior Member

Posts: 360
Threads: 25
Joined: Dec 2010
Reputation: 4
#4
RE: How to make unsettling events?

(03-13-2011, 11:55 PM)Danarogon Wrote: in the float afAmount what do i put? numbers? or something else?
what about "bool abUseEffect"? its to put true? right?
and i don't understand what "string &asAtTargetCallback" is =/

Just check the example I left at the bottom.

string &asAtTargetCallback

Is used if you wanted something else to happen when the player looks at the target.

Like, the player is forced look at a monster and when he does, it disappears.
03-14-2011, 12:02 AM
Find
Danny Boy Offline
Posting Freak

Posts: 2,718
Threads: 85
Joined: Mar 2011
Reputation: 81
#5
RE: How to make unsettling events?

Yay i'm almost there but he just keeps looking at the door =/ how can i make him stop?
03-14-2011, 12:17 AM
Website Find
Russ Money Offline
Senior Member

Posts: 360
Threads: 25
Joined: Dec 2010
Reputation: 4
#6
RE: How to make unsettling events?

(03-14-2011, 12:17 AM)Danarogon Wrote: Yay i'm almost there but he just keeps looking at the door =/ how can i make him stop?

StopPlayerLookAt();
Also,
http://wiki.frictionalgames.com/hpl2/amn..._functions
(This post was last modified: 03-14-2011, 12:21 AM by Russ Money.)
03-14-2011, 12:20 AM
Find
Danny Boy Offline
Posting Freak

Posts: 2,718
Threads: 85
Joined: Mar 2011
Reputation: 81
#7
RE: How to make unsettling events?

ok... it does not work =/ i tried to do that wend the player exits a area but it did not work =/
look this is my code

void OnStart()
{
AddEntityCollideCallback("Player", "ScaryAreaone", "Collide", true, -1);
}
void Collide(string &in asParent, string &in asChild, int alState)
{
StopPlayerLookAt();
}


is it wrong?
(This post was last modified: 03-14-2011, 07:16 PM by Danny Boy.)
03-14-2011, 07:05 PM
Website Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#8
RE: [Solved]How to make unsettling events?

It's wrong, because you didn't force the player to look at somewhere.

03-14-2011, 08:51 PM
Website Find
Danny Boy Offline
Posting Freak

Posts: 2,718
Threads: 85
Joined: Mar 2011
Reputation: 81
#9
RE: [Solved]How to make unsettling events?

well actualy i have written the code to force the player to look at a door but i didn't put it here. because that part works just fine, so i thought the problem was in the code i posted here.

the "ScaryAreaone" its the same area that makes the player to look at "the very scary door", but instaed for collide whit the area, the StopPlayerLookAt(); was "or what it was supposed to be" wend exit that area... but that didn't work so i made a second area that wend collided the player stops being forced to look to that door.

But its not very much as i wanted it to be.
if you know a better way to make the player stop looking at it i would be veary thankfull. Smile
(This post was last modified: 03-14-2011, 10:50 PM by Danny Boy.)
03-14-2011, 10:49 PM
Website Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#10
RE: [Solved]How to make unsettling events?

Add a timer to call StopPlayerLookAt()...

03-14-2011, 11:50 PM
Website Find




Users browsing this thread: 1 Guest(s)