mouse tracker

You must understand the Game Editor concepts, before post here.

mouse tracker

Postby sonicforvergame » Fri Jan 18, 2013 8:15 pm

if somebody ever played sonic battle you will totally understand this

Sonic battle use an rpg and 2D battle style game
for the RPG part there is a cursor that you can move freely and when you click (the cursor) sonic will move to the cursor position
But i want to say that sonic dosen't directly go to the cursor he walk to it and you can see him going to the cursor

I wanted to do this on GE but i ended up having sonic directly going to the cursor this is why i talked about how sonic move in sonic battle
ANYWAY i want to make sonic walk to the cursor And for making sonic walk to the cursor i don't really know what to do

I would like some advice and help :D
Kaizoku ni ore wa naru
User avatar
sonicforvergame
 
Posts: 422
Joined: Sat Sep 01, 2012 2:17 pm
Score: 10 Give a positive score

Re: mouse tracker

Postby skydereign » Fri Jan 18, 2013 8:19 pm

Easiest way is to use the function MoveTo. You can look it up here http://game-editor.com/docs/script_reference.htm as well as on the forums. You may need to set the animation of sonic to reflect the proper direction of movement though.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: mouse tracker

Postby sonicforvergame » Fri Jan 18, 2013 8:48 pm

oh no i am just going to use left and right animation
it may sound weird but i will give a demo soon
Kaizoku ni ore wa naru
User avatar
sonicforvergame
 
Posts: 422
Joined: Sat Sep 01, 2012 2:17 pm
Score: 10 Give a positive score

Re: mouse tracker

Postby Hblade » Fri Jan 18, 2013 10:26 pm

draw actor of the tracker:
Code: Select all
angle=direction(xscreen, yscreen, xmouse, ymouse);
xvelocity=distance(xscreen, yscreen, xmouse, ymouse)/2;
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest

cron