joo

getRelativeSpritePositions

joo
Mar 27th, 2019 (edited)
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. on getRelativeSpritePositions
  2. repeat with n = 1 to _movie.lastChannel
  3. if sprite(n).member.name <> "torso" then next repeat
  4. torsoPos = sprite(n).loc
  5. exit repeat
  6. end repeat
  7.  
  8. positions = []
  9. repeat with n = 1 to _movie.lastChannel
  10. if sprite(n).castLibNum <> castLib("character").number then next repeat
  11. positions.add(sprite(n).loc - torsoPos)
  12. end repeat
  13. return positions
  14. end
Add Comment
Please, Sign In to add comment