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
Script Help Combinations?
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#1
Combinations?

Hey guys, just started working with combinations.

Is this correct?(To combine TetrodotoxinItem with HalfDone and get a chemical_container_epoxy.ent[wich i will rename when the script is correct])

void OnStart()
{

AddCombineCallback("MixtureCombination", "HalfDone", "TetrodotoxinItem", "CompleteMix", true);
}

void CompleteMix(string &in asItemA, string &in asItemB)
{
RemoveItem("TetrodotoxinItem");
RemoveItem("HalfDone");
GiveItem("CompleteMix", "chemical_container_epoxy.ent", "ReversalSyrum", "chemical_container_epoxy.tga", 1);
}

P.S. Its not working...

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
(This post was last modified: 01-30-2012, 08:18 AM by Tripication.)
01-30-2012, 08:17 AM
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#2
RE: Combinations?

33 views 0 replies -.-

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
01-30-2012, 09:49 AM
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#3
RE: Combinations?

Ok, so i've figured out that the combination requires an inventory.hps. But i have no idea how to relate my maps.hps with the inventory.hps or how to use the inventory.hps...

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
01-30-2012, 11:38 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Combinations?

(01-30-2012, 11:38 AM)Tripication Wrote: Ok, so i've figured out that the combination requires an inventory.hps. But i have no idea how to relate my maps.hps with the inventory.hps or how to use the inventory.hps...

inventory.hps goes in the folder where your maps and scripts are. Understanding the inventory.hps file is as easy as looking at the main campaign's inventory.hps file.

Tutorials: From Noob to Pro
01-30-2012, 08:43 PM
Website Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#5
RE: Combinations?

I did test it a bit, but couldnt seem to figure it out... Does it need to relate to the game in anyway? If so what way... I will test in detail tonight

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
01-30-2012, 10:38 PM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#6
RE: Combinations?

It isn't required to have an inventory.hps file, but it's better if you use one because then it allows the player to combine the two items anywhere in the story. If you script it in your maps it won't work in any map without the appropriate function.

Take a look at TDD's inventory.hps and try and emulate it. It's similar to the map's script file. You need an OnGameStart() in which you add the combination callback, and then you write up the function elsewhere in the script. Make sure your story is already open in Amnesia before you edit, because just like map script files, syntax errors in the inventory file will crash the game at compile time.

01-31-2012, 12:01 AM
Find




Users browsing this thread: 2 Guest(s)