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 in trouble!
Macetrow Offline
Junior Member

Posts: 38
Threads: 3
Joined: Apr 2012
Reputation: 1
#1
Noob in trouble!

Hi, i created a thread the other day with a problem that my monster did not spawn from a key being picked up. Good news thou i fixed that so the monster spawns, but my key doesn't work for any door. I've gone through the tutorial on the wiki and several videos, but nothing seems to work. I didn't want to bother any of the more experienced developers on the forums with this, but it seems i've run out of options.

TL;DR: What did i do wrong with my script so my door doesn't work?

////////////////////////
//Run when starting map
void OnStart()
{
AddUseItemCallback("", "key_1", "mansion_3", "UsedKeyOnDoor", true);
SetEntityCallbackFunc("key_1", "OnPickup");
}
void UsedKeyOnDoor(string &in item, string &in entity)
{
SetSwingDoorLocked("mansion_3", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_3", 0, false);
RemoveItem("key_1");
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("monster", true);
ShowEnemyPlayerPosition("monster");
}
void DoorLockedPlayer(string &in entity)
{
if(GetSwingDoorLocked("mansion_3") == true)
{

SetMessage("Messages", "msgname1", 0);

}
}
////////////////////////
//Run when entering map
void OnEnter()
{

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

}
(This post was last modified: 04-13-2012, 07:07 PM by Macetrow.)
04-13-2012, 07:06 PM
Find


Messages In This Thread
Noob in trouble! - by Macetrow - 04-13-2012, 07:06 PM
RE: Noob in trouble! - by Putmalk - 04-13-2012, 07:35 PM
RE: Noob in trouble! - by Macetrow - 04-13-2012, 07:43 PM
RE: Noob in trouble! - by Putmalk - 04-13-2012, 10:59 PM
RE: Noob in trouble! - by Macetrow - 04-13-2012, 11:01 PM
RE: Noob in trouble! - by Putmalk - 04-13-2012, 11:03 PM
RE: Noob in trouble! - by Macetrow - 04-13-2012, 11:09 PM
RE: Noob in trouble! - by Putmalk - 04-13-2012, 11:14 PM
RE: Noob in trouble! - by Macetrow - 04-13-2012, 11:20 PM
RE: Noob in trouble! - by zombiehacker595 - 04-14-2012, 01:37 AM
RE: Noob in trouble! - by Macetrow - 04-14-2012, 09:41 AM
RE: Noob in trouble! - by zombiehacker595 - 04-14-2012, 10:18 AM
RE: Noob in trouble! - by Datguy5 - 04-14-2012, 11:54 AM
RE: Noob in trouble! - by Macetrow - 04-14-2012, 03:55 PM
RE: Noob in trouble! - by Datguy5 - 04-14-2012, 04:09 PM
RE: Noob in trouble! - by Macetrow - 04-14-2012, 04:12 PM
RE: Noob in trouble! - by Datguy5 - 04-14-2012, 05:15 PM
RE: Noob in trouble! - by Macetrow - 04-14-2012, 05:51 PM
RE: Noob in trouble! - by Datguy5 - 04-14-2012, 06:01 PM
RE: Noob in trouble! - by DRedshot - 04-14-2012, 06:46 PM
RE: Noob in trouble! - by Macetrow - 04-14-2012, 07:31 PM
RE: Noob in trouble! - by DRedshot - 04-14-2012, 08:27 PM
RE: Noob in trouble! - by JenniferOrange - 04-14-2012, 09:47 PM
RE: Noob in trouble! - by Macetrow - 04-14-2012, 09:49 PM
RE: Noob in trouble! - by DRedshot - 04-14-2012, 10:06 PM
RE: Noob in trouble! - by SilentStriker - 04-14-2012, 10:21 PM
RE: Noob in trouble! - by Macetrow - 04-14-2012, 11:08 PM
RE: Noob in trouble! - by SilentStriker - 04-14-2012, 11:13 PM
RE: Noob in trouble! - by Macetrow - 04-14-2012, 11:16 PM
RE: Noob in trouble! - by SilentStriker - 04-14-2012, 11:17 PM
RE: Noob in trouble! - by Macetrow - 04-15-2012, 12:43 AM
RE: Noob in trouble! - by SilentStriker - 04-15-2012, 01:08 AM



Users browsing this thread: 1 Guest(s)