This content has been marked as final. Show 3 replies
Put the script on the sprite's enterFrame. Lets say your global is
gLocation... put this on the sprite that we are monitoring.
on enterFrame me
Here's how you could create a single list containing all the locV values that you want:
if ilk(gLocVList) <> #propList then
gLocVList = [:]
vSpriteList = [2, 3, 5, 7, 11, 13, 17, 19] -- or other spriteNums
repeat with vSpriteNum in vSpriteList
vLocV = sprite(vSpriteNum).locV
However, it seems rather pointless to do this, as it checks the locV of every sprite on every frame whether you need that information or not. Since the sprite references are globally available anyway, you would use fewer CPU cycles if you just asked for...
... (where x is a sprite name or spriteNum, or a variable holding such information ) whenever you actually require the value of the locV.
That works. Many thanks!