Frictional Games Forum (read-only)

Full Version: Scripting Help Please!!?(Basics)??
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, im trying to make a custom story and i dont know anything about scripting.... but when i went to the wiki it didnt help, idk why but it didnt help me for some reason. I seem to learn only from people on the forum Big Grin anyway, im sorry for being lazy but i need to know how the scripts and how to use them for these actions

1. Make a key open a locked door
2. Have a monster patrolling around/ have a set path
3. Make a note
4. End a map? ( like how to get into a room and have it fade out with like "THE END" or something XD)
5: how to make a monster appear when you walk into a room


Thanks and again sorry for being lazy but i need to know and wiki is useless to me Sad Thanks!!

Frictional gams 4 ever <3 Smile
http://wiki.frictionalgames.com/hpl2/amn..._functions

http://www.frictionalgames.com/forum/thread-5117.html

These links should help Big Grin

Don't forget to take a look around the forum (search option is a godsend) when you're looking for answers. Smile
(03-11-2011, 02:06 AM)Droopy Wrote: [ -> ]http://wiki.frictionalgames.com/hpl2/amn..._functions

http://www.frictionalgames.com/forum/thread-5117.html

These links should help Big Grin

Don't forget to take a look around the forum (search option is a godsend) when you're looking for answers. Smile

Thanks for the quick response! but they didnt did work Sad i tried the key and door one from the 2nd link and its not working... i put it in the hps file.. any ideas? heres how my folders go

Custom_story's > Creature (my custom map folder) > Custom_story_settings.cfg/extra_english.lang/MAPS(folder) > Detail test.map/ enclosedmap.map/ enclosedmap.hps > (in the hps folder)

void OnStart()
{
AddUseItemCallback("", "R01_Key1", "mansion_1", "KeyOnDoor", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
}



IM DESPERATE D: but thanks for helping me Smile
(03-11-2011, 02:23 AM)Byllistic Wrote: [ -> ]
(03-11-2011, 02:06 AM)Droopy Wrote: [ -> ]http://wiki.frictionalgames.com/hpl2/amn..._functions

http://www.frictionalgames.com/forum/thread-5117.html

These links should help Big Grin

Don't forget to take a look around the forum (search option is a godsend) when you're looking for answers. Smile

Thanks for the quick response! but they didnt did work Sad i tried the key and door one from the 2nd link and its not working... i put it in the hps file.. any ideas? heres how my folders go

Custom_story's > Creature (my custom map folder) > Custom_story_settings.cfg/extra_english.lang/MAPS(folder) > Detail test.map/ enclosedmap.map/ enclosedmap.hps > (in the hps folder)

void OnStart()
{
AddUseItemCallback("", "R01_Key1", "mansion_1", "KeyOnDoor", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
}



IM DESPERATE D: but thanks for helping me Smile

Do you have a hps folder? I think the hps file have to be in the same folder as the map file...