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
Noob needs scripting help.
A Tricky Carnie Offline
Member

Posts: 72
Threads: 15
Joined: Sep 2011
Reputation: 0
#1
Noob needs scripting help.

I'm working on a custom story, and I've run into a problem.
I have a locked door that I want to open with a key, but when I go into the map, the game crashes and says there was an error in the script.

This is my script:
Quote:////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("","Key_1", "mansion_3". "KeyOnDoor", true)
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_3", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false);
RemoveItem("Key_1")

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

}

The map worked fine until I added the key commands into my script. Any help would be greatly appreciated.

09-04-2011, 10:54 PM
Find


Messages In This Thread
Noob needs scripting help. - by A Tricky Carnie - 09-04-2011, 10:54 PM
RE: Noob needs scripting help. - by Your Computer - 09-04-2011, 11:01 PM
RE: Noob needs scripting help. - by Tanshaydar - 09-04-2011, 11:02 PM



Users browsing this thread: 1 Guest(s)