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
Whats wrong with that script?
Chaker Offline
Junior Member

Posts: 9
Threads: 2
Joined: Oct 2011
Reputation: 0
#1
Whats wrong with that script?

Hey Guys, i've got a problem, i watched tutorials about scripting etc
i copied the script in the tutorials and just renamed the item and the door.
void OnStart()

{
AddUseItemCallback("", "doorkey2", "door2","UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in esEnity)
{
SetSwingDoorLocked("door2", false, true);
PlaySoundAtEnity("", "unlock_door", "door2", 0, false);
RemoveItem("doorkey2");
}
(This post was last modified: 10-14-2011, 04:50 PM by Chaker.)
10-14-2011, 04:45 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Whats wrong with that script?

So, what is the problem exactly?

Tutorials: From Noob to Pro
10-14-2011, 05:01 PM
Website Find
Chaker Offline
Junior Member

Posts: 9
Threads: 2
Joined: Oct 2011
Reputation: 0
#3
RE: Whats wrong with that script?

i try to open a door using a key, but its not working
10-14-2011, 05:04 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Whats wrong with that script?

(10-14-2011, 05:04 PM)Chaker Wrote: i try to open a door using a key, but its not working

What kind of door is it and have you checked to make sure that the door name matches the one in the script and that the key the user carries has the same name as the script?

Tutorials: From Noob to Pro
10-14-2011, 05:09 PM
Website Find
Chaker Offline
Junior Member

Posts: 9
Threads: 2
Joined: Oct 2011
Reputation: 0
#5
RE: Whats wrong with that script?

yeah they are the same, can you add me in skype so i can show you screenshot or you can help me with teamviewer? skype: coka_leha
10-14-2011, 05:11 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#6
RE: Whats wrong with that script?

(10-14-2011, 05:11 PM)Chaker Wrote: yeah they are the same, can you add me in skype so i can show you screenshot or you can help me with teamviewer? skype: coka_leha

I don't have Skype, and while i have TeamViewer i would rather that any fix be publicly available for future reference.

Tutorials: From Noob to Pro
10-14-2011, 05:14 PM
Website Find
Chaker Offline
Junior Member

Posts: 9
Threads: 2
Joined: Oct 2011
Reputation: 0
#7
RE: Whats wrong with that script?

i tried everything but nothin works :S
10-14-2011, 06:37 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#8
RE: Whats wrong with that script?

(10-14-2011, 06:37 PM)Chaker Wrote: i tried everything but nothin works :S

What's "everything"?

Tutorials: From Noob to Pro
10-14-2011, 07:14 PM
Website Find
GreyFox Offline
Member

Posts: 162
Threads: 23
Joined: Jul 2011
Reputation: 2
#9
RE: Whats wrong with that script?

void UsedKeyOnDoor(string &in asItem, string &in esEnity)

Should Be asEntity

-Grey Fox

Current Project
Forgotten
10-14-2011, 08:19 PM
Find
Chaker Offline
Junior Member

Posts: 9
Threads: 2
Joined: Oct 2011
Reputation: 0
#10
RE: Whats wrong with that script?

fixed but still not working
10-14-2011, 08:51 PM
Find




Users browsing this thread: 7 Guest(s)