Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: renno on February 09, 2004, 06:30:29 PM

Title: Move character with arrows
Post by: renno on February 09, 2004, 06:30:29 PM
hello everyone.
how can i move my character with arrows instead of the mouse pointer?
Title: Re:Move character with arrows
Post by: Mnemonic on February 09, 2004, 09:36:20 PM
Well, it won't be easy, you'd have to check the

on "keypress" ...

event and send the actor to appripritae directions, like:

if(Keyboard.KeyCode==VK_RIGHT) actor.GoTo(actor.X + 50, actor.Y);
...

But since there's no event for key-release, you'd have to periodically check for the "keypress" events to know it the key is being hold down.
Title: Re:Move character with arrows
Post by: odnorf on February 13, 2004, 04:59:37 PM
Quote
But since there's no event for key-release

This sounds like a self-made feature reguest. ;)