Advertisement
HugePinball

deck_flip_top_card_object.lua

Feb 26th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.36 KB | None | 0 0
  1. -- scripts to flip the top card of a deck when it is removed from a bag
  2.  
  3. -- object version
  4. -- code to be placed on a deck
  5. function onLoad()
  6.     Wait.condition(function() flipTop() end, function() return self.resting end)
  7. end
  8.  
  9. function flipTop()
  10.     local pos = self.getPosition()
  11.     self.takeObject({ position = { pos.x, pos.y + 2, pos.z}, flip = true })
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement