Yeah. You set up the specifics of the rotations in the table file. The trigger type would have to be set to scripted. To get proper sequencing, you need to play with the various "+delay" values.
The script, in essence, would then boil down to this:
#Conditional Hooks
$State: GS_STATE_GAME_PLAY
$On State Start:
[
hurricane = {}
--Get a pointer to the ship we're after
for i = 1, #mn.Ships do
if mn.Ships[i].Class.Name == "Hurricane VI" then
hurricane.ship = mn.Ships[i]
end
end
]
$On Frame:
[
if hurricane.ship ~= nil then --We only need to do anything if our ship is in mission
if hurricane.ship:isValid() then --Final piece of checking, we should only proceed if we have a valid ship handle
if hurricane.triggerforward then --This is the variable we'll be setting via sexp to make the animation play forward
hurricane.ship:triggerAnimation("scripted")
hurricane.triggerforward = false
end
if hurricane.triggerbackward then
hurricane.ship:triggerAnimation("scripted", 0, false)
hurricane.triggerbackward = false
end
end
end
]
$On State End:
[
hurricane = nil --Get rid of everything.
]
#End
In a mission, you would then use the "eval-script" sexp to trigger the animation, like so:
( when
<Condition>
( eval-script "hurricane.triggerforward = true")
)
To trigger the animation in the reverse direction, use "triggerbackward" instead of "triggerforward".