Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to script
Melaara Offline
Junior Member

Posts: 19
Threads: 2
Joined: Apr 2014
Reputation: 1
#6
RE: Trying to script

(04-24-2014, 06:19 PM)FlawlessHappiness Wrote: Post your script again, then we can solve the monster-thingy Wink

My Script looks now like this:



////////////////////////////
// Run first time starting map
void OnStart()

{
AddUseItemCallback("", "key_1", "mansion_1", "KeyOnDoor", true);
AddEntityCollideCallback("Player", "scr_enemy1", "MonsterFunction", true, 1);
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_4", 0.001, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_8", 0, "");
SetEntityActive("servant_grunt_2", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("key_1");
}

void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
}
////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}



But I think the problem has nothing to do with the script but more with the editor. I read on the wiki that somewhere I have to insert "Playercollide" so that when I walk into the area the monster will appear, but even after several tutorials I still haven't found where to insert that. Smile
04-24-2014, 07:18 PM
Find


Messages In This Thread
Trying to script - by Melaara - 04-24-2014, 03:30 PM
RE: Trying to script - by PutraenusAlivius - 04-24-2014, 03:36 PM
RE: Trying to script - by Mudbill - 04-24-2014, 04:34 PM
RE: Trying to script - by Melaara - 04-24-2014, 05:36 PM
RE: Trying to script - by FlawlessHappiness - 04-24-2014, 06:19 PM
RE: Trying to script - by Melaara - 04-24-2014, 07:18 PM
RE: Trying to script - by Mudbill - 04-24-2014, 08:07 PM
RE: Trying to script - by Melaara - 04-24-2014, 11:26 PM



Users browsing this thread: 2 Guest(s)