Home Gallery Resources The Team Rules chat Login Register
Pages: [1]
Author Topic: Change Subaction Command  (Read 2524 times)
0 Members and 1 Guest are viewing this topic.
Large Leader
I'm shocked I'm allowed to still have this.
Angel Kitten
***
Offline Offline

Posts: 3036


  • Awards Active Contributor Diamond in the Rough Renowned Hacker Super Saiyan Topic

  • View Profile Awards
    « 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!
    Logged



    Quote from: Miacis
    In other words, LURK MORE.
    Quote from: LC-DDM
    In other news, birds fly, sun shines, fishes swim, and the sky is [censored]ing BLUE.
    Quote from: Miacis
    3. ... You seriously don't know who Clinton is?
    Quote from: Haseyo
    If only hacking Brawl paid bills.
    Quote from: Nanobuds
    O snap
    Quote from: DrPanda
    But you are in a Smash Bros. thread.
    You can't have an opinion here.

    otheusrex
    Expert Kitten
    ****
    Offline Offline

    Posts: 57

  • Awards Tutorial Writer

  • View Profile Awards
    « Reply #1 on: March 14, 2014, 02:01:34 AM »


    Nice post and nicely explained too!
    Logged

    Pages: [1]
    Print
    Jump to: