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
Triggering Monsters
HansEnMilan Offline
Junior Member

Posts: 6
Threads: 2
Joined: Aug 2011
Reputation: 0
#1
Triggering Monsters

Hello,

I don't know if this is the right place to post this thread but I am new here.

Well I have tried everything to trigger a monster and make it walk from one position to another and then dissapear.

I've added a monster and 1 PathNode and I added a script area.

But everytime I end up getting different kinds of errors like : Invalid Token ''{'', etc

This is what I've got so far :

////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "AreaEen", "CollideRoomEen", true, 1);
}

void CollideRoomEen(string &in asParent, string &in asChild, int alState)

{
SetSwingDoorLocked("hanskamerdeur", true, true);
}

////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "hanskamerdeurkey_1", "hanskamerdeur", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("hanskamerdeur", false, true);
PlaySoundAtEntity("", "unlock_door", "hanskamerdeur", 0, false);
RemoveItem("hanskamerdeurkey_1");
}

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

}

As you can see I can trigger a door to close itself but I can't seem to trigger a monster, I started off the same way as I started with the door but then instead of CloseDoor I used this scripts :

void AddEnemyPatrolNode(string& asName, string& asNodeName, float afWaitTime, string& asAnimation);

Could someone Please help me, I've searched all of the internet but no one can give me a answer.





08-12-2011, 05:54 PM
Find


Messages In This Thread
Triggering Monsters - by HansEnMilan - 08-12-2011, 05:54 PM
RE: Triggering Monsters - by Tanshaydar - 08-12-2011, 06:06 PM
RE: Triggering Monsters - by HansEnMilan - 08-12-2011, 06:25 PM
RE: Triggering Monsters - by Tanshaydar - 08-12-2011, 06:28 PM
RE: Triggering Monsters - by HansEnMilan - 08-12-2011, 06:38 PM
RE: Triggering Monsters - by Tanshaydar - 08-12-2011, 06:56 PM
RE: Triggering Monsters - by HansEnMilan - 08-12-2011, 06:59 PM
RE: Triggering Monsters - by MegaScience - 08-13-2011, 06:20 AM



Users browsing this thread: 2 Guest(s)