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 activating monster on script area
zombiehacker595 Offline
Member

Posts: 141
Threads: 51
Joined: Mar 2012
Reputation: 3
#1
activating monster on script area

so how do i activate a monster when i step on the script area i can do it when i pick up key but i tested the script area and it didnt work this is my script.
void OnStart()
{
SetEntityPlayerInteractCallback("ScriptArea_1", "ActivateMonster", true);
}
void ActivateMonster(string &in item)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "Idle");
}
void OnEnter()
{
{
void OnLeave()
}
so what do i have to change to get him to activate i also changed it to a hullicination so would i have to change parts of the script for that aswell? thanks Smile
04-01-2012, 10:31 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: activating monster on script area

Change
SetEntityPlayerInteractCallback("ScriptArea_1", "ActivateMonster", true);


To AddEntityCollideCallback("Player", "ScriptArea_1", "ActivateMonster", true, 1);


and void ActivateMonster(string &in item)


to


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

04-01-2012, 10:50 AM
Find
zombiehacker595 Offline
Member

Posts: 141
Threads: 51
Joined: Mar 2012
Reputation: 3
#3
RE: activating monster on script area

works great thanks Smile
04-01-2012, 10:58 AM
Find




Users browsing this thread: 1 Guest(s)