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 Monster Area doesn't work
Bl4ckSheep Offline
Junior Member

Posts: 2
Threads: 1
Joined: Nov 2012
Reputation: 0
#1
Monster Area doesn't work

The monster is supposed to spawn when the player walks into the area, but when I walk through it, nothing happens...
I'm not really sure where the problem comes from, is there an error in the script ?

Thank you.


void OnEnter()
{
AddEntityCollideCallback("Player", "CorridorArea", "monster3", true, 1);
}


void monster3(string &in asEntity, string &in type)
{
SetEntityActive("CorridorMonster1", true);
ShowEnemyPlayerPosition("CorridorMonster1");
}
11-26-2012, 05:29 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Monster Area doesn't work

(string &in asEntity, string &in type)
This is the syntax not for when you use a collide function.


The correct syntax is (string &in asParent, string &in asChild, int alState)


Try looking at this: http://www.frictionalgames.com/forum/thread-18368.html

Trying is the first step to success.
11-26-2012, 05:51 PM
Find
Bl4ckSheep Offline
Junior Member

Posts: 2
Threads: 1
Joined: Nov 2012
Reputation: 0
#3
RE: Monster Area doesn't work

(11-26-2012, 05:51 PM)beecake Wrote: (string &in asEntity, string &in type)
This is the syntax not for when you use a collide function.


The correct syntax is (string &in asParent, string &in asChild, int alState)


Try looking at this: http://www.frictionalgames.com/forum/thread-18368.html
Thank you very much, it worked !
I started to script yesterday so I'm not so good at this Confused
11-26-2012, 05:54 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#4
RE: Monster Area doesn't work

That's why you're here! Wink
You learn here! I did that too

Trying is the first step to success.
11-26-2012, 05:55 PM
Find




Users browsing this thread: 1 Guest(s)