Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

How do I make this into one simple formula

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
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.

PostPosted: Mon May 08, 2006 7:14 pm    Post subject: How do I make this into one simple formula Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
JSH357




Joined: 02 Feb 2003
Posts: 1705

PostPosted: Mon May 08, 2006 7:21 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Ysoft_Entertainment
VB Programmer




Joined: 23 Sep 2003
Posts: 810
Location: Wherever There is a good game.

PostPosted: Mon May 08, 2006 7:32 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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