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
Monster Triggering problem
Niko Offline
Junior Member

Posts: 4
Threads: 1
Joined: May 2012
Reputation: 0
#1
Monster Triggering problem

EDIT: Everything works now! thx for help!

-----------








There may be same kind of threads somewhere, so if there is im sry but this is DAMN annoying. Angry

So, i have tried many monster triggering techniques. Even watched tutorials on YouTube, following other custom story triggering technique. but some reason my monster wont appear! Am i doing something wrong or wth?

Problem --> The monster wont go active and nothing happens, like there wouldnt be script at all.

here is my scripting: (with playercollide script in level editor and monster isnt active)


void OnStart()
{
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
}

void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
ShowEnemyPlayerPosition("servant_grunt_1");
}




could anyone help me how to get it working? I just cant get it work even with frictionalgames wiki. I have tried it.


Attached Files
.jpg   Untitled-2.jpg (Size: 266.23 KB / Downloads: 180)
(This post was last modified: 05-27-2012, 03:27 PM by Niko.)
05-25-2012, 01:47 PM
Find
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#2
RE: Monster Triggering problem

I recommend renaming the grunt in the level editor(and remember to press enter always when youve changed the name of something!!)and in the script.Like Grunt1 or something like that.

05-25-2012, 01:52 PM
Find
Putmalk Offline
Senior Member

Posts: 290
Threads: 13
Joined: Apr 2012
Reputation: 15
#3
RE: Monster Triggering problem

(05-25-2012, 01:52 PM)Datguy5 Wrote: I recommend renaming the grunt in the level editor(and remember to press enter always when youve changed the name of something!!)and in the script.Like Grunt1 or something like that.
Um. Why, exactly? -.-

Your problem, OP, looks to be you didn't name "PlayerCollide" area correctly, because the script and syntax look correct.

Make sure the grunt is named "servant_grunt_1", area is named "PlayerCollide", and that's pretty much it.

If your map has a CACHE file, delete it.

(This post was last modified: 05-25-2012, 05:17 PM by Putmalk.)
05-25-2012, 05:16 PM
Find
Niko Offline
Junior Member

Posts: 4
Threads: 1
Joined: May 2012
Reputation: 0
#4
RE: Monster Triggering problem

(05-25-2012, 05:16 PM)Putmalk Wrote:
(05-25-2012, 01:52 PM)Datguy5 Wrote: I recommend renaming the grunt in the level editor(and remember to press enter always when youve changed the name of something!!)and in the script.Like Grunt1 or something like that.
Um. Why, exactly? -.-

Your problem, OP, looks to be you didn't name "PlayerCollide" area correctly, because the script and syntax look correct.

Make sure the grunt is named "servant_grunt_1", area is named "PlayerCollide", and that's pretty much it.

If your map has a CACHE file, delete it.
Alright, but actually i can only find the .map file from level editor. When i look at it in folder without Level Editor then there is only .hps file.

May that create the problem? Because i made sure those things was named correctly.
05-25-2012, 05:23 PM
Find
Putmalk Offline
Senior Member

Posts: 290
Threads: 13
Joined: Apr 2012
Reputation: 15
#5
RE: Monster Triggering problem

(05-25-2012, 05:23 PM)Niko Wrote:
(05-25-2012, 05:16 PM)Putmalk Wrote:
(05-25-2012, 01:52 PM)Datguy5 Wrote: I recommend renaming the grunt in the level editor(and remember to press enter always when youve changed the name of something!!)and in the script.Like Grunt1 or something like that.
Um. Why, exactly? -.-

Your problem, OP, looks to be you didn't name "PlayerCollide" area correctly, because the script and syntax look correct.

Make sure the grunt is named "servant_grunt_1", area is named "PlayerCollide", and that's pretty much it.

If your map has a CACHE file, delete it.
Alright, but actually i can only find the .map file from level editor. When i look at it in folder without Level Editor then there is only .hps file.

May that create the problem? Because i made sure those things was named correctly.
The .map and the .hps have to be in the same folder for it to work. That is your problem.

05-25-2012, 05:50 PM
Find
Niko Offline
Junior Member

Posts: 4
Threads: 1
Joined: May 2012
Reputation: 0
#6
RE: Monster Triggering problem

