Hi, After reading the sticky scripting turtorial here, I found a dog script that I needed, but I realized that I would have to rewrite it to have it do what I wanted. I want to make a dog start barking when the player gets close,keep barking and move toward the player when they get closer and then attack.
Using the original and the turtorial as a guide, I wrote this script. here is the original and then my attempt.
-----------------------------------------------------------------
;Artificial Intelligence Script
; by xplosys
desc = Dog see and attack
;Triggers
:state=0,plrdistwithin=500:state=1
:state=1,plrdistwithin=300:rotatetoplr,movefore=2,animate=2
:state=1,plrdistwithin=60:sound=audiobank\user\dogbark.wav,rotateplr,animate=1,plraddhealth=-10,state=2
:state=2,plrdistfurther=100:state=1
;End of Script
---------------------------------------------------------------
;Artifical Intelligence Script
; by The Eye of The Storm
desc = Dog barking see and attack
;Triggers
:state=0,plrdistwithin=800:state=1
:state=1,plrdistwithin=500:loopsound=audiobank\user\dogbark.wav,rotateplr,state=2
:state=2,plrdistwithin=400:movefore=2,animate=2,loopsound=audiobank\user\dogbark.wav,state=3
:state=3,plrdistwithin=60:loopsound=audiobank\user\dogbark.wav,animate=1,plraddhealth=-10,state=4
:state=4,plrdistfurther=100:state=2
;End of script
----------------------------------------------------------------
When i load it the dog will not dog, but if i walk up to him I start to loose health.
any ideas?
it's my first script and the learning curve is steep...lol
If I can get this to work, next I want to make a dog that is an ally with the player and comes with him, barking when enemies get near. maby even attacking them.
And even in our sleep, pain which cannot forget falls drop by drop upon the heart, until in our own despite, against our will, comes wisdom.