DRD Team
drdteam.org forum


* FAQ    * Search  * Register
 * Login 

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Binding key to script
PostPosted: Sun Apr 08, 2007 9:53 

Joined: Sun Sep 04, 2005 8:41
Posts: 25
How can you bind a key to a script in GZDoom? I'm assuming there is a command in ACS that allows you to do it?

Im making a mod for Legacy, which I'm having to use runcommand (ergh!) in FraggleScript but I also want it to work in GZDoom as well.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 08, 2007 17:54 
Member, DRD Team

User avatar
DRD Team Admin (Inactive)

Joined: Wed Jun 29, 2005 22:00
Posts: 2146
Location: the Admincave!
To bind a key to a script, just make make an alias.

First, take note of what number your script is. You'll need that later.

Create a KEYCONF lump in your wad file. Add the following:
Code:
alias planky_script "puke ###"
defaultbind o plankyscript

Substitute the ### with whatever your script number is, and change o to whatever key you need it to be. To top it off, make sure the key is listed in the control config screen by doing this in your KEYCONF lump:
Code:
addkeysection "planky's mod" plankykeys
addmenukey "planky's script" plankscript

Then it'll appear at the bottom of the keyboard controls menu.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 08, 2007 23:44 

Joined: Sun Sep 04, 2005 8:41
Posts: 25
Thanks - I'm assuming using this won't affect the players permanent configuration (I know the method Im using in Legacy does :()?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 08, 2007 23:53 
User avatar
Hosted

Joined: Wed Jul 20, 2005 9:48
Posts: 5130
Location: Germany
No. (G)ZDoom saves all WAD specific key bindings in a dedicated section (that's why you have to use addkeysection.)
However, if something else is already bound to the key you choose as a default the binding won't take effect and has to be set manually. This is to avoid overwriting a user's own settings for standard stuff.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 07, 2008 7:01 
FAAAAAAAAIL WITH STYLE

User avatar

Joined: Sun Dec 30, 2007 15:44
Posts: 117
Location: Where ?
And is there anything for doublebindings via KEYCONF ?

_________________
Jack the Ripper, Charles Manson and Adolf Hitler all drank water. You criminal scum !


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
DRDTeam Classic Color 2100 Style by Tormentor667