Frictional Games Forum (read-only)
Just a quick fix please??Script missing word? - 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: Just a quick fix please??Script missing word? (/thread-18306.html)

Pages: 1 2


Just a quick fix please??Script missing word? - danimora2012 - 09-13-2012

Alright...this is wat happens when i load the Custom story or Reload it (In this case reload it)
http://postimage.org/image/4any4osw7/

Can anyone show me a quick fix?

here is the script i used:


1////////////////////////////
2//Run first time starting map
3void OnStart()
4{
5SetEntityCallbackFunc("", "key_torture_chamber_1", "UsedKeyOnDoor", true);
6}
7void OnPickup(string &in asEntity, string &in type)
8{
9AddUseItemCallback("", "key_torture_chamber_1", "door_hub_1", "UsedKeyOnDoor", true);
10{
11SetEntityActive("servant_grunt_1", true);
12ShowEnemyPlayerPosition("servant_grunt_1");
13}
14void UsedKeyOnDoor(string &in asItem, string &in asEntity)
15{
16SetLevelDoorLocked("level_hub_1", false);
17PlaySoundAtEntity("", "unlock_door", "level_hub_1", 0.0f, false);
18RemoveItem("key_torture_chamber_1");
19AddDebugMessage("Key On Door", false);
20}
21
22////////////////////////////
23//Run when leaving map
24void OnLeave()
25}
26
27{

Il leave the custom story for you to download if you want to...it's small with only 2 maps...currently being made...it's for pewdiepie...test it out and tell me what you think when it is fixed il upload it again here...


RE: Just a quick fix please??Script missing word? - Robby - 09-13-2012

At void OnLeave(), those 2 brackets are inverted. Turn them around.


RE: Just a quick fix please??Script missing word? - danimora2012 - 09-13-2012

(09-13-2012, 10:26 AM)Nemet Robert Wrote: At void OnLeave(), those 2 brackets are inverted. Turn them around.
Thank you but now i got this...
http://postimage.org/image/xl3n98u9z/ Huh


RE: Just a quick fix please??Script missing word? - Robby - 09-13-2012

Post your script file. It worked when I tested it.

EDIT: You know what? I'll script the entire thing myself. I have an idea of what I'm doing (scripter).


RE: Just a quick fix please??Script missing word? - danimora2012 - 09-13-2012

(09-13-2012, 10:35 AM)Nemet Robert Wrote: Post your script file. It worked when I tested it.
Ok....here you go... (it has something to do with the { } but i fix it but if i mess arround to much i can't put it back the way it was


RE: Just a quick fix please??Script missing word? - Robby - 09-13-2012

Not those brackets. Here, try copy-pasting this (without quotes)

"void OnLeave()
{

}"


to the end of the script file (removing the "OnLeave" part you have)

If that doesn't work, I'll script everything by myself! See if that fixes it.


RE: Just a quick fix please??Script missing word? - danimora2012 - 09-13-2012

(09-13-2012, 10:44 AM)Nemet Robert Wrote: Not those brackets. Here, try copy-pasting this (without quotes)

"void OnLeave()
{

}"


to the end of the script file (removing the "OnLeave" part you have)

If that doesn't work, I'll script everything by myself!
Im sorry I AM COMPLETLY LOST Huh Undecided Confused Can you do it...Il put ya in ma credits!? Big Grin
Download the one attached to this reply...Im sorry sir...but im barely dead...Im such a Noob...started theese scriptings today...this is how im learning...


RE: Just a quick fix please??Script missing word? - Robby - 09-13-2012

Already scripting everything. Also making minor improvements to the map.

Yeah, add me to the credits if you wish. Watch this post, as I'll edit it soon (quick and good scripter)

EDIT: Ok, now testing my script out.

EDIT2: Fully works. Replace ALL files!

[attachment=3359]


RE: Just a quick fix please??Script missing word? - danimora2012 - 09-13-2012

(09-13-2012, 10:55 AM)Nemet Robert Wrote: Already scripting everything. Also making minor improvements to the map.

Yeah, add me to the credits if you wish. Watch this post, as I'll edit it soon (quick and good scripter)

EDIT: Ok, now testing my script out.
Is that u?
http://www.youtube.com/watch?v=RbyP5PpSyBA Huh


RE: Just a quick fix please??Script missing word? - Robby - 09-13-2012

Yup. Edited other post. Check it!