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 Bleurgh! Brute isn't activating!
satanicguardian Offline
Junior Member

Posts: 7
Threads: 3
Joined: Jun 2012
Reputation: 0
#1
Bleurgh! Brute isn't activating!

{
AddEntityCollideCallback("Player", "brutespawn_1", "func_brutespawn_1", true, 1);

}

void func_brutespawn_1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", true);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_37", 0.5, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_38", 0.5, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_39", 0.5, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_40", 0.5, "");
}


http://24.media.tumblr.com/tumblr_m52k8k...1_1280.jpg


the brute is named as servant_brute_1 and the pathnodes are correctly numbered, but when i step through the door in game into the area box nothing happens :c

It's supposed to be a quick, hard scare, but if it won't activate it's not very scary at all! :'c
(This post was last modified: 06-04-2012, 02:31 AM by satanicguardian.)
06-04-2012, 02:27 AM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#2
RE: Bleurgh! Brute isn't activating!

I'd say set up a debug message to ensure that the collision actually happens. As far as I can tell, that's the only issue that's present. There may be a naming issue.

06-04-2012, 03:29 AM
Find
Putmalk Offline
Senior Member

Posts: 290
Threads: 13
Joined: Apr 2012
Reputation: 15
#3
RE: Bleurgh! Brute isn't activating!

Is the area called "brutespawn_1"?

Is that collide callback under the void OnStart() function? (can't really tell because you didn't include that in your snippet)

Did you delete a map_cache is any exists?

06-04-2012, 05:12 AM
Find
Stepper321 Offline
Senior Member

Posts: 263
Threads: 26
Joined: Nov 2011
Reputation: 8
#4
RE: Bleurgh! Brute isn't activating!

Delete map_cache and make sure that
AddEntityCollideCallback("Player", "brutespawn_1", "func_brutespawn_1", true, 1);
is on OnStart() {
If that doesn't work, try to use a debug message.
If you want the monster to immedatly run at the player, put in this code in the function:
ShowEnemyPlayerPosition('servant_brute_1"); (don't know if it's the actual code, search Engine Functions or Script Functions or whatever.
This makes him charge and run at the player the second this script is activated. Also, the pathnodes are not needed if its that close to the player. He will find his way charging directly at him Smile.

Signature to awesome to be displayed.
06-04-2012, 08:54 AM
Find
Theforgot3n1 Offline
Member

Posts: 192
Threads: 20
Joined: Apr 2012
Reputation: 6
#5
RE: Bleurgh! Brute isn't activating!

(06-04-2012, 08:54 AM)Stepper321 Wrote: Delete map_cache and make sure that
AddEntityCollideCallback("Player", "brutespawn_1", "func_brutespawn_1", true, 1);
is on OnStart() {
If that doesn't work, try to use a debug message.
If you want the monster to immedatly run at the player, put in this code in the function:
ShowEnemyPlayerPosition('servant_brute_1"); (don't know if it's the actual code, search Engine Functions or Script Functions or whatever.
This makes him charge and run at the player the second this script is activated. Also, the pathnodes are not needed if its that close to the player. He will find his way charging directly at him Smile.
But it's always good with them since "skilled" players can survive it.

Confusion: a Custom Story - Ch1 for play!
http://www.frictionalgames.com/forum/thread-15477.html
About 50% built.
Delayed for now though!
(This post was last modified: 06-04-2012, 02:11 PM by Theforgot3n1.)
06-04-2012, 02:02 PM
Website Find
Stepper321 Offline
Senior Member

Posts: 263
Threads: 26
Joined: Nov 2011
Reputation: 8
#6
RE: Bleurgh! Brute isn't activating!

No, it isn't. The monster dissapears after completing the trail.

Signature to awesome to be displayed.
06-04-2012, 03:20 PM
Find
satanicguardian Offline
Junior Member

Posts: 7
Threads: 3
Joined: Jun 2012
Reputation: 0
#7
RE: Bleurgh! Brute isn't activating!

Ok thanks for all the replies, here is the entire of the script so far (I haven't been working on it very long XD) There is no map cache and I must admit i don't know how to setup debug (I'm fairly new to scripting)


////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "gruntspawn_1", "func_gruntspawn_1", true, 1);

AddEntityCollideCallback("Player", "script_grunt1_gone", "func_grunt1_gone", true, 1);
}

void func_gruntspawn_1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_14", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_15", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_16", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_17", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_18", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_19", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_20", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_21", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_22", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_23", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_24", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_25", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_26", 0.5, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_27", 0.5, "");
}

void script_grunt1_gone(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", false);
}

{
AddEntityCollideCallback("Player", "kaernkspawn_1", "func_kaernkspawn_1", true, 1);


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

{
SetEntityActive("waterlurker_1", true);
AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_28", 0.5, "");
AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_29", 0.5, "");
AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_30", 0.5, "");
AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_31", 0.5, "");
AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_32", 0.5, "");
AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_33", 0.5, "");
AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_34", 0.5, "");
AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_35", 0.5, "");
AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_36", 0.5, "");
}
{
AddEntityCollideCallback("Player", "brutespawn_1", "func_brutespawn_1", true, 1);

}

void func_brutespawn_1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", true);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_37", 0.5, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_38", 0.5, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_39", 0.5, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_40", 0.5, "");
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
06-05-2012, 04:04 PM
Find




Users browsing this thread: 1 Guest(s)