Advertisement
stom66

RotateCardsThatPassThroughAZone

Jan 23rd, 2021
601
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. function onLoad()
  2.     --if the script is on Global then declare the zone here:
  3.     zone = getObjectFromGUID("d15e01")
  4.  
  5.     --alternately, if the script is on the zone itself, decalre the zone as follows:
  6.     --zone = self
  7. end
  8.  
  9. function onObjectEnterScriptingZone(zone, obj)
  10.     if zone == zone and obj.tag == "Card" then
  11.         Wait.condition(
  12.             function()
  13.                 obj.setRotationSmooth(obj.getRotation():add(Vector(180, 0, 0)))
  14.             end,
  15.             function()
  16.                 return (obj.resting and not obj.held_by_color)
  17.             end
  18.         )
  19.     end
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement