Home › Forums › General Questions › hide object on load / startUp
- This topic has 25 replies, 3 voices, and was last updated 9 months, 4 weeks ago by Claas.
-
AuthorPosts
-
2024-02-24 at 3:41 pm #71010ClaasParticipant
XEON your if then approach and switch fr the list does the trick.
I can now with a mouse click turn objects on and with a second click turn it off
I did the show hide first manually for all objects but this is madness and having learned how the list tool works makes this so much easier to script.
Even adding a timer I figured out. I work and teach in 3D modeling so scripting is like black magic for me but Verge3D makes this much easier to try.
I was first looking into Godot but this is too daunting – also for my students.Now I can go back and delete all the hours of work I did and rebuild the logic with 10% of the commands ;)
- This reply was modified 9 months, 4 weeks ago by Claas.
Attachments:
You must be logged in to view attached files.2024-02-24 at 3:43 pm #71013ClaasParticipantwhen I click one light objects the light cone and error message is displayed
if I click the same light object again the cone and error is hiddenJust check visibility.
I looked at your puzzle – do I see this right that we can populate a list with hidden objects this way?
You all must laugh at my kindergarten questions
2024-02-24 at 3:49 pm #71014kdvParticipantdo I see this right that we can populate a list with hidden objects this way?
Have no idea what are you talking about
That puzzle set just shows that every object already has its visibility state. There is no need to use some additional variable. You just can read the visibility state right from the object itself.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-02-24 at 3:55 pm #71015ClaasParticipantno surprise you don’t know what I’m talking about – I don’t know it either lol
I get your explanation now – this would work with multiple objects too since turning on one object will hide all others – I thought a list is bets fo that to sort stuff?my logic seems to work well besides that
after I click on the red icosphere to show it
and then while it is visible click on the blue icosphere
it only hides everything but does not show the blue cube and sphere- This reply was modified 9 months, 4 weeks ago by Claas.
- This reply was modified 9 months, 4 weeks ago by Claas.
Attachments:
You must be logged in to view attached files.2024-02-24 at 3:59 pm #71019kdvParticipantUpload your app in zip and post the link here
Attachments:
You must be logged in to view attached files.Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-02-24 at 4:09 pm #71021ClaasParticipantUpload your app in zip and post the link here
I did – it is called “Test App.zip”
2024-02-24 at 4:21 pm #71022ClaasParticipant2024-02-24 at 4:22 pm #71024xeonCustomerThe addition of the timer setting a variable means your hide and show states can get delayed or messed up.
With this new wrinkle you woukd be better off using the when visible approach suggested by KDV.
This way there is no chance of variables being in the wrong state when another object is pressed.
Haven’t looked at your file yet … I am on the road but I am sure KDv can get you going in the right direction
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2024-02-24 at 4:37 pm #71026kdvParticipantSomething like this should work
https://v3d.net/te5Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-02-24 at 6:11 pm #71031ClaasParticipantSomething like this should work
ah wow – I get the logic behind it.
thank you for the demonstrations.
2024-02-25 at 3:40 am #71059ClaasParticipantXEON and KDV
thank you so much for your code / puzzle examples.
I did settle for this simple logic which does what I need to do.
It works very well – is short – easy to remember
without you all telling me about how to make lists (XEON) and to check the visibility of objects (KDV) I would not have been able to get this together in this short time!
Again thank you!
- This reply was modified 9 months, 4 weeks ago by Claas.
Attachments:
You must be logged in to view attached files. -
AuthorPosts
- You must be logged in to reply to this topic.