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
Script Help Enemy Lure and Animation Script?
MsHannerBananer Offline
Member

Posts: 218
Threads: 34
Joined: Sep 2013
Reputation: 10
#1
Enemy Lure and Animation Script?

I have dogs.

Well, in real life I have dogs too, but I mean I have dogs that in a map, and the objective is to 'lure' them to a spot in order to get an object and then flee for ones life.

Using fresh meat placed at a particular spot, certain dogs are supposed to come over to it without attacking the player and eat.

I have the penumbra dogs from plutomaniac's post (HERE), and they have multiple animations, one of them being an eat animation.

I figure it's just about scripting it so that their triggers are turned off once the meat is placed, and then somehow scripting them to follow specific path nodes over to the meat, but is there a way to have them use their eat animation?

I know there's a part in the PatrolNode script that lets you pick an animation for the enemy to do when it reaches a path node, however I was told this was useless.

Sooooooo is this possible? Or would I be wasting time trying?

03-30-2014, 12:43 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Enemy Lure and Animation Script?

Tried this?
PHP Code: (Select All)
void PlayPropAnimation(stringasPropstringasAnimationfloat afFadeTimebool abLoopstringasCallback); 
Makes the prop play an animation and calls a function.
Callback syntax:void MyFunc(string &in asProp)

asProp - internal name of the prop
asAnimation - animation to play
afFadeTime - ?
abLoop - determines whether the animation loops
asCallback - function to call

(This post was last modified: 03-30-2014, 12:47 AM by Mudbill.)
03-30-2014, 12:45 AM
Find
MsHannerBananer Offline
Member

Posts: 218
Threads: 34
Joined: Sep 2013
Reputation: 10
#3
RE: Enemy Lure and Animation Script?

(03-30-2014, 12:45 AM)Mudbill Wrote: Tried this?
PHP Code: (Select All)
void PlayPropAnimation(stringasPropstringasAnimationfloat afFadeTimebool abLoopstringasCallback); 
Makes the prop play an animation and calls a function.
Callback syntax:void MyFunc(string &in asProp)

asProp - internal name of the prop
asAnimation - animation to play
afFadeTime - ?
abLoop - determines whether the animation loops
asCallback - function to call

I didn't think about it. (Because it's prop stuff).

Would it work with enemy dogs?

03-30-2014, 12:47 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: Enemy Lure and Animation Script?

I'm not actually sure, but I've seen other people suggest it for monsters.
Worth a shot, I guess.

03-30-2014, 12:49 AM
Find
MsHannerBananer Offline
Member

Posts: 218
Threads: 34
Joined: Sep 2013
Reputation: 10
#5
RE: Enemy Lure and Animation Script?

(03-30-2014, 12:49 AM)Mudbill Wrote: I'm not actually sure, but I've seen other people suggest it for monsters.
Worth a shot, I guess.

Das is true. I'll give it a go.

03-30-2014, 12:50 AM
Find




Users browsing this thread: 1 Guest(s)