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
Hpl 2 help
plutomaniac Offline
Super Moderator

Posts: 6,368
Threads: 45
Joined: May 2011
Reputation: 183
#2
RE: Hpl 2 help

I guess the code you want is this?

PHP Code: (Select All)
void OnStart()
{
    
AddUseItemCallback("""key_study_1""Lockeddoor_1""hello1"true);
    
AddUseItemCallback("""key_tower_1""Lockeddoor_2""hello2"true);
}

void hello1(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked(asEntityfalsetrue);
    
PlaySoundAtEntity("""unlock_Lockeddoor_1"asEntity0false);
    
RemoveItem(asItem);
}

void hello2(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked(asEntityfalsetrue);
    
PlaySoundAtEntity("""unlock_Lockeddoor_2"asEntity0false);
    
RemoveItem(asItem);


You had two functions with the same name (hello, I changed one to hello1 and the other to hello2) and a misplaced AddUseItemCallback function(it should go under OnStart, just like the first one you used).
(This post was last modified: 03-23-2013, 03:37 AM by plutomaniac.)
03-23-2013, 02:29 AM
Find Reply


Messages In This Thread
Hpl 2 help - by s2skafte - 03-23-2013, 02:03 AM
RE: Hpl 2 help - by plutomaniac - 03-23-2013, 02:29 AM
RE: Hpl 2 help - by s2skafte - 03-23-2013, 05:33 AM
RE: Hpl 2 help - by NaxEla - 03-23-2013, 07:40 AM
RE: Hpl 2 help - by PutraenusAlivius - 03-23-2013, 06:49 AM
RE: Hpl 2 help - by s2skafte - 03-24-2013, 06:02 AM
RE: Hpl 2 help - by PutraenusAlivius - 03-24-2013, 06:10 AM
RE: Hpl 2 help - by s2skafte - 03-25-2013, 01:30 AM
RE: Hpl 2 help - by Your Computer - 03-25-2013, 01:53 AM
RE: Hpl 2 help - by s2skafte - 03-25-2013, 05:44 PM
RE: Hpl 2 help - by NaxEla - 03-25-2013, 05:35 AM
RE: Hpl 2 help - by NaxEla - 03-25-2013, 06:49 PM
RE: Hpl 2 help - by s2skafte - 03-25-2013, 09:34 PM
RE: Hpl 2 help - by s2skafte - 03-25-2013, 11:33 PM
RE: Hpl 2 help - by PutraenusAlivius - 03-26-2013, 06:30 AM



Users browsing this thread: 1 Guest(s)