Target Parameters:
This is probably the most complex and time consuming part of adjusting the game for your application. The targets variable is basically
an array containing sub-arrays. Each array element corresponds to one target, and each subarray contains all the individual parameters for that target. You can
have as many or as few targets as you want, more targets makes the game harder and more interesting.
A typical target parameter set would look something like:
var targets=[
[ "target1.gif" , 127 , 156 , 48 , 90 , 2 ],
[ "target3.gif" , 103 , 268 , 45 , 90 , 1 ],
[ "target4.gif" , 209 , 389 , 60 , 110 , 2 ],
[ "target3.gif" , 700 , 415 , 45 , 85 , 1 ],
[ "target4.gif" , 277 , 292 , 40 , 75 , 1 ],
[ "target4.gif" , 356 , 459 , 20 , 40 , 1 ],
[ "target1.gif" , 580 , 110 , 15 , 40 , 3 ],
[ "target2.gif" , 656 , 288 , 20 , 30 , 3 ],
[ "target1.gif" , 628 , 110 , 15 , 40 , 3 ],
[ "target2.gif" , 107 , 410 , 55 , 85 , 3 ]
]
This example shows there are 10 seperate targets. The format for the parameters is:
[ "IMAGE_URL" , Xposition , Yposition , Width , Height , DIRECTION ]
- "IMAGE_URL"
This is URL the target image.
- Xposition
This is the horizontal pixel position of the top left corner of the image relative to the game background image.
- Yposition
This is the vertical pixel position of the top left corner of the target image relative to the game background image.
(Hint: Put your background image into a graphics editor and use the coordinates display to determine target placement.)
- Width
This is the target image width regardless of actual image width. Due to the way the script works, this value MUST be a multiple of 5 (ex: 100, 205, 240, 35, etc...). If not, the script will round to the nearest multiple of 5.
- Height
This is the target image height regardless of actual image height. Due to the way the script works, this value MUST be a multiple of 5. If not, the script will round to the nearest multiple of 5.
- DIRECTION
This determines which direction the target will appear.
1 = Moves to the left.
2 = Moves to the right.
3 = Moves upward.
4 = Moves downward.