09-30-2010, 05:12 PM
09-30-2010, 05:16 PM
09-30-2010, 05:17 PM
(09-30-2010, 05:12 PM)LoneWolf Wrote: [ -> ]I dont know how and please tell me what i would write.
Thanks.
This has been addressed a thousand times and is in the tutorial section as a video.
09-30-2010, 07:09 PM
It doesn't work for me. Any idea
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "awesomekey_1", "mansion_1", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("awesomekey_1");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave(
{
}
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "awesomekey_1", "mansion_1", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("awesomekey_1");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave(
{
}
09-30-2010, 08:58 PM
void OnStart()
{
AddUseItemCallback("", "awesomekey_1", "mansion_1", "UsedKeyOnDoor", true); --> is your key named "awesomekey_1"? The door name must be "mansion_1" as well.
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true); --> again door name "mansion_1"?
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("awesomekey_1"); --> just to remove the key from inventory after it is used, key name "awesomekey_1"
}
Check the tutorial video on making doors. If you follow step by step you can't go wrong.
{
AddUseItemCallback("", "awesomekey_1", "mansion_1", "UsedKeyOnDoor", true); --> is your key named "awesomekey_1"? The door name must be "mansion_1" as well.
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true); --> again door name "mansion_1"?
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("awesomekey_1"); --> just to remove the key from inventory after it is used, key name "awesomekey_1"
}
Check the tutorial video on making doors. If you follow step by step you can't go wrong.
09-30-2010, 09:18 PM
I've done everything like in the video. That's why i don't understand.
edit: I've found the problem. The extension of my folder was .hps.hps instead of .hps !
It works now! Youhou!
Anyway thank you!
edit: I've found the problem. The extension of my folder was .hps.hps instead of .hps !
It works now! Youhou!
Anyway thank you!