Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Djigital Aura
#11
I applaud you for the attempt. And I appreciate that the name for the switch is in keeping with the naming structure.

An easier way to look at the two methods would simply be:

Code:
#--------------------------------------------------------------------------
  # * Aura System Mode One : Single keypress that draws the aura for X frames
  #--------------------------------------------------------------------------
  def aura_mode_one
    # Disable the system if the switch isn't activated
    return if $game_switches[Aura::AURA_SWITCH] == true
    # Do test if key triggered
    aura_test if Input.trigger?(Aura::AURA_KEY)
    # Update timer
    aura_delay_update
  end
  #--------------------------------------------------------------------------
  # * Aura System Mode Two : Constatn keypress the shows aura until released
  #--------------------------------------------------------------------------
  def aura_mode_two
    # Disable the system if the switch isn't activated
    return if $game_switches[Aura::AURA_SWITCH] == true
    # Player cannot be moving
    return aura_cancel if $game_player.moving?
    # Obtain keypress as local variable (works better as set variable)
    test = aura_toggle_key
    # If the current aura_key state doesn't match the keypress, we toggled
    if @current != test
      # Turn on or off the effect based on the new toggle state
      (test == true) ? aura_test : aura_cancel
      # And reset the toggle aura key toggle state
      @current = test
    end
  end

By using the
Code:
return if  blah blah blah...
means that the method is never run if the switch is turned off. You won't be able to press the trigger or anything.

Oh, and the 'aura_cancel' method runs through all the events in the area over and over and over... which causes lag. I only use it when the effect is being turned off, so it is reduced. Your version would have it run constantly. Better to have the system disabled and exit than having it run the cancel method instead.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png] [Image: liM4ikn.png] [Image: fdzKgZA.png] [Image: sj0H81z.png]
[Image: QL7oRau.png] [Image: uSqjY09.png] [Image: GAA3qE9.png] [Image: 2Hmnx1G.png] [Image: BwtNdKw.png%5B]
Above are clickable links

Reply }


Messages In This Thread
Djigital Aura - by DerVVulfman - 09-23-2016, 05:08 AM
RE: Djigital Aura - by Djigit - 09-24-2016, 12:17 AM
RE: Djigital Aura - by DerVVulfman - 09-24-2016, 03:05 AM
RE: Djigital Aura - by DerVVulfman - 09-25-2016, 09:32 PM
RE: Djigital Aura - by RASHIDA12 - 09-26-2016, 04:00 AM
RE: Djigital Aura - by DerVVulfman - 09-26-2016, 04:24 AM
RE: Djigital Aura - by RASHIDA12 - 09-26-2016, 04:35 AM
RE: Djigital Aura - by DerVVulfman - 09-26-2016, 04:51 AM
RE: Djigital Aura - by RASHIDA12 - 09-26-2016, 02:14 PM
RE: Djigital Aura - by RASHIDA12 - 10-07-2016, 01:50 AM
RE: Djigital Aura - by DerVVulfman - 10-07-2016, 04:05 AM
RE: Djigital Aura - by RASHIDA12 - 10-07-2016, 12:50 PM
RE: Djigital Aura - by DerVVulfman - 10-08-2016, 03:56 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Victor Engine - State Aura Victor Sant 0 4,002 08-02-2012, 12:04 AM
Last Post: Victor Sant



Users browsing this thread: