Trying to script
Hi there, everybody.
I'm new to the forum and also to scripting in the game. I hope that someone might explain to me how to script a little better. xD First of all I would like that someone corrects my hps file. There's no error but some of the things just don't work. Right now my locked door won't open (when I try to use the key it says 'Item cannot be used this way') and my monster won't spawn. It might be that I placed some things wrong, because I just don't know any better. ^^" I hope anybody can help me.
hps file:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "key_1", "mansion_1", "KeyOnDoor", true);
AddEntityCollideCallback("Player", "scr_enemy1", "MonsterFunction", true, 1);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0.001, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "");
SetEntityActive("servant_grunt_1", true);
}
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("key_1");
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
(This post was last modified: 04-24-2014, 03:35 PM by Melaara.)
|