You can do various types of target and easily adapt it into the code with very little change.
One easy way of doing this:
For each different style of target, add a KEY:VALUE of "script_noteworthy" and a value of your choosing.
So, if you had a moving target:
Key: script_noteworthy
Value: moving_target
Now, in your code:
Code: Select all
switch(targets[currentTarget].script_noteworthy)
{
    case "right":
        targets[currentTarget] rotateyaw(90, 0.2);
        wait (2 / (user.target_level + 0.3));
        targets[currentTarget] rotateyaw(-90,0.1);
        break;
    case "left":
        targets[currentTarget] rotateyaw(-90, 0.2);
        wait (2 / (user.target_level + 0.3));
        targets[currentTarget] rotateyaw(90,0.1);
        break;
    case "down":
        targets[currentTarget] rotateroll(90, 0.2);
        wait (2 / (user.target_level + 0.3));
        targets[currentTarget] rotateroll(-90,0.1);
        break;
}
wait 1;
The example above uses 3 targets, 2 of the targets pop out from the walls and the third is standard.
You just add your own case and how it reacts. So different wait times, different actions (combine movement maybe?)
--
Generally, mapping could also be improved - such as lighting, textures of target, fx, etc