Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Chemical Script needed
TheSniperMajor Offline
Junior Member

Posts: 9
Threads: 4
Joined: Oct 2012
Reputation: 0
#1
Chemical Script needed

Hey guys!
I need a little help. I have already looked in the wiki, but I found nothing there.
So, what I need:
I want that, if the player combines the chemical container with the bucket of tar (or the other way round), then he sould get an acid, with which he could dissolve a organic thing - which disapears.
I´m not a good scripter. Could anyone help may?
- Greatings
12-06-2012, 03:15 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: Chemical Script needed

This doesn't go to Techincal support in playing Custom stories, but I will samely help.

So, in your inventory.hps file:

void OnGameStart()
{
AddCombineCallback("", "Chemical_container", "bucket", "FUNC", false);
AddCombineCallback("", "bucket", "Chemical_container", "FUNC", false);
}

void FUNC (string &in asItemA, string &in asItemB)
{
GiveItem("Acid", "Puzzle", "LangEntry", "Image.tga"
}

It's something like this. The wiki says:

void GiveItem(string& asName, string& asType, string& asSubTypeName, string& asImageName, float afAmount);



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 - img155.imageshack.us/img155/6871/20806785.jpg




afAmount - amount to give

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
12-06-2012, 03:23 PM
Find




Users browsing this thread: 1 Guest(s)