HEY! I CANT ADD PARTICLE TO MY GUI SCRIPT - I WANT TO USE PATRICLE SYSTEM WHENEVER I CLICK MY MAIN BUTTON IN THE GUI FOR A SIMPLE TEST I MADE. MY GUI SCRIPT IS PRETTY SIMPLE - CLICK ON A MAIN BUTTON FOR OPENING A POPUP AND THEN CLICK TO CLOSE THIS WINDOW.
i really tried everywhere - how? and where? do i add that:
**gui.play_particlefx("#particle")**
to my simple gui script:
local popupActive = false
function init(self)
msg.post(".", "acquire_input_focus")
self.mainButton = gui.get_node("mainButton")
self.popup = gui.get_node("popup")
self.close = gui.get_node("close")
gui.set_enabled(self.popup, false)
end
function on_input(self, action_id, action)
if action.pressed and gui.pick_node(self.mainButton, action.x, action.y)
and popupActive == false then
openPopup(self.popup)
gui.set_enabled(self.popup, true)
gui.set_enabled(self.mainButton, false)
popupActive = true;
end
if action.pressed and gui.pick_node(self.close, action.x, action.y)
and popupActive == true then
closePopup(self.popup)
end
end
thank you so much guys!