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
HPS and extra_english.lang not working
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#5
RE: HPS and extra_english.lang not working

(03-11-2015, 10:55 PM)SetsuPotato Wrote:
(03-11-2015, 06:43 PM)Neelke Wrote: void UsedKeyOnDoor()

The () cannot be empty in this scenario. It needs a few extra things:

void UsedKeyOnDoor(string &in asItem, string &in asEntity)

asItem = the main item used on the object (in this case the key)
asEntity = the main object the item is being used on (in this case the door)

I tried that and the key still doesn't open the door. Do you also have any idea why when I pick up my key it's supposed to trigger an enemy but it doesn't?

It's because you didn't write the parameters correctly.

You wrote: (string &in item)
But it's an interaction callback so it's supposed to be: (string &in asEntity)

This thread might help: http://www.frictionalgames.com/forum/thread-18368.html

Here is how the script should look.
PHP Code: (Select All)
void OnStart()
{
AddUseItemCallback("""key_din""door_din""UsedKeyOnDoor"true);
SetEntityPlayerInteractCallback("key_din""MonstAct1"true);
}

void UsedKeyOnDoor(string &in asItemstring in asEntity
{
SetSwingDoorLocked("door_din"falsetrue);
PlaySoundAtEntity("""unlock_door""door_din"0false);
RemoveItem("key_din");
}

void OnEnter()
{

}

void OnLeave()
{

}

void MonstAct1(string &in asEntity)
{
SetEntityActive("monster1"true);
AddEnemyPatrolNode("monster1""PathNodeArea1"0"Idle");
AddEnemyPatrolNode("monster1""PathNodeArea2"0"Idle");


Trying is the first step to success.
(This post was last modified: 03-12-2015, 12:39 AM by FlawlessHappiness.)
03-12-2015, 12:36 AM
Find


Messages In This Thread
RE: HPS and extra_english.lang not working - by FlawlessHappiness - 03-12-2015, 12:36 AM



Users browsing this thread: 1 Guest(s)