Eventing a Battle System - fixing a key press issue

Discussion in 'RPG Maker VX Ace' started by lithkast, Jun 9, 2015.

  1. lithkast

    lithkast Quirky mini boss Veteran

    Messages:
    105
    Likes Received:
    48
    Location:
    Nebraska, USA
    First Language:
    english
    So I'm trying to see how much of an Action Battle System I can make without using any third party scripts.  Its more of a test for me to see how far I can get with just eventing, so that maybe in the future I wont have to use as many scripts.  So anyways, here is the problem I'm encountering.

    Yurei has a punch attack.  You press the A key and she punches.  This is how I have the common event set up currently.

    Event name: Punch Effect / Trigger: Parallel Process / Condition Switch: Fist@>Conditional Branch: The A Button is Being Pressed @>Control Switches: [0997:punch] = On #turns the event on the map on @>Control Variables: [0003:Character location X] = Player's Map X @>Control Variables: [0004:Character location Y] = Player's Map Y @>Conditional Branch: Player is Facing Down @>Control Variables: [0004:Character location Y] += 1 @>Set Event Location: [Punch], Variable [0003][0004] @>Set Move Route: player : :$>Stepping Animation ON @>Show Animation: [Punch], [Pierce Physical], Wait @>Set Move Route: Player : :$>Stepping Animation OFF @> : Branch End @>Conditional Branch: Player is Facing Left @>Control Variables: [0004:Character location X] -= 1 @>Set Event Location: [Punch], Variable [0003][0004] @>Set Move Route: player : :$>Stepping Animation ON @>Show Animation: [Punch], [Pierce Physical], Wait @>Set Move Route: Player : :$>Stepping Animation OFF @> : Branch End @>Conditional Branch: Player is Facing Right @>Control Variables: [0004:Character location X] += 1 @>Set Event Location: [Punch], Variable [0003][0004] @>Set Move Route: player : :$>Stepping Animation ON @>Show Animation: [Punch], [Pierce Physical], Wait @>Set Move Route: Player : :$>Stepping Animation OFF @> : Branch End @>Conditional Branch: Player is Facing Up @>Control Variables: [0004:Character location Y] -= 1 @>Set Event Location: [Punch], Variable [0003][0004] @>Set Move Route: player : :$>Stepping Animation ON @>Show Animation: [Punch], [Pierce Physical], Wait @>Set Move Route: Player : :$>Stepping Animation OFF @> : Branch End @>Control Switches: [0997:punch] = OFF @>: Branch end@> ok, to explain that common event up there.  When you hold A, the event gets the players X and Y position and stores them in variables.  It also turns on a switch that turns on an event on my map.  The event on the map activates when another event touches it (the enemies) and will do damage to said enemies.  

    Then the event checks the characters direction.  If facing down, it adds 1 to the Y coordinate, sets the event (punch, the damaging event) location to the coordinates, activates the stepping animation (to look like the character is punching), uses an animation, turns off the stepping animation, and wait 10 frames.

    The common event works fine, I just need help with one small detail.  I don't want the event to continually run if you hold the button.  I want it to run on button press.  So one punch per button press.  Can't figure out how to do that for the life of me so any help would be appreciative.  

    Thanks!
     
    #1
  2. Wavelength

    Wavelength Pre-Merge Boot Moderator

    Messages:
    4,521
    Likes Received:
    3,773
    Location:
    Florida, USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    Try changing the Conditional Branch from "Button Press" to "Script" and entering the following: Input.trigger?:)A)

    Not sure whether it will work with your event structure, but if I were to script such an input check, that's how I'd do it, so I think it will work and it's by far the simplest way if it does.
     
    #2
  3. lithkast

    lithkast Quirky mini boss Veteran

    Messages:
    105
    Likes Received:
    48
    Location:
    Nebraska, USA
    First Language:
    english
    That worked.  Thank you very much.  
     
    #3

Share This Page