playMaker

Author Topic: Sprite sheet animation swapping  (Read 1292 times)

Padenlee

  • Junior Playmaker
  • **
  • Posts: 63
  • You can't hit what you don't shoot for!
Sprite sheet animation swapping
« 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!
« Last Edit: June 14, 2019, 03:14:16 PM by Padenlee »
-Paden Pierry
@padenpierry
Apple inc.'s first TV show, EP 1.
Game Dev since 2007
Coolest client: Bridgestone

Thore

  • Sr. Member
  • ****
  • Posts: 480
Re: Sprite sheet animation swapping
« Reply #1 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 in the forum.

There might be also something in the forum, or on the Ecosystem, haven’t checked ;)

Padenlee

  • Junior Playmaker
  • **
  • Posts: 63
  • You can't hit what you don't shoot for!
Re: Sprite sheet animation swapping
« Reply #2 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

-Paden Pierry
@padenpierry
Apple inc.'s first TV show, EP 1.
Game Dev since 2007
Coolest client: Bridgestone

Thore

  • Sr. Member
  • ****
  • Posts: 480
Re: Sprite sheet animation swapping
« Reply #3 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.