By default, an actor has
no Looper assigned to it. The
Motion class will either call the actor's looper to determine which loop to use, or ask the engine with the
DirLoop kernel if it's that default null value. That kernel function is the only point where four-directional views are
strictly hardcoded. If you want another amount of loops, or in a wildly different order in the view resource,
that's where custom loopers come in.
The only reason characters in SCI 1.x (and rarely SCI 0.x like in
Codename Iceman) turn around on the spot all smoothly-like before moving is specifically
because they have a custom looper assigned:
GradualLooper or
Grooper for short.
Grooper too can handle either four or eight directional views.
The logic for
DirLoop is as follows:
- If the angle given is between 315 and 45 degrees, use loop 3 if the number of loops is four or higher, or keep it the same otherwise (up, north).
- If it's between 135 and 225 degrees, use loop number 2 if we have four or more (down, south).
- If it's less than 180 degrees, use loop 0 (right, east)
- If it's any other range, use loop 1 (left, west).
(Edit to clarify: that means if you have
two loops in your view, they'll be left/right, and going up or down just uses whichever loop was used last.)
Grooper does similar checks but
specifically doubles up the amount of angle ranges, next to the whole smooth turnaround thing.
This is why Larry in LSL2 and 3 has
no looper set, or even a cycler. In fact if you were to play LSL5, or 6, and
somehow cleared Larry's looper and cycler properties (say by typing "
send ?Larry loop 0" in the ScummVM debugger), you'd find he suddenly walks in only four directions again, like he did in earlier games.