Author Topic: [XP][VX][VXA] Timed User Input - Lite Version  (Read 5713 times)

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 775
  • LV: 33
    • View Profile
[XP][VX][VXA] Timed User Input - Lite Version
« on: November 10, 2012, 04:40:14 PM »
Timed User Input - Lite Version
Authors: Diagostimo, Heretic
Version: 1.0
Type: Simulated User Input
Key Term: Misc System

Introduction

This Script is intended to allow you to Simulate User Input in ANY Scene at ANY time by entering a series of simple script commands.

Features

  • Simulate User Input at specific times
  • Very easy to use
  • Highly Compatible
  • I like shiny things

Screenshots

No Screenshots.

It isnt possible to take a Screenshot of simulating User Input.

Demo

This Demo contains a FULL VERSION of the script with expandad functionality.

http://www.775.net/~heretic/downloads/rmxp/AnimatedTitleScreen/index.php

Script

This is the LITE VERSION of the User Input Script.  It does NOT contain the expanded functionality provided by the FULL VERSION, but will be more compatible.

Place above Main.
(click to show/hide)

Instructions

How to use:

timed_input(wait=n, key)

Wait is Wait Time in Frames before simulating the key as the Button pressed.

Key is a CAPITAL LETTER of the corresponding Input Key or WORD.  That means you dont need to put in Input::DOWN, you can just put in the word DOWN in all capital letters.

See Script and Demo for examples.

Compatibility

I believe this will be nearly 100% compatible with other Scripts, including other Input Scripts!  If there are any compatability issues, please let me know and I'll do my best to correct them.

Credits and Thanks

  • Diagostimo for providing the original code that was expanded on.
  • I'd like to thank the Academy...

Author's Notes

My goal with this script is to reach as close to a 100% compatability rating as I can get.

NOTE:  There are TWO VERSIONS of this Script.  This is the LITE VERSION.  Both versions are very similar, but for sake of compatability, a LITE VERSION was born.  Some of the features in the Full Version may not be needed at all, but they may also lower the compatability.

The Lite Version is compatible with RMXP, RMVX, and RMVXA.

Update: Minor update to fix compatability with VX and Ace.  Verified as compatible in all versions.
--------------------------------------------------------------------------------
« Last Edit: November 13, 2012, 03:54:55 AM by Heretic86 »
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline LiTTleDRAgo

  • Astral Trancist
  • *****
  • Posts: 851
  • LV: 517
  • Gender: Male
    • View Profile
    • ~
Re: [XP][VX][VXA] Timed User Input - Lite Version
« Reply #1 on: November 11, 2012, 05:31:09 AM »
NOT compatible with VX and VX-Ace

(click to show/hide)

now you can call that compatible with VX and VX-Ace
« Last Edit: November 13, 2012, 04:23:37 AM by LiTTleDRAgo »

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: [XP][VX][VXA] Timed User Input - Lite Version
« Reply #2 on: November 11, 2012, 05:46:40 AM »
There may be no need to use eval.
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 LiTTleDRAgo

  • Astral Trancist
  • *****
  • Posts: 851
  • LV: 517
  • Gender: Male
    • View Profile
    • ~
Re: [XP][VX][VXA] Timed User Input - Lite Version
« Reply #3 on: November 11, 2012, 06:32:16 AM »
is it bad to use eval?

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: [XP][VX][VXA] Timed User Input - Lite Version
« Reply #4 on: November 11, 2012, 01:25:46 PM »
It really depends. eval can be a good way to make a program interactive with the user or if complex code can be generated on the fly, but these systematic approaches are usually very rarely needed. e.g. I have a Ruby prompt in RMX-OS on the server which is a fairly good use of eval. I also use eval for decoding of data, e.g. I get 1,2,3,4,5, then I add [ and ] and run eval on that. It may not be the safest way for the client/server to interpret data, but it makes things a lot easier. In other cases eval should be avoided, especially in code declaration such as methods and classes.
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 Heretic86

  • Astral Trancist
  • *****
  • Posts: 775
  • LV: 33
    • View Profile
Re: [XP][VX][VXA] Timed User Input - Lite Version
« Reply #5 on: November 12, 2012, 11:44:11 AM »
I was not aware that the classes had been renamed in later versions of RPG Maker.  I do recall seeing something in a script somewhere that $DEBUG is also different in VX and Ace.  Is there a better / safer (non eval) way to detect RPG Maker Version (IE: XP, VX, Ace) and process accordingly?

While Im at it, I just tested out the full version with BlizzABS in Sir Lags-A-Lot, and it seems to work just fine.  How would I put in a command entry for a Keypress in Blizz?  The Constants of UP and DOWN seem to work, just not sure how to do grab keys for BlizzABS.  As far as I can tell, this could also be used as a BlizzABS Plugin as well!
« Last Edit: November 12, 2012, 12:22:02 PM by Heretic86 »
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline LiTTleDRAgo

  • Astral Trancist
  • *****
  • Posts: 851
  • LV: 517
  • Gender: Male
    • View Profile
    • ~
Re: [XP][VX][VXA] Timed User Input - Lite Version
« Reply #6 on: November 12, 2012, 04:07:20 PM »
you don't have to think too hard
(click to show/hide)

ah, by the way this is kinda off topic but this script does similar things with FTS - Key Simulator
(except the timer and the keyboard button)
« Last Edit: November 13, 2012, 04:23:16 AM by LiTTleDRAgo »

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 775
  • LV: 33
    • View Profile
Re: [XP][VX][VXA] Timed User Input - Lite Version
« Reply #7 on: November 13, 2012, 02:39:59 AM »
What I meant to ask is are there any Global Variables or Methods or some other such thing that we can use to check for XP / VX and / or Versions?  

For example RPG::Game_Version returning ["XP","1.07a"] or  ["VX","1.13f"] or something to that effect?

Not that your method doesnt work, it works just fine, I'm just wondering if there was anything already built into the engine...

(click to show/hide)

(Sorry for the delay, I've felt like crap for the last couple days.)
« Last Edit: November 13, 2012, 03:56:00 AM by Heretic86 »
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline LiTTleDRAgo

  • Astral Trancist
  • *****
  • Posts: 851
  • LV: 517
  • Gender: Male
    • View Profile
    • ~
Re: [XP][VX][VXA] Timed User Input - Lite Version
« Reply #8 on: November 13, 2012, 04:34:20 AM »
What I meant to ask is are there any Global Variables or Methods or some other such thing that we can use to check for XP / VX and / or Versions? 

For example RPG::Game_Version returning ["XP","1.07a"] or  ["VX","1.13f"] or something to that effect?

Not that your method doesnt work, it works just fine, I'm just wondering if there was anything already built into the engine...

さあ~ I didn't know about that but as far as I know there aren't

(click to show/hide)

(Sorry for the delay, I've felt like crap for the last couple days.)

there are high possibility some scripter using Game_Interpreter to make his script compatible with XP / VX
it's too risky if you use defined?(Game_Interpreter) and much safer if you use something that most scripter don't aware of it

(click to show/hide)