you might be able to do a rapid cloak effect, concealing the texture changeover in a cloud of particles.
;;cloakint
#Global Hooks
$GameInit:
[
cloaktex = { gr.loadTexture("apis-c00"), gr.loadTexture("apis-c01"), gr.loadTexture("apis-c02"),
gr.loadTexture("apis-c03"), gr.loadTexture("apis-c04"), gr.loadTexture("apis-c05"),
gr.loadTexture("apis-c06"), gr.loadTexture("apis-c07"), gr.loadTexture("apis-c08"),
gr.loadTexture("apis-c09"), gr.loadTexture("apis-c10"), gr.loadTexture("apis-c11"),
gr.loadTexture("apis-c12"), gr.loadTexture("apis-c13"), gr.loadTexture("apis-c14"),
gr.loadTexture("apis-c15") } --array of cloak textures
cloakticker = 750 -- countdown timer
cloaklevel = 0 -- cloaklevel, how cloaked we are
cmapindex = 0 -- this stores an index for which texture were using
]
$Simulation:
[
if cloakticker > 0 then --counting down to cloak engage, all this stuff is called every frame
cloakticker = cloakticker - 1
else
cloak = true
end
if cloak and cloaklevel < 160 then --if its time to cloak and were not already fully cloaked
cloaklevel = cloaklevel + 1
cmapindex = math.floor(cloaklevel / 10) --convert are cloaklevel into an index
end
ship = mn.Ships["Alpha 1"] --get alpha 1's ship
if cloaked ~= true and ship:isValid()and cmapindex > 0 then --if alphas alive and were cloaking set texture, but not if our cloak is complete
for i=1, #ship.Textures do
ship.Textures[i] = cloaktex[cmapindex] --change all the ships textures
end
if campindex == 16 then cloaked = true end --tell this if to stop changing textures when were done
end
]
#end