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
Level Editor
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#1
Level Editor

I got a few questions about the level scripting:

1. How do I add music to my notes?
2. How do I add mementos?
3. How do I get acid from an acid container?
4. How can I use my acid on the web wall (the web used in Entrance Hall in the original game)?
04-02-2013, 08:42 PM
Find Reply
WALP Offline
Posting Freak

Posts: 1,221
Threads: 34
Joined: Aug 2012
Reputation: 45
#2
RE: Level Editor

Why would you put the title Level Editor if you need help with scripting? its misleading.
04-02-2013, 08:45 PM
Find Reply
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#3
RE: Level Editor

(04-02-2013, 08:42 PM)Neelke Wrote: I got a few questions about the level scripting:

1. How do I add music to my notes?
2. How do I add mementos?
3. How do I get acid from an acid container?
4. How can I use my acid on the web wall (the web used in Entrance Hall in the original game)?

You sound like you need to know more about scripting. I'll see if i can help.

1. Music to notes. Check the original script files. There's gotta be something. I don't remember how to...

2. The script-line is "AddQuest("NAMEOFQUEST", "NAMEOFQUEST");"
To complete the quest, write: "CompleteQuest("NAMEOFQUEST", "NAMEOFQUEST");"
You name the quests and what you want in them in your .lang file.

Use the search button on this website to find the relevant info about mementos. It should be possible.

3. Getting acid from a container.
To do this you must understand how this game works.
It's not physically pouring acid into a container.
It's a picture.

If you have the glass-container in your inventory you'll notice that it's empty. This is just a picture of an empty container.
Now when you use the picture on the acid container, you have to create an "AddUseItemCallback".
(Use Ctrl+F or Cmd+F on this site: http://wiki.frictionalgames.com/hpl2/amn..._functions)

In this function you simply
RemoveItem("NAMEOFGLASSCONTAINER");
GiveItem("NAMEOFACID", "Puzzle", "SUBNAMEOFACID", "ACIDIMAGE.tga", 1);

See?
You remove the previous item, and add a new one. There's no pouring at all.

4. It works the exact same way. Now instead of Giving a new item to the player, you just use the SetPropActiveAndFade("NAMEOFWEB", false, 2);

I hope you understood this Smile


Now go learn some scripting!!!

Trying is the first step to success.
04-02-2013, 09:37 PM
Find Reply
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#4
RE: Level Editor

For adding music to notes, add this to your .hps file.
void OnStart()
{
SetEntityCallbackFunc("NOTENAME", "MusicNote");
}

void MusicNote(string &in asEntity, string &in type)
{
PlayMusic("MUSICNAME.ogg", false, 1.0f, 1.0f, 1, false);
AddTimer("", 3.0f, "EndMusic"); //Change 3.0f to the duration of the note time. I cannot do anything about this. Sorry.
}

void EndMusic(string &in asTimer)
{
StopMusic(1.0f, 1);
}

"Veni, vidi, vici."
"I came, I saw, I conquered."
04-03-2013, 06:20 AM
Find Reply




Users browsing this thread: 1 Guest(s)