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
Help a newbie with an HPS file?
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#2
RE: Help a newbie with an HPS file?

AddUseItemCallback("", "monsterdoorkey_1", "monsterdoor", "irondoor"key", "irondoor" "UsedKeyOnDoor", true);
You can't just add a new one, you have to make a new command for that. Also, the UsedKeyOnDoor function has a wrong syntax. And everything in it is wrong too.
In fact, you got that many mistakes, that I think it's better to just correct everything, so you can see what you did wrong.

PHP Code: (Select All)
void OnStart()
{
AddUseItemCallback("""monsterdoorkey_1""monsterdoor""UsedKeyOnDoor"true);
AddUseItemCallback("""irondoor_key""irondoor""UsedKeyOnDoor"true);
}
void UsedKeyOnDoor(string &in asItemstring &in asEntity
{
SetSwingDoorLocked(asEntityfalsetrue);
PlaySoundAtEntity("""unlock_door.snt"asEntity0false);
RemoveItem(asItem);

If you got any questions on that script, feel free to ask. I just think that explaining everything would take too long, as this is something people make 3+ video tutorials about(Because of using asEntity etc. Variables and the syntax and such stuff)
(This post was last modified: 06-29-2012, 05:49 PM by Cruzore.)
06-29-2012, 05:42 PM
Find


Messages In This Thread
Help a newbie with an HPS file? - by lbrosious96 - 06-29-2012, 05:28 PM
RE: Help a newbie with an HPS file? - by Cruzore - 06-29-2012, 05:42 PM
RE: Help a newbie with an HPS file? - by Adny - 06-29-2012, 05:45 PM
RE: Help a newbie with an HPS file? - by ApeCake - 06-29-2012, 10:20 PM



Users browsing this thread: 1 Guest(s)