Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- buttons affected by this script
- DRAW5BUTTON = '0e63cb'
- DRAW4AND1BUTTON = 'e69f07'
- DRAW1WUTAIBUTTON = '88b5d8'
- -- DRAWBUTTON positions, designates target location not src
- DRAW5POS = {-7.35, 0.96, -21.82}
- DRAW4AND1POS = {1.58, 0.96, 0.91}
- DRAW1POS = {1.27, 0.96, -2.81}
- -- creates the button
- function onload()
- -- clickable area
- self.createButton({
- click_function="click", function_owner=self,
- position={0, 0.2, 0}, height=700, width=700, color={1,1,1,0}, label="setupWutai"
- })
- -- button label
- self.createButton({
- click_function="click", function_owner=self,
- position={0, 0.2, 0}, height=1, width=1, color={1,1,1,1}, label="Setup \nWutai \nMountain", font_size=150
- })
- local buttonDraw4and1 = getObjectFromGUID(DRAW4AND1BUTTON)
- local buttonDraw1Wutai = getObjectFromGUID(DRAW1WUTAIBUTTON)
- local buttonDraw5 = getObjectFromGUID(DRAW5BUTTON)
- end
- -- beginning of button's click function
- function click(objectButtonClicked, playerColorClicked)
- if objectButtonClicked == 'setupWutai' then
- buttonDraw5.setPositionSmooth(DRAW5POS, false, true)
- buttonDraw5.setRotationSmooth({0,180,0}, false, true)
- buttonDraw4and1.setPositionSmooth(DRAW4AND1POS, false, true)
- buttonDraw4and1.setRotationSmooth({0,90,0}, false, true)
- buttonDraw1Wutai.setPositionSmooth(DRAW1POS, false, true)
- buttonDraw1Wutai.setRotationSmooth({0,90,0}, false, true)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement