If you clear a Tween Chain, then it stops working on subsequent plays. GetTweenChainPlaying() returns zero.
Demo, no media required:
setwindowsize(1024,768,0)
SetVirtualResolution(1024,768)
global arrTween as integer[8]
global spr as integer
global ch as integer
spr = createSprite(0)
SetSpriteSize(spr, 50,50)
startShake()
do
UpdateTweenChain(ch, getFrameTime())
sync()
loop
//*********************************************************
function startShake()
//*********************************************************
ch = createTweenChain()
for n = 1 to 8
arrTween[n] = CreateTweenSprite(1)
next n
clearTweenChain(ch)
x# = 0: y# = 0
for n = 1 to 8
newx# = x# + 20
newy# = y# + 2
SetTweenSpriteX(arrtween[n], x#,newx# ,0)
SetTweenSpriteY(arrtween[n], y#, newy#,0)
AddTweenChainSprite(ch,arrtween[n],spr, 0)
x# = newx#: y# = newy#
next n
PlayTweenChain(ch)
endfunction