Chaker
Junior Member
Posts: 9
Threads: 2
Joined: Oct 2011
Reputation:
0
|
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 |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: Whats wrong with that script?
So, what is the problem exactly?
|
|
10-14-2011, 05:01 PM |
|
Chaker
Junior Member
Posts: 9
Threads: 2
Joined: Oct 2011
Reputation:
0
|
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 |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
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?
|
|
10-14-2011, 05:09 PM |
|
Chaker
Junior Member
Posts: 9
Threads: 2
Joined: Oct 2011
Reputation:
0
|
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 |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
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.
|
|
10-14-2011, 05:14 PM |
|
Chaker
Junior Member
Posts: 9
Threads: 2
Joined: Oct 2011
Reputation:
0
|
RE: Whats wrong with that script?
i tried everything but nothin works :S
|
|
10-14-2011, 06:37 PM |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: Whats wrong with that script?
(10-14-2011, 06:37 PM)Chaker Wrote: i tried everything but nothin works :S
What's "everything"?
|
|
10-14-2011, 07:14 PM |
|
GreyFox
Member
Posts: 162
Threads: 23
Joined: Jul 2011
Reputation:
2
|
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 |
|
Chaker
Junior Member
Posts: 9
Threads: 2
Joined: Oct 2011
Reputation:
0
|
RE: Whats wrong with that script?
fixed but still not working
|
|
10-14-2011, 08:51 PM |
|
|