Ra02 Posted April 20, 2011 How can I define these buttons? BT_USER1 through BT_USER4 also if I want to make a script where player needs to have 2 or more energy to activate something, how do I make that? like if (energy = 1) like that but except there wont be a = but what? Thanks 0 Share this post Link to post
Mithran Denizen Posted April 20, 2011 Ra02 said:I want to make a script where player needs to have 2 or more energy to activate something, how do I make that? like if (energy = 1) like that but except there wont be a = but what? First of all, a single '=' sign in ACS assigns a value to a variable, rather than checking for equality. You use '==' to do the latter. In any case, if you want to check whether a variable is greater or equal to 2, you'd use something like the following: if (energy >= 2)If you don't know what the '>=' means, or if you want to see info on similar operators, you should take a look at this page. Also, I can't answer your first question off the top of my head, sorry. 0 Share this post Link to post
Ra02 Posted April 20, 2011 Thanks, that's what I wanted to know. I knew that I have to put == instead of =. I was also wondering that it could be something like that but wasn't sure, also thanks for the page info. Now all I need to know is how to define BT_USER1 to 4 ... anyone? 0 Share this post Link to post
Worst Posted April 21, 2011 Ra02 said:Now all I need to know is how to define BT_USER1 to 4.. anyone? Make a KEYCONF lump with: addkeysection "My Keysection" MySampleKeysection addmenukey "User action 1" my_userbind1 addmenukey "User action 2" my_userbind2 addmenukey "User action 3" my_userbind3 addmenukey "User action 4" my_userbind4 alias my_userbind1 "+user1" alias my_userbind2 "+user2" alias my_userbind3 "+user3" alias my_userbind4 "+user4" defaultbind v my_userbind1 defaultbind b my_userbind2 defaultbind n my_userbind3 defaultbind m my_userbind4 0 Share this post Link to post
Ra02 Posted April 22, 2011 So if I understand correctly if I copy+paste this it will be " defaultbind v my_userbind1 defaultbind b my_userbind2 defaultbind n my_userbind3 defaultbind m my_userbind4" as BT_USER? I mean that defaultbind v my_userbind1 = key "v" BT_USER1 right? 0 Share this post Link to post
Worst Posted April 22, 2011 err yeah, the console commands: +user1, +user2 ,+user3 and +user4 are same as BT_USER1, BT_USER2, BT_USER3, and BT_USER4 in GetPlayerInput. you should probably read more about alias and defaultbind if you dont know what they do: http://zdoom.org/wiki/CCMDs:Customization 0 Share this post Link to post
Ra02 Posted April 22, 2011 too complicated for me :D I just wanted to have BT_USER1 set as Q, 2 as E, 3 as Z and 4 as G, maybe Ill stick to trial and error then lol, but thanks 0 Share this post Link to post
Gez Posted April 22, 2011 No, what Worst said will work for what you want. And there's pretty much no other way to do it. 0 Share this post Link to post