Move my character left or right, but randomly

Ask gaming related questions
Jasminelee123
Posts: 3
Joined: 18 Mar 2018, 11:17

Move my character left or right, but randomly

18 Mar 2018, 11:26

Code: [Select all] [Download] (Untitled.ahk)GeSHi © Codebox Plus

SendMode Play
s::
Loop, 100
{
Send, {a down}
}


so, I have this right now, and it makes my character move to the left.
BUT, what I want, is for it to move to the left or right, but randomly.
How do I do this;-;
note: just pressing the button quickly won't move the character, so that is why the a is being held down
User avatar
Nwb
Posts: 444
Joined: 29 Nov 2016, 08:56

Re: Move my character left or right, but randomly

18 Mar 2018, 11:53

Does this work as wanted?

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

I am your average ahk newbie. Just.. a tat more cute. ;)
Jasminelee123
Posts: 3
Joined: 18 Mar 2018, 11:17

Re: Move my character left or right, but randomly

18 Mar 2018, 12:31

its closer, but not exactly what i need
when i press s, (the hotkey), itll just switch directions
and it doesnt always work, so i THINK what you gave me was, it has a chance to switch directions if i press s
User avatar
Nwb
Posts: 444
Joined: 29 Nov 2016, 08:56

Re: Move my character left or right, but randomly

18 Mar 2018, 12:48

Jasminelee123 wrote:its closer, but not exactly what i need
when i press s, (the hotkey), itll just switch directions
and it doesnt always work, so i THINK what you gave me was, it has a chance to switch directions if i press s

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

I am your average ahk newbie. Just.. a tat more cute. ;)
Jasminelee123
Posts: 3
Joined: 18 Mar 2018, 11:17

Re: Move my character left or right, but randomly

18 Mar 2018, 12:57

now the character is only moving right. ;-;
User avatar
Nwb
Posts: 444
Joined: 29 Nov 2016, 08:56

Re: Move my character left or right, but randomly

19 Mar 2018, 02:44

Jasminelee123 wrote:now the character is only moving right. ;-;



What about now?

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

I am your average ahk newbie. Just.. a tat more cute. ;)

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 9 guests