ja. Aber das liegt ja nicht an A6 oder A7 oder sonst was...irgendwas ist schlecht programmiert in der WHILE Schleife....aber was?
Hier mal mein kompletter code. Es geht teilweise. Mal klappts mal nicht...irgendwas ist total falsch:
var Zomb_Index=0;
var Zomb_Array[100];
entity* Carry_Zomb_Array;
function Init_Unit()
{
Zomb_Array[index] = handle (me);
Zomb_index += 1;
..
.
}
function manage_fog()
{
my.tilt = 90;
my.alpha = 100;
my.oriented = on;
my.transparent = on;
my.passable = on;
WHILE(Zomb_Index==0) { WAIT(1); }
while (1)
{
Carry_Zomb_Array = ptr_for_handle(Zomb_Array[MY.SKILL90]);
IF(Carry_Zomb_Array!=NULL) {
if (vec_dist(Carry_Zomb_Array.x, my.x) < 350)
{
my.alpha = 0;my.invisible=ON;
}
else
{
my.alpha = 100;
}
Carry_Zomb_Array = NULL;
}
IF (MY.SKILL90>Zomb_Index) { MY.SKILL90=0; }
ELSE { MY.SKILL90+=1; }
wait (1);
}
}
starter create_fog_sprites()
{
WHILE (Zomb_Index==0) { WAIT(1); }
var row_index = 0;
var column_index = 0;
while (row_index < 64)
{
while (column_index < 64)
{
column_index += 1;
temp.x = column_index * 128 - 4000; // -2000 to 2000 on x
temp.y = row_index * 128 - 4000; // -2000 to 2000 on y
temp.z = CAMERA.Z-450;
ent_create ("fogofwar.tga", temp.x, manage_fog);
}
column_index = 0;
row_index += 1;
}
}
Edit:
Ich probier mal deinen Code aus
Wenn ich die erste Einheit erstelle geht es...danach bekomm ich die VEC_DIST Zeile mit LEEREN POINTER angezeigt...keine Ahnung warum.
Das kann garnicht sein, da die Schleife ja nur bis Array-Maxiumum läuft ?!"?!?!