Quote: "But the script didnot work. Why?"
Because the syntax is incorrect. The command "setposteffect" is an action, and therefore should be on the "right" side of the colon, not left side.
When scripting, script lines should follow any one of these formats:
:STATE,CONDITION(S):ACTION(S)
or
:STATE:ACTION(S)
or
:CONDITION(S):ACTION(S)
The key is knowing what are conditions and actions, then that will help to understand when to use a colon or comma.
In the case of your script, it should be:
;Artificial Intelligence Script
;Header
desc = Flashbacks
;Triggers
:state=0,plrwithinzone=1:setposteffect=surreal,state=1
:state=1,plrwithinzone=0:setposteffect=none,state=2
:state=2:state=0
;End of Script
Hope that helps.
There's no problem that can't be solved without applying a little scripting.