(05-09-2012 09:25 PM)maitalr Wrote:
(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 do
Judging 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[font=arial, sans-serif]
[/font]That's my script now:
// Run when entering map
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);
// Run when leaving map
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
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