Kitty Corp Meow Mix Forums

Help & Tutorials => A/A Tutorials => Topic started by: Large Leader on February 10, 2014, 02:49:04 PM



Title: Change Subaction Command
Post by: Large Leader on February 10, 2014, 02:49:04 PM
Hey, everyone. Drogoth here with a very basic tutorial about an event that every PSAer should know aside from Asynchronous and Synchronous Timers and Hitboxes.

In this tutorial I'll be talking about a very basic event (or parameter, if you prefer) in PSA called Change Subaction. I won't get into the specifics of every possible way to use Change Subaction, but I'll list two ways to use it.

The Change Subaction event does exactly what it says: Changes the current Subaction to another one. This isn't to be confused with the Goto command (which doesn't change the animation). Don't worry if you made that error, I made the same mistake myself multiple times when I first started out.

Change Subaction can be very versatile when used, and can lead to extremely intricate movesets or even just make transitions from animations look smooth.

I'll be showing you the most basic example of how you can use the Change Subaction command. The text within the spoilers is what you would have within the Subaction (whether it's Main, GFX, SFX, or Other)

Example 1: Making Subaction1 transition to Subaction2 after the end of Subaction1.
Asynchronous Timer: frames = 14
Change Subaction: Subaction2

And that's it. Simple as that.

But what does it mean?

Asynchronous Timer: frames = 14 - After Frame 14, something occurs
Change Subaction: Subaction2 - The current subaction goes to a new subaction

Now, I'm going to use an example from a personal hack of mine (Skyward Sword Link), and show you how to use Change Subaction after pressing a Button

Example 2: Make Subaction1 go to Subaction2 after pressing a button
Set Loop Infinite
   Synchronous Timer: frames=1
   If Button Pressed: 2
      Change Subaction: sub action=Subaction2
   End If
Execute Loop

But what does this mean?

Let's break it down now, shall we?
Set Loop -1 (PSA translates this to infinite)- This sets/starts a loop that goes on during the Subaction. Depending on the number put in, you can loop the next few events 5 times, 15 times, 500 times, or an infinite amount of times.

Synchronous Timer: 1- After every single frame, something occurs or happens.

If Button Pressed: 2 - If Button 2 (which are the Jump buttons, X and Y) are pressed

Change Subaction: Subaction2 - Changes the Subaction to a new subaction

End If - Ends the If statement. It's the equivalent to a period at the end of a sentence. It's incorrect without it.

Execute Loop - The loop gets carried out.

There are a MULTITUDE of uses for Change Subaction. And because it's so simple, it can be used in the most creative of ways if combined with the correct events.

Hope this tutorial will be useful for some of the newbies that come around!


Title: Re: Change Subaction Command
Post by: otheusrex on March 14, 2014, 02:01:34 AM
Nice post and nicely explained too!