YesNoOk
avatar

Custom Auto Turn ( Never face player type helpers ) (Read 8132 times)

Started by 2OS, July 25, 2012, 09:05:59 am
Share this topic:

2OS

Custom Auto Turn ( Never face player type helpers )
New #1  July 25, 2012, 09:05:59 am
  • ****
  • 608 Wannabe
  • Ich schicke dich zur HOELLE!! STIRB DU FEIGLING!!
    • Egypt
    • deuceovspadez.webs.com/
[Statedef -2]

[State P2Dist X]
type=varset
trigger1=numenemy
var(0)=ceil(pos x-enemynear(ifelse(enemynear(0),stateno!=5150,0,numenemy=2)),pos x)*-facing
ignorehitpause=1

[State P2Dist Y]
type=varset
trigger1=numenemy
var(1)=ceil(pos y-enemynear(ifelse(enemynear(0),stateno!=5150,0,numenemy=2)),pos y)*-1
ignorehitpause=1

[State ]
type=assertspecial
trigger1=1
flag=noautoturn
ignorehitpause=1

[State ]
type=turn
triggerall=stateno=0||stateno=11||stateno=20
trigger1=var(0)<-5
ignorehitpause=1

[State FaceP2]
type=turn
triggerall=stateno=  ;;  states that have facep2=1 ( null facep2=1 )
trigger1=var(0)<-5
trigger1=time=1
ignorehitpause=1

[State ]
type=changeanim
triggerall=stateno=0||stateno=11||stateno=20
trigger1=var(0)<-5
value=5+(stateno=11)
ignorehitpause=1


replace and avoid using p2 p3 p4 triggers (they're stupid as hell anyway) and use enemy(near) redirects instead.


enemynear(0),  ;;  closest
enemynear(numenemy=2),  ;;  furthest
enemy(0),  ;;  p2
enemy(numenemy=2),  ;;  p4


extremely dumb alternative — code all player helpers exclusively in state 5150.
Last Edit: February 26, 2017, 01:14:04 am by 2OS