playMaker

Author Topic: Activate Component  (Read 4026 times)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Activate Component
« on: July 30, 2017, 03:53:33 AM »
Hi,
I made a new Action Called Activate Component.

You can drop in a component to activate / deactivate or use a object variable.

This should work with most components that can be activated / deactivate
This does NOT work with colliders, but there is a different action for that on the ecosystem.
You can get the action on the ecosystem or get the attachment below.

Deek

  • Full Member
  • ***
  • Posts: 133
Re: Activate Component
« Reply #1 on: July 30, 2017, 01:54:00 PM »
Dang, thanks a lot!
I tried to create such an action myself a while ago but couldn't figure out how to get the reference to any component as an object.
Now knowing how, I built upon your script and the 'ActivateMultipleGameObjects'-Action and created the action 'ActivateMultipleComponents', which can be downloaded from the attachments.

It allows for (de-/)activation of several components, even Colliders, throws an error when it contains a GameObject or other invalid components and optionally resets on exit.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Activate Component
« Reply #2 on: July 30, 2017, 10:27:52 PM »
Hi,
Great, i will check it out,
i will look to add a 'reset on exit' and a collider also  to my action.

i had also a hard time to get this to work :P

I was 1st thinking not to include collider as there is already an action for activate collider, but it will be better to add then.

And i will include yours to the Ecosystem.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Activate Component
« Reply #3 on: July 31, 2017, 03:14:08 AM »
Hi,
I think i will remove reset on exit on your action, to place on the ecosystem.
as it can slow down the action.

Deek

  • Full Member
  • ***
  • Posts: 133
Re: Activate Component
« Reply #4 on: July 31, 2017, 09:21:15 AM »
Fair enough.
I only included it because 'ActivateMultipleGameObjects' had it and I thought that maybe someone might need this, even though I never did. It's gonna be rare that someone does, and if so, he/she can get it from this thread.