In the mapper docs, there is a command to set the rotation of a critter (animate_rotation), but none to determine its rotation. I thought this was pretty goofy because how can you know the rotation you want if you don't know which way you are facing. I found the command I wanted in \mapper\scripts\headers\define.h To determine a critter rotation (0-5), do this:
variable rotation;
rotation = obj_get_rot( self_obj ) // or ( scorpion_obj ) etc
I tested it and it does work.
One of the reasons the large critters (behemoth and pacification bot) look strange when wandering is that the wander routines typically used in FO2 (which I copied) jump to any random rotation (example, from facing rotation 1 to 4). With a large critter its very noticeable. Using this obj_get_rot command, I can make a better wandering routine that turns the critter ie 1,2,3,4 .... then wander in the target direction. It will require some timer code, but I think its worth it for the large critters.
variable rotation;
rotation = obj_get_rot( self_obj ) // or ( scorpion_obj ) etc
I tested it and it does work.
One of the reasons the large critters (behemoth and pacification bot) look strange when wandering is that the wander routines typically used in FO2 (which I copied) jump to any random rotation (example, from facing rotation 1 to 4). With a large critter its very noticeable. Using this obj_get_rot command, I can make a better wandering routine that turns the critter ie 1,2,3,4 .... then wander in the target direction. It will require some timer code, but I think its worth it for the large critters.