playMaker

Author Topic: Making a buttload of objects invisible?[SOLVED]  (Read 2882 times)

KozTheBoss

  • Full Member
  • ***
  • Posts: 150
  • You dont fail unless you give up trying to succeed
    • Pixel Life - portfolio
Making a buttload of objects invisible?[SOLVED]
« on: July 20, 2013, 06:18:30 PM »
Hi guys! I am working on a hobby project at the moment for fun - it's a top-down apocalyptic survival type game, and i have a "problem" that i could use some help with =)

Currently, when you enter a building, i have hard-coded it to make the roof object of the building invisible using "set visibility action" This works great for single-story buildings where it's just the roof i need to see through, but when i enter a 2-story house for an example, there is the roof, the floor and ALL the furniture, litter and trash on the second floor that needs to become invisible aswell, and i figured that maybe there would be a better way to make all of these invisible at once, instead of having a "set visibility" action for each single object (i think i would have at least 30 of them in one action then)

So my question - is there an easier way to make many items go invisble at once than using "set visibility" for each object?

Plus points if you can point me towards how i would make them "fade out" instead of just going invisible instantly :)

lots of love! - fred
« Last Edit: July 28, 2013, 05:23:03 PM by jeanfabre »
Remember, you don't fail unless you give up trying to succeed!

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Making a buttload of objects invisible?
« Reply #1 on: July 20, 2013, 09:33:52 PM »
Fading out would be tricky...

Parent each level under a gameobject and then turn that off, everything under it like furniture should also turn off. Fading ... Hmmm

KozTheBoss

  • Full Member
  • ***
  • Posts: 150
  • You dont fail unless you give up trying to succeed
    • Pixel Life - portfolio
Re: Making a buttload of objects invisible?
« Reply #2 on: July 21, 2013, 07:19:27 AM »
oh my god, of course! I can't believe I didn't think that one up myself =( that's what you get for working at 3 AM i guess ;)

Thanks mate :)

________________

EDIT: dammit, parenting them all under one game object didnt work =( Only the main GO is set invisible, the rest are still fully visible =/
« Last Edit: July 21, 2013, 08:00:55 AM by KozTheBoss »
Remember, you don't fail unless you give up trying to succeed!

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Making a buttload of objects invisible?
« Reply #3 on: July 21, 2013, 08:08:00 AM »
Use the Activate Game Object action instead :D

KozTheBoss

  • Full Member
  • ***
  • Posts: 150
  • You dont fail unless you give up trying to succeed
    • Pixel Life - portfolio
Re: Making a buttload of objects invisible?
« Reply #4 on: July 21, 2013, 01:12:06 PM »
yep, disabling the game objects works :) Thanks again!
Remember, you don't fail unless you give up trying to succeed!