Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Enemy Patroling and Disapearing: Help!
heyitsrobert97 Offline
Member

Posts: 68
Threads: 29
Joined: Jan 2012
Reputation: 0
#20
RE: Enemy Patroling and Disapearing: Help!

(04-27-2012, 08:21 AM)Cocomunches Wrote:
Quote: ////////////////////////////
// Run when entering map
void OnStart()

{
SetEntityPlayerInteractCallback("scareactive2", "OnPickup", true);
}

void OnPickup(string &in asEntity)
{
SetEntityActive ("Monster_Grunt", true);
AddTimer("monsterstart", 60.0f, "byegrunt");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_1", 2, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_2", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_3", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_4", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_5", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_6", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_7", 2, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_8", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_9", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_10", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_11", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_12", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_13", 2, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_14", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_15", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_16", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_17", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_18", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_19", 2, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_20", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_21", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_22", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_23", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_24", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_25", 2, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_26", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_27", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_28", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_29", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_30", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_31", 2, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_32", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_33", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_34", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_35", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_36", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_37", 0, "");
AddEnemyPatrolNode("Monster_Grunt", "PathNodeAre_38", 0, "");
}

void byegrunt(string &in asTimer)
{
SetEntityActive ("Monster_Grunt", false);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{
StopMusic(2.0f, 0);
}
You Can Delete The Collide area to create areanodes. you just add them right after you spawn the grunt like i did. I also Added Something to The void OnLeave() to help you. it will stop the music (if you have any) and fade it out when you exit the map to main menu or another map Big Grin



This Darn House! , Four Doors, Youtube
04-27-2012, 11:11 AM
Find


Messages In This Thread
RE: Enemy Patroling and Disapearing: Help! - by heyitsrobert97 - 04-27-2012, 11:11 AM



Users browsing this thread: 4 Guest(s)