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
#7
RE: Call Monster When Interact With Door?

(03-06-2011, 05:51 PM)Droopy Wrote: You don't mind sharing the finished script for those who may have the same problems?

Sure. This is how mine goes:
void OnStart()
{

SetEntityPlayerInteractCallback("DoorGrunt", "SpawnGrunt", false);
    
}

void SpawnGrunt(string &in entity)
{
    SetEntityActive("SpotGrunt2", true);
    GiveSanityDamage(10, true);
    AddEnemyPatrolNode("SpotGrunt2", "PathNodeArea_100", 15, "");
    AddTimer("Waypoints1", 15.0f, "TimerSpotGrunt2");
    AddTimer("Waypoints2", 20.0f, "TimerSpotGrunt2");
    AddTimer("Waypoints3", 30.0f, "TimerSpotGrunt2");
}

void TimerSpotGrunt2(string &in asTimer)
{
    if(asTimer == "Waypoints1")
    {
        ClearEnemyPatrolNodes("SpotGrunt2");
    }
    else if(asTimer == "Waypoints2")
    {
        AddEnemyPatrolNode("SpotGrunt2", "PathNodeArea_54", 10, "");
    }
    else if(asTimer == "Waypoints3")
    {
        AddEnemyPatrolNode("SpotGrunt2", "PathNodeArea_83", 1, "");
    }
}

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


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



Users browsing this thread: 1 Guest(s)