01-30-2012, 10:27 AM
01-30-2012, 10:43 AM
01-30-2012, 10:47 AM
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");
}
{
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");
}
01-30-2012, 11:11 AM
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()
{
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()
{
01-30-2012, 11:14 AM
(01-30-2012, 11:11 AM)QysteiN Wrote: [ -> ]I created a script:Dude what on earth are you doing, if you need help make your own thread......
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()
{
01-30-2012, 11:15 AM
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: [ -> ]This is his/her thread.(01-30-2012, 11:11 AM)QysteiN Wrote: [ -> ]I created a script:Dude what on earth are you doing, if you need help make your own thread......
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()
{
01-30-2012, 11:18 AM
Omg sry, I went into the wrong 1... xD
01-30-2012, 12:07 PM
thanks flamez once again lol =D