Et gestion mini de la santé des ennemis (en test pour un script plus pouusé)
fonctionne parfdaitement : ennemis armé, mettre en principal pas de script shoot, pas de waypoint.
Cyber
;Artificial Intelligence Script
;Header
desc = -HAVOK-SCRIPT- (funny)
;Triggers
:healthless=30:state=40
:random=300,state=0:state=10
:random=500,state=0:state=30
:random=700,state=0:state=40
:state=0:waypointstart,setframe=19
:state=0,plrwithin,plrdistfurther=401:state=0
:state=0,plrwithin,plrdistwithin=400:state=1
:state=1,plrcanbeseen:state=10
;-=>>>WAYPOINTS<<<=-
:waypointstate=3:animate=2,waypointnext
:waypointstate=4:animate=2,waypointrandom
:waypointstate=5:animate=2,waypointreverse
:waypointstate=6:animate=2,waypointrandom
:waypointstate=7:animate=2,waypointnext
:waypointstate=8:animate=2,waypointreverse
;///PLR FOUND\\\
:state=1,plrcanbeseen:state=10
:state=1,plrcannotbeseen:state=2
;///Look For Plr\\\
:state=2,plrcannotbeseen,random=6:timerstart
:state=2,plrcannotbeseen,random=6,timergreater=30:
rotateheadrandom=50
:state=2,plrcannotbeseen,random=6,timergreater=40:
pivotrandom=55,movefore=10,animate=2
:state=2,shotdamage=1:rotatetoplr
:state=2,noiseheard=60:rotatetoplr
:state=2:state=1
;ATTACK 01
:state=10,plrcanbeseen:state=11,settarget
:state=10:runfpidefault=1
:state=11,losetarget=100:state=15
:state=11:rotatetoplr
:state=11,plrcanbeseen:settarget
:state=11,ifweapon=1,plrdistfurther=100:movetotarg
et=1,animate=5
:state=11,plrdistwithin=101:rotatetoplr
:state=11,ifweapon=1,plrdistwithin=300,plrcanbesee
n=46,rateoffire:animate=1,rotatetoplr,freeze,usewe
apon,rundecal=6
:state=11,ifweapon=0:animate=1,freeze,state=12,set
frame=6
:state=11,plrdistwithin=200,random=20:state=15
:state=11,plrdistwithin=50:state=20
:state=12:incframe=6
:state=12,frameatend=6:state=11,reloadweapon,sound
=audiobank\guns\reload.wav
:state=15,random=1:state=16,setframe=4
:state=15:state=17,setframe=3
:state=16:incframe=4,strafe=90,rotatetoplr
:state=16,frameatend=4:state=11,animate=1
:state=17:incframe=3,strafe=-90,rotatetoplr
:state=17,frameatend=3:state=11,animate=1
:state=20:state=21,setframe=5
:state=21:incframe=5,strafe=180,rotatetoplr
:state=21,frameatend=5:state=30,animate=1
;ATTACK 02
:state=30,plrcanbeseen:state=31,settarget
:losetarget=100:runfpidefault=1
:state=30:runfpidefault=1
:state=31:rotatetoplr
:state=31,ifweapon=1,plrcanbeseen=100,plringunsigh
t,rateoffire:useweapon,rundecal=6
:state=31,ifweapon=0:state=32,setframe=6
:state=32:incframe=6
:state=32,frameatend=6:state=40,reloadweapon,sound
=audiobank\guns\reload.wav
;ATTACK 03
:state=40,plrcanbeseen:state=41,settarget
:state=40:runfpidefault=1
:state=41,losetarget=100:state=45
:state=41:rotatetoplr
:state=41,plrcanbeseen:settarget
:state=41,ifweapon=1,plrdistfurther=100:movetotarg
et=1,animate=5
:state=41,plrdistwithin=101:rotatetoplr
:state=41,ifweapon=1,plrdistwithin=101,plrcanbesee
n=100,rateoffire:animate=1,rotatetoplr,freeze,usew
eapon,rundecal=6
:state=41,ifweapon=0:animate=1,freeze,state=42,set
frame=6
:state=41,plrdistwithin=200,random=50:state=45
:state=41,plrdistwithin=50:state=50
:state=42:incframe=6
:state=42,frameatend=6:state=41,reloadweapon,sound
=audiobank\guns\reload.wav
:state=45,random=1:state=6,setframe=4
:state=45:state=47,setframe=3
:state=46:incframe=4,strafe=90,rotatetoplr
:state=46,frameatend=4:state=31,animate=1
:state=47:incframe=3,strafe=-90,rotatetoplr
:state=47,frameatend=3:state=31,animate=1
:state=50:state=51,setframe=5
:state=51:incframe=5,strafe=180,rotatetoplr
:state=51,frameatend=5:state=0,animate=1
;End of Script