Jump to content
Sign in to follow this  

quick question.

Recommended Posts


ok...i want to make a script that does multiple commands when a key is pressed. I want it so that if i press a key it will do this: Jump (space), attack (hold left click for the rest of the command), switch weapons (2), then it should still be holding the left click so it should shoot, then i want to switch back to weapon one (1). I think there is a way to make it so that if i press "t" it will do this but also walk forward and "g" to do the same then but walk backwards, "f" to go left and "h" to do it to the right. if that makes any sense at all...i am pretty good at scripting, but the If's are confusing me so basically i want it so that if t is pressed it will do: space, either hold a left click or do 1 now and one after pressing 2... Any help will be greatly appreciated! thanks in advance

Share this post

Link to post
Share on other sites

A script that will wait for a certain key to be pressed and then do something:

; do the work when X is pressed
; refer to help file for how to define a different key
hotkeySet("x", "doSomething")

; do nothing (and not exit)
while (1)

func doSomething()

; definition of what to do goes in here, e.g.
; press keys, mouse down, mouse up etc.


Good luck!

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
Sign in to follow this