Jump to content

Recommended Posts

Posted

Hide should work. What is your code?

 

 

//Edit: here is a short script. Works without any problem. Just connect it in your flowgraph with the default PushButton.lua script.

 

-- activate light
function Script:Activate()--in
 if self.entity:Hidden() then
  self.entity:Show()
  self.component:CallOutputs("Activate")
 end
end
-- deactivate light
function Script:Deactivate()--in
 if not self.entity:Hidden() then
  self.entity:Hide()
  self.component:CallOutputs("Deactivate")
 end
end
-- toggle light
function Script:Toggle()--in
 if not self.entity:Hidden() then
  self:Deactivate()
 else
  self:Activate()
 end
end

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...