for a miner, when you declare players you can also say which ore to mine, after you do that how do you recall to that ore so it knows what colors to use?
for a miner, when you declare players you can also say which ore to mine, after you do that how do you recall to that ore so it knows what colors to use?

SCAR Code:var
Colors: TIntegerArray;
begin
case LowerCase(Players[CurrentPlayer].Strings[0]) of
'copper': Colors := [5487834, 32634, 7343];
'tin': Colors := [567437, 54672436, 52373632];
'iron': Colors := [3675327, 7243735, 724745];
'coal': Colors := [547243, 5472, 32633];
'mith': Colors := [5473475, 24745, 74374];
'addy': Colors := [5763246, 45737, 7247435];
'rune': Colors := [4632346, 63246234, 6352634];
end;
end.
Like that?![]()
on wii but w/e.
do:
that loads the first string in declareplares. tn declare orecolor as tintegerarray -make sure function results as dat too sooo:SCAR Code:case lowercase(players[currentplayer].strings[0])
darn u ian..i had 2 type wif wii-moteSCAR Code:result := orecolor[1234, 457, 679];![]()

Mhmm. And sorry for not being clear with the Players[CurrentPlayer].Strings[0] thing, I'm at work so I don't have SCAR and I'm trying to hurry.Haha
SCAR Code:procedure DeclarePlayers;
begin
HowManyPlayers := 1; //How many Players
NumberOfPlayers(HowManyPlayers);
CurrentPlayer :=0; //Starting Player
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
Players[0].Strings[0] := '';//this stuff
end;
Sorry! Work. Talk to you later.![]()
__on computer__
By the way mcnollend, mine was a little off use the one like in ians first post.
If your using my way then do it like:
SCAR Code:Function LoadRockColors: TIntegerArray;
begin
case LowerCase(Players[CurrentPlayer].Strings[0]) of
'iron': Result := [24325, 234234, 5435];
ETC.
That way you can just do....something like:
SCAR Code:For i := 0 to 5(aka number of colors including 0) do
begin
if findcolor(x, y, LoadRockColors[i], MSX1, MSY1, MSX2, MSY2)then blah;
Since when it results as the colors you can just write in LoadRockColors where it says color in parameters.
Good Luck~~
Edit : declare i as an int.
Last edited by Smarter Child; 08-20-2009 at 07:44 AM.
<TViYH> i had a dream about you again awkwardsaw
Malachi 2:3
Yah, you can do that in a separate func..oh i see wat you mean. Yes you do need that, i forgot about that.

Or use some srl object finding. Some of them(or all?) uses TIntegerArrays for colors.
Ok, so if i use the case lowercase(etc etc) to find the ore that the person chose, would i use a findcolortolerance(x, y, color, etc) to find the rock on the screen?
There are currently 1 users browsing this thread. (0 members and 1 guests)