[RESOLVED][XP] Press a buttom(other than the deafualt ones)

Started by cyclope, July 05, 2010, 12:20:53 pm

Previous topic - Next topic

cyclope

I am ussing Blizz abs and I need a small Add-on=
I need a script or a way to make events triggerd whene you press a buttom other than left, right, down, up, a, b, c, y, z, l, r. For example if i want to triigger an event with backspace or Ctrl-C.
Things I Hate

1. People who point at their wrist asking for the time... I know where my watch is pal, where the hell is yours? Do I point at my crotch when I ask where the toilet is?

2. People who are willing to get off their a** to search the entire room for the TV remote because they refuse to walk to the TV and change the channel manually.

3. When people say "Oh you just want to have your cake and eat it too". Damn Right! What good is cake if you can't eat it?

4. When people say "it's always the last place you look". Of course it is. Why the hell would you keep looking after you've found it? Do people do this? Who and where are they?

5. When people say while watching a film, "did ya see that?" No Loser, I paid $12 to come to the cinema and stare at the damn floor!

6. People who ask "Can I ask you a question?"... Didn't give me a choice there, did ya sunshine?

stripe103

If you use a conditional branch choose the Script and then type in
Input.trigger?(Input::Key['THEKEYYOUWANT'])

That should work.
Blizzards input module is allready in Blizz-ABS.

cyclope

But to have it activated when Ctrl and Letter C are pressed at the same time
Things I Hate

1. People who point at their wrist asking for the time... I know where my watch is pal, where the hell is yours? Do I point at my crotch when I ask where the toilet is?

2. People who are willing to get off their a** to search the entire room for the TV remote because they refuse to walk to the TV and change the channel manually.

3. When people say "Oh you just want to have your cake and eat it too". Damn Right! What good is cake if you can't eat it?

4. When people say "it's always the last place you look". Of course it is. Why the hell would you keep looking after you've found it? Do people do this? Who and where are they?

5. When people say while watching a film, "did ya see that?" No Loser, I paid $12 to come to the cinema and stare at the damn floor!

6. People who ask "Can I ask you a question?"... Didn't give me a choice there, did ya sunshine?

AresWarrior

under the conditional branch (if ctrl is pressed), make another conditional branch (if C is pressed)

cyclope

Quote from: AresWarrior on July 05, 2010, 06:03:59 pm
under the conditional branch (if ctrl is pressed), make another conditional branch (if C is pressed)

It didnt work :'( :wacko:
Things I Hate

1. People who point at their wrist asking for the time... I know where my watch is pal, where the hell is yours? Do I point at my crotch when I ask where the toilet is?

2. People who are willing to get off their a** to search the entire room for the TV remote because they refuse to walk to the TV and change the channel manually.

3. When people say "Oh you just want to have your cake and eat it too". Damn Right! What good is cake if you can't eat it?

4. When people say "it's always the last place you look". Of course it is. Why the hell would you keep looking after you've found it? Do people do this? Who and where are they?

5. When people say while watching a film, "did ya see that?" No Loser, I paid $12 to come to the cinema and stare at the damn floor!

6. People who ask "Can I ask you a question?"... Didn't give me a choice there, did ya sunshine?

stripe103

Try to make it like this then.

Edit: I just tried what AresWarrior suggested. It worked but I had to press them at the exact the same time not one after another. But if you want that to work you could have an event like this:
Event Commands: ShowHide
@>Conditional Branch: Script: Input.trigger?(Input::Key['Ctrl'])
  @>Control Switches: [0001: CTRL] = ON
  @>
: Branch End
@>Conditional Branch: Script: Input.trigger?(Input::Key['C'])
  @>Control Switches: [0002: C] = ON
  @>
: Branch End
@>Conditional Branch: Switch [0001: CTRL] == ON
  @>Conditional Branch: Switch [0002: C] == ON
     @>Text: You pressed the Control and the C key.
     @>Control Switches: [0001: CTRL] = OFF
     @>Control Switches: [0002: C] = OFF
     @>
   : Branch End
  @>
: Branch End
@>


ForeverZer0

I made a script for this a while back to make triggers for events, but never released it. I didn't think anybody would get any use from it. Let me see if I can find it/re-write it and I'll post it.  :<_<:

It would allow for any type of trigger, but without having to use parallel processes to always be checking for things. You just had to type a comment or two into the event's code.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

G_G

That'll be pretty helpful FZ! You should post it for everyone to use, I've tried creating my own custom event trigger script and it didn't work out so well.

winkio

having two input.trigger? will not work, as you have to press both buttons the same frame.  Having two input.press? will not work because it will repeat the action multiple times.  You need 1 input.trigger?, and all the rest input.press?, for any given button combination.  No need to mess around with switches or other stuff.

SBR*

@Winkio: For instance: You have to press the Z button and the A button. Your way, it would be this:

if Input.press?(Input::Z) && Input.trigger?(Input::A)
  $scene = Scene_Map.new #For instance
end


This would work fine if you first press the Z button, and then the A button. But if you first press the A button and then the Z button, it won't work. New code:

if (Input.press?(Input::Z) && Input.trigger?(Input::A)) || (Input.press?(Input::A) && Input.trigger?(Input::Z))
  $scene = Scene_Map.new #For instance
end


?

cyclope

Quote from: winkio on July 06, 2010, 10:48:00 pm
having two input.trigger? will not work, as you have to press both buttons the same frame.  Having two input.press? will not work because it will repeat the action multiple times.  You need 1 input.trigger?, and all the rest input.press?, for any given button combination.  No need to mess around with switches or other stuff.


It worked as i wanted it to :haha:
Things I Hate

1. People who point at their wrist asking for the time... I know where my watch is pal, where the hell is yours? Do I point at my crotch when I ask where the toilet is?

2. People who are willing to get off their a** to search the entire room for the TV remote because they refuse to walk to the TV and change the channel manually.

3. When people say "Oh you just want to have your cake and eat it too". Damn Right! What good is cake if you can't eat it?

4. When people say "it's always the last place you look". Of course it is. Why the hell would you keep looking after you've found it? Do people do this? Who and where are they?

5. When people say while watching a film, "did ya see that?" No Loser, I paid $12 to come to the cinema and stare at the damn floor!

6. People who ask "Can I ask you a question?"... Didn't give me a choice there, did ya sunshine?