Your welcome and I am
; but, I appreciate your kind word.
I was able to test this myself but using my own script and simple map. The map is linked to the download button. This tests the code I changed. Actually, I didn't do anything on my own, I simply used the same code that was used for "raycastback" except I made sure that it was not looking in back of the object or character.
I decided to also test the original code. It does not work as I suspected.
The script is as follows.
;Artificial Intelligence Script
;Header
desc = testing raycast
;Triggers
:state=0:rpg_entitytimerstart,state=1
:state=1,rpg_entitytimergreater=1000:state=10
:state=10:rotatetoplr,state=15
:state=15,raycast=1 30:state=20
:state=20,waypointstate=0:animate=2,waypointstart
:state=20,waypointstate=3:animate=2,waypointnext
:state=20,waypointstate=4:animate=2,waypointrandom
:state=20,waypointstate=5:animate=2,waypointstop,state=30
:state=30:none
When using this script as is, the character
will not follow the waypoint because it is checking a raycast that is only 30 units to the front of him. However, change state #15 to
:state=15,raycast 1 300:state=20
The character is only about 200 units (a little more perhaps) from the wall and therefore it will return true and then the character will follow the waypoint and therefore passed the wall.
This is a very cool way of making sure a character doesn't just try to go through a wall but follow the way point instead. Good thinking Charles.
"A programmer is just a tool which converts caffeine into code . . . reminds me….. if I had one more brain cell, I could have a synapse! woo hoo, Sparky!
~I'm the Terry of the Flatlands.