Vlue

vmodt
Special Keybinds

19 posts in this topic

Special Keybinds v1.0

By V.M. of D.T.

 

Introduction

This neat little script allows you to bind almost any key on your keyboard to do one of three things in game. Toggle a switch, add a preset amount to a variable, or call a scene.

 

How to Use

Plug and play and customize as needed~

Details in the script

 

Script

Convenient little pastebin! Right... here. Not here.

 

FAQ

None atm.

 

Credit and Thanks

- By V.M. of D.T.

- Free to use in any non-commercial project

 

Author's Notes

The hardest part was writing out each constant equivalent for the keys x.x

Every key was not tested, post if a certain one doesn't work.

dbchest, Wren, Fallun and 1 other like this

Share this post


Link to post
Share on other sites

Vlue, I can see the use for development and testing... very nice.

What would be some uses for a player? (I honestly can't think of any right now, but if you have some ideas, posting them may draw more attention to this little snippet!) Just thinking out loud... ;)

Vlue likes this

Share this post


Link to post
Share on other sites

Increasing a variable by button press for mini games.

Switch toggling huds or similar game mechanics.

Using the switch toggle feature to activate common events. (My original goal for making this)

Keybinds for custom or original scenes. i.e. opening the menu with m, or a journal script with j

 

Plenty I think :3

Share this post


Link to post
Share on other sites

Hmm, I see everything your saying in my head... and its spawning new ideas. I see the value to the player as well as the developer now! Very nice! I'll start testing keys in the next day or two... i'll let you know if anything goes wonky.

Vlue likes this

Share this post


Link to post
Share on other sites

What are the terms for commercial?

 

Credit given. Don't use it to enslave the world. That's all.

Share this post


Link to post
Share on other sites

I have a question for you! I have a keybind set to activate a common event, and I can press the key during any scene (including message windows) and the event will run once the scene is closed. Also, if a key is pressed before the script call sets the keybind, the common event will be called as soon as the keybind is set. How can I fix these things?

Edited by AeghtyAteKees

Share this post


Link to post
Share on other sites

Whoo, that was a stumper. Pastebin has been updated, keybinds should only work on maps now. (It should've in the first place, man.. bleh)

As for the keybind being called immediately after being set, just declare it in the script before hand like...

:N5 = [:script, ""]

Nothing will happen when that button is pressed and when you set it, it won't immediately run.

Share this post


Link to post
Share on other sites

i'm trying to have it to where when you press the L button the player pulls out a lamp without having to go into the items menu, how would i do that?

Share this post


Link to post
Share on other sites

Make an autorun common event, and then set the L button to turn on the switch for that common event, and have that same common event turn the switch off when it's done so it doesn't repeat itself.

Share this post


Link to post
Share on other sites

This one is really cool!

 

How did I miss this script, I slink around the completed script forum probably 85% of the time I'm on here now, hah!

 

Thanks for this one Vlue!

Vlue likes this

Share this post


Link to post
Share on other sites

I'm probably asking stupid questions, but this is my very first experiment involving scripting.

Does this script override standard keybinds from the game?

I find the game's controls confusing for new people, and they aren't automatically set a certain way when you export a game. It makes it hard to put instruction into the game of what each button does, when it resets for every person that downloads it. I hope that's understandable? I'm not great with words.

 

I understand how to use the script to bind keys; I bound a key to activate a switch, and it's all working as intended. But I've been looking through the standard scripts of the game, and I can't find the standard controls. I suppose I just don't recognise it.

Could you help me out? I'm sorry if I'm not very clear, I don't know how to phrase it.

Share this post


Link to post
Share on other sites

It doesn't override the standard keybinds. They are handled through the Input module. This is just in addition.

Share this post


Link to post
Share on other sites

Hey Vlue sorry for asking this annoying question but i was just wondering if this script is for non commercial only? :o It says you can use for both commercial and non commercial on header

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.