var targetPlatform; var state = 0;

function init() { targetPlatform = gameControl.getObjectById(2); targetPlatform.setAnimate(false);

addDestroyTargetObjective(10); addDestroyTargetObjective(11); addDestroyTargetObjective(12); }

function onObjectiveReached() { switch (state) { case 0: addLandOnPlatformObjective(2); targetPlatform.setAnimate(true); state = 1; break; case 1: gameControl.finish(); break; } }