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
Scripting problem
Hauken Offline
Member

Posts: 62
Threads: 19
Joined: Jul 2012
Reputation: 1
#1
Question  Scripting problem

Hello folks!

Finally got myself registered, so Im having trouble with the over used Key VS Door script, im in the process of learning the HPL editor scripting functions.

I am intrested in learning this, I've been searching this forum, been watching vids over again.. And i cant get whats wrong..

So heres my progress:

I can pick up the key, and i can use it to unlock the door specefied, HOWEVER, the key does not have a name, and the door does not have a name either.

I suspect it's my HPS file, i've double checked the Lang file dozens of times..

As you can see i've added a note in my map aswell, which shows up blank ingame.

LANG FILE TEMPLATE:








test1



Awesome note
Just a test ey



Bedroom Key
"Key to bedroomdoor"





HPS FILE TEMPLATE


////////////////////////////
// Run when entering map
void OnStart()
{
AddUseItemCallback("", "Key_1", "door1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "door1", 0, false);
RemoveItem("Key_1");
}



I've double checked that the keyname and subname is correct in the editor so I got that covered.

I bet most of you see the problem already. Cool


EXTRA HELP
http://i50.tinypic.com/28wfbq9.jpg
(This post was last modified: 07-16-2012, 10:59 AM by Hauken.)
07-16-2012, 05:44 AM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: Scripting problem

In your entry for "CustomStoryMain" you closed it with /entry instead of /Entry

I rate it 3 memes.
07-16-2012, 05:50 AM
Find
Hauken Offline
Member

Posts: 62
Threads: 19
Joined: Jul 2012
Reputation: 1
#3
RE: Scripting problem

Thanks for finding a problem, but it's still the same..

Not solved
(This post was last modified: 07-16-2012, 06:15 AM by Hauken.)
07-16-2012, 06:05 AM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#4
RE: Scripting problem

I've looked over both the .lang and the .hps more times than I'd like to admit, and can't find anything wrong; the only thing I'd suggest is getting rid of the Resources part in the .lang, you don't really need that.

It could be an "external" issue; is the extra_english.lang file located in the same place as your custom_story_settings.cfg? Did you properly "save as..." to save it as a language file, or is it still a text file? That's all I can think of as far as solving it goes.

I rate it 3 memes.
07-16-2012, 06:48 AM
Find
Hauken Offline
Member

Posts: 62
Threads: 19
Joined: Jul 2012
Reputation: 1
#5
RE: Scripting problem

(07-16-2012, 06:48 AM)andyrockin123 Wrote: I've looked over both the .lang and the .hps more times than I'd like to admit, and can't find anything wrong; the only thing I'd suggest is getting rid of the Resources part in the .lang, you don't really need that.

It could be an "external" issue; is the extra_english.lang file located in the same place as your custom_story_settings.cfg? Did you properly "save as..." to save it as a language file, or is it still a text file? That's all I can think of as far as solving it goes.
Yeah, I know it´s wierd..

The lang file is in the same folder as custom story settings file yes.

maps
custom story file
lang file
story.png

Uhm. I made the lang file with the Lang Editor provided on the frictional games wiki just to be 100% sure its a lang file.

extra_english_lang.lang

Is how it is..

I´ll look into the resource part when i get home ty.

Edit: As I´ve mentioned, the notes turn out blank aswell so it has to be the script right?

The note is idiot proof, followed a tutorial on that one so it´s good from the editor at least..
(This post was last modified: 07-16-2012, 07:35 AM by Hauken.)
07-16-2012, 07:33 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#6
RE: Scripting problem

(07-16-2012, 07:33 AM)Hauken Wrote: extra_english_lang.lang

It's supposed to be "extra_english.lang"

Tutorials: From Noob to Pro
07-16-2012, 08:08 AM
Website Find
Hauken Offline
Member

Posts: 62
Threads: 19
Joined: Jul 2012
Reputation: 1
#7
RE: Scripting problem

Thanks Computer!

I had it like you said before but i tried several things to make this work, basically you both helped me!

Thankyou both alot Smile it works now!
07-16-2012, 10:59 AM
Find




Users browsing this thread: 1 Guest(s)