Author Topic: [MV] More keys to Conditions  (Read 176 times)

Offline Crixus

  • Total Beginner
  • Posts: 8
  • LV: 1
  • Gender: Male
  • Rm2k Forever!
    • View Profile
    • Museum Rpg maker
[MV] More keys to Conditions
« on: April 09, 2019, 03:10:53 AM »
Keys Module
Authors: Crixus/RpgBoss
Version: 0.1
Type: Tool
Key Term: Scripting Tool

Introduction

There are three types of events for conditions with keyboard buttons.

Features

  • js_keyDown: When you press the key, if holding the command will not repeat, it will only happen once
  • js_keyPress: For key pressed, this works for all letters, digits and calc keys, but does not work on others because they are for the exclusive use of the Rpg Maker System
  • js_keyUp: This works after using the KeyDown, you do not need to create a KeyDown condition, just hold the key for a short time and release

Screenshots



Video - How to use:
https://www.youtube.com/watch?v=-IMNR-BI7Uw

Video - First tests:
https://www.youtube.com/watch?v=XHRxAhbvfjQ

Demo
NONE


Script

(click to show/hide)

Instructions
In the event command "Script" you must put the Global variable of your preference.

Here is an example of creating a keydown that will have a only action when pressed but may have another action when released.
Due to the "timer" the action will only occur if it is held for 0.4 seconds (40% of 1 second):
Quote
<>IF: Script : js_keyDown == "KeyJ"
   <>//Comment: Only Action
   <>
:END
<>IF: Script : js_keyUp == "KeyJ"
   <>//Comment: After Only Action - Optional
   <>
:END
<>

This is the best way to use a pressed key that loads some value or animation:
Quote
<>IF: Script : js_keyPress == "KeyH"
   <>//Comment: Charging Power
   <>
:END
<>

An example of Skill in map (ABS):
Quote
<>IF: Script : js_keyPress == "KeyH"
   <>Animation: ki-charging, Wait
   <>Op Variable: [xxxx:Kamehame-ha!] += 1
   <>
:Else
   <>IF: Variable[xxxx:Kamahame-ha!] >= 5
      <>Animation: Kamename-HA!!!!, Wait
      <>Op Variable: [xxxx:Kamehame-ha!] == 0
   :End
   <>
:End
<>
In GITHub you have the menu for tests of keyboad:
https://github.com/BossRpg/keys_module

Compatibility

None so far.

Credits and Thanks


Author's Notes

The system itself does not work perfectly with the standard Rpg Maker directional keys.
For more support:
« Last Edit: April 16, 2019, 10:36:26 AM by Blizzard »

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20015
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: MV - Plugin - More keys to Conditions
« Reply #1 on: April 12, 2019, 02:09:02 PM »
Please use this template so your script can appear properly in the Script Database.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Crixus

  • Total Beginner
  • Posts: 8
  • LV: 1
  • Gender: Male
  • Rm2k Forever!
    • View Profile
    • Museum Rpg maker
Re: MV - Plugin - More keys to Conditions
« Reply #2 on: April 12, 2019, 11:34:15 PM »
It was my mistake.
See if you agree with the model.

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20015
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [MV] More keys to Conditions
« Reply #3 on: April 16, 2019, 10:40:59 AM »
Just had to change the topic title and remove a key term (only one key term is supported) and now it works fine. :)
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Crixus

  • Total Beginner
  • Posts: 8
  • LV: 1
  • Gender: Male
  • Rm2k Forever!
    • View Profile
    • Museum Rpg maker
Re: [MV] More keys to Conditions
« Reply #4 on: April 16, 2019, 05:17:19 PM »
Thank you.