playMaker

Author Topic: How to get values from an array of sprites for "UI Image Set Sprite"  (Read 1088 times)

Xtreme

  • Playmaker Newbie
  • *
  • Posts: 3
I am new to playmaker and games development hobby in general. I am trying to make an array of sprites and then after extracting value for each index, trying to assign it to an array of game objects. But apparently using "array get" action, I can only get game object or object but not sprites, which is what I want. Any way or get around to this?

In specific, I have 4 hearts for player's health. Each time it hits by the enemy, the heart gameobject (having full heart sprite) needs to be replaced first by half heart sprite and then empty heart sprite after another hit by enemy.

Please explain with details as I am new to playmaker actions.

Thanks in advance
« Last Edit: August 08, 2020, 08:07:55 PM by Xtreme »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: How to get values from an array of sprites for "UI Image Set Sprite"
« Reply #1 on: August 09, 2020, 12:00:31 PM »
Hi
With Array Get set the Type to Object then look for unityengine/sprite

Xtreme

  • Playmaker Newbie
  • *
  • Posts: 3
Re: How to get values from an array of sprites for "UI Image Set Sprite"
« Reply #2 on: August 09, 2020, 01:07:02 PM »
Please see attached SS. The ui image set sprite is not letting me choose the stored result from array get action.

Xtreme

  • Playmaker Newbie
  • *
  • Posts: 3
Re: How to get values from an array of sprites for "UI Image Set Sprite"
« Reply #3 on: August 09, 2020, 01:27:00 PM »
Figured out, thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to get values from an array of sprites for "UI Image Set Sprite"
« Reply #4 on: August 10, 2020, 03:38:44 AM »
Hi,

I got your pm, but I can assume you are good now?

Bye,

 Jean