playMaker

Author Topic: Deactivate All children of [ ] apart from [ ]  (Read 4765 times)

FritsLyn

  • Full Member
  • ***
  • Posts: 191
Deactivate All children of [ ] apart from [ ]
« on: June 18, 2015, 08:18:25 AM »
It'd be great with an action that'd take in..

********
Deactivate
All children of [        ] 
Apart from  [        ]
********

So one could (easily) set up with a parent and a bunch of objects - and just select which one of the children should be activated.

This would be a tremendous help in all types of anything :D

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Deactivate All children of [ ] apart from [ ]
« Reply #1 on: June 18, 2015, 12:34:20 PM »
You could just loop through all of the contents in the array you want to deactivate.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

FritsLyn

  • Full Member
  • ***
  • Posts: 191
Re: Deactivate All children of [ ] apart from [ ]
« Reply #2 on: June 18, 2015, 02:27:39 PM »
Yes :) and basically that goes for every wanted action: You can code it or set it up.

And I do that all the time.

What I am talking about is a single action that does this specific drill.

Because it would essentially be a multi-tool possible beyond comprehension. Imagine how it could be used - how fast it'd be to set up things such as:

* 'Apart from' could be looked up in a hash or array list - so in seconds you'd have an array that controls basically how a complete scene looks.

* You want to have a UGUI to behave differently (have different buttons and text) based on a single input? There you go: by simple parenting and a simple input you'd be able to set all things up, neat, easy and transparent..

* Just fast setups, like what weapon (including children that sets up type of damage etc) etc etc..

By arranging things this way there'd be less Garbage collect (less instantiating), and a lot faster development of complex setups.

Yes - it can be done by cycling through etc.. but the point is: One action, not a spiders web!

thatnzguy

  • Playmaker Newbie
  • *
  • Posts: 43
Re: Deactivate All children of [ ] apart from [ ]
« Reply #3 on: June 18, 2015, 06:41:41 PM »
I've been building templates that do this kind of thing, it's like an action that you plug in, but it's just a Run FSM instead.

You could make two arrays, All Items, and Excluded Items, then feed both these to a Run FSM that runs a template that does the looping on the array etc.

It kinda sucks that you have to compile arrays before hand then feed that to the Run FSM, but whatevs.

FritsLyn

  • Full Member
  • ***
  • Posts: 191
Re: Deactivate All children of [ ] apart from [ ]
« Reply #4 on: June 19, 2015, 02:37:48 AM »
Yer thatnzguy, thanks.

Again; I am aware that it can be done 'manually' - but what I propose is a single action, so the whole thing would be done in a few clicks.

BECAUSE that'd mean that it'd be used quite a lot more - and that'd mean really fast workflow and doing some very effective building, both in terms of performance, but also in terms of how easy it'd be to read the build etc.

Imagine to be able to take ANYTHING and put it in as children - and then just feed a single parameter to the parent and that child would be the only active below the parent..

The ultimate selection / building tool!

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Deactivate All children of [ ] apart from [ ]
« Reply #5 on: June 22, 2015, 10:30:36 PM »
I agree with lane but since it was a simple hack here you go:

http://hutonggames.com/playmakerforum/index.php?topic=10602.0

 :)

FritsLyn

  • Full Member
  • ***
  • Posts: 191
Re: Deactivate All children of [ ] apart from [ ]
« Reply #6 on: June 23, 2015, 07:34:35 AM »
Wow dudebxl!! This is why I love you.

From hereon and into space and time for ever, I love you!

You have no idea how much simpler my life just became.

This is just like PlayMaker itself: Of course one can just do things in written code, but it's so much faster to do most things in PlayMaker.. And now this setup you provide access to: Could be done 'manually', but this is SO strong and potent magic!

Thank you Thank you Thank you!