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!
SLAMnesia Offline
Member

Posts: 99
Threads: 39
Joined: May 2011
Reputation: 0
#1
Script help!

I have quite the situation for anyone willing to help Big Grin

I want to have this system for unlocking a door, heres my idea:

-the door is locked and the padlock has rusted

-First, you need to get the rust of the lock, and you go about doing that by getting a glass_container_1 and using that to pick up a poison_gland_1 (by pick up, i mean double clicking the glass_container_1 in your inventory and then clicking on the poison_gland_1) combining the 2 into an item glass_container_mix_done_1 (have it spawn in your inventory). Then using the glass_container_mix_done_1 to unrust the lock and remove the glass_container_mix_done_1 from inventory. THEN finally unlock the door with key_study_1 and zam ur in.

Please help, if you get some working script for me I will put you in my credits Big Grin
05-18-2011, 02:58 AM
Find
Russ Money Offline
Senior Member

Posts: 360
Threads: 25
Joined: Dec 2010
Reputation: 4
#2
RE: Script help!

From what I hear, you'll need to make your custom story into a full conversion for custom combinations of items. I could be wrong though and you'll just need to make an inventory.hps. Use Amnesia's inventory.hps for reference.

05-18-2011, 09:01 AM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#3
RE: Script help!

You can script in locally too.

This script should do what you want. Copy and paste it, but make sure your names and such are correct!

AddUseItemCallback("glass_container_on_poison_gland", "glass_container_1", "poison_gland_1", "GlassContainerFunc", true);

void GlassContainerFunc
{
    GiveItemFromFile("acid_mix", *put your custom acid item here*);
    //more cool stuff here
}

* Create a custom item entity and use that in the GiveItemFromFile function.

(This post was last modified: 05-18-2011, 09:13 AM by palistov.)
05-18-2011, 09:08 AM
Find
SLAMnesia Offline
Member

Posts: 99
Threads: 39
Joined: May 2011
Reputation: 0
#4
RE: Script help!

Sad sorry im really new to scripting. Where would I put these lines of code? I have the custom_story_settings.cfg and the extra_english.cfg but i have no clue where level script would go Big Grin i have looked around and I didnt find out how
Big Grin
Big Grin
05-19-2011, 12:07 AM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#5
RE: Script help!

In your maps folder, create a text file and match its name to the name of its respective map file. It must be saved as a .hps file. In this file you put your script Smile

05-19-2011, 07:29 AM
Find
Rownbear Offline
Member

Posts: 157
Threads: 13
Joined: Apr 2011
Reputation: 2
#6
RE: Script help!

(05-19-2011, 12:07 AM)SLAMnesia Wrote: Sad sorry im really new to scripting. Where would I put these lines of code? I have the custom_story_settings.cfg and the extra_english.cfg but i have no clue where level script would go Big Grin i have looked around and I didnt find out how
Big Grin

Hey, Start with watching the video tutorials and read the wiki
http://wiki.frictionalgames.com/hpl2/tut...tutorial_1

And try to begin with something easy as use key_1 on door_1 to make it unlocked. the tutorials show how to do that here
http://www.frictionalgames.com/forum/thread-7608.html
it's 11 very helpful video tutorials. Get coffee ready and start watching videos and reading about it, it won't be easy to begin with Big Grin

05-19-2011, 09:16 AM
Find




Users browsing this thread: 1 Guest(s)