Escena 1
actions for fotograma 1
// SitIni.
Base.S = 5;
// CandIni.
Actual.C = -1;
// Vars de Unsolved sits.
Actual.U = 0;
Actual.Us = 0;
// Save iniSit y preparar comprobación.
S = 5;
C = "Ninguno";
Loading.S = -1;
Loading.C = -1;
Loading.Cargas = 0;
Loading.ArchID = "S"+S+".txt";
fscommand ("save", Loading.ArchID);
actions for fotograma 3
Loading.Comps = 0;
Loading.Cargas = Loading.Cargas+1;
loadVariables (Loading.ArchID, "Loading");
actions for fotograma 5
Loading.Comps = Loading.Comps+1;
Loading.Verif = 1;
if (Loading.S != S) {
Loading.Verif = 0;
} else if (Loading.C != C) {
Loading.Verif = 0;
}
if (Loading.Verif == 0) {
if (Loading.Comps == 10) {
if (Loading.Cargas == 3) {
fscommand ("save", "30 fallas en savecheck de "+Loading.ArchID);
fscommand ("quit");
} else {
// reload.
gotoAndPlay (3);
}
} else {
// retry.
gotoAndPlay (4);
}
}
actions for fotograma 6
// Reset Sit. Aplic.
Actual.S = Base.S+Actual.C;
// ¿Sol?
if (10<Actual.S) {
// Sol; begin loads to show list
List = Actual.C;
gotoAndPlay (26);
} else {
// ¿Sit exist?
Loading.Cargas = 0;
Loading.S = -10;
Loading.C = -10;
Loading.ArchID = "S"+Actual.S+".txt";
}
actions for fotograma 7
Loading.Comps = 0;
Loading.Cargas = Loading.Cargas+1;
loadVariables (Loading.ArchID, "Loading");
actions for fotograma 9
Loading.Comps = Loading.Comps+1;
Loading.Verif = 1;
if (Loading.S == -10) {
Loading.Verif = 0;
} else if (Loading.C == -10) {
Loading.Verif = 0;
}
if (Loading.Verif == 0) {
if (Loading.Comps == 10) {
if (Loading.Cargas == 3) {
// La Sit parece no existir, crearla.
S = Base.S;
C = Actual.C;
Loading.Cargas = 0;
Loading.ArchID = "S"+Actual.S+".txt";
gotoAndPlay (15);
} else {
// reload.
gotoAndPlay (7);
}
} else {
// retry.
gotoAndPlay (8);
}
}
actions for fotograma 10
// La sit existe. ¿Candmod is pos?
if (Actual.C<1) {
// Candmod.
Actual.C = Actual.C+2;
// Reset sit, then Aplic.
gotoAndPlay (6);
} else {
// Load UnsSit.
Actual.U = Actual.U+1;
Loading.Cargas = 0;
Base.S = -10;
Loading.ArchID = "U"+Actual.U+".txt";
}
actions for fotograma 11
Loading.Comps = 0;
Loading.Cargas = Loading.Cargas+1;
loadVariables (Loading.ArchID, "Base");
actions for fotograma 13
if (Base.S == -10) {
Loading.Comps = Loading.Comps+1;
if (Loading.Comps == 10) {
if (Loading.Cargas == 3) {
fscommand ("save", "30 fallas en loading "+Loading.ArchID);
fscommand ("quit");
} else {
// reload.
gotoAndPlay (11);
}
} else {
// retry.
gotoAndPlay (12);
}
}
actions for fotograma 14
Base.S = Number(Base.S);
// Reset Cand. Aplic.
Actual.C = -1;
gotoAndPlay (6);
actions for fotograma 15
// Creando Sit.
fscommand ("save", Loading.ArchID);
actions for fotograma 17
Loading.Comps = 0;
Loading.Cargas = Loading.Cargas+1;
loadVariables (Loading.ArchID, "Loading");
actions for fotograma 19
Loading.Comps = Loading.Comps+1;
Loading.Verif = 1;
if (Loading.S != S) {
Loading.Verif = 0;
} else if (Loading.C != C) {
Loading.Verif = 0;
}
if (Loading.Verif == 0) {
if (Loading.Comps == 10) {
if (Loading.Cargas == 3) {
fscommand ("save", "30 fallas en savecheck de "+Loading.ArchID);
fscommand ("quit");
} else {
// reload.
gotoAndPlay (17);
}
} else {
// retry.
gotoAndPlay (18);
}
}
actions for fotograma 20
// Save UnsSit.
delete C;
S = Actual.S;
Actual.Us = Actual.Us+1;
Loading.S = -10;
Loading.Cargas = 0;
Loading.ArchID = "U"+Actual.Us+".txt";
fscommand ("save", Loading.ArchID);
actions for fotograma 22
Loading.Comps = 0;
Loading.Cargas = Loading.Cargas+1;
loadVariables (Loading.ArchID, "Loading");
actions for fotograma 24
if (Loading.S == -10) {
Loading.Comps = Loading.Comps+1;
if (Loading.Comps == 10) {
if (Loading.Cargas == 3) {
fscommand ("save", "30 fallas en savecheck de "+Loading.ArchID);
fscommand ("quit");
} else {
// reload.
gotoAndPlay (22);
}
} else {
// retry.
gotoAndPlay (23);
}
}
actions for fotograma 25
// ¿Candmod is pos?
gotoAndPlay (10);
actions for fotograma 26
S = Base.S;
Loading.Cargas = 0;
Base.S = -1;
Base.C = -10;
Loading.ArchID = "S"+S+".txt";
actions for fotograma 27
Loading.Comps = 0;
Loading.Cargas = Loading.Cargas+1;
loadVariables (Loading.ArchID, "Base");
actions for fotograma 29
Loading.Comps = Loading.Comps+1;
Loading.Verif = 1;
if (Base.S == -1) {
Loading.Verif = 0;
} else if (Base.C == -10) {
Loading.Verif = 0;
}
if (Loading.Verif == 0) {
if (Loading.Comps == 10) {
if (Loading.Cargas == 3) {
fscommand ("save", "30 fallas en loading "+Loading.ArchID);
fscommand ("quit");
} else {
// reload.
gotoAndPlay (27);
}
} else {
// retry.
gotoAndPlay (28);
}
}
actions for fotograma 30
if (Base.C != "Ninguno") {
List = Base.C+" "+List;
gotoAndPlay (26);
} else {
stop ();
}
La idea es comparable a un objeto que se mueve de a 1 casillero en el eje de las X, hasta que gracias a las acciones adecuadas quede más allá del punto 10.
Funciona, pero si no puedo entenderlo difícil que pueda agregarle cosas más complejas, no tiene sentido.
Pueden hacerme preguntas; las adecuadas resolverán mis dudas se supone...
Gracias.
Por ejemplo: ¿Por qué uso Actual.C en vez de C?
MOD: Titulo modificado. Agregadas etiquetas GeSHi.
Logré esto, aunque debo llegar a más >:D
(https://i.ibb.co/K6pVbNM/diagrama-min-acts-to-sol-trying3.jpg)