06-09-2013, 02:04 PM
Pages: 1 2
06-09-2013, 02:39 PM
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)
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)
06-09-2013, 02:39 PM
(06-09-2013, 02:39 PM)Kullin Wrote: [ -> ]GiveItem(string& asName, string& asType, string& asSubTypeName, string& asImageName, float afAmount);THanks!
Adds an item to the inventory of the player. Note that the item does not have to exist as entity in the world to be able to do this.
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 -
06-09-2013, 02:43 PM
No problem!
If you need script functions go to: http://wiki.frictionalgames.com/hpl2/amn..._functions
And press CTRL+F and search after something, like "giveitem"
If you need script functions go to: http://wiki.frictionalgames.com/hpl2/amn..._functions
And press CTRL+F and search after something, like "giveitem"
06-09-2013, 02:52 PM
(06-09-2013, 02:43 PM)Kullin Wrote: [ -> ]No problem!
If you need script functions go to: http://wiki.frictionalgames.com/hpl2/amn..._functions
And press CTRL+F and search after something, like "giveitem"
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
06-09-2013, 03:04 PM
(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!
If you need script functions go to: http://wiki.frictionalgames.com/hpl2/amn..._functions
And press CTRL+F and search after something, like "giveitem"
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
06-09-2013, 03:05 PM
(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!
If you need script functions go to: http://wiki.frictionalgames.com/hpl2/amn..._functions
And press CTRL+F and search after something, like "giveitem"
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
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);
}
06-09-2013, 03:16 PM
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.
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.
06-09-2013, 03:24 PM
(06-09-2013, 03:16 PM)Kullin Wrote: [ -> ]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.
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>
06-09-2013, 03:28 PM
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!
Like that, i think, if it's called Cellar_key in the lang!
Pages: 1 2