0 registered members (),
1,459
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Fog of War ( AUM ) problem
#240994
12/13/08 20:39
12/13/08 20:39
|
Joined: Mar 2008
Posts: 2,247 Baden Württemberg, Germany
Espér
OP
Expert
|
OP
Expert
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
|
hi.. I copied the Fog of War code from the AUM.. Now i got a new problem... how am i able to ask for the floor entities??? the AUM Code askes for the player:
if(vec_dist(boden.x, my.x) <= 350)
{
while(my.alpha >= 5)
{my.alpha -= 3;wait(1);}
ptr_remove(my);
}
But i create entities, where no fow should be over, and at 50 pixels each side. The floor ents are stored inside an array ( 4000 stacks ). How to let the script ask for all 4000 places of the array paralell to the gameplay??? Variable code: var i = 0;
var mouse_move[3];
var bodentiles[4000];
var bodentiles_start = 0;
while (i < 4001)
{
bodentiles[i] = 0;
i += 1;
} the ent_create part: // Boden_normal ( immer gesetzt, alles andre iss drüber )
bodentiles[bodentiles_start] = ent_create("Ground.mdl",vector(temp.x,temp.y,2),object_boden);
bodentiles_start += 1; you see.. every floor ent is stored in a specified place of the array... The Fog of War Bitmap has a size of 8x8... so i need on a 150x150 Field map ( each field has 64x64 pixels ),... 180000 Fog of War entities.. only for fow...
Last edited by xXReapeRXx; 12/14/08 03:12.
|
|
|
Re: Fog of War ( AUM ) problem
[Re: Espér]
#240996
12/13/08 20:44
12/13/08 20:44
|
Joined: Nov 2007
Posts: 1,032 Croatia
croman
Serious User
|
Serious User
Joined: Nov 2007
Posts: 1,032
Croatia
|
try commenting out line by line to locate in which line is the problem that causes the crash
Ubi bene, ibi Patria.
|
|
|
Re: Fog of War ( AUM ) problem
[Re: Espér]
#241004
12/13/08 21:13
12/13/08 21:13
|
Joined: Nov 2007
Posts: 1,032 Croatia
croman
Serious User
|
Serious User
Joined: Nov 2007
Posts: 1,032
Croatia
|
maybe it has something with cursors.x - maybe it's an empty pointer. check it. btw - do you get an error or complete crash of application?
Ubi bene, ibi Patria.
|
|
|
Re: Fog of War ( AUM ) problem
[Re: croman]
#241009
12/13/08 21:59
12/13/08 21:59
|
Joined: Aug 2008
Posts: 408 mi usa
sadsack
Senior Member
|
Senior Member
Joined: Aug 2008
Posts: 408
mi usa
|
Are you sure that is lite-c?
I have A7 Commercial .............. Now I just need to learn how to use it
|
|
|
Re: Fog of War ( AUM ) problem
[Re: Espér]
#241056
12/14/08 04:25
12/14/08 04:25
|
Joined: Oct 2004
Posts: 1,655
testDummy
Serious User
|
Serious User
Joined: Oct 2004
Posts: 1,655
|
array indices 0-3999? while (i < 4001)
{
bodentiles[i] = 0;
i += 1;
} array bounds exceeded? Quoting xXReapeRXx. 180000 Fog of War entities.. only for fow... 1. Maybe only space d / area a is visible at time t, thus, perhaps, only max n entities are required to cover visible d / a. 2. A separate function / loop / action might not be required for each coverage entity, where only one loop might do. 3. Potentially separate from visible coverage entities, cell visible states might only require boolean slots (vs var long = memory savings?).
|
|
|
|