Frictional Games Forum (read-only)
Amnesia simple script 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: Amnesia simple script help (/thread-25967.html)



Amnesia simple script help - theodorg - 08-27-2014

Sooooo i forgot the script for adding a lantern to players inventory.......
I googled around for quite a bit but still couldent find it anywhere, help is appreciated. Smile


RE: Amnesia simple script help - PutraenusAlivius - 08-27-2014

NOTE: Works on any item
PHP Code:
void GiveItem(stringasNamestringasTypestringasSubTypeNamestringasImageNamefloat afAmount); 
asName - internal name
asType - item to give
asSubTypeName - item name for .lang file
asImageName - For exemple: void GiveItem(string& asName, string& asType, “chemical_container_full”, “chemical_container_full.tga” , float afAmount); The image is from <nowiki> <nowiki> <nowiki>\ </nowiki> </nowiki> </nowiki> graphics\Item\chemical_container_full.tga : is the image which will appear in Inventory - img155.imageshack.us/img155/6871/20806785.jpg
afAmount - amount to give


RE: Amnesia simple script help - theodorg - 08-27-2014

(08-27-2014, 03:53 PM)First Captain Wrote: NOTE: Works on any item
PHP Code:
void GiveItem(stringasNamestringasTypestringasSubTypeNamestringasImageNamefloat afAmount); 
asName - internal name
asType - item to give
asSubTypeName - item name for .lang file
asImageName - For exemple: void GiveItem(string& asName, string& asType, “chemical_container_full”, “chemical_container_full.tga” , float afAmount); The image is from <nowiki> <nowiki> <nowiki>\ </nowiki> </nowiki> </nowiki> graphics\Item\chemical_container_full.tga : is the image which will appear in Inventory - img155.imageshack.us/img155/6871/20806785.jpg
afAmount - amount to give

Thanks

(08-27-2014, 03:53 PM)First Captain Wrote: NOTE: Works on any item
PHP Code:
void GiveItem(stringasNamestringasTypestringasSubTypeNamestringasImageNamefloat afAmount); 
asName - internal name
asType - item to give
asSubTypeName - item name for .lang file
asImageName - For exemple: void GiveItem(string& asName, string& asType, “chemical_container_full”, “chemical_container_full.tga” , float afAmount); The image is from <nowiki> <nowiki> <nowiki>\ </nowiki> </nowiki> </nowiki> graphics\Item\chemical_container_full.tga : is the image which will appear in Inventory - img155.imageshack.us/img155/6871/20806785.jpg
afAmount - amount to give

Okay actully what i want to do is making the lantern unavailble for the player with timers under a certain time thats kinda scary.


RE: Amnesia simple script help - PutraenusAlivius - 08-27-2014

(08-27-2014, 03:54 PM)theodorg Wrote: Okay actullyactually what i want to do is making the lantern unavailbleunavailable for the player with timers under a certain time thatsthat's kinda scary.

Code:
void SetLanternDisabled(bool abX);

Enables/Disables the player's ability to use his lantern.


RE: Amnesia simple script help - theodorg - 08-27-2014

(08-27-2014, 04:03 PM)First Captain Wrote:
(08-27-2014, 03:54 PM)theodorg Wrote: Okay actullyactually what i want to do is making the lantern unavailbleunavailable for the player with timers under a certain time thatsthat's kinda scary.

Code:
void SetLanternDisabled(bool abX);

Enables/Disables the player's ability to use his lantern.

Ahhh thanks man!


RE: Amnesia simple script help - FlawlessHappiness - 08-27-2014

Also dude, this: https://wiki.frictionalgames.com/doku.php?id=hpl2/amnesia/script_functions

Bookmark it. Save it somewhere! It's SO useful!