playMaker

Author Topic: ex2D Actions  (Read 6086 times)

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3145
  • Official Playmaker Support
    • View Profile
    • LinkedIn
ex2D Actions
« on: April 20, 2012, 10:32:37 PM »
Some basic ex2D actions for playing, pausing and resuming ex2D animation clips.

You can also send events to PlayMakerFSMs from ex2D Sprite Animations.

Just create an event in the Sprite Animation Editor:
http://www.ex-dev.com/ex2d/wiki/doku.php?id=manual:sprite_anim_editor:edit_event

Method Name: SendEvent
Param Type: STRING
Parameter: event to send

You should also be able to use Get/Set Property actions on ex2D components, I'm guessing with "Use Animation Helper" checked so ex2D updates properly...

I'm not super familiar with ex2D, so please post anything else you'd like to see here...

Thanks!
Alex

EDIT: Fixed the action category in the attached scripts.
« Last Edit: April 20, 2012, 10:57:27 PM by Alex Chouls »

OriginalBigDan

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
Re: ex2D Actions
« Reply #1 on: April 22, 2012, 09:12:41 AM »
A big thank you! :D

amaranth

  • Full Member
  • ***
  • Posts: 172
    • View Profile
Re: ex2D Actions
« Reply #2 on: April 24, 2012, 02:17:37 PM »
Thank you! :D

Alex, I'm not sure if it's ex2D or PlayMaker, but I've found that Ex Sprite Animation Play sometimes only works when my SpriteAnimatedObject has "Play Automatically" turned on, and sometimes only when it's turned off. I think part of the problem is that my ex2D sprite object isn't refreshing when it should, so I'm not sure whether Play Automatically should be on or off or if it shouldn't matter.

[Update]
I think I may have found the culprit. Here's what happens:
1. Press Play.
2. The Ex Sprite Animation (Script) attached to the game object disables itself even though I have it enabled by default.
3. When something collides with the game object and I call the Ex Sprite Animation Play action, Ex Sprite Animation (Script) is enabled for a moment and then disabled.
4. No animation occurs. Is it possible that not enough time is provided for the animation script to turn on before the animation is called?

[Update 2]
Aaaarrgggs! Okay, this is driving me nuts. Here is something else that might be a symptom of something. If I spawn the game object, the new game objects animate when FSM tells them to do this, but the original game object does not.

[Update 3]
I did a bit more research into ex2D and found a setting that refreshes sprites. This seemed to fix the problems. :)

[Update 4]
Never mind. Opened project today and ran without any changes. No animation. I used the ex2D rebuild sprites and prefab option, tested, and no change. While the demo game was playing, I expanded the Ex Sprite (Script) on the object that should have animated and just by doing this, the object animated. Weird. Plain weird.
« Last Edit: April 26, 2012, 03:38:38 PM by amaranth »

arongb

  • Playmaker Newbie
  • *
  • Posts: 1
    • View Profile
Re: ex2D Actions
« Reply #3 on: July 05, 2012, 03:25:53 PM »
Hi there,

've tried following this guide, but i'm not able to find any sprite sheet ani's made using ex2d (i havent used any other sprite programs) in the drop down list in the play animation action.

This may be a really basic question, but how do I get an animation i've made using ex2D to appear and be usable from the animation action list?

Any help would be greatly appreciated!!

Cheers

Aron