Frictional Games Forum (read-only)
Hi, i need help! - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Hi, i need help! (/thread-24934.html)

Pages: 1 2


Hi, i need help! - AlluNeesia - 03-27-2014

Can someone give me a script like that:

Same level, 5 keys, 5 locked doors

and 5 scriptarea _> monster appear
scripts..

but i need that 5 keys and 5 locked doors script

--------------------------------------------------

Can someone make it for me ?


RE: Hi, i need help! - Romulator - 03-27-2014

We can't just simply MAKE a map per se. Is there a reason why you cannot make the map, or the script?


RE: Hi, i need help! - AlluNeesia - 03-27-2014

i suck in scripting and i wan't script Big Grin

Sry bad english, im from Finland!


RE: Hi, i need help! - Romulator - 03-27-2014

Well, in order for us to help, we need a map, as a bare minimum.

To learn about making scripts, take a look at some of the tutorials on the wiki!
This one about opening doors with keys should help: http://wiki.frictionalgames.com/hpl2/tutorials/script/scripting_by_xtron_-_item_that_unlocks_a_door


RE: Hi, i need help! - AlluNeesia - 03-27-2014

Can you say how i can make script with 5 keys, this is one key and one locked door :

void OnStart()
{
AddUseItemCallback("", "avain", "ovi", "UseKeyOnDoor", true);
}

void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
}


------------------

But i want 5 !


RE: Hi, i need help! - Traggey - 03-27-2014

This isn't posted in the right section, moved.


RE: Hi, i need help! - AlluNeesia - 03-27-2014

Can someone give that script for me ? :<


RE: Hi, i need help! - Traggey - 03-27-2014

Whilst this community is here to help, we are not here to make your mods for you, I'd suggest you head over to the frictional games Wiki and learn some scripting! Or try to team up with someone whom is capable of scripting.


RE: Hi, i need help! - Slanderous - 03-27-2014

You just put more adduseitemcallbacks and then use key on door, for example:

PHP Code:
void OnStart()
{
AddUseItemCallback("""key1""door1""UseKeyOnDoor1"true);
AddUseItemCallback("""key2""door2""UseKeyOnDoor2"true);
AddUseItemCallback("""key3""door3""UseKeyOnDoor3"true);
AddUseItemCallback("""key4""door4""UseKeyOnDoor4"true);
AddUseItemCallback("""key5""door5""UseKeyOnDoor5"true);
}

void UseKeyOnDoor1(string &in asItemstring &in asEntity)
{
SetSwingDoorLocked(asEntityfalsetrue);
PlaySoundAtEntity("""unlock_door.snt"asEntity0false);
RemoveItem(asItem);
}
void UseKeyOnDoor2(string &in asItemstring &in asEntity)
{
SetSwingDoorLocked(asEntityfalsetrue);
PlaySoundAtEntity("""unlock_door.snt"asEntity0false);
RemoveItem(asItem);
}
void UseKeyOnDoor3(string &in asItemstring &in asEntity)
{
SetSwingDoorLocked(asEntityfalsetrue);
PlaySoundAtEntity("""unlock_door.snt"asEntity0false);
RemoveItem(asItem);
}
void UseKeyOnDoor4(string &in asItemstring &in asEntity)
{
SetSwingDoorLocked(asEntityfalsetrue);
PlaySoundAtEntity("""unlock_door.snt"asEntity0false);
RemoveItem(asItem);
}
void UseKeyOnDoor5(string &in asItemstring &in asEntity)
{
SetSwingDoorLocked(asEntityfalsetrue);
PlaySoundAtEntity("""unlock_door.snt"asEntity0false);
RemoveItem(asItem);


Spoiler below!






RE: Hi, i need help! - AlluNeesia - 03-27-2014

OH THANK YOU, YOU'RE BEST Smile) <3

Thx rly