QysteiN
Junior Member
Posts: 45
Threads: 6
Joined: Nov 2011
Reputation:
0
|
Script help (Key to door)
Yo yo. Im kinda stuck with something again.
I made the door and the key. But how do i make the key fit with the door? :<
I make YouTube videos and I'm currently working on a Amnesia custom story.
(This post was last modified: 01-30-2012, 08:49 PM by QysteiN.)
|
|
01-30-2012, 10:27 AM |
|
i3670
Posting Freak
Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation:
36
|
RE: Script help (Key to door)
|
|
01-30-2012, 10:43 AM |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
RE: Script help (Key to door)
void OnStart()
{
AddUseItemCallback("", "nameofkey", "nameofdoor", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("nameofdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "door1", 0, false);
RemoveItem("nameofkey");
}
(This post was last modified: 01-30-2012, 10:47 AM by flamez3.)
|
|
01-30-2012, 10:47 AM |
|
QysteiN
Junior Member
Posts: 45
Threads: 6
Joined: Nov 2011
Reputation:
0
|
RE: Script help (Key to door)
I created a script:
Anyone can spot whats wrong?
I get error whenever i try to load my custom story:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback(''awesomekey_1'', ''castle_1'', ''UsedKeyOnDoor'', True);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(''castle_1''' , false, true);
PlaySoundAtEntity('' '', ''unlock_door'' , ''castle_1'' , 0, false);
RemoveItem(''awesomekey_1'');
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
I make YouTube videos and I'm currently working on a Amnesia custom story.
|
|
01-30-2012, 11:11 AM |
|
Saren
Member
Posts: 196
Threads: 20
Joined: Jan 2012
Reputation:
1
|
RE: Script help (Key to door)
(01-30-2012, 11:11 AM)QysteiN Wrote: I created a script:
Anyone can spot whats wrong?
I get error whenever i try to load my custom story:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback(''awesomekey_1'', ''castle_1'', ''UsedKeyOnDoor'', True);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(''castle_1''' , false, true);
PlaySoundAtEntity('' '', ''unlock_door'' , ''castle_1'' , 0, false);
RemoveItem(''awesomekey_1'');
}
////////////////////////////
// Run when leaving map
void OnLeave()
{ Dude what on earth are you doing, if you need help make your own thread......
|
|
01-30-2012, 11:14 AM |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
RE: Script help (Key to door)
You are using 2 ' to make the quotation. Hold shift and press the button left of the Enter to make ".
(01-30-2012, 11:14 AM)Saren Wrote: (01-30-2012, 11:11 AM)QysteiN Wrote: I created a script:
Anyone can spot whats wrong?
I get error whenever i try to load my custom story:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback(''awesomekey_1'', ''castle_1'', ''UsedKeyOnDoor'', True);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(''castle_1''' , false, true);
PlaySoundAtEntity('' '', ''unlock_door'' , ''castle_1'' , 0, false);
RemoveItem(''awesomekey_1'');
}
////////////////////////////
// Run when leaving map
void OnLeave()
{ Dude what on earth are you doing, if you need help make your own thread...... This is his/her thread.
(This post was last modified: 01-30-2012, 11:16 AM by flamez3.)
|
|
01-30-2012, 11:15 AM |
|
Saren
Member
Posts: 196
Threads: 20
Joined: Jan 2012
Reputation:
1
|
RE: Script help (Key to door)
Omg sry, I went into the wrong 1... xD
|
|
01-30-2012, 11:18 AM |
|
QysteiN
Junior Member
Posts: 45
Threads: 6
Joined: Nov 2011
Reputation:
0
|
RE: Script help (Key to door)
thanks flamez once again lol =D
I make YouTube videos and I'm currently working on a Amnesia custom story.
|
|
01-30-2012, 12:07 PM |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
RE: Script help (Key to door)
(01-30-2012, 12:07 PM)QysteiN Wrote: thanks flamez once again lol =D : )
|
|
01-30-2012, 12:08 PM |
|
|