LOGIN
SEARCH
PROFILE
keys: ↑ ↓
LOGOUT
INDEX
MEMBERS
keys: ↑ ↓
HOME
PORTAL
PLAY ALONG
PLAY with WORDS
PLAY with GRAPHICS
PLAY with SOUNDS
PLAY with CODES
PLAY with PROJECTS
keys: ← →
Guest Access
Register:
Members:



View previous topic View next topic Go down Message [Page 1 of 1]

Administrator
Administrator
#1 default RMXP = Switches by the Button
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
just like the one before it
[You must be registered and logged in to see this link.]

I whipped up a new script, one that you can control whatever switch you want with whatever button you choose.

Switches by the Button v1.0
(this was edited for XAS as you will see in the demo attached)

Code:
#==============================================================================
# * Switches by the Button v1.0 G@MeF@Ce 7/30/2011 edited for XAS multiple HUDs
#==============================================================================

module G101_ts
  #the buttons used for toggling switches
  TOGGLER1 = Input::C #action
  TOGGLER2 = Input::A #defend
  TOGGLER3 = Input::X #dash
  TOGGLER4 = Input::Y #item
  TOGGLER5 = Input::Z #skill
 
  #the switches to be used for toggling
  HUD_1 = 5 #xas standard
  HUD_1A = 4 #xas active
  HUD_2 = 10 #mog I hud
  HUD_3 = 15 #mog cas hud
  HUD_4 = 20 #mog zelda hud
  HUD_5 = 24 #party hud
  HUD_6 = 30 #s hud
  end

#==============================================================================
class Scene_Map

  include G101_ts
 
  #--------------------------------------------------------------------------
  # * initialize
  #--------------------------------------------------------------------------
  alias hud_set initialize 
 
    def initialize
        hud_set
     
        $game_switches[HUD_1] = false
        $game_switches[HUD_1A] =false
        $game_switches[HUD_2] = true
        $game_switches[HUD_3] = true
        $game_switches[HUD_4] = true
        $game_switches[HUD_5] = false
        $game_switches[HUD_6] = true
        return
       
      end

  #--------------------------------------------------------------------------
  # * update
  #--------------------------------------------------------------------------
  alias hud_check update
   
    def update
        hud_check


    if Input.trigger?(TOGGLER1)#action
      cycle_1
      return
    end
   
    if Input.trigger?(TOGGLER2)#defend 
      cycle_2
      return
    end
   
    if Input.press?(TOGGLER3)#dash 
      cycle_3
      return
    end
 
    if Input.press?(TOGGLER4) 
      cycle_4
      return
    end
   
    if Input.press?(TOGGLER5) 
      cycle_5
      return
    end
     
        $game_player.refresh
    end #def

   
    def cycle_1 #action
        $game_switches[HUD_1] = false
        $game_switches[HUD_1A] = false
        $game_switches[HUD_2] = true
        $game_switches[HUD_3] = true
        $game_switches[HUD_4] = true
        $game_switches[HUD_5] = false
        $game_switches[HUD_6] = true
      end

     
    def cycle_2 #defend
        $game_switches[HUD_1] = true
        $game_switches[HUD_1A] = true
        $game_switches[HUD_2] = true
        $game_switches[HUD_3] = false
        $game_switches[HUD_4] = true
        $game_switches[HUD_5] = true
        $game_switches[HUD_6] = true
      end


    def cycle_3 #dash
        $game_switches[HUD_1] = true
        $game_switches[HUD_1A] = true
        $game_switches[HUD_2] = true
        $game_switches[HUD_3] = true
        $game_switches[HUD_4] = true
        $game_switches[HUD_5] = true
        $game_switches[HUD_6] = false
      end


    def cycle_4 #item
        $game_switches[HUD_1] = true
        $game_switches[HUD_1A] = true
        $game_switches[HUD_2] = true
        $game_switches[HUD_3] = true
        $game_switches[HUD_4] = false
        $game_switches[HUD_5] = true
        $game_switches[HUD_6] = true
      end
     
      def cycle_5 #skill
        $game_switches[HUD_1] = true
        $game_switches[HUD_1A] = true
        $game_switches[HUD_2] = false
        $game_switches[HUD_3] = true
        $game_switches[HUD_4] = true
        $game_switches[HUD_5] = true
        $game_switches[HUD_6] = true
      end

  end #class

*this edit was just an example on how you can toggle multiple HUDS by controlling so many switches with just a press of a button.

check out the demo
(click on the face)


[You must be registered and logged in to see this link.]

*I could image a game having a special HUD for attacking, dashing, using a skill/item ~ etc!
Administrator
Show Signature


Hey Guest, check out my demos!
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]




G101's theme colors
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this link.]

[You must be registered and logged in to see this image.]


shhh.... [You must be registered and logged in to see this link.]



[You must be registered and logged in to see this link.]
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
C.O.R.N.
C.O.R.N.
#2 default Re: RMXP = Switches by the Button
Loading

BluE

BluE
C.O.R.N.
C.O.R.N.
C.O.R.N.
profile
very cool G@MeF@Ce!
Only this is, I don't know what HUD I'm currently on :p or what it's meant to be displaying
So one HUD for health, one for spells?
C.O.R.N.
Show Signature


Want a real challenge? Try [You must be registered and logged in to see this link.]

If you read this message, please PM me. this is a test. And I'm serious, this isnt just some lousy time wasting paragraph that I wrote just to fill in my signature. It's here for a reason. PM ME.
C.O.R.N.
http://51s-seedy-masteroogway.blogspot.com
Administrator
Administrator
#3 default Re: RMXP = Switches by the Button
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
in the demo I used all of Moghunter's latest HUDs

a different HUD displays when pressing one of the buttons. Imagine a defender HUD displayed when blocking, showing what shield, armor, and how long the equipment is good for, what defensive power the hero has etc... and same for attack, what weapon, the weapon's name, power, how long it is good for or if it is in need of repairs etc...


Not only HUDs, but I was also thinking about using this script to make a boxing game, I could use this with the animation by the buttons script and mock up an RMXP punchout ^,^

*yea I'm abnormal, I use an RPG maker to make games that are not always RPG.
Administrator
Show Signature


Hey Guest, check out my demos!
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]




G101's theme colors
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this link.]

[You must be registered and logged in to see this image.]


shhh.... [You must be registered and logged in to see this link.]



[You must be registered and logged in to see this link.]
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
C.O.R.N.
C.O.R.N.
#4 default Re: RMXP = Switches by the Button
Loading

BluE

BluE
C.O.R.N.
C.O.R.N.
C.O.R.N.
profile
Ah I see. So you have "sub-HUD"s for specific things
C.O.R.N.
Show Signature


Want a real challenge? Try [You must be registered and logged in to see this link.]

If you read this message, please PM me. this is a test. And I'm serious, this isnt just some lousy time wasting paragraph that I wrote just to fill in my signature. It's here for a reason. PM ME.
C.O.R.N.
http://51s-seedy-masteroogway.blogspot.com

Sponsored content

profile

View previous topic View next topic Back to top Message [Page 1 of 1]

 

Chatbox system disabled
Personal messaging disabled