 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
Ysoft_Entertainment VB Programmer

Joined: 23 Sep 2003 Posts: 810 Location: Wherever There is a good game.
|
Posted: Mon May 08, 2006 7:14 pm Post subject: How do I make this into one simple formula |
|
|
Code: |
script,converter,x4,y4,begin
if(x4==1,and,y4==1)then(return(1))
if(x4==2,and,y4==1)then(return(2))
if(x4==3,and,y4==1)then(return(3))
if(x4==1,and,y4==2)then(return(4))
if(x4==2,and,y4==2)then(return(5))
if(x4==3,and,y4==2)then(return(6))
if(x4==1,and,y4==3)then(return(7))
if(x4==2,and,y4==3)then(return(8))
if(x4==3,and,y4==3)then(return(9))
end
|
I did it once in vb but I completely forgot it. _________________ Try my OHR exporter/importer.
OHRGFX
Striving to become better pixel artist then Fenrir Lunaris. Unfortunately the laziness gets in the way of my goals. |
|
Back to top |
|
 |
JSH357

Joined: 02 Feb 2003 Posts: 1705
|
Posted: Mon May 08, 2006 7:21 pm Post subject: |
|
|
Step one:
Code: |
script,converter,x4,y4,begin
if(y4==1)then(return(x4))
if(y4==2)then(return(x4+3))
if(y4==3)then(return(x4+6))
end
|
Step two:
Code: |
script,converter,x4,y4,begin
return(x4+((y4--1)*3))
end
|
|
|
Back to top |
|
 |
Ysoft_Entertainment VB Programmer

Joined: 23 Sep 2003 Posts: 810 Location: Wherever There is a good game.
|
Posted: Mon May 08, 2006 7:32 pm Post subject: |
|
|
Step 2 is exactly what I was looking for. Thanks man. _________________ Try my OHR exporter/importer.
OHRGFX
Striving to become better pixel artist then Fenrir Lunaris. Unfortunately the laziness gets in the way of my goals. |
|
Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|