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
Same script... really!?
Saren Offline
Member

Posts: 196
Threads: 20
Joined: Jan 2012
Reputation: 1
#1
Same script... really!?

Okay so I got 2 monsters in the same map, and ofc you have to use this script:
void MonsterFunction(string &in asParent, string &in asChild, int alState)
As far as I know.. but when I launch the game it says it's already there like, it dos'nt like me adding it again.... what's up with that?
The script is like this:
//Foodstorage grunt
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt_foodstorage", true);
ShowEnemyPlayerPosition("grunt_foodstorage");
AddEnemyPatrolNode("grunt_foodstorage", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("grunt_foodstorage", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("grunt_foodstorage", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("grunt_foodstorage", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("grunt_foodstorage", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("grunt_foodstorage", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("grunt_foodstorage", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("grunt_foodstorage", "PathNodeArea_8", 0, "");
}
void Despawngrunt_foodstorage(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("grunt_foodstorage", false);
}
//Penumbra dog
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("guard_dog", true);
ShowEnemyPlayerPosition("guard_dog");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_15", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_16", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_19", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_20", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_21", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_22", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_23", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_24", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_25", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_26", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_27", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_28", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_29", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_30", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_31", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_32", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_33", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_34", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_35", 0, "");
AddEnemyPatrolNode("guard_dog", "PathNodeArea_36", 0, "");

03-02-2012, 10:53 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: Same script... really!?

Change one of the MonsterFunction to MonsterFucntion2. Also do this in the callback aswell.

03-02-2012, 11:10 AM
Find
Saren Offline
Member

Posts: 196
Threads: 20
Joined: Jan 2012
Reputation: 1
#3
RE: Same script... really!?

(03-02-2012, 11:10 AM)flamez3 Wrote: Change one of the MonsterFunction to MonsterFucntion2. Also do this in the callback aswell.
Oohhh, you can add numbers... nice, thx dude



03-02-2012, 11:11 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Same script... really!?

(03-02-2012, 11:11 AM)Saren Wrote: Oohhh, you can add numbers... nice, thx dude

Or you can do it all in the same function, which is the practical way of doing it given the purpose of the function, and rely on the parent and child variables to determine what to do.

Tutorials: From Noob to Pro
03-02-2012, 07:57 PM
Website Find




Users browsing this thread: 1 Guest(s)