Problem - 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: Problem (/thread-15337.html) |
RE: Problem - darkadders - 05-08-2012 (05-08-2012, 05:06 PM)maitalr Wrote:well, for instance you can try adding a scriptarea in the level editor and assign the callback to it(05-08-2012, 04:08 PM)DarkShadowz Wrote:Yes. its still locked and it say "you cannot use this item that way//.."(05-08-2012, 03:31 PM)maitalr Wrote: Everything works well. But when I try to open the door with the key, it does not openso its still locked after you use the key on it? RE: Problem - Cranky Old Man - 05-08-2012 *butts my head in:* Have you named the key properly in the editor? If you want an online tutorial of the basics of scripting, checkout this one. RE: Problem - maitalr - 05-09-2012 this is really weird. even when i'm try with anther scripts it's still not working. i'm seriously don't know what to do RE: Problem - Cranky Old Man - 05-09-2012 (05-09-2012, 12:55 PM)maitalr Wrote: this is really weird. even when i'm try with anther scripts it's still not working. i'm seriously don't know what to doJudging by your grammar, you should start with learning the basics. Just copying and pasting example code, often doesn't work out, and when it doesn't work out, you need to have some understanding of why it doesn't. I should start by saying that scripting isn't easy. If you want better help than that, post what code you're currently using now, and what exactly isn't working now. We can't tell you what's wrong now, just by looking at the old code. RE: Problem - maitalr - 05-09-2012 (05-09-2012, 01:03 PM)Cranky Old Man Wrote:Sorry. English it's not my first language. Is it so obvious?(05-09-2012, 12:55 PM)maitalr Wrote: this is really weird. even when i'm try with anther scripts it's still not working. i'm seriously don't know what to doJudging by your grammar, you should start with learning the basics. Just copying and pasting example code, often doesn't work out, and when it doesn't work out, you need to have some understanding of why it doesn't. I should start by saying that scripting isn't easy. If you want better help than that, post what code you're currently using now, and what exactly isn't working now. We can't tell you what's wrong now, just by looking at the old code. But still, i'm pretty good at English. I did copy it, and then i change whats need to. I tried several times with all the suggestions were here and in youtube That's my script now: ///////////////////////////////// // Run when entering map void OnStart() { AddUseItemCallback("", "key_1", "Door_3", "UsedKeyOnDoor", true); } void KeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("Door_3", false, true); PlaySoundAtEntity("", "unlock_door", "Door_3", 0, false); RemoveItem("key_1"); } //////////////////////////// // Run when leaving map void OnLeave() { } RE: Problem - darkadders - 05-09-2012 (05-09-2012, 09:25 PM)maitalr Wrote:aah i see what youre doing wrong. you put in the function "UsedKeyOnDoor" as a callback, but your void calls back the function of "KeyOnDoor", a function which doesnt exist in your script(05-09-2012, 01:03 PM)Cranky Old Man Wrote:Sorry. English it's not my first language. Is it so obvious?(05-09-2012, 12:55 PM)maitalr Wrote: this is really weird. even when i'm try with anther scripts it's still not working. i'm seriously don't know what to doJudging by your grammar, you should start with learning the basics. Just copying and pasting example code, often doesn't work out, and when it doesn't work out, you need to have some understanding of why it doesn't. I should start by saying that scripting isn't easy. If you want better help than that, post what code you're currently using now, and what exactly isn't working now. We can't tell you what's wrong now, just by looking at the old code. simply change your void KeyOnDoor to void UsedKeyOnDoor ALSO: did you not read what i said? you need an extention for your sound file to be played. put a .snt at the end of your "unlock_door" RE: Problem - maitalr - 05-09-2012 (05-09-2012, 09:49 PM)DarkShadowz Wrote:(05-09-2012, 09:25 PM)maitalr Wrote:aah i see what youre doing wrong. you put in the function "UsedKeyOnDoor" as a callback, but your void calls back the function of "KeyOnDoor", a function which doesnt exist in your script(05-09-2012, 01:03 PM)Cranky Old Man Wrote:Sorry. English it's not my first language. Is it so obvious?(05-09-2012, 12:55 PM)maitalr Wrote: this is really weird. even when i'm try with anther scripts it's still not working. i'm seriously don't know what to doJudging by your grammar, you should start with learning the basics. Just copying and pasting example code, often doesn't work out, and when it doesn't work out, you need to have some understanding of why it doesn't. I should start by saying that scripting isn't easy. If you want better help than that, post what code you're currently using now, and what exactly isn't working now. We can't tell you what's wrong now, just by looking at the old code. Not working. I'm going crazy. By the way I tried what you said, and because it did not work, I put it back. :/ Any way, here screenshots: First: the key, custom_story_settings, and script Second: the door (You can click on the image to enlarge) [url]http://www.myg.co.il/index.php?loc=see&pic=phpZNpHIQ.png[/url] http://www.myg.co.il/index.php?loc=see&pic=phpDW3TOi.png I swear, it's probably a stupid mistake that I make And Seriously, Thanks for helping. RE: Problem - Your Computer - 05-09-2012 (05-09-2012, 10:54 PM)maitalr Wrote: I swear, it's probably a stupid mistake that I make You have no idea. P.S. You didn't do what he told you to do. RE: Problem - maitalr - 05-10-2012 (05-09-2012, 11:54 PM)Your Computer Wrote:(05-09-2012, 10:54 PM)maitalr Wrote: I swear, it's probably a stupid mistake that I make Oh.. ignore that thing its save with what he ask me to do. I made that screenshot before i change that part. cuz' i tried with it and without it. And i checked it again - it is save with the .snt thing //.. i'm becoming desperate maybe i should let it go and don't design... it will be so disappointing/... RE: Problem - darkadders - 05-10-2012 (05-10-2012, 12:13 AM)maitalr Wrote:dont worry about this dude, we all get stuck sometime. we'll get through it though, so dont worry ^^.(05-09-2012, 11:54 PM)Your Computer Wrote:(05-09-2012, 10:54 PM)maitalr Wrote: I swear, it's probably a stupid mistake that I make can you give me your current script? |