playMaker

Author Topic: Little help converting string to type  (Read 2452 times)

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Little help converting string to type
« on: September 06, 2013, 07:30:59 PM »
Hi!
I´m trying to make this custom action but I can´t pass this last step.
This´s basically a copy of GetNextChild action.
But in this case I´m setting the tag of children of the children depended on their components.
And because GetNextChild only gets the first childs.

This has an error on Type variable.
In my mind we first set a String with the type of component we want to find.
And then we need to convert it to a Type variable to use in GetComponentsInChildren.
Thanks in advice.
Cheers
Seb


Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Little help converting string to type
« Reply #1 on: September 08, 2013, 07:40:45 AM »
Bump

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Little help converting string to type
« Reply #2 on: September 08, 2013, 01:30:58 PM »
Hi,

I've attached a fixed up version of the action. Let me know how it works for you. I'll include it in the next update too...

Saputo

  • Full Member
  • ***
  • Posts: 107
Re: Little help converting string to type
« Reply #3 on: September 08, 2013, 03:43:46 PM »
This Might be useful for my problem as well, can't wait to test things out with this

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Little help converting string to type
« Reply #4 on: September 08, 2013, 10:02:06 PM »
Hi Alex
I really appreciate that :D
You are awesome! My action seems a toy car comparative to a real car yours.
Thanks for your time and attention.
I just created another action from yours this one sets layer not tags.
This two actions can be very useful.
In my case when I kill a enemy I set their tag from "Enemy" to "RagDoll". Just a example.
There is it.
Cheers
Seb