Bullshock is right.
You called an invalid condition.
The addition of the
dist is crucial.
You are also missing the colon that separates the conditions from the actions in each state.
;Artificial intelligence script
;Header
desc = civilian
;Triggers
:state=0,plrdistwithin=50:rotatetoplr,rotatey=90,state=1
:state=1:movefore=70,animate=2,state=0
;End of Script
The state identifiers are conditions.
Therefore state=0 has two conditions... state=0, and plrdistwithin=50.
We then place a colon to separate the conditions from the actions to be taken if said conditions are met.
State=1 has only one condition (it's identifier) so it is immediately followed with a colon.
All of it's actions are performed whenever it's single condition (state=1) is true.
Every state must have its conditions and actions separated with a colon.
Whatever you can imagine, you can animate. --- Walt Disney
All too easy. --- Darth Vader
Just do it! --- Nike