This is a customized script that is not a script to use out of the box. I provide it for those interested in creating waypoint scripts to analyze. If anyone is interested I will give them a while to look over the scripts. The first script is obviously the main script that the npc has. The next three scripts are used by the entities at the end of the waypoint and the last script is the script for the collision on/off for the glass walls. This allows the entity to go through but not the player. The attached image shows at which point the waypoint state changes. The npc starts with waypointstate 0 and then it will be waypointstate 5 for the rest of his progress. WPS indicates the waypointstate.
;Artificial Intelligence Script
desc = standing pc
;Header
;Triggers
:state=0:animate=25,state=1
:state=1:animate=25
:state=1,activated=2:state=2,etimerstart
:state=2,etimergreater=2000:animate=25,state=3
:state=3:activate=0,randomize,state=4
:state=4,waypointstate=0:animate=2,waypointstart
:state=4,waypointstate=2,plrdistwithin=75:animate=2,plrfreeze=3000
:state=4,waypointstate=2,plrdistfurther=75:animate=2,plrfreeze=0
:state=4,waypointstate=3:animate=2,waypointnext
:state=4,waypointstate=4:animate=2,waypointrandom
:state=4,waypointstate=5:animate=1,state=5
:state=5:activateifused=1,state=6,etimerstart
:state=6,etimergreater=250:state=7
;
:state=7,activated=1:etimerstart,state=10,animate=1,freeze
:state=7,activated=2:animate=31,freeze,etimerstart,state=9
:state=7,activated=3:state=8,randomize
:state=8,random=7:animate=31,state=9,etimerstart,freeze
:state=8,random=12:animate=1,state=10,etimerstart,freeze
:state=9,etimergreater=150:animate=31,state=10,etimerstart
:state=10,etimergreater=5000:animate=2,waypointreverse,state=104,activate=0
;
;
:state=104,waypointstate=0:animate=2,waypointstart
:state=104,waypointstate=2,plrdistwithin=75:animate=2,plrfreeze=3000
:state=104,waypointstate=2,plrdistfurther=75:animate=2,plrfreeze=0
:state=104,waypointstate=3:animate=2,waypointnext
:state=104,waypointstate=4:animate=2,waypointrandom
:state=104,waypointstate=5:etimerstart,state=105,animate=25,randomize
:state=105,random=25:state=106
:state=105,random=25:state=107
:state=105,random=25:state=108
:state=106,etimergreater=2000:animate=2,waypointreverse,state=3
:state=107,etimergreater=5000:animate=2,waypointreverse,state=3
:state=108,etimergreater=10000:animate=2,waypointreverse,state=3
;End of Script
;Artificial Intelligence Script
;Header
desc = npcwithin entity #1
;Triggers
:state=0,anywithin=55:activateifused=1,state=2
:state=2,anyfurther=60:state=0
;End of Script
;Artificial Intelligence Script
;Header
desc = npcwithin entity #2
;Triggers
:state=0,anywithin=55:activateifused=2,state=2
:state=2,anyfurther=60:state=0
;End of Script
;Artificial Intelligence Script
;Header
desc = npcwithin entity #3
;Triggers
:state=0,activated=1:state=1
:state=1,anywithin=50:activateifused=3,state=2
:state=1:state=2
:state=2,anyfurther=55:state=0,activate=0
;End of Script
;Artificial Intelligence Script
;Header
desc = turn collision on off according to position of npc
;Triggers
:state=0,anywithin=105:coloff,state=1
:state=1,anyfurther=110:colon,state=0
:state=1,plrdistwithin=50:colon,state=2
:state=2,plrdistfurther=50:state=0
;End of Script
THEORY - you know everything but nothing works. PRACTICE - when everything works but don't know why.
For me, theory and practice are combined: nothing works and I don't know why.