Im makin a new game and i need a code for moving a little picture of a person around on a map by clickin on the new location.
any ideas?
Printable View
Im makin a new game and i need a code for moving a little picture of a person around on a map by clickin on the new location.
any ideas?
You might want to be a little more specific. Here's some info that might be helpful:
How are you doing the drawing?
Do you plan on using animation?
Are we talking moving in a straight line or pathfinding?
There is no easy answer to your question without additional info. We could waste our time giving you general info, but it wouldn't be very helpful.
Look at this post. Is this what you mean...
http://www.vbforums.com/showthread.p...hreadid=211059
er...i dono...
ok.
I have a map.
i have a char. pic and i want a code so that where i click with my mouse the picrure will move. then ill have events like battles occure.
or wait...I just had a thought...
is there a code for useing the arrow keys? when i push a arrow key the picture goes that direction.
any ideas?
Use your thought
Get the keystrokes of the arrows,
on left move to picture(or whatver) left, on right move .....
Put that in your "loop" and fill in the code for the movement
VB Code:
If (GetAsyncKeyState(vbKeyLeft)) Then 'move left ElseIf (GetAsyncKeyState(vbKeyRight)) Then 'move right End If If (GetAsyncKeyState(vbKeyUp)) Then 'move up ElseIf (GetAsyncKeyState(vbKeyDown)) Then 'move down End If
Or try this for a start...hope you don't got a fast CPU.....
ill look at it fist thing in the morning.
thanks alot.
wanna know somthin really lame?
im just learning what a loop is.....:(
*feels degreated*
Dont feel bad. 3/4 of the time i look at some of this code and say "HUH??":confused:
ya!Quote:
Originally posted by NoteMe
Or try this for a start...hope you don't got a fast CPU.....
thats kinda like what i want. except he moves to fast and rapid. i would only want him to move a small distance. or move slower.
like:
uparrow: up 1 space
downarrow: down 1 space
rightarrow:right 1 space
leftarrow:left one space
i would have to set the distance each space is.
[on a side note]
could someone please explain to me (like you would teach a monkey) loops? im sitting in class and the teacher is reading a book out loud...:mad: that makes me sick...THE TEACHER DONT KNOW!
ok i figured out how to salve my little problem...well kinda...ok
i just make 4 command buttons and have each of them move the picture in a differnt direction!
ok now heres the problem: how do i make the picture move?
i know what im gunna move to make it move i dont know HOW im gunna make it move.
I'm not 100% sure if I understand what you mean, and I'm not sure if the problem is my English or yours, but do you mean something like this????????????????????