Advertisement
Guest User

Untitled

a guest
Jan 4th, 2021
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. -- buttons affected by this script
  2. DRAW5BUTTON = '0e63cb'
  3. DRAW4AND1BUTTON = 'e69f07'
  4. DRAW1WUTAIBUTTON = '88b5d8'
  5. -- DRAWBUTTON positions, designates target location not src
  6. DRAW5POS = {-7.35, 0.96, -21.82}
  7. DRAW4AND1POS = {1.58, 0.96, 0.91}
  8. DRAW1POS = {1.27, 0.96, -2.81}
  9.  
  10.  
  11.  
  12. -- creates the button
  13. function onload()
  14. -- clickable area
  15. self.createButton({
  16. click_function="click", function_owner=self,
  17. position={0, 0.2, 0}, height=700, width=700, color={1,1,1,0}, label="setupWutai"
  18. })
  19. -- button label
  20. self.createButton({
  21. click_function="click", function_owner=self,
  22. position={0, 0.2, 0}, height=1, width=1, color={1,1,1,1}, label="Setup \nWutai \nMountain", font_size=150
  23. })
  24.  
  25. local buttonDraw4and1 = getObjectFromGUID(DRAW4AND1BUTTON)
  26. local buttonDraw1Wutai = getObjectFromGUID(DRAW1WUTAIBUTTON)
  27. local buttonDraw5 = getObjectFromGUID(DRAW5BUTTON)
  28.  
  29. end
  30. -- beginning of button's click function
  31. function click(objectButtonClicked, playerColorClicked)
  32.  
  33. if objectButtonClicked == 'setupWutai' then
  34. buttonDraw5.setPositionSmooth(DRAW5POS, false, true)
  35. buttonDraw5.setRotationSmooth({0,180,0}, false, true)
  36.  
  37. buttonDraw4and1.setPositionSmooth(DRAW4AND1POS, false, true)
  38. buttonDraw4and1.setRotationSmooth({0,90,0}, false, true)
  39.  
  40. buttonDraw1Wutai.setPositionSmooth(DRAW1POS, false, true)
  41. buttonDraw1Wutai.setRotationSmooth({0,90,0}, false, true)
  42.  
  43. end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement