Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: acornbringer on June 21, 2016, 01:30:12 PM
-
Hey there!
I'm trying to create a button that will switch the sprite element in a Sprite Renderer component of another object. I've made a button out of a cube and attached the FSM to that but when I create the "Set Property" action to the cube's fsm, I don't get the option to select the new sprite. However, when I create an FSM on the sprite object, it lets me choose a sprite.
When I drag the Sprite Renderer component to the state list, I select "Sprite Renderer > Get Property". Then under the "Property" drop down, I select "sprite > Sprite". Instead of an image box appearing like I would like, I am left with a "Store Object" option.
Any help would be appreciated!
Thanks.
-
Hi,
You can find a custom action called "swap Sprite"
on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181)
install this and search for "swap Sprite"
-
Holy smokes! First time hearing about the Ecosystem. Very useful. That particular action worked perfectly as well.
Thanks a lot! You opened up a whole new world for me ;D
I'm still kind of curious as to why the "Set Property" action wasn't suitable. Is it only meant to be used on the owner of the FSM?
Take care!
-
Hi,
indeed...and not only on sprite, but on all it seems.
i have send a bug report.
But just for your information it is better to use (custom) actions that get/set properties :)
when you build for example to a web build the get/set sometimes do not work atm.
-
i was unable to find the swap sprite action some days ago, but managed to work out a way to swap the sprite using the Set Object action and setting the type to Sprite
-
Hi,
i got a reply from alex
This is an issue with the new drag and drop context menus.
A Set Property made by dragging an object into the State View and
selecting Set Property is broken.
This is fixed in the next update (coming soon).
In the meantime I posted a patch in another thread that fixes
the issue with a custom action editor.
he also attached a fix here (http://hutonggames.com/playmakerforum/index.php?topic=13051.0;topicseen) if you need it.
-
i was unable to find the swap sprite action some days ago, but managed to work out a way to swap the sprite using the Set Object action and setting the type to Sprite
Good to know! I'm sure that would have helped me as well and I'll keep it in mind for other situations. For now, I was able to download the "swap sprite" action and use that.
-
Hi,
i got a reply from alex
This is an issue with the new drag and drop context menus.
A Set Property made by dragging an object into the State View and
selecting Set Property is broken.
This is fixed in the next update (coming soon).
In the meantime I posted a patch in another thread that fixes
the issue with a custom action editor.
he also attached a fix here (http://hutonggames.com/playmakerforum/index.php?topic=13051.0;topicseen) if you need it.
Awesome! Thanks for inquiring about it. It did seem funny that it wasn't working but I'm too new to Playmaker to properly diagnose something as a bug.
I look forward to the update but the fix you recommended works just fine for now.
-
Can you help me to solve my problem: http://hutonggames.com/playmakerforum/index.php?topic=13065.0
Basicly i need to save sprite variable to persist on disk so that even my app has been closed the image / sprite still remain