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
Script Help Error trying to run map
Macetrow Offline
Junior Member

Posts: 38
Threads: 3
Joined: Apr 2012
Reputation: 1
#7
RE: Error trying to run map

Hmm i did change it to this, not sure if this is what you meant, but it's not working. Also for some reason the key or the door does not have a name.
Any idea what i managed to screw up? I'm such a noob lol

////////////////////////
//Run when starting map
void OnStart()
{
SetEntityCallbackFunc("key_1", "ActivateMonster");
}

void ActivateMonster(string &in asEntity, string &in type)
{
if(type == "OnPickup")
{
SetEntityActive("monster_1", true);
}
}
////////////////////////
//Run when entering map
void OnEnter()
{
AddUseItemCallback("","key_1","door_1","UsedKeyOnDoor", true);
AddEnemyPatrolNode("monster_1", "PathNodeArea_1", 0, "idle");
AddEnemyPatrolNode("monster_1", "PathNodeArea_2", 0, "idle");
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_1", false, true);
PlaySoundAtEntity("", "unlock_door", "door_1", 0, false);
RemoveItem("key_1");
}

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

}
(This post was last modified: 04-11-2012, 04:00 PM by Macetrow.)
04-11-2012, 03:48 PM
Find


Messages In This Thread
Error trying to run map - by Macetrow - 04-11-2012, 02:25 PM
RE: Error trying to run map - by ClayPigeon - 04-11-2012, 03:00 PM
RE: Error trying to run map - by Macetrow - 04-11-2012, 03:07 PM
RE: Error trying to run map - by ClayPigeon - 04-11-2012, 03:10 PM
RE: Error trying to run map - by Macetrow - 04-11-2012, 03:17 PM
RE: Error trying to run map - by ClayPigeon - 04-11-2012, 03:31 PM
RE: Error trying to run map - by Macetrow - 04-11-2012, 03:48 PM
RE: Error trying to run map - by ClayPigeon - 04-11-2012, 04:07 PM
RE: Error trying to run map - by Macetrow - 04-11-2012, 04:11 PM
RE: Error trying to run map - by ClayPigeon - 04-11-2012, 04:42 PM
RE: Error trying to run map - by Macetrow - 04-11-2012, 04:51 PM



Users browsing this thread: 2 Guest(s)