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.

Newcomers DBPro Corner / SET MATRIX TILE dbpro

Author
Message
Krimzon DestinE
19
Years of Service
User Offline
Joined: 18th Sep 2005
Location:
Posted: 9th Feb 2006 21:49
How does this work exactly. What i'm trying to do is, make a matrix and set a texture to it, then hide the mouse and limit it to only being able to move around the matrix, and change the texture of that particular square to another texture; sort of like a cursor.
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 10th Feb 2006 00:57
To do this you would make all the textures you want to be possible in the matrix into a single image. Each picture can be put side by side and up and down to make a rectangle. Load the image and when you prepare matrix texture you put in how many pictures there are across and how many pictures down there are in the image. In set matrix tile you specify which of these pictures you are using in that tile. The pictures are numbered left to write from top to bottom just like how you read English. I hope I haven't rambled. This might help a bit.



Insanity is just a state of mind
Krimzon DestinE
19
Years of Service
User Offline
Joined: 18th Sep 2005
Location:
Posted: 10th Feb 2006 05:44 Edited at: 10th Feb 2006 05:45
thanks, but that is not quite what i was looking for. i guess a better question would be, is there a way to single out each square of a matrix.

hey, my first psuedo-code (sorta)

Catman 400
18
Years of Service
User Offline
Joined: 9th Feb 2006
Location:
Posted: 10th Feb 2006 06:44
I think I know what you're saying. Try using the MouseMoveX() and MouseMoveY() variables to change, let's say: GridSquareX and GridSquareZ. Make an algorithim to either:
A)put some standard shape in the center of that grid square, since you know how big each square is (if each square is x by z units then shapeX=x*(GridSquareX-1)+x/2. Ditto for z.)
B)make the camera follow it with the Position Camera and Point Camera commands
C)or just display the X and Z numbers in the corner (use Print). Finally, when MouseClick()=1, use the Set Matrix Tile command.

I would've included code, but your question is vague, so I gave a vague answer. If you would like a sample I'd be happy to make one. I'm free until someone answers my question about diffuse color settings (what are they?).

Login to post a reply

Server time is: 2024-09-24 15:27:56
Your offset time is: 2024-09-24 15:27:56