Bonjour à tous.
J'ai un petit problème, j'ai récemment changé le système qui gère les régions, les cercles de puissances, les unités mini par territoires etc... dans mon Risk (Tactical Middle Earth Risk) - (un système par Gaurbaque).
Mais la map lagg et apparemment ça ne vient pas que de moi (en solo ça ne lagg pas, uniquement sur Bnet).
Les triggers qui seraient selon moi susceptibles de provoquer ce lagg :
Evénements
Unité - A unit leaves Amon Hen <gen>
Unité - A unit leaves Andunie <gen>
Comme ça pour une centaine de régions.
Unité - A unit leaves Zarak Dum <gen>
Conditions
(Number of units in (Units within 100.00 of (Position of (Random unit from (Units within 512.00 of (Position of (Leaving unit)) matching ((Unit-type of (Matching unit)) Egal à Territory)))) matching (((Matching unit) is alive) Egal à TRUE))) Egal à 1
Actions
Unité - Move (Leaving unit) instantly to (Position of (Random unit from (Units within 512.00 of (Position of (Leaving unit)) matching ((Unit-type of (Matching unit)) Egal à Territory))))
Evénements
Unité - A unit enters Amon Hen <gen>
Unité - A unit enters Andunie <gen>
Comme ça pour une centaine de régions.
Unité - A unit enters Zarak Dum <gen>
Conditions
(Number of units in (Units within 100.00 of (Position of (Entering unit)) matching ((((Matching unit) is Un bâtiment) Egal à FALSE) and (((Owner of (Matching unit)) Différent de (Owner of (Entering unit))) and (((Matching unit) is alive) Egal à TRUE))))) Egal à 0
Actions
Groupe unité - Pick every unit in (Units within 512.00 of (Position of (Entering unit)) matching (((Matching unit) is Un bâtiment) Egal à TRUE)) and do (Actions)
Boucle - Actions
Unité - Change ownership of (Picked unit) to (Owner of (Entering unit)) and Changer couleur
Déclencheur - Run Victory <gen> (checking conditions)
Groupe joueur - Pick every player in (All players) and do (Actions)
Boucle - Actions
Multitable - Set the text for MultiTable item in column 2, row ((Player number of (Picked player)) + 1) to (<Chaîne vide> + (String((Number of living Territory units owned by (Picked player)))))
J'aimerai savoir si y'a un moyen d'optimiser tout ça pour éviter qu'ça lagg et puis aussi si c'est sur que le lagg vient de là.
Autre problême :
On m'avait donné une ligne de code pour éviter les leaks dans un "groupe-unit pick every unit", je l'ai mis mais probablement mal parce que rien ne spawn...
- Units Spawns Morts Vivants
Evénements
Temps - Compteur expires
Conditions
Actions
Custom script: set bj_wantDestroyGroup=true
Groupe unité - Pick every unit in (Units of type |cff400040Crypt) and do (Actions)
Boucle - Actions
Set SpawnPoint = (Position of (Picked unit))
Unité - Create 1 |cff400040Tomb Keeper for (Owner of (Picked unit)) at (Position of (Picked unit)) facing Orientation bâtiment par défaut degrees
Unité - Create 2 |cff400040Tomb Servant for (Owner of (Picked unit)) at (Position of (Picked unit)) facing Orientation bâtiment par défaut degrees
Unité - Create 1 |cff400040Skeleton Bowman for (Owner of (Picked unit)) at (Position of (Picked unit)) facing Orientation bâtiment par défaut degrees
Custom script: call RemoveLocation(udg_SpawnPoint)
Il faut savoir qu'après ça il y a encore plusieurs "blocs" identiques, cela change t-il quelque chose ?
Merci d'avance
KB.
Message édité par Kuchiki Byakuya le 22-03-2008 à 10:50:03