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
How to fix the error
Josh9810 Offline
Junior Member

Posts: 34
Threads: 9
Joined: Oct 2012
Reputation: 0
#21
RE: How to fix the error

Nope theyre all Brute and the SetEntityActive("Brute", false); doesnt work do I have to be a certain distance away from him or can I be like less than 5 meters away from him?
10-25-2012, 05:35 AM
Find
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#22
RE: How to fix the error

(10-25-2012, 05:35 AM)Josh9810 Wrote: Nope theyre all Brute and the SetEntityActive("Brute", false); doesnt work do I have to be a certain distance away from him or can I be like less than 5 meters away from him?
SetEntityActive("Brute", false); deactivates the monster no matter how far he's away from you.
It seems your function doesn't get executed. Make sure you've set the entitycollidecallback right and look for typos.

[Image: 18694.png]
10-25-2012, 06:59 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#23
RE: How to fix the error

SetEntityActive() works everywhere

Trying is the first step to success.
10-25-2012, 06:59 AM
Find
Josh9810 Offline
Junior Member

Posts: 34
Threads: 9
Joined: Oct 2012
Reputation: 0
#24
RE: How to fix the error

void OnStart()
{
AddEntityCollideCallback("Player", "brutey", "MonsterFunction", true, 1);
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEnemyDisableTriggers("Brute", true);
SetEntityActive("Brute", true);
AddEnemyPatrolNode("Brute", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_12", 0, "");
AddUseItemCallback("", "key", "unlock", "unlockdoor", true);
}
void unlockdoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("unlock", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "unlock", 0, false);
RemoveItem("key");
AddEntityCollideCallback("Brute", "brute_go", "Monsterdisappear", true, 1);
}
void Monsterdisappear(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Brute", false);
}
___________________________________________________________________________________

Is anything wrong... Any typos any spelling mistakes any thing I should move, remove or change to get it to work properly???
10-25-2012, 07:53 AM
Find
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#25
RE: How to fix the error

So the area which activates the Brute is called brutey, the area in which the Brute walks is called brute_go. Check if the names are the same in the editor and make sure the areas are big enough.
Not sure if SetEnemyDisableTriggers("Brute", true); disables interaction with areas too.
You may try to add SetEnemyDisableTriggers("Brute", false); to "unlockdoor".
void unlockdoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("unlock", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "unlock", 0, false);
RemoveItem("key");
AddEntityCollideCallback("Brute", "brute_go", "Monsterdisappear", true, 1);
SetEnemyDisableTriggers("Brute", false);
}

[Image: 18694.png]
(This post was last modified: 10-25-2012, 08:20 AM by Ongka.)
10-25-2012, 08:19 AM
Find
Josh9810 Offline
Junior Member

Posts: 34
Threads: 9
Joined: Oct 2012
Reputation: 0
#26
RE: How to fix the error

the door unlocks fine and he follows the track algoods too but he gets to the area and doesnt go away so ill check and change. Thanks for all help though

I realized when im in the room when he is on the mode where doesn't care and leaves you alone SetEnemyDisableTriggers("Brute", true); i can push him into the area and he disappears but when he clearly walks through him self he just turns around and goes back to the start of the track and repeats.
(This post was last modified: 10-26-2012, 06:28 AM by Josh9810.)
10-26-2012, 05:51 AM
Find
Josh9810 Offline
Junior Member

Posts: 34
Threads: 9
Joined: Oct 2012
Reputation: 0
#27
RE: How to fix the error

and now my custom story doesnt even show up on the list?? Sad
What am I doing wrong??

If needed ill show all my files or it.

Fixed it
dont worry

Edit: Dont even worry anymore ill find a way its workin good now I have two monsters set up and the both scare me even when I expect them XD jk. Thanks for all help and stuff guys.
(This post was last modified: 10-26-2012, 10:35 AM by Josh9810.)
10-26-2012, 07:41 AM
Find




Users browsing this thread: 1 Guest(s)