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:
  • 2 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Another Scripting Problem...
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#1
Sad  Another Scripting Problem...

I once again tried to combine 2 scripts and it failed at working. I tried to make a servant grunt to become active when you went into an area. So I added: AddEntityCollideCallback("Player" , "ScriptArea_1" , "CollideRoomTwo" , true, 1); AND void SetEntityActive(servant_grunt, true);

Full script:

////////////////////////////
// Run first time starting map
void OnStart()

{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "CollideRoomTwo" , true, 1);
AddUseItemCallback("", "Mansion Key", "MansionDoor", "UsedKeyOnDoor", true);
}

void SetEntityActive(servant_grunt, true);
void UsedKeyOnDoor(string &in asItem, string &in asEntity)

{
SetSwingDoorLocked("MansionDoor", false, true);
PlaySoundAtEntity("", "unlock_door" , "MansionDoor", 0, false);
RemoveItem("Mansion Key");
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

I also wanted to point out that I DO NOT want the grunt to become active when I try to open the door... Please try to keep it seperate.

(This post was last modified: 10-10-2010, 05:20 PM by Kyle.)
10-10-2010, 05:18 PM
Find


Messages In This Thread
Another Scripting Problem... - by Kyle - 10-10-2010, 05:18 PM
RE: Another Scripting Problem... - by Entih - 10-10-2010, 05:37 PM
RE: Another Scripting Problem... - by Kyle - 10-10-2010, 05:54 PM
RE: Another Scripting Problem... - by Chilton - 10-10-2010, 05:57 PM
RE: Another Scripting Problem... - by Frontcannon - 10-10-2010, 05:58 PM
RE: Another Scripting Problem... - by Kyle - 10-10-2010, 06:05 PM
RE: Another Scripting Problem... - by Chilton - 10-10-2010, 06:07 PM
RE: Another Scripting Problem... - by Frontcannon - 10-10-2010, 06:09 PM
RE: Another Scripting Problem... - by Chilton - 10-10-2010, 06:11 PM
RE: Another Scripting Problem... - by Kyle - 10-10-2010, 06:12 PM
RE: Another Scripting Problem... - by Chilton - 10-10-2010, 06:13 PM
RE: Another Scripting Problem... - by Kyle - 10-10-2010, 06:15 PM
RE: Another Scripting Problem... - by Chilton - 10-10-2010, 06:17 PM
RE: Another Scripting Problem... - by Kyle - 10-10-2010, 06:24 PM
RE: Another Scripting Problem... - by Entih - 10-10-2010, 06:38 PM
RE: Another Scripting Problem... - by Kyle - 10-11-2010, 01:40 AM



Users browsing this thread: 1 Guest(s)