Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 5 Vote(s) - 3.8 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting, need urgent help!
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#51
RE: Scripting, need urgent help!

////////////////////////////
// Run when entering map
void OnEnter ()
{
AddUseItemCallback("", "mainkey_1", "maindoor_1", "UsedKeyOnDoor", true);
AddUseItemCallback("", "nameofkey", "nameofleveldoor", "UsedKeyOnDoor2", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("maindoor_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "maindoor_1", 0, false);
RemoveItem("mainkey_1");
}

void UsedKeyOnDoor2(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("nameofleveldoor", false);
SetLevelDoorLockedSound("nameofleveldoor", "door_level_wood_locked.snt");
RemoveItem("nameofkey");
///////////////////////////
//Run when leaving map
void OnLeave ()
{

}

There you go, sorry this is frustrating for you. Sad

Ba-da bing, ba-da boom.
07-24-2011, 03:14 AM
Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#52
RE: Scripting, need urgent help!

I love you so much right now! You have no idea how much I love you, NO IDEA! Thanks SOOOO much! The test should be ready tonight! Maybe you can play it?


PS: The solution to the notes, and key names not showing in game from the extra eng, is that you dont put </Entry> at the end. Just had that problem, and FikZed it. (Inside joke with FikZ)

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

(This post was last modified: 07-24-2011, 03:30 AM by JetlinerX.)
07-24-2011, 03:28 AM
Website Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#53
RE: Scripting, need urgent help!

Ah hooray it worked! Big Grin
I'm always terrified to play Amnesia. xD But, as an assistor I will gladly play it and scare myself to death. Smile When I'm done I'll give you an honest right-to-the-point feedback on the atmosphere, scares, etc. ^^
Thank you for the love by the way. I'm glad I stuck with you to help you figure this out!
(I also upgraded my post numbers and went from Junior Member to Member.. hehe.)

@P.S. You don't? O.o strange, I'll try that out.. I swear that's how I've always done it.

Ba-da bing, ba-da boom.
(This post was last modified: 07-24-2011, 03:40 AM by JenniferOrange.)
07-24-2011, 03:33 AM
Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#54
RE: Scripting, need urgent help!

Hey-

I am now trying to figure out how to write the description for the story. I have this in the custom story settings:

<Main
Name="First Map"
Author="Mapping by Seth, Scripting by JetlinerX"
ImgFile=""

MapsFolder = "maps"
StartMap="test.map"
StartPos="PlayerStartArea_1"
/>

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

07-24-2011, 03:41 AM
Website Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#55
RE: Scripting, need urgent help!

Okay this is easy, so this should progress quickly. ^^

<Main
Name="First Map" <--- Name of the custom story
Author="Mapping by Seth, Scripting by JetlinerX" <--- This is fine, but you can shorten it to just Seth & JetlinerX for now, then specify what you two did in the credits
ImgFile="" <-- If you're not including an image, this can go

MapsFolder = "maps" <-- Location of your StartMap, should be "maps/"
StartMap="test.map" <--- Name of the first map the player starts on
StartPos="PlayerStartArea_1" <--- Name of the starting area
/>

So, it should be like this:

<Main
Name = "First Map"
Author = "Seth and JetlinerX"

MapsFolder = "maps/"
StartMap = "test.map"
StartPos = "PlayerStartArea_1"
/>
The story's actual description goes in your extra_english.lang folder.
Add this to the file:

<LANGUAGE>
[TAB here]<CATEGORY Name="CustomStoryMain">
[TAB here, add 2 spaces]<Entry Name="Description">Your story's description here</Entry>
[TAB here]</CATEGORY>
</LANGUAGE>

Remember if you want to put an enter space in the description, for example you wanted it to say:
"This is my custom story.

It's so awesome."
You have to add [br][br] to your description. Like this:
<LANGUAGE>
[TAB here]<CATEGORY Name="CustomStoryMain">
[TAB here, add 2 spaces]<Entry Name="Description">This is my custom story.[br][br]It's so awesome.</Entry>
[TAB here]</CATEGORY>
</LANGUAGE>

And there you go! Big Grin
[TAB here]/[TAB here, add 2 spaces]* sorry about that, it wouldn't let me add spaces or TAB. >:c

Ba-da bing, ba-da boom.
(This post was last modified: 07-24-2011, 03:57 AM by JenniferOrange.)
07-24-2011, 03:49 AM
Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#56
RE: Scripting, need urgent help!

Oh yeah! I forgot its in the extra eng. MY BAD! I have a description in there, its not showing up tho Sad

New scripting question:

We have a door, now I need to know how to make it so that when the door is unlocked, the player is then stuck in place, and a grunt beats down the door and kills you. (End of demo)

Also, how do I make credits?

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

(This post was last modified: 07-24-2011, 04:00 AM by JetlinerX.)
07-24-2011, 03:58 AM
Website Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#57
RE: Scripting, need urgent help!

I understand how you feel, all of the descriptions for my stories have now changed to "No description" and won't show the picture either.. I'll look into it.

Ba-da bing, ba-da boom.
07-24-2011, 04:04 AM
Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#58
RE: Scripting, need urgent help!

Edited post. New question Smile

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

07-24-2011, 04:06 AM
Website Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#59
RE: Scripting, need urgent help!

You sure are the man of a thousand questions, eh? xD haha, I'm only teasing.
Well we have to disable the players functions.. I'm going to whip up something and test it out.
Prepare for epic scripting, we're going to have to add scripting areas and such x_x

Ba-da bing, ba-da boom.
(This post was last modified: 07-24-2011, 04:14 AM by JenniferOrange.)
07-24-2011, 04:11 AM
Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#60
RE: Scripting, need urgent help!

That sounds quite.... FUN! /sarcasm.

Im ready! Anything to get this out tonight!

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

07-24-2011, 04:16 AM
Website Find




Users browsing this thread: 2 Guest(s)