The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
#1
Error trying to run map

Hey, trying to make my own map for the first time and i've run into some error once i started to make it a bit more complicated.
1: I want my key (key_1) to activate a monster
2: I want that key to unlock a door (door_1)
3: I want to set a patrolnode for that monster once i activate it
(Optinal)4: if anyone could also assist me with how to changemap once i've opened the last door that would be great.
I'm deeply grateful for any assistance since i'm a noob and all!

I'm getting an error message which says:
[Image: scripterror.png]

This is my script so far:

////////////////////////
//Run when starting map
void OnStart()
{
SetEntityPlayerInteractCallBack("key_1", "ActivateMonster", true);
}
////////////////////////
//Run when entering map
void OnEnter()
{ AddUseItemCallback("","key_1","door_1","UsedKeyOnDoor". true);

}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_1", false, true);
PlaySoundAtEntity("", "unlock_door", "door_1", 0, false);
RemoveItem("key_1");
}
void ActivateMonster(string &in item)
{
SetEntityActive("monster_1", true);
AddEnemyPatrolNode("monster_1", "PathNodeArea_1", 0, "idle");
AddEnemyPatrolNode("monster_1", "PathNodeArea_2", 0, "idle");
}
////////////////////////
//Run when leaving map
void OnLeave()
{

}
04-11-2012, 02:25 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: 1 Guest(s)