Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: PrimitiveUser on Sun 07/12/2008 02:32:38

Title: Arrow Keys in AGS
Post by: PrimitiveUser on Sun 07/12/2008 02:32:38
How do I disable the player to use Arrow Keys to walk.., its really pissing me off when I hold down any Arrow Key and then the views of the player are like that speedy guy in marvel heroes, is there anyway to disable it?
Give me Steps like 1. 2. 3. 4. 5. Thanks for the help.....
Title: Re: Arrow Keys in AGS
Post by: Trent R on Sun 07/12/2008 02:35:02
Walking with the Arrow Keys is from the module that's included in the Default Template. Just delete that script from your game and also the related line from game_start.

~Trent
Title: Re: Arrow Keys in AGS
Post by: PrimitiveUser on Sun 07/12/2008 16:34:02
You were of no help to me, you put the worst reply, anyone else got an idea, with steps like i PROPOSED.
Title: Re: Arrow Keys in AGS
Post by: Gilbert on Sun 07/12/2008 16:51:41
I don't see any problems with Trent's reply. If you don't understand something, just ask, and more specifically.

If you are using V3.* of AGS, just right click the Keyboard_Movement_whatever.asc on the script section on the right and choose Delete. Then, double click GlobalScript.asc and find the game_start function (you may find it using the drop down menu on top of the script) and remove the line KeyboardMovement.SetMode(something); and you are all done. This is just what Trent mentioned in more details.
Title: Re: Arrow Keys in AGS
Post by: Stupot on Sun 07/12/2008 23:49:41
Quote from: primitiveuser on Sun 07/12/2008 16:34:02
You were of no help to me, you put the worst reply, anyone else got an idea, with steps like i PROPOSED.

Ouch... Poor Trent  :'(
Title: Re: Arrow Keys in AGS
Post by: Trent R on Mon 08/12/2008 01:48:19
:'( I'm gonna go slit my wrists now :(


~Trent
Title: Re: Arrow Keys in AGS
Post by: suicidal pencil on Mon 08/12/2008 02:24:35
Quote from: Trent R on Mon 08/12/2008 01:48:19
:'( I'm gonna go slit my wrists now :(


~Trent

Now now, no need for that. Just think of the mess the janitor will have to clean...

But, if you want to make it so that the arrow keys do not move the player, follow these super simple, yet sarcastically pedantic steps.

1) Open the script that will contain the relevant information (possibly GlobalScript.asc)
2) look for these numbers: 372, 375, 377, 380
3) replace them with these numbers: 371, 373, 376, 381
4) Get some coffee
5) Fall into a pit of arrogance, and smartly remark to this set of instructions not working.
6) Hit alt-F4 to send a virus to my computer
7) Get more Coffee
8.) Throw your router through a window, and smash it to bits with your computer.
9) Congrats! problem solved.

Basically, instead of having the arrow keys move the player, completely different keys will make him move (I believe they are Pg.Up, Pg.Down, End, and Home.
Title: Re: Arrow Keys in AGS
Post by: Stupot on Mon 08/12/2008 03:12:32
As a player of AGS games I pretty much never even think about using the arrow keys unless otherwise instructed.  So it probably wouldn't do any harm to leave it as it is.
Title: Re: Arrow Keys in AGS
Post by: Trent R on Mon 08/12/2008 04:09:21
Quote from: suicidal pencil on Mon 08/12/2008 02:24:35
Now now, no need for that. Just think of the mess the janitor will have to clean...
But Roger Wilco can do anything! He even has a golden mop!

I was gonna take some screen captures, riddled with sarcastic comments, and post them here. But I decided not to because Gilbet, suicidal pencil, and myself are all right.

And Stupot's right too. Most Adventure games don't use or require the arrow keys so it's not really something you think about (parser games excluded from that). It's just an extra convenience which is why it's included with the Default Template.

~Trent (http://www.youtube.com/watch?v=2udJdWVa1Fw&feature=related)
Title: Re: Arrow Keys in AGS
Post by: PrimitiveUser on Mon 08/12/2008 17:44:03
Quote from: Gilbet V7000a on Sun 07/12/2008 16:51:41
I don't see any problems with Trent's reply. If you don't understand something, just ask, and more specifically.

If you are using V3.* of AGS, just right click the Keyboard_Movement_whatever.asc on the script section on the right and choose Delete. Then, double click GlobalScript.asc and find the game_start function (you may find it using the drop down menu on top of the script) and remove the line KeyboardMovement.SetMode(something); and you are all done. This is just what Trent mentioned in more details.

Thanks alot Gilbet, Your information helped me correctly, you indeed have the adventure game studio in *You*!
Congratz, I would give you something nice but I don't have anything nice, I'll give you a hug, but im not G**, Thanks.
Title: Re: Arrow Keys in AGS
Post by: Akatosh on Mon 08/12/2008 18:02:22
... now that's what I call mood swings.
Title: Re: Arrow Keys in AGS
Post by: Dualnames on Mon 08/12/2008 22:16:01
Almost my reply there Akatosh..