(05-25-2012, 05:50 PM)Putmalk Wrote:
(05-25-2012, 05:23 PM)Niko Wrote:
(05-25-2012, 05:16 PM)Putmalk Wrote:
(05-25-2012, 01:52 PM)Datguy5 Wrote: I recommend renaming the grunt in the level editor(and remember to press enter always when youve changed the name of something!!)and in the script.Like Grunt1 or something like that.
Um. Why, exactly? -.-

Your problem, OP, looks to be you didn't name "PlayerCollide" area correctly, because the script and syntax look correct.

Make sure the grunt is named "servant_grunt_1", area is named "PlayerCollide", and that's pretty much it.

If your map has a CACHE file, delete it.
Alright, but actually i can only find the .map file from level editor. When i look at it in folder without Level Editor then there is only .hps file.

May that create the problem? Because i made sure those things was named correctly.
The .map and the .hps have to be in the same folder for it to work. That is your problem.
It appeared there when i pressed compatibility files button, but it works now!! i feel so stupid. The problem i had was that i had the .hps file named differrently than the .map file Sad million thanks still, without you i wouldnt have seen that. Smile
05-25-2012, 06:09 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#7
RE: Monster Triggering problem

Dat level design >.< mansion base walls with worn castle base ceiling for the floor. You didn't even fix the area tie! Judging by the number of grunts, this looks like it will be a PDP map.

I rate it 3 memes.
05-25-2012, 07:07 PM
Find
Aresak Offline
Junior Member

Posts: 26
Threads: 1
Joined: May 2012
Reputation: 0
#8
RE: Monster Triggering problem

So, you can't active 4 grunts true?
Change name to anything what you want... I named it Monster1, Monster2, Monster3, Monster4 ok?
I see on you image ScriptArea, when player go in, the monsters are must activate ok?
Script Area name: ScriptArea_1

This is script:

PHP Code: (Select All)
void OnStart() 



AddEntityCollideCallback("Player""ScriptArea_1""MonsterFunction"true1); 





void MonsterFunction(string &in asParentstring &in asChildint alState)

{

SetEntityActive("Monster1"true); 
SetEntityActive("Monster2"true); 
SetEntityActive("Monster3"true); 
SetEntityActive("Monster4"true); 

ShowEnemyPlayerPosition("Monster1");
ShowEnemyPlayerPosition("Monster2");
ShowEnemyPlayerPosition("Monster3");
ShowEnemyPlayerPosition("Monster4");

}

void OnEnter()
{

}

void OnLeave()
{



Maybe it will be function Big Grin

My Custom Maps:
Black Mirror
--------
I can scripting, editing and more for you.
(This post was last modified: 05-25-2012, 09:03 PM by Aresak.)
05-25-2012, 09:02 PM
Find
Niko Offline
Junior Member

Posts: 4
Threads: 1
Joined: May 2012
Reputation: 0
#9
RE: Monster Triggering problem

(05-25-2012, 09:02 PM)Aresak Wrote: So, you can't active 4 grunts true?
Change name to anything what you want... I named it Monster1, Monster2, Monster3, Monster4 ok?
I see on you image ScriptArea, when player go in, the monsters are must activate ok?
Script Area name: ScriptArea_1

This is script:

PHP Code: (Select All)
void OnStart() 



AddEntityCollideCallback("Player""ScriptArea_1""MonsterFunction"true1); 





void MonsterFunction(string &in asParentstring &in asChildint alState)

{

SetEntityActive("Monster1"true); 
SetEntityActive("Monster2"true); 
SetEntityActive("Monster3"true); 
SetEntityActive("Monster4"true); 

ShowEnemyPlayerPosition("Monster1");
ShowEnemyPlayerPosition("Monster2");
ShowEnemyPlayerPosition("Monster3");
ShowEnemyPlayerPosition("Monster4");

}

void OnEnter()
{

}

void OnLeave()
{



Maybe it will be function Big Grin
tyvm for making script but it works already, i appreciate that still
(This post was last modified: 05-27-2012, 03:28 PM by Niko.)
05-27-2012, 03:28 PM
Find




Users browsing this thread: 1 Guest(s)