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?
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#11
RE: Friendly Monster?

Did i just solve the post :O

05-06-2014, 02:04 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#12
RE: Friendly Monster?

Probably, probably not. Either way, the OP has not checked this question since.

Regardless, it's heavily difficult to implement such a task, but is possible.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
05-06-2014, 02:31 PM
Find
MsHannerBananer Offline
Member

Posts: 218
Threads: 34
Joined: Sep 2013
Reputation: 10
#13
RE: Friendly Monster?

(05-06-2014, 02:04 PM)Straxedix Wrote: Did i just solve the post :O

Your post wasn't exactly informative or helpful, you realize. You didn't give any real script help, you just told him what he could do instead of showing him what he could do, which is what he requested.

I also wouldn't be so quick to assume you've solved a problem when the OP hasn't even posted. You make yourself sound really arrogant. Big Grin

05-07-2014, 03:00 AM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#14
RE: Friendly Monster?

Hahah know it Smile

05-07-2014, 08:28 PM
Find
ProyectV Offline
Junior Member

Posts: 19
Threads: 6
Joined: Apr 2014
Reputation: 0
#15
RE: Friendly Monster?

Well, the post actually helped a little bit but not solved the problem... i asked if using an NPC would be a better idea?
05-07-2014, 10:05 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#16
RE: Friendly Monster?

I've never used an NPC.
If you can make it follow pathnodes, then yes, that should be possible Wink

Making a monster follow you doesn't require much more than a little bit of scripting. It shouldn't be hard if you know how to:

You create a scriptarea called "AreaNode_1"
Then you place a pathnode in that area called "PathAreaNode_1"
Repeat, everywhere.
Check that the names always correspond.

In your script file you make it like this:
void OnStart()
{
for(int i=1;i<=100;i++)
AddEntityCollideCallback("Player", "AreaNode_"+i, "MonsterFollowFunction", false, 1);
}

void MonsterFollowFunction(string &in asParent, string &in asChild, int alState)
{
AddEnemyPatrolNode("Monster", "Path"+asChild, 0, "")
}

To make the monster attack something else, you're gonna have to create a scripted sequence.

For example:

When colliding with area
---Monster runs to the thing it has to kill
---Screen goes black
---Monster and Claw sounds play
---Screen fades in where the thing has been destroyed and the monster is close to the thing.

Seems usable?

Trying is the first step to success.
05-08-2014, 11:51 AM
Find
Nikson. Offline
Member

Posts: 134
Threads: 22
Joined: Feb 2013
Reputation: 4
#17
RE: Friendly Monster?

Or, you could modify the .ent file and change the animations for example: just change the attack animations in idle or walk. Make the monster deal 0 damage and change the music. The only problem is that the chase sound will play and the monster wont follow you if you don't do the showenemyplayerposition. I don't know if it's possible but, yeah better than nothing.

[Image: fnaf3_by_maybeanothercat-d8flfz4.gif]
05-08-2014, 12:49 PM
Find
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




Users browsing this thread: 2 Guest(s)