Frictional Games Forum (read-only)
Scripting, need urgent help! - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Scripting, need urgent help! (/thread-9259.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13


RE: Scripting, need urgent help! - JenniferOrange - 07-24-2011

////////////////////////////
// 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



RE: Scripting, need urgent help! - JetlinerX - 07-24-2011

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)


RE: Scripting, need urgent help! - JenniferOrange - 07-24-2011

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.


RE: Scripting, need urgent help! - JetlinerX - 07-24-2011

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"
/>


RE: Scripting, need urgent help! - JenniferOrange - 07-24-2011

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


RE: Scripting, need urgent help! - JetlinerX - 07-24-2011

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?


RE: Scripting, need urgent help! - JenniferOrange - 07-24-2011

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.


RE: Scripting, need urgent help! - JetlinerX - 07-24-2011

Edited post. New question Smile


RE: Scripting, need urgent help! - JenniferOrange - 07-24-2011

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


RE: Scripting, need urgent help! - JetlinerX - 07-24-2011

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

Im ready! Anything to get this out tonight!