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
Why doesn't this script work? plz help
pdkgaming Offline
Junior Member

Posts: 16
Threads: 3
Joined: Jun 2012
Reputation: 0
#1
Why doesn't this script work? plz help

Hi all,

I'm kinda stuck at a part of scripting.. again >.<
I've made another thread but I don't think that one is needed anymore..
So the problem is.. I want the player to look at 3 entities when you enter an area. When it enters the area though, it only looks at one entity (first one in script) and keeps staring at it.. Does anybody see the problem?
And is my script even right? In theory it should work (I think).

Here's my script part:


void LookAt(string &in asTimer)
{
AddTimer("LookAt1", 2, "Sanity");
}

void Sanity(string &in asTimer)
{
if (LookAt1 == 2);
{
StartPlayerLookAt("corpse_male_torso_1", 100, 100, ""};
}
if (LookAt1 == 6);
{
StartPlayerLookAt("chest_of_drawers_nice_broken_1", 100, 100, "");
}
if (LookAt1 == 4);
{
StartPlayerLookAt("painting03_1", 100, 100, "");
}
if (LookAt1 == 0);
{
SetPlayerSanity(0);
}
}

THANKS Big Grin

Map tester
CS creator (beginner)
Youtube:
http://www.youtube.com/pdkgaming
06-18-2012, 09:30 PM
Website Find


Messages In This Thread
Why doesn't this script work? plz help - by pdkgaming - 06-18-2012, 09:30 PM



Users browsing this thread: 1 Guest(s)