Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Xtreme on August 08, 2020, 08:03:55 PM

Title: How to get values from an array of sprites for "UI Image Set Sprite"
Post by: Xtreme on August 08, 2020, 08:03:55 PM
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
Title: Re: How to get values from an array of sprites for "UI Image Set Sprite"
Post by: djaydino on August 09, 2020, 12:00:31 PM
Hi
With Array Get set the Type to Object then look for unityengine/sprite
Title: Re: How to get values from an array of sprites for "UI Image Set Sprite"
Post by: Xtreme 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.
Title: Re: How to get values from an array of sprites for "UI Image Set Sprite"
Post by: Xtreme on August 09, 2020, 01:27:00 PM
Figured out, thanks
Title: Re: How to get values from an array of sprites for "UI Image Set Sprite"
Post by: jeanfabre on August 10, 2020, 03:38:44 AM
Hi,

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

Bye,

 Jean