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.

Dark GDK / print object coordinates

Author
Message
ZbfZ
16
Years of Service
User Offline
Joined: 5th Mar 2008
Location:
Posted: 8th Mar 2008 04:35
alright, i found out how to get the object to move with arrow keys with:

but how do i print the coordinates, i know its going to be in the "loop" part of the code but what is it?
Fusspawn
16
Years of Service
User Offline
Joined: 19th Feb 2008
Location:
Posted: 8th Mar 2008 05:04
Try this.




Should print something along the lines of

Coord's = 123,232,657 being x , y ,z

Stuck in the land of the confused! and loving it!
ZbfZ
16
Years of Service
User Offline
Joined: 5th Mar 2008
Location:
Posted: 8th Mar 2008 05:09
hmm...i put it in like this:

but i got 8 errors that include:

unless i put it in wrong?
Codger
21
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 8th Mar 2008 05:39
Another option

dbText(10,10,dbStr(dbObjectPositionX(1));

Codger

System
PIV 2.8 MZ 512 Mem
FX 5600 256 mem
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 8th Mar 2008 06:09
So many ways to skin a cat - but the cat isn't happy!

(Glad you're making progress bro) Email again if you get really stumped and the forums aren't helping... but as you can see - every one here is pretty darn helpful! )

Fusspawn
16
Years of Service
User Offline
Joined: 19th Feb 2008
Location:
Posted: 8th Mar 2008 15:44 Edited at: 8th Mar 2008 15:47


Try that, Its probally my attempt at using "," As spacers, if you can live with one long readout without spaces give that ago, Or split it up into multiple dbText Commands one for each x,y,z and just move them down or up the screen a little for each.

I think its seeing the ","'s as a normal part of the command not a string. Odd tho i figured dbStr() would counteract that..

you could always try changing it to something like a - instead of the ","'s

Eitherway I hope this gives someinsight into what todo. and a chance for me to give something back to the community ^_^

Stuck in the land of the confused! and loving it!
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 8th Mar 2008 17:07
How about:



It makes use of the C standard library string formatting to combine the multiple statements into a single statement.

Lilith, Night Butterfly
ZbfZ
16
Years of Service
User Offline
Joined: 5th Mar 2008
Location:
Posted: 8th Mar 2008 20:16
alright, i got it to work now, thank you everybody for the help, really appreciate it!

Login to post a reply

Server time is: 2024-09-29 15:26:22
Your offset time is: 2024-09-29 15:26:22