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
inventory.hps just doesnt work.
Lizard Offline
Member

Posts: 174
Threads: 23
Joined: Jul 2012
Reputation: 5
#2
RE: inventory.hps just doesnt work.

(10-31-2012, 10:42 PM)Cherubeal Wrote: Im trying to make two items combine together. The code im using is here:


void OnGameStart()
{
AddCombineCallback("", "Piracetam", "SalvinaDinorum", "MadPotFun", true);
}
void MadPotFun(string &in asItemA, string &in asItemB)
{
RemoveItem("Piracetam");
RemoveItem("SalvinaDinorum");
GiveItem("MadnessPotion", "Puzzle", "MadnessPotion", "chemical_container_full.tga", 1);
}


Its currently in inventory.hps in my maps file. The names of all the items are definitely correct. The code doesnt work when moved into the main hps file (moving the on game start function to the OnStart section). I tried entering wrong syntax on purpose into my inventory file to see if its even running because i figured an error would return. The game doesnt report back an error. Ive tried renaming, moving, recreating, shifting, refreshing and editing the inventory.hps file to try and connect it and nothing. Is. Working. This is driving me insane. And yes it is called "inventory.hps" with lowercase i.


"A jar of powdered Salvina Dinorum"
"Salvina Dinorum"

"A jar of concentrated Piracetam"
"Concentrated Piracetam"

My lang file entry that DOES work to show all the names are correct. All i get when trying to combine is "That combination doesnt work". The function never calls. The file is never linked. What on earth to i do.

Thanks in advance. Im going to destroy my computer at this rate.



Try this:

GiveItem("chemical_container_full", "Puzzle", "MadnessPotion", "chemical_container_full.tga", 1);

also its called void OnStart() and not void OnGameStart()

CURRENT PROJECT:
A Fathers Secret == Just started
(This post was last modified: 10-31-2012, 11:02 PM by Lizard.)
10-31-2012, 10:52 PM
Find


Messages In This Thread
inventory.hps just doesnt work. - by Cherubeal - 10-31-2012, 10:42 PM
RE: inventory.hps just doesnt work. - by Lizard - 10-31-2012, 10:52 PM



Users browsing this thread: 1 Guest(s)