Frictional Games Forum (read-only)
[SCRIPT] Enemy Lure and Animation Script? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] Enemy Lure and Animation Script? (/thread-24948.html)



Enemy Lure and Animation Script? - MsHannerBananer - 03-30-2014

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?


RE: Enemy Lure and Animation Script? - Mudbill - 03-30-2014

Tried this?
PHP Code:
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


RE: Enemy Lure and Animation Script? - MsHannerBananer - 03-30-2014

(03-30-2014, 12:45 AM)Mudbill Wrote: Tried this?
PHP Code:
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?


RE: Enemy Lure and Animation Script? - Mudbill - 03-30-2014

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


RE: Enemy Lure and Animation Script? - MsHannerBananer - 03-30-2014

(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.