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
Script Help Variables and Closet Scares
Mrpeanut188 Offline
Junior Member

Posts: 2
Threads: 1
Joined: Oct 2012
Reputation: 0
#1
Variables and Closet Scares

For my map I am having a closet right next to the first spawn, and when opened, a grunt is inside. Problem is, when they respawn, I want to to not be there. So, I am using boolean variable 'ClosetTriggered' to check if it has already been activated. I have it set in the OnStart() function, and it still gives tells me it is not declared.

Here is the part of the script relating to it:
////////////////////////////
// Run when the map starts
void OnStart()
{
    AddUseItemCallback("", "Pick", "StartDoor", "UNLOCK", true);
    AddEntityCollideCallback("Player", "RoomScare", "ClosetScare", true, 1);
    bool (ClosetTriggered == false);
}


//GRUNT IN CLOSET SCARE
void ClosetScare(string &in asParent, string &in asChild, int alState)
{
for (ClosetTriggered == true);
{
SetEntityActive("ClosetMonster", false);
}
else
{
SetEntityActive("ClosetMonster", true);
(ClosetTriggered == true);
}
}
10-28-2012, 08:25 AM
Find


Messages In This Thread
Variables and Closet Scares - by Mrpeanut188 - 10-28-2012, 08:25 AM
RE: Variables and Closet Scares - by craven7 - 10-28-2012, 01:32 PM
RE: Variables and Closet Scares - by Mrpeanut188 - 10-29-2012, 12:25 AM



Users browsing this thread: 1 Guest(s)