Hi people,
I've a character with multiple animations (walk/crouch/stand, 9 attacks ...)
and i making my script.
Here is
;Artificial Intelligence Script
;Header
desc = Ultimate Zombie Script
;CHOICE ZOMBIE (walking, walk crouch, flamewalk... 4 choices)
:state=0,random=6:state=135
:state=0,random=6:state=140
:state=0,random=6:state=145
:state=0,random=6:state=150
:state=105,plrdistfurther=601:animate=30,state=0
:state=105,plrwithin,plrdistfurther=601:state=0
:state=110,plrwithin,plrdistwithin=600:state=160
;CHOICE ATTACK ZOMBIES (nine attacks possibles)
;///PLR FOUND\\\ 135
:state=135,plrdistfurther=50,plrcanbeseen:rotatetoplr,movefore=20,animate=1
:state=135,plrcannotbeseen:state=0
;state=135,shotdamage=1:strafeforward
:state=135,plrdistwithin=50:state=160
;///PLR FOUND\\\ 140
:state=140,plrdistfurther=50,plrcanbeseen:rotatetoplr,movefore=20,animate=4
:state=140,plrcannotbeseen:state=0
;state=140,shotdamage=1:strafeforward
:state=140,plrdistwithin=50:state=160
;///PLR FOUND\\\ 145
:state=145,plrdistfurther=50,plrcanbeseen:rotatetoplr,movefore=20,animate=3
:state=145,plrcannotbeseen:state=0
;state=145,shotdamage=1:strafeforward
:state=145,plrdistwithin=50:state=160
;///PLR FOUND\\\ 150
:state=150,plrdistfurther=50,plrcanbeseen:rotatetoplr,movefore=20,animate=2
:state=150,plrcannotbeseen:state=0
;state=150,shotdamage=1:strafeforward
:state=150,plrdistwithin=50:state=160
;CHOOSE MELEE ATTACK
:state=160,random=9:state=170
:state=160,random=9:state=175
:state=160,random=9:state=180
:state=160,random=9:state=185
:state=160,random=9:state=190
:state=160,random=9:state=195
:state=160,random=9:state=200
:state=160,random=9:state=205
:state=160,random=9:state=210
;/ /ATTACK\\ 1
:state=170,plrdistfurther=100:animate=0,state=0
:state=170,plrdistwithin=80,rateoffire:rotateplr,animate=6,plraddhealth=-2
:state=170:state=0
;/ /ATTACK\\ 2
:state=175,plrdistfurther=100:animate=30,state=0
:state=175,plrdistwithin=80,rateoffire:rotateplr,animate=7,plraddhealth=-2
:state=175:state=0
;/ /ATTACK\\ 3
:state=180,plrdistfurther=100:animate=0,state=0
:state=180,plrdistwithin=80,rateoffire:rotateplr,animate=8,plraddhealth=-2
:state=180:state=0
;/ /ATTACK\\ 4
:state=185,plrdistfurther=100:animate=30,state=0
:state=185,plrdistwithin=80,rateoffire:rotateplr,animate=9,plraddhealth=-2
:state=185:state=0
;/ /ATTACK\\ 5
:state=190,plrdistfurther=100:animate=0,state=0
:state=190,plrdistwithin=80,rateoffire:rotateplr,animate=10,plraddhealth=-2
:state=190:state=0
;/ /ATTACK\\ 6
:state=195,plrdistfurther=100:animate=30,state=0
:state=195,plrdistwithin=80,rateoffire:rotateplr,animate=11,plraddhealth=-2
:state=195:state=0
;/ /ATTACK\\ 7
:state=200,plrdistfurther=100:animate=0,state=0
:state=200,plrdistwithin=80,rateoffire:rotateplr,animate=12,plraddhealth=-2
:state=200:state=0
;/ /ATTACK\\ 8
:state=205,plrdistfurther=100:animate=30,state=0
:state=205,plrdistwithin=80,rateoffire:rotateplr,animate=13,plraddhealth=-2
:state=205:state=0
;/ /ATTACK\\ 9
:state=210,plrdistfurther=100:animate=0,state=0
:state=210,plrdistwithin=80,rateoffire:rotateplr,animate=20,plraddhealth=-2
:state=210:state=0
;End of Script
I'm not really new in scripting but i think this is unoptimised...
Anybody here can help me for optimize routine, or is it really good optimized ??
Sorry for my english, i'm frenchy boy.
respectfully,
Francis