When interact Entity 'Get Item' - 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: When interact Entity 'Get Item' (/thread-21768.html) Pages:
1
2
|
When interact Entity 'Get Item' - VeNoMzTeamHysterical - 06-09-2013 I need some help on a script. void GetRope(string &in asEntity) { } How to let the player get an item in his inventory? RE: When interact Entity 'Get Item' - Kullin - 06-09-2013 GiveItem(string& asName, string& asType, string& asSubTypeName, string& asImageName, float 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); or GiveItemFromFile(string& asName, string& asFileName); Adds a single item to the player's inventory. This is meant to be used for debug mostly as it creates the actual item and then destroys it. asName - internal name asFileName - item to give + extension (.ent) RE: When interact Entity 'Get Item' - VeNoMzTeamHysterical - 06-09-2013 (06-09-2013, 02:39 PM)Kullin Wrote: GiveItem(string& asName, string& asType, string& asSubTypeName, string& asImageName, float afAmount);THanks! RE: When interact Entity 'Get Item' - Kullin - 06-09-2013 No problem! If you need script functions go to: http://wiki.frictionalgames.com/hpl2/amnesia/script_functions And press CTRL+F and search after something, like "giveitem" RE: When interact Entity 'Get Item' - VeNoMzTeamHysterical - 06-09-2013 (06-09-2013, 02:43 PM)Kullin Wrote: No problem! So should be? void GetRope(string &in asEntity) { GiveItem("rope_beam02_1", "string_pile_1", "Rope", "string_pile.tga", 1); SetEntityActive("rope_beam02_1", false); } mmm i don't get it work :S RE: When interact Entity 'Get Item' - Kullin - 06-09-2013 (06-09-2013, 02:52 PM)VeNoMzTeamHysterical Wrote:Can I get the whole script and can you tell me exactly what you wanna do?(06-09-2013, 02:43 PM)Kullin Wrote: No problem! RE: When interact Entity 'Get Item' - VeNoMzTeamHysterical - 06-09-2013 (06-09-2013, 03:04 PM)Kullin Wrote:I don't get the text.(06-09-2013, 02:52 PM)VeNoMzTeamHysterical Wrote:Can I get the whole script and can you tell me exactly what you wanna do?(06-09-2013, 02:43 PM)Kullin Wrote: No problem! I do get the item now. void GetRope(string &in asEntity) { GiveItem("rope_beam02_1", "string_pile.ent", "Rope", "pile_string.tga", 1); SetEntityActive("rope_beam02_1", false); } RE: When interact Entity 'Get Item' - Kullin - 06-09-2013 Oh it don't show that, but you can use the: SetMessage(string& asTextCategory, string& asTextEntry, float afTime); asTextCategory - the category in the .lang file asTextEntry - the entry in the .lang file afTime - determines how long the message is displayed. If time is < =0 then the life time is calculated based on string length. RE: When interact Entity 'Get Item' - VeNoMzTeamHysterical - 06-09-2013 (06-09-2013, 03:16 PM)Kullin Wrote: Oh it don't show that, but you can use the: That sucks so i cant load some how the item with this? <Entry Name="ItemDesc_Cellar_Key">It might be useful!</Entry> <Entry Name="ItemName_Cellar_Key">Rope!</Entry> RE: When interact Entity 'Get Item' - Kullin - 06-09-2013 GiveItem("rope_beam02_1", "string_pile_1", "Cellar_Key", "string_pile.tga", 1); Like that, i think, if it's called Cellar_key in the lang! |