Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Dev_Sebas on September 06, 2013, 07:30:59 PM

Title: Little help converting string to type
Post by: Dev_Sebas 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

Title: Re: Little help converting string to type
Post by: Dev_Sebas on September 08, 2013, 07:40:45 AM
Bump
Title: Re: Little help converting string to type
Post by: Alex Chouls 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...
Title: Re: Little help converting string to type
Post by: Saputo 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
Title: Re: Little help converting string to type
Post by: Dev_Sebas 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