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
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#12
RE: Hpl 2 help

1. Should be OnStart, not Onstart (you need a capital 'S')

2. These two lines
SetEntityActive("Monster_grunt_1", true);
ShowEnemyPlayerPosition("Monster_grunt_1");
need to be inside a function.

3. You wrote OnPickup for the callback for SetEntityCallbackFunc, but you didn't put that function anywhere. I'm assuming that you want those two lines (above) to happen when the player picks up the key?

Try using this script.
PHP Code: (Select All)
void OnStart()
{
    
AddUseItemCallback("""key_tower_2""Lockeddoor_3""hello3"true);
    
SetEntityPlayerInteractCallback("key_tower_2""OnKeyPickup"true);

}

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

void OnKeyPickup(string &in asEntity)
{
    
SetEntityActive("Monster_grunt_1"true);
    
ShowEnemyPlayerPosition("Monster_grunt_1");


In Ruins [WIP]
03-25-2013, 06:49 PM
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)