Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Ra02

Define BT_USER1 - 4

Recommended Posts

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

Share this post


Link to post
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.

Share this post


Link to post

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?

Share this post


Link to post
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

Share this post


Link to post

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?

Share this post


Link to post

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

Share this post


Link to post

No, what Worst said will work for what you want. And there's pretty much no other way to do it.

Share this post


Link to post

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
×