I made a script for a zombie that I made from scratch.
The zombie has 38 frames of animation, it just springs out of a barrel. Frames:
0 - 2 opens barrel
3 - 38 zombie jumps out the barrel and tries to grab you (at least scare you.
My problem is that I want my script to do:
first stay in frame 0 which is barrel closed and zombie inside as long as the player is not in range for the first time, once the player gets in range play second animation(zombie jumps out the barrel, frames 3-38, play animation only once) and when the player goes away, play only frame 38. Here is my fpe and fpi. Please help. if you need more info please ask. I will post the zombie for free. I promise.
;header
desc = zombieout
;ai
aiinit = appear1.fpi
aimain = people\zombieout.fpi
aidestroy = destroy\fadecorpse.fpi
aishoot =
soundset =
;spawn
spawnmax = 0
spawndelay = 0
spawnqty = 0
;orientation
model = zombieout.x
offx = 0
offy = 0
offz = 0
rotx = 0
roty = 0
rotz = 0
scale = 100
fixnewy = 180
;cone of sight
coneheight = 53
coneangle = 50
;visualinfo
textured = zombieout.png
effect =
castshadow = 0
;decals
decalmax = 2
decal0 = red
decal1 = sparks
;identity details
strength = 0
ischaracter = 1
hasweapon =
isobjective = 0
cantakeweapon = 0
;bodypartslimbinfo (1=head/2=body/3+4=armslr/5+6=legslr)
limbmax = 0
;animationinfo
animmax = 4
anim0 = 0,0
anim1 = 0,38
anim2 = 38,38
and fpi
desc = zombie out stay and scare
;Triggers
:state=0:animate=0,state=10
:state=10,plrdistwithin=100:animate=1,animationover=38,state=11
:state=11:state=1
:state=1,plrdistfurther=40:animate=2
:state=1,plrdistwithin=150:animate=1
there is a pic what it looks like when it jumps out the barrel.
Right now it does weird stuff, it stays inside at first, when player gets close it keeps playing the animation when jumps out the barrel and player gets away the barrel's lid keeps closing and opening whiting a couple of frames.
This is my second script. thanks.
...........(o o)........
--oooO--(_)--Oooo---