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
Can someone help out with this Script?
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#5
RE: Can someone help out with this Script?

No, nothing is wrong with his {}, but his callbacks are all over, and you are calling back the same thing twice. Try this:

void OnStart()

{

SetEntityPlayerInteractCallback("celltwelvekey", "SecondMonster", true);

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

}



void OnPickup(string &in asEntity)



{

SetEntityActive ("Monster_Grunt", true);

AddTimer("monsterstart", 60.0f, "byegrunt");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_1", 2, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_2", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_3", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_4", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_5", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_6", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_7", 2, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_8", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_9", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_10", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_11", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_12", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_13", 2, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_14", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_15", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_16", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_17", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_18", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_19", 2, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_20", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_21", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_22", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_23", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_24", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_25", 2, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_26", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_27", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_28", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_29", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_30", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_31", 2, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_32", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_33", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_34", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_35", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_36", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_37", 0, "");

AddEnemyPatrolNode("Monster_Grunt", "PathNodeArea_38", 0, "");

}


void byegrunt(string &in asTimer)



{

SetEntityActive ("Monster_Grunt", false);

}



void SecondMonster(string &in asEntity)



{

SetEntityActive ("baisle", true);

AddTimer("monsterstart", 400.0f, "byegrunt");

AddEnemyPatrolNode("baisle", "PathNodeArea_39", 2, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_40", 0, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_41", 0, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_42", 0, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_43", 0, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_44", 0, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_45", 2, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_46", 0, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_47", 0, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_48", 0, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_49", 0, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_50", 0, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_51", 2, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_52", 0, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_53", 0, "");



AddEnemyPatrolNode("baisle", "PathNodeArea_54", 0, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_55", 0, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_56", 0, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_57", 2, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_58", 0, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_59", 0, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_60", 0, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_61", 0, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_62", 0, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_63", 2, "");

AddEnemyPatrolNode("baisle", "PathNodeArea_64", 0, "");

}







void byegrunt(string &in asTimer)



{



SetEntityActive ("baisle", false);

}



void OnLeave()

{

StopMusic(2.0f, 0);

}

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

04-29-2012, 04:24 AM
Website Find


Messages In This Thread
RE: Can someone help out with this Script? - by JetlinerX - 04-29-2012, 04:24 AM



Users browsing this thread: 1 Guest(s)