Playmaker Forum

Playmaker News => General Discussion => Topic started by: odthiago on November 05, 2018, 04:26:23 AM

Title: (SOLVED)Question about templates
Post by: odthiago on November 05, 2018, 04:26:23 AM
Hi, people

I created a generic template to attach on each body part of enemies of my game. The template control "health" of each body part. Fire the animation when the body part is hitted...and more.

I created a String variable called "boolAnimatorParameter" that's represents what animator parameter will be change when call "Set Animator bool".
But when I set a value to "boolAnimatorParameter" to "isRightLegHit", for instance, the "boolAnimatorParameter" is changed to all of FSM that recieved my generic template.

How can I set a value to a template variable without change of others FSM with same temaplate? Sorry my spelling! Hope you can understand!

Thx a lot,
Thiago from Brazil
Title: Re: Question about templates
Post by: DanielThomas on November 05, 2018, 05:45:20 AM
If I understand you correct, you would need to set the variable to show in the inspector, then you can change the variable for each gameobject in the FSM component controls in the inspector window.
Title: Re: Question about templates
Post by: odthiago on November 05, 2018, 06:29:02 AM
Thx you DanielThomas!

Now Its Working!!!

Thx a lot, man!
Thiago