I might have an answer -
If you want the piston to explode, use this (BETA 7-8 & LATER ONLY!) -
;Artificial Intelligence Script
;Header
desc = Follow Waypoints
;Triggers
:waypointstate=0:animate=2,waypointstart
:waypointstate=3:animate=2,waypointnext
:waypointstate=4:animate=2,waypointrandom
:waypointstate=5:animate=2,waypointreverse
:plrdistwithin=1:explode,state=1
:state=1:destroy
;End of Script
If you want it to just keep going and not get destroyed (and turn back when it hits the player), use this -
;Artificial Intelligence Script
;Header
desc = Follow Waypoints
;Triggers
:waypointstate=0:animate=2,waypointstart
:waypointstate=3:animate=2,waypointnext
:waypointstate=4:animate=2,waypointrandom
:waypointstate=5:animate=2,waypointreverse
:plrdistwithin=1:plraddhealth=-100,waypointreverse
;End of Script
If you want it to just keep going and not get destroyed (and keep hitting the player until he/she is beyond it's last waypoint), use this -
;Artificial Intelligence Script
;Header
desc = Follow Waypoints
;Triggers
:waypointstate=0:animate=2,waypointstart
:waypointstate=3:animate=2,waypointnext
:waypointstate=4:animate=2,waypointrandom
:waypointstate=5:animate=2,waypointreverse
:plrdistwithin=1:plraddhealth=-100
;End of Script
NOTE: In order for the exploding script to work, you have to set the piston's 'Explodable?' property (under physics) to 'Yes'.
Let me know how this works for you!
I believe I should put a smart comment here, but I wouldn't have time to think about it.