Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 3 Vote(s) - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Anyone Need Help? (Thread #2)
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#24
RE: Anyone Need Help? (Thread #2)

(07-25-2011, 07:10 PM)zecuro Wrote: actually about note and key to open door and basic stuff like that i'm really new to this i have a lot of potentional in drawing so i came up with prettty good visual concept but without script......you cant really create a storyline so plz help

sorry for my bad english

For a custom story to run you need a .hps file with the same name as each map you have for your custom story. Meaning, for example, your map is called "MapName.map", then there will be a file in the same folder called "MapName.hps" that the modder has to make by themselves which then holds all the scripting information about that map.

This is needed for the most simple .hps script file to have the custom story successfully run the map:

void OnStart()
{

}

To unlock a door with a key, you can do this:

void OnStart()
{
    AddUseItemCallback("", "Key01", "Door01", "DoorUnlock", true);
}
void DoorUnlock(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked(asEntity, false, true);
    PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
    RemoveItem(asItem);
}

The code above unlocks swing doors (doors that the player can open with his hand). "Key01" is the name of the key that unlocks the door. "Door01" is the name of the door the key unlocks. "DoorUnlock" is the name of the function where once it's called unlocks the door, which is the entity. It plays the sound at the door. And it removes the key that unlocks the door.

07-25-2011, 08:50 PM
Find


Messages In This Thread
Anyone Need Help? (Thread #2) - by Kyle - 07-22-2011, 05:25 PM
RE: Anyone Need Help? (Thread #2) - by Rokotain - 07-22-2011, 06:36 PM
RE: Anyone Need Help? (Thread #2) - by Kyle - 07-22-2011, 07:27 PM
RE: Anyone Need Help? (Thread #2) - by Rokotain - 07-23-2011, 12:38 PM
RE: Anyone Need Help? (Thread #2) - by Kyle - 07-23-2011, 11:11 PM
RE: Anyone Need Help? (Thread #2) - by xtron - 07-24-2011, 04:22 AM
RE: Anyone Need Help? (Thread #2) - by xtron - 07-24-2011, 05:10 AM
RE: Anyone Need Help? (Thread #2) - by xtron - 07-24-2011, 05:17 AM
RE: Anyone Need Help? (Thread #2) - by xtron - 07-24-2011, 06:03 AM
RE: Anyone Need Help? (Thread #2) - by JetlinerX - 07-24-2011, 06:22 AM
RE: Anyone Need Help? (Thread #2) - by xtron - 07-24-2011, 06:27 AM
RE: Anyone Need Help? (Thread #2) - by JetlinerX - 07-24-2011, 06:28 AM
RE: Anyone Need Help? (Thread #2) - by Kyle - 07-24-2011, 01:17 PM
RE: Anyone Need Help? (Thread #2) - by JetlinerX - 07-24-2011, 07:21 PM
RE: Anyone Need Help? (Thread #2) - by zecuro - 07-24-2011, 11:14 PM
RE: Anyone Need Help? (Thread #2) - by Kyle - 07-25-2011, 12:58 AM
RE: Anyone Need Help? (Thread #2) - by zecuro - 07-25-2011, 07:10 PM
RE: Anyone Need Help? (Thread #2) - by Kyle - 07-25-2011, 08:50 PM
RE: Anyone Need Help? (Thread #2) - by zecuro - 07-25-2011, 09:29 PM
RE: Anyone Need Help? (Thread #2) - by Kyle - 07-25-2011, 09:44 PM
RE: Anyone Need Help? (Thread #2) - by zecuro - 07-25-2011, 10:26 PM
RE: Anyone Need Help? (Thread #2) - by Kyle - 07-25-2011, 10:49 PM
RE: Anyone Need Help? (Thread #2) - by zecuro - 07-25-2011, 10:55 PM
RE: Anyone Need Help? (Thread #2) - by Kyle - 07-25-2011, 10:59 PM
RE: Anyone Need Help? (Thread #2) - by zecuro - 07-25-2011, 11:03 PM
RE: Anyone Need Help? (Thread #2) - by Kyle - 07-25-2011, 11:07 PM
RE: Anyone Need Help? (Thread #2) - by zecuro - 07-25-2011, 11:17 PM
RE: Anyone Need Help? (Thread #2) - by Kyle - 07-25-2011, 11:35 PM
RE: Anyone Need Help? (Thread #2) - by Roenlond - 07-25-2011, 11:53 PM
RE: Anyone Need Help? (Thread #2) - by zecuro - 07-26-2011, 12:16 AM
RE: Anyone Need Help? (Thread #2) - by Kyle - 07-26-2011, 12:57 AM
RE: Anyone Need Help? (Thread #2) - by zecuro - 07-30-2011, 05:35 PM
RE: Anyone Need Help? (Thread #2) - by Kyle - 07-30-2011, 02:17 AM



Users browsing this thread: 1 Guest(s)