A.Dominion
New Member
- Reaction score
- 0
hi all and thanks in advance for your help and comment.
i am an average or basic triggerer since i can't use Jass, and i am not very familiar with memory used by trigger, so i would like to check with you all if these trigger are ok, or if there is a way to improve them....
please i don't know how to put the trigger tag to make it more lisible, so can a moderator do it for me and explain mle how to do it too. ^^
edit: i figured it out so no need to teach me how to put the trigge tag
Ok i will post trigger one at a time, but i will explain first the goal of these trigger so you can help me more efficiently.
this trigger run the whole map ((160x160) square by square, and detect the terrain type, store the sand terrain type into a point variable (shallow water), the grassy sand same (deep water), the summer lorderon dirt and ashenvale moss same (mountain), create randomly tree (2 chance out of 10) in the ashenvale vigne terrain and store each tree into a destructible variable (tree0,1,2) and hide them to show only summer tree. it also add pathblocker in the mountain and deep water and put the water blocker into a destructible variable (pathbloker)
it take something like 16 or 22 second to run through the whole map. so first is this trigger ok, or is it bad?
i write the following trigger down: (here is a bug, some of the terrain and tree doesn't change only the upper map to 2/3 are updated, but the lower map doesn't update tree and terrain) someone can help fix this??
when the season change it run this trigger:
i am an average or basic triggerer since i can't use Jass, and i am not very familiar with memory used by trigger, so i would like to check with you all if these trigger are ok, or if there is a way to improve them....
please i don't know how to put the trigger tag to make it more lisible, so can a moderator do it for me and explain mle how to do it too. ^^
edit: i figured it out so no need to teach me how to put the trigge tag
Trigger:
- trigger
- Events
- Temps - Elapsed game time is 1.00 seconds
- Conditions
- Actions
- Set Center_point = (Center of Lake <gen>)
- Set X = (X of Center_point)
- Set Y = (Y of Center_point)
- For each (Integer A) from 1 to 181, do (Actions)
- Boucle - Actions
- Wait 0.01 seconds
- Set Y = (Y - 128.00)
- Set X = (X of Center_point)
- For each (Integer B) from 1 to 181, do (Actions)
- Boucle - Actions
- Set X = (X + 128.00)
- Set Temp_point = (Point(X, Y))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Si - Conditions
- (Terrain type at Temp_point) = Ashenvale - Touffes d'herbe
- Alors - Actions
- Set MountainN = (MountainN + 1)
- Environnement - Create a 0.01 second Permanent crater deformation at Temp_point with radius 128.00 and depth -128.00
- Environnement - Change terrain type at Temp_point to Summer de Lordaeron - Rochers using variation -1 in an area of size 1 and shape Square
- Destructible - Create a Obstacle chemin (Sol) (Grand) at Temp_point facing (Random angle) with scale 1.00 and variation 0
- Set Mountain[MountainN] = (Point((X of Temp_point), (Y of Temp_point)))
- Sinon - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Si - Conditions
- (Terrain type at Temp_point) = Summer de Lordaeron - Terre
- Alors - Actions
- Set MountainN = (MountainN + 1)
- Environnement - Create a 0.01 second Permanent crater deformation at Temp_point with radius 128.00 and depth -384.00
- Environnement - Change terrain type at Temp_point to Summer de Lordaeron - Rochers using variation -1 in an area of size 1 and shape Square
- Destructible - Create a Obstacle chemin (Sol) (Grand) at Temp_point facing (Random angle) with scale 1.00 and variation 0
- Set Mountain[MountainN] = (Point((X of Temp_point), (Y of Temp_point)))
- Sinon - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Si - Conditions
- (Terrain type at Temp_point) Egal Ã_ Ashenvale - Vignes
- Alors - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Si - Conditions
- (Random integer number between 1 and 10) <= 3
- Alors - Actions
- Set TreeN = (TreeN + 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Si - Conditions
- (Random integer number between 1 and 3) = 1
- Alors - Actions
- Destructible - Create a Mur d'arbres de ville automnale at Temp_point facing (Random angle) with scale 1.00 and variation 0
- Set Tree1[TreeN] = (Last created destructible)
- Destructible - Masquer Tree1[TreeN]
- Destructible - Create a Mur d'arbres de ville snow at Temp_point facing (Random angle) with scale 1.00 and variation 0
- Set Tree2[TreeN] = (Last created destructible)
- Destructible - Masquer Tree2[TreeN]
- Destructible - Create a Mur d'arbres de ville Summer at Temp_point facing (Random angle) with scale 1.00 and variation 0
- Set Tree0[TreeN] = (Last created destructible)
- Sinon - Actions
- Destructible - Create a Mur d'arbre automne at Temp_point facing (Random angle) with scale 1.00 and variation 0
- Set Tree1[TreeN] = (Last created destructible)
- Destructible - Masquer Tree1[TreeN]
- Destructible - Create a Mur d'arbre Snow at Temp_point facing (Random angle) with scale 1.00 and variation 0
- Set Tree2[TreeN] = (Last created destructible)
- Destructible - Masquer Tree2[TreeN]
- Destructible - Create a Mur d'arbres Summer at Temp_point facing (Random angle) with scale 1.00 and variation 0
- Set Tree0[TreeN] = (Last created destructible)
- Si - Conditions
- Sinon - Actions
- Environnement - Change terrain type at Temp_point to Summer de Lordaeron - Herbe using variation -1 in an area of size 1 and shape Square
- Si - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Sinon - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Si - Conditions
- (Terrain type at Temp_point) Egal Ã_ Ruines englouties - Sable
- Alors - Actions
- Set SandN = (SandN + 1)
- Set Sand[SandN] = (Point((X of Temp_point), (Y of Temp_point)))
- Sinon - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Si - Conditions
- (Terrain type at Temp_point) = Ruines englouties - Terre herbeuse
- Alors - Actions
- Set WaterN = (WaterN + 1)
- Environnement - Create a 0.01 second Permanent crater deformation at Temp_point with radius 128.00 and depth 64.00
- Destructible - Create a Obstacle chemin (Sol) (Grand) at Temp_point facing (Random angle) with scale 1.00 and variation 0
- Set PathBlocker[WaterN] = (Last created destructible)
- Set Water[WaterN] = (Point((X of Temp_point), (Y of Temp_point)))
- Sinon - Actions
- Si - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Si - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Si - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Si - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Si - Conditions
- Custom script: call RemoveLocation( udg_Temp_point )
- Boucle - Actions
- Boucle - Actions
- Events
Ok i will post trigger one at a time, but i will explain first the goal of these trigger so you can help me more efficiently.
this trigger run the whole map ((160x160) square by square, and detect the terrain type, store the sand terrain type into a point variable (shallow water), the grassy sand same (deep water), the summer lorderon dirt and ashenvale moss same (mountain), create randomly tree (2 chance out of 10) in the ashenvale vigne terrain and store each tree into a destructible variable (tree0,1,2) and hide them to show only summer tree. it also add pathblocker in the mountain and deep water and put the water blocker into a destructible variable (pathbloker)
it take something like 16 or 22 second to run through the whole map. so first is this trigger ok, or is it bad?
i write the following trigger down: (here is a bug, some of the terrain and tree doesn't change only the upper map to 2/3 are updated, but the lower map doesn't update tree and terrain) someone can help fix this??
when the season change it run this trigger:
Trigger:
- Winter
- Events
- Conditions
- Actions
- Set Temp_point = (Point(-512.00, 0.00))
- Environnement - Change terrain type at Temp_point to Hiver de Lordaeron - Falaise Snow using variation -1 in an area of size 91 and shape square
- Custom script: call RemoveLocation( udg_Temp_point )
- Trigger - Run Winter loop <gen> (checking conditions)
Trigger:
- Winter loop
- Events
- Conditions
- Actions
- Set TempN = 0
- For each (Integer A) from 1 to 3000, do (Actions)
- Boucle - Actions
- Set TempN = (TempN + 1)
- If (TempN > WaterN) then do (Do nothing) else do (Trigger - Run Winter water <gen> (checking conditions))
- If (TempN > SandN) then do (Do nothing) else do (Trigger - Run Winter sand <gen> (checking conditions))
- If (TempN > TreeN) then do (Do nothing) else do (Trigger - Run Tree snow <gen> (checking conditions))
- If (TempN > MountainN) then do (Do nothing) else do (Trigger - Run Mountain <gen> (checking conditions))
- Boucle - Actions
Trigger:
- Winter sand
- Events
- Conditions
- Actions
- Environnement - Create a 0.01 second Permanent crater deformation at Sand[TempN] with radius 128.00 and depth -64.00
- Environnement - Change terrain type at Sand[TempN] to Glacier d'Icecrown - Glace using variation -1 in an area of size 1 and shape square
Trigger:
- Winter water
- Events
- Conditions
- Actions
- Environnement - Create a 0.01 second Permanent crater deformation at Water[TempN] with radius 128.00 and depth -128.00
- Environnement - Change terrain type at Water[TempN] to Glacier d'Icecrown - Glace sombre using variation -1 in an area of size 1 and shape Square
- Destructible - Kill PathBlocker[TempN]
Trigger:
- Tree snow
- Events
- Conditions
- Actions
- Set Temp_point = (Position of Tree0[TempN])
- Destructible - Masquer Tree0[TempN]
- Destructible - Masquer Tree1[TempN]
- Destructible - Montrer Tree2[TempN]
- Environnement - Change terrain type at Temp_point to Ashenvale - Vignes using variation -1 in an area of size 1 and shape Square
- Custom script: call RemoveLocation( udg_Temp_point )
Trigger:
- Mountain
- Events
- Conditions
- Actions
- Environnement - Change terrain type at Mountain[TempN] to Eté de Lordaeron - Rochers using variation -1 in an area of size 1 and shape Square