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
Friendly Monster?
Darkfire Offline
Senior Member

Posts: 371
Threads: 22
Joined: May 2014
Reputation: 15
#18
RE: Friendly Monster?

For monster attacking another one:
In the function
AddEnemyPatrolNode(string& asName, string& asNodeName, float afWaitTime, string& asAnimation);

you have the string & asAnimation part. What it does is that when monster reaches a certain patrol node it launches an animation (you can find these in model editor and viewer). You could use that, but only if the other monster wouldn't attack the player. Also, you'd have to set afWaitTime long enough not to interrupt the animation.

For monster following the player:

If you have a corridor (not an open area), you can do a simple thing. It's not that smooth, but it would work to some degree.
You place various areas in the corridor and put AddEntityCollideCallback("Player", "area name", ... ); in void OnEnter() (or somewhere else) and when the player reaches them, you can call AddEnemyPatrolNode in a way that the monster follows up to a certain place, and then stops (with ClearEnemyPatrolNodes and another AddEntityCollideCallback maybe ?). Then when player reaches another area it is done similarly again...

I hope it helped, but perhaps it isn't what you were really looking for Big Grin

EDIT: if you don't stop the monster, he will start to make loops, going back and forth.
(This post was last modified: 05-30-2014, 03:58 PM by Darkfire.)
05-30-2014, 03:55 PM
Find


Messages In This Thread
Friendly Monster? - by ProyectV - 04-28-2014, 12:57 AM
RE: Friendly Monster? - by lothabread - 04-28-2014, 02:20 AM
RE: Friendly Monster? - by Romulator - 04-28-2014, 09:59 AM
RE: Friendly Monster? - by ProyectV - 04-28-2014, 08:10 PM
RE: Friendly Monster? - by Daemian - 04-28-2014, 10:11 PM
RE: Friendly Monster? - by lothabread - 04-29-2014, 12:54 AM
RE: Friendly Monster? - by 7heDubz - 04-29-2014, 01:02 AM
RE: Friendly Monster? - by MsHannerBananer - 04-29-2014, 08:43 PM
RE: Friendly Monster? - by FlawlessHappiness - 04-30-2014, 10:24 AM
RE: Friendly Monster? - by Straxedix - 05-02-2014, 09:20 AM
RE: Friendly Monster? - by Straxedix - 05-06-2014, 02:04 PM
RE: Friendly Monster? - by MsHannerBananer - 05-07-2014, 03:00 AM
RE: Friendly Monster? - by Romulator - 05-06-2014, 02:31 PM
RE: Friendly Monster? - by Straxedix - 05-07-2014, 08:28 PM
RE: Friendly Monster? - by ProyectV - 05-07-2014, 10:05 PM
RE: Friendly Monster? - by FlawlessHappiness - 05-08-2014, 11:51 AM
RE: Friendly Monster? - by Nikson. - 05-08-2014, 12:49 PM
RE: Friendly Monster? - by Darkfire - 05-30-2014, 03:55 PM



Users browsing this thread: 4 Guest(s)