First off, sorry if I posted this is in the wrong place.
So here's the
basicsof my project I'm working on:
I'm parsing in a .log file with three type of info (time, location, test) and so I'm trying to create a map with little icons flying to and from each location.
So far I can make one file go from one place to another and loop. But when I try to do two icons moving, it starts at the same time so they overlap. So my problem is that I want to give each icon its own timing so that they'd start a few milliseconds apart and thus won't overlap. I can't seem to do that without changing the entire frameSpeed of the project though.
Here's my messy code that I've chugged out until I hit my roadblock; it may or may not help.
Code:PImage mapLayer1, mapLayer2, mapLayer3, file1, file2;
String lines[];
String items[];
String time, loc, test;
boolean start = true;
boolean mapIn = false;
int frame, count1;
String test1, test2, test3;
void setup(){
size(1000,527);
lines = loadStrings("live.log");
smooth();
frameRate(10 );
file1 = loadImage("file.png");
file2 = loadImage("file2.png");
for(int i = 0; i < lines.length; i++){
String data = join(lines, " "); //CONCAT THE 27 STRING ELEMENTS INTO ONE STRING
items = split(data, " "); //SPLIT THE STRING INTO ONE ARRAY
}
if(start == true){
mapLayer1 = loadImage("scc1.png");
background(mapLayer1);
start = false;
}
}
void draw(){
frame++;
background(mapLayer1);
if(count1 == 120){
count1 = 0;
}
for(int z=2; z <= 83; z+=3){
test = items[z];
if(count1 <= 120){
if(test.equals("cluster")){
//ellipse(385-(count1*2.05), 255+(count1), 10,10);
frameRate(10);
image(file1, 382-(count1*2.1), 248+(count1));
count1++;
}
else if(test.equals("grid")){
image(file2, 382-(count1*2.1), 248+(count1));
count1++;
}
}
}
}
I hope that makes sense. I would very much appreciate any and all help you can provide me with. Thanks in advance.