Also das funzt nun...habe die Stelle mit der falschen VAR (von mir) mit Kommentar versehn ^^
Code:
var Zomb_Index=0;              //how many zombies are in the array
var Zomb_Array[100];         //Array for all active Zombies

ACTION Add_To_Object_In_Wed {
    Zomb_Array[Zomb_Index] = handle (me); //HIER WAR DIE FALSCHE VAR
    Zomb_index += 1;
}
    ENTITY* ent; //temp Entity-Pointer

function manage_fog()
{
    my.tilt = 90;
    my.alpha = 100;
    my.oriented = on;
    my.transparent = on;
    my.passable = on;

    var i = 0;
    var unitisnear = 0; //neue var die speichert ob eine Einheit in der nähe ist
    while (1)
    {
       while(i < Zomb_Index)
       {
          ent = ptr_for_handle(Zomb_Array[i]);
          if (vec_dist(ent.x, my.x) < 350 && unitisnear == 0)
          {
             unitisnear = 1;
          }
          ent = NULL;
          i += 1;
       }
       if (unitisnear == 1)
       {
          my.alpha = 0;my.invisible=ON;
       }
       else
       {
         my.alpha = 100;
       }
       unitisnear = 0;
       i = 0;
       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;
    }
} 

Gute Nacht und nochma danke!

Edit:
Rein Framerate-Technisch ist der Fog of War irgendwie ein Supergau frown ...oder sagen wirs so, wenns heiss her geht, habe ich 20fps verloren ! Allerdings bei 5000x5000
Quants, 64 Reihen und 64 Spalten fog.

Last edited by rayp; 04/27/09 22:09.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;