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 activation newb
zaggnut Offline
Member

Posts: 62
Threads: 2
Joined: Jul 2012
Reputation: 1
#1
Sad  Monster activation newb

i am trying to learn/practice scripting by activating a grunt and have it follow path nodes. i can load my map fine but when i enter the script area nothing happens. i believe the names of my entities/areas match between the .map and .hps .... i need someone that has mastered the dark arts of scripting

i spent like 2 hours trying to do this simple task. Angry
is there anything wrong with my syntax or something?


////////////////////////////
// Run first time starting map
void onstart()
{
AddEntityCollideCallback("Player", "Scr_enemyspawn1", "MonsterFunction", true, 1);
}

void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Grunt_1", true);
AddEnemyPatrolNode("Grunt_1", "PathNode_1", 0, "");
AddEnemyPatrolNode("Grunt_1", "PathNode_2", 0, "");
AddEnemyPatrolNode("Grunt_1", "PathNode_3", 0, "");
}

////////////////////////////
// Run when entering map

void OnEnter()
{

}

////////////////////////////
// Run when leaving map

void OnLeave()
{

}

The human race will Bleed, they will serve my
need!
(This post was last modified: 07-29-2012, 06:07 AM by zaggnut.)
07-28-2012, 11:31 PM
Find
Kazakarumariou Away
An angry man.

Posts: 283
Threads: 8
Joined: Jul 2012
Reputation: 14
#2
RE: Monster activation newb

void onstart()


void OnStart()
(This post was last modified: 07-28-2012, 11:33 PM by Kazakarumariou.)
07-28-2012, 11:33 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#3
RE: Monster activation newb

Good thing to know is:

Monsters do follow pathnodes, even if they aren't in the script.
If you have a lot of pathnodes in every room and corridors, and set the monster to go to 1 specific pathnode then it will pass the closest pathnodes to get to the scripted one Wink

Trying is the first step to success.
07-29-2012, 12:02 AM
Find
zaggnut Offline
Member

Posts: 62
Threads: 2
Joined: Jul 2012
Reputation: 1
#4
RE: Monster activation newb

(07-28-2012, 11:33 PM)Harthex Wrote: void onstart()


void OnStart()
thx for the "professional" help

Big Grin

(07-29-2012, 12:02 AM)beecake Wrote: Good thing to know is:

Monsters do follow pathnodes, even if they aren't in the script.
If you have a lot of pathnodes in every room and corridors, and set the monster to go to 1 specific pathnode then it will pass the closest pathnodes to get to the scripted one Wink
i'll keep that in mind when i am raging @ notepad++

The human race will Bleed, they will serve my
need!
(This post was last modified: 07-29-2012, 01:33 AM by zaggnut.)
07-29-2012, 01:31 AM
Find




Users browsing this thread: 1 Guest(s)