The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
How to script Fainting?
taylor122002 Offline
Junior Member

Posts: 13
Threads: 10
Joined: Aug 2012
Reputation: 0
#1
How to script Fainting?

Hello everyone!

I have a question for scripting. I'm making a custom story, and I set up the map so in one room, right when you open the door, you see a torso with some blood. And I want to make a script area so when you enter the script area, you collapse or faint for a moment.

I don't know how I would script this, could someone help me?
I don't know how to even begin the part of fainting when walking into a scripted area.


But, I tried anyways.
Here's what I did:

AddEntityCollideCallback("Player", "Faint", "Faint", true, 1);
void SetPlayerSanity(float afSanity);
{
SetPlayerSanity(0);
}
See, I don't even know where to begin. Lol

Originally, I had this before I set it to "void SetPlayerSanity...":

void Faint(string &in asParent, string &in asChild, int alState)
{
SetPlayerSanity(0);
}

and that did nothing.

I apologize if this didn't make sense.
(This post was last modified: 11-02-2012, 03:58 AM by taylor122002.)
11-02-2012, 03:56 AM
Find


Messages In This Thread
How to script Fainting? - by taylor122002 - 11-02-2012, 03:56 AM
RE: How to script Fainting? - by naseem142 - 11-02-2012, 08:51 AM



Users browsing this thread: 1 Guest(s)