mouse controled car

Started by gollymrme, Mon 16/05/2011 16:27:11

Previous topic - Next topic

gollymrme

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.

Matti

You could manually script something like this and play around with the speed:

Code: ags

if (mouse.x > player.x) player.x++;
if (mouse.x < player.x) player.x--;
if (mouse.y ...
...

gollymrme

Cool! I'll try it out! Thank you very much for helping the green horn out! Ryan

SMF spam blocked by CleanTalk