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
Magical Grunts?
Jagsrs28 Offline
Member

Posts: 101
Threads: 25
Joined: Jun 2012
Reputation: 0
#1
Wink  Magical Grunts?

I am new to scripting, but how do you get a Grunt to magicaly pop up out of mid air by walking into a certain area?

I had an idea of walking down a medium sized hall way and a grunt pop up out of mid air about 5 feet away from you and then disappear.

How do I do that?
All I know is set the Grunt to a poofer.
And set up an area close to where the Grunt is supposed to magicaly pop up.

Special Custom Story for 2 special people!

[Image: LWFcAl]


06-23-2012, 09:49 PM
Find
lothabread Offline
Member

Posts: 106
Threads: 11
Joined: Apr 2012
Reputation: 2
#2
RE: Magical Grunts?

void OnStart()
{
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("enemy_suitor_malo_1", true);
ShowEnemyPlayerPosition("enemy_suitor_malo_1");
AddEnemyPatrolNode("enemy_suitor_malo_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("enemy_suitor_malo_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("enemy_suitor_malo_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("enemy_suitor_malo_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("enemy_suitor_malo_1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("enemy_suitor_malo_1", "PathNodeArea_7", 0, "");
}

just change enemy_suitor_malo_1 name to name of your grunt ^^ hope i helped

as for an explanation. set a script area and rename it MonsterFunction, set grunt inactive and use the script above Big Grin sorry not really good at explaining and ignore the pathnodes if you just want him to pop up and dissapear
(This post was last modified: 06-23-2012, 10:14 PM by lothabread.)
06-23-2012, 10:05 PM
Find




Users browsing this thread: 1 Guest(s)