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
Call Monster When Interact With Door?
theDARKW0LF Offline
Member

Posts: 150
Threads: 17
Joined: Sep 2010
Reputation: 0
#1
Call Monster When Interact With Door?

Hi guys, quick question...

What's the proper code to create an event where a monster is spawned after I interact with a door? I haven't created one of these specific situations before so I'm pretty much using trial and error methods right now...

Right now my code looks like this:
void CollideAreaGruntDoorCallback(string &in asParent, string &in asChild, int alState)
{
    SetEntityPlayerInteractCallback("DoorGrunt", "SpawnGrunt", false);
}

void SpawnGrunt(string &in asParent, string &in asChild, int alState)
{
    SetEntityActive("SpotGrunt2", true);
    GiveSanityDamage(10, true);
    AddEnemyPatrolNode("SpotGrunt", "PathNodeArea_98", 1, "");
    AddTimer("Waypoints", 13.0f, "TimerSpotGrunt2");
}

void TimerSpotGrunt2(string &in asTimer)
{
    if(asTimer == "Waypoints")
    {
        ClearEnemyPatrolNodes("SpotGrunt2");
        AddEnemyPatrolNode("SpotGrunt2", "PathNodeArea_83", 1, "");
    }
}

Something's wrong here, but I'm not too sure what, any help?

Check out my custom stories(1)(2)!
(This post was last modified: 03-04-2011, 08:13 AM by theDARKW0LF.)
03-04-2011, 08:07 AM
Find


Messages In This Thread
Call Monster When Interact With Door? - by theDARKW0LF - 03-04-2011, 08:07 AM



Users browsing this thread: 1 Guest(s)