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 script issue [SOLVED]
Andross Offline
Junior Member

Posts: 38
Threads: 1
Joined: Oct 2010
Reputation: 0
#4
RE: HPS script issue

This way it is syntactically correct; don't know if it's functional, though.
I would suggest some basic programming tutorial. I believe that FrictionalGames suggest to start with JavaScript, as it is similar to AngelScript.

void OnStart()
{
    AddUseItemCallback("", "key_tomb_rusty_1", "metal_1", "KeyOnDoor1", true);
    AddUseItemCallback("", "key_torture_chamber_1", "prison_1", "KeyOnDoor2", true);
    AddUseItemCallback("", "key_tower_1", "hatch_ceiling_1", "KeyOnDoor3", true);
}

void KeyOnDoor1(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("metal_1", false, true);
    PlaySoundAtEntity("", "unlock_door.snt", "metal_1", 0.0f, true);
    RemoveItem("key_tomb_rusty_1");
}

void KeyOnDoor2(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("prison_1", false, true);
    PlaySoundAtEntity("", "unlock_door.snt", "prison_1", 0.0f, true);
    RemoveItem("key_torture_chamber_1");
}

void KeyOnDoor3(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("hatch_ceiling_1", false, true);
    PlaySoundAtEntity("", "unlock_door.snt", "hatch_ceiling_1", 0.0f, true);
    RemoveItem("key_tower_1");
}
01-15-2011, 07:38 AM
Find


Messages In This Thread
HPS script issue [SOLVED] - by Devil Dogs SF - 01-15-2011, 05:29 AM
RE: HPS script issue - by Andross - 01-15-2011, 06:34 AM
RE: HPS script issue - by Devil Dogs SF - 01-15-2011, 07:26 AM
RE: HPS script issue - by Andross - 01-15-2011, 07:38 AM
RE: HPS script issue - by Devil Dogs SF - 01-15-2011, 08:13 AM
RE: HPS script issue - by Seragath - 01-15-2011, 06:07 PM



Users browsing this thread: 2 Guest(s)