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.
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.
But to have it activated when Ctrl and Letter C are pressed at the same time
under the conditional branch (if ctrl is pressed), make another conditional branch (if C is pressed)
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:
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:
@>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
@>
Just set them to Input.press? ?
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.
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.
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.
@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
?
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: