Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Padenlee on June 14, 2019, 03:11:54 PM

Title: Sprite sheet animation swapping
Post by: Padenlee on June 14, 2019, 03:11:54 PM
Is there a way to achieve this or a similar effect with Playmaker? (Not sure if the YouTube player is working correctly with a specific time, the part I'm talking about starts at 20:00:

I'm wanting to make a Pet prefab and swap out the sprite sheet animations with Cat, Dog, Moose, etc.

The question worded differently: Is there a way to dynamically swap sprite animations on the same prefab during runtime?

Thanks in advanced!
Title: Re: Sprite sheet animation swapping
Post by: Thore on June 17, 2019, 03:22:21 PM
You can use that script, drag and drop it into PM’s action list, and select Set Properties. You can also create an object variable, and configure it to use that property (by navigating the menus to the script/component’s properties). Later on, you’ll need to use the Linker Wizard.

I found get/set properties a bit frail, so I recommend to write your own custom action that sets the property, or maybe port the entire script. There are some good resources on how to get started with simple custom scripts that pass in information, and you can also request actions (https://hutonggames.com/playmakerforum/index.php?board=8.0) in the forum.

There might be also something in the forum, or on the Ecosystem, haven’t checked ;)
Title: Re: Sprite sheet animation swapping
Post by: Padenlee on June 18, 2019, 03:03:57 PM
Thanks Thore for the feedback! (*´▽`*)

It's so surprising to me that there is not a native solution to sprite sheet swapping, oof... (ノಠ益ಠ)ノ彡┻━┻

So what you're really saying is I should create my own sprite animation manager and use Resource Load All into sprite arrays, arrays into hash tables with name as key, finally XML looping to control animation frames. Dope! I totally agree XD After years of Playmaker experience, making complex managers is a cake walk to me now. ( ̄ー ̄)
#emojilife

Title: Re: Sprite sheet animation swapping
Post by: Thore on June 18, 2019, 03:18:36 PM
Thanks Thore for the feedback! (*´▽`*)

It's so surprising to me that there is not a native solution to sprite sheet swapping, oof... (ノಠ益ಠ)ノ彡┻━┻

So what you're really saying is I should create my own sprite animation manager and use Resource Load All into sprite arrays, arrays into hash tables with name as key, finally XML looping to control animation frames. Dope! I totally agree XD After years of Playmaker experience, making complex managers is a cake walk to me now. ( ̄ー ̄)
#emojilife

I am saying that you can use the script and set sprites with the Set Property action. Sprite Swap actions also exist on the Ecosystem, which may do something similar to what you try to achieve.