KenOfAllTrades
Member
Posts: 53
Threads: 2
Joined: Apr 2011
Reputation:
0
|
Simple help with scripting?
Okay so I've been searching the forum, and I've found a lot of useful scripts. So far I've been able to spawn a monster when I walk to a certain spot, but I don't know how to make it go to a path node.
I've found some lines I can't find again on how to make it instantly spot my location or go to the path node, but I don't know HOW to add them. I've tried a lot of different things. My problem is just that I don't know how to ADD stuff to the OnStart part.
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player" , "MonsterArea" , "MonsterFunc1" , true , 1);
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("Monsterguy" , true);
}
ShowEnemyPlayerPosition("Monsterguy");
}
If I want my monster to go to "Path01", EXACTLY what do I have to add where? Can anyone write me a modified version of this script that would make him head for "Path01"? And maybe try to explain how it works? Help is VERY much appreciated
I probably made a LP of this! Youtube channel here!
|
|
05-22-2011, 12:19 AM |
|