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!
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#22
RE: Noob in trouble!

Very strange...
Are any other scripts in your .hps working?
From what I can see, there is no problem with the scripting at all!

Try creating a script area around the door, tick the 'ItemInteraction' box, and change it's name to "mansion_3_area". Then change your code to the following:

void OnStart()
{
AddUseItemCallback("KeyOnArea", "key_1", "mansion_3_area", "UsedKeyOnArea", true);
SetEntityCallbackFunc("key_1", "OnPickup");
}

void UsedKeyOnArea(string &in item, string &in entity)
{
SetSwingDoorLocked("mansion_3", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_3", 0, false);
RemoveItem(item);
SetEntityActive(entity , false);

AddDebugMessage("Key has been used, is door unlocked?" , false);
}

It's not the ideal way to do it, but I can't see any way that this can fail.


(This post was last modified: 04-14-2012, 08:27 PM by DRedshot.)
04-14-2012, 08:27 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)