Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Movement Problems

Author
Message
They Killed Kenny
21
Years of Service
User Offline
Joined: 18th Jul 2004
Location: FL, USA
Posted: 30th Oct 2004 23:22 Edited at: 30th Oct 2004 23:22
I have a movement problem.

I want it so that when i click, my character moves towards the mouseclick's new position. so here is my code:


it says variable mousey is not valid at line 38.
I dont really understand the mousey variable, so couls someone help me?
pizzaman
22
Years of Service
User Offline
Joined: 18th Feb 2004
Location: Gateshead, UK
Posted: 31st Oct 2004 00:59
mousey should be mousey()

therefore your code would be

Zero #43
22
Years of Service
User Offline
Joined: 5th May 2004
Location: ** in your head **
Posted: 3rd Nov 2004 07:15
hey if ur using Dark Basic, (not pro) then there shouldnt be commas. and i cant help u there

Zero #43
13e
21
Years of Service
User Offline
Joined: 20th Oct 2004
Location: Here
Posted: 4th Nov 2004 22:30
mousey() (I believe) is the mouse pointer's vertical co-ordinate.

So if mousey() = 150 then your mouse pointer is 150 pixels from the top of the screen.

Pizzaman's right in saying you need to add brackets at the end of the command.

I think if you want your character to move to the newly selected position, it should maybe be like this: -



I think that should work and I welcome anyone to correct me. I'm not much of a coder anyway, so I'm sorry if this is wrong.

At least I'm giving it a go, I guess?
Math89
22
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: UK
Posted: 5th Nov 2004 03:55
I think you want to make this :
Jedi Lord
21
Years of Service
User Offline
Joined: 11th Jun 2004
Location: Jedi Temple
Posted: 26th Nov 2004 12:46
I having problem with sprite moving without mousex or mousey
like


do you see below it is sprite 1 and sprite 2
* *

then sprite 1 go to sprite 2 without mouse.
can you help

Login to post a reply

Server time is: 2026-06-11 13:13:48
Your offset time is: 2026-06-11 13:13:48