Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: gollymrme on Mon 16/05/2011 16:27:11

Title: mouse controled car
Post by: gollymrme on Mon 16/05/2011 16:27:11
In the game I’m working on I want the character to get into a car and change the graphics to them inside the car and have it move with the mouse movements. Dodging things and so forth. Is there a way to do that? Follow the mouse without having to click to move it? Thanks if you can help! AGS green horn, Ryan.
Title: Re: mouse controled car
Post by: Matti on Mon 16/05/2011 17:25:36
You could manually script something like this and play around with the speed:


if (mouse.x > player.x) player.x++;
if (mouse.x < player.x) player.x--;
if (mouse.y ...
...
Title: Re: mouse controled car
Post by: gollymrme on Thu 19/05/2011 17:52:30
Cool! I'll try it out! Thank you very much for helping the green horn out! Ryan