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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem
darkadders Offline
Junior Member

Posts: 44
Threads: 1
Joined: Mar 2012
Reputation: 3
#16
RE: Problem

(05-09-2012, 09:25 PM)maitalr Wrote:
(05-09-2012, 01:03 PM)Cranky Old Man Wrote:
(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.
Sorry. English it's not my first language. Is it so obvious?
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()
{

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

*insert creative signature here*
05-09-2012, 09:49 PM
Find


Messages In This Thread
Problem - by maitalr - 05-08-2012, 02:10 PM
RE: Problem - by Cranky Old Man - 05-08-2012, 02:15 PM
RE: Problem - by darkadders - 05-08-2012, 02:32 PM
RE: Problem - by Traggey - 05-08-2012, 03:07 PM
RE: Problem - by maitalr - 05-08-2012, 03:16 PM
RE: Problem - by darkadders - 05-08-2012, 03:19 PM
RE: Problem - by maitalr - 05-08-2012, 03:31 PM
RE: Problem - by darkadders - 05-08-2012, 04:08 PM
RE: Problem - by Datguy5 - 05-08-2012, 04:26 PM
RE: Problem - by maitalr - 05-08-2012, 05:06 PM
RE: Problem - by darkadders - 05-08-2012, 05:44 PM
RE: Problem - by Cranky Old Man - 05-08-2012, 05:56 PM
RE: Problem - by maitalr - 05-09-2012, 12:55 PM
RE: Problem - by Cranky Old Man - 05-09-2012, 01:03 PM
RE: Problem - by maitalr - 05-09-2012, 09:25 PM
RE: Problem - by darkadders - 05-09-2012, 09:49 PM
RE: Problem - by maitalr - 05-09-2012, 10:54 PM
RE: Problem - by Your Computer - 05-09-2012, 11:54 PM
RE: Problem - by maitalr - 05-10-2012, 12:13 AM
RE: Problem - by darkadders - 05-10-2012, 07:34 AM
RE: Problem - by Datguy5 - 05-10-2012, 11:53 AM
RE: Problem - by maitalr - 05-10-2012, 12:35 PM
RE: Problem - by Adrianis - 05-10-2012, 02:38 PM
RE: Problem - by darkadders - 05-10-2012, 02:43 PM
RE: Problem - by Adrianis - 05-10-2012, 02:52 PM
RE: Problem - by Datguy5 - 05-10-2012, 01:29 PM
RE: Problem - by darkadders - 05-10-2012, 02:26 PM
RE: Problem - by maitalr - 05-10-2012, 03:22 PM
RE: Problem - by Adrianis - 05-10-2012, 03:31 PM
RE: Problem - by maitalr - 05-10-2012, 04:13 PM
RE: Problem - by Datguy5 - 05-10-2012, 03:36 PM
RE: Problem - by Adrianis - 05-10-2012, 03:44 PM
RE: Problem - by darkadders - 05-10-2012, 04:45 PM
RE: Problem - by maitalr - 05-10-2012, 07:14 PM
RE: Problem - by darkadders - 05-10-2012, 07:38 PM



Users browsing this thread: 1 Guest(s)