git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6177 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Bukz
2011-03-31 19:27:44 +00:00
parent ca7867aa1f
commit 498d96e200
3 changed files with 48 additions and 3 deletions
+11 -2
View File
@@ -184,6 +184,14 @@ docident [bind] [Binds a key to a command.];
docargument [K] [the key to bind] [string] [0];
docargument [A] [the command] [string, usually an alias] [0];
docremark [To find out what key names and their default bindings are, look at config/keymap.cfg, then add bind commands to your autoexec.cfg.];
docident [megabind] [Binds a key to many different actions depending on the current game state.];
docargument [K] [the key to bind];
docargument [D] [body of code to execute if watching a demo];
docargument [E] [body of code to execute if editing or in coop-edit mode];
docargument [C] [body of code to execute if connected to a server];
docargument [B] [body of code to execute if in a bot mode];
docargument [O] [body of code to execute if none of the other arguments have been met];
docremark [This command requires 6 arguments, no more no less. Use an empty set of brackets [] for any of the arguments that you want to "do nothing".];
docident [browsefiledesc] [Toggles getting descriptive text from CGZ or DMO files in menudirlist.];
docargument [B] [] [min 0/max 1/default 1];
docident [changeteam] [Swaps your player to the enemy team.];
@@ -1561,8 +1569,9 @@ docident [showmapbackdrop] [change wether to have a see-through map overview (0)
docargument [B] [backdrop-style] [min 0/max 2/default 0];
docident [showmapbackdroptransparency] [];
docargument [T] [transparency] [min 0/max 100/default 75];
docident [soundmuted] [TODO: Description];
docargument [A] [TODO] [] [0];
docident [soundmuted] [Returns 1 if sound A is muted, else 0.];
docargument [A] [sound ID] [See /config/sounds.cfg for valid sound ID's.] [0];
docexample [mutesound 5; if (soundmuted 5) [echo Sound 5 is muted!] [echo Sound 5 is not muted!]] [Output: Sound 5 is muted!];
docident [testvel] [TODO];
docargument [N] [TODO] [min 0/max 1/default 0];
docident [texreduce] [-1: 2x2 : 0 : 1: x0.5 : 2: x0.25 : 3: x0.125];
+7
View File
@@ -264,6 +264,13 @@ pasteent = [
]
]
// megabind - Binds a key to many different actions depending on the current game state.
megabind = [
if (= $numargs 6) [
bind $arg1 (format "if (watchingdemo) [%1] [if (|| $editing (= $gamemode 1)) [%2] [if $connected [%3] [if (curmodeattr bot) [%4] [%5]]]]" $arg2 $arg3 $arg4 $arg5 $arg6)
] []
]
// Simple claim-admin script for one single-server.
// Fill in the 3 aliases below, and uncomment the below line to activate.
// bind F3 "customclaimadminscript"
+30 -1
View File
@@ -797,7 +797,35 @@
<argument token="K" description="the key to bind" valueNotes="string"/>
<argument token="A" description="the command" valueNotes="string, usually an alias"/>
</arguments>
<references>
<identifierReference identifier="megabind"/>
<identifierReference identifier="onrelease"/>
</references>
</command>
<command name="megabind">
<description>Binds a key to many different actions depending on the current game state.</description>
<examples>
<example>
<code><![CDATA[megabind F9 [echo Demo!] [echo Editing or coop!] [echo Connected!] [echo Bots!] [echo Other!]]]></code>
</example>
</examples>
<arguments>
<argument token="K" description="the key to bind" valueNotes="string"/>
<argument token="D" description="body of code to execute if watching a demo" valueNotes="a body of code"/>
<argument token="E" description="body of code to execute if editing or in coop-edit mode" valueNotes="a body of code"/>
<argument token="C" description="body of code to execute if connected to a server" valueNotes="a body of code"/>
<argument token="B" description="body of code to execute if in a bot mode" valueNotes="a body of code"/>
<argument token="O" description="body of code to execute if none of the other arguments have been met" valueNotes="a body of code"/>
</arguments>
<remarks>
<remark>This command requires 6 arguments, no more no less. Use an empty set of brackets [] for any of the arguments that you want to "do nothing".</remark>
</remarks>
<references>
<identifierReference identifier="bind"/>
<identifierReference identifier="onrelease"/>
</references>
</command>
<command name="onrelease">
<description>Executes a command on the release of a key/button.</description>
@@ -811,6 +839,7 @@
</examples>
<references>
<identifierReference identifier="bind"/>
<identifierReference identifier="megabind"/>
</references>
<arguments>
<argument token="A" description="the command"/>
@@ -4186,7 +4215,7 @@ Output:
</example>
</examples>
<arguments>
<argument token="A" description="sound id" valueNotes="See /config/sounds.cfg for valid sound id's."/>
<argument token="A" description="sound ID" valueNotes="See /config/sounds.cfg for valid sound ID's."/>
</arguments>
<references>
<identifierReference identifier="mutesound"/>