playMaker

Author Topic: (SOLVED)Question about templates  (Read 47 times)

odthiago

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
(SOLVED)Question about templates
« 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
« Last Edit: November 05, 2018, 06:31:06 AM by odthiago »

DanielThomas

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 79
    • View Profile
Re: Question about templates
« Reply #1 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.

odthiago

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: Question about templates
« Reply #2 on: November 05, 2018, 06:29:02 AM »
Thx you DanielThomas!

Now Its Working!!!

Thx a lot, man!
Thiago