Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
(5 ratings)
ApprovedI would like to know:
Why do you add grass and flowers(the destructible for both of them) within the trees at the end of the generation?
You can barely see the grass within the trees and when you do it looks weird.
(however putting grass texture under the trees is fine)
I suggest that you have an instant fade out and fade in once the generation is done.
Config
TERRAINPOINT
DESTRUCTABLESPOINT
DEFORMATIONSPOINT
Special Terrain
For each (Integer A) from 1 to STMax, do (Actions)

Loop - Actions


Destructible - Pick every destructible in (Entire map) and do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Destructible-type of (Picked destructible)) Equal to DestructibleType[(Integer A)]





Then - Actions






Set STPOINT = (Position of (Picked destructible))






Environment - Change terrain type at STPOINT to SpecialTerrain[(Integer A)] using variation SpecialTerrainVariation[(Integer A)] in an area of size SpecialTerrainSize[(Integer A)] and shape SpecialTerrainShape[(Integer A)]






Custom script: call RemoveLocation(udg_STPOINT)





Else - Actions
Destructible - Pick every destructible in (Entire map) and do (Actions)

Loop - Actions


For each (Integer A) from 1 to STMax, do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Destructible-type of (Picked destructible)) Equal to DestructibleType[(Integer A)]





Then - Actions






Custom script: exitwhen true





Else - Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Integer A) less than or equal to STMax equal to true



Then - Actions




Set STPOINT = (Position of (Picked destructible))




Environment - Change terrain type at STPOINT to SpecialTerrain[(Integer A)] using variation SpecialTerrainVariation[(Integer A)] in an area of size SpecialTerrainSize[(Integer A)] and shape SpecialTerrainShape[(Integer A)]




Custom script: call RemoveLocation(udg_STPOINT)



Else - Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




And - All (Conditions) are true





Conditions






STInteger Equal to 1






Or - Any (Conditions) are true







Conditions








(Destructible-type of (Picked destructible)) Equal to Tree1








(Destructible-type of (Picked destructible)) Equal to Tree2








(Destructible-type of (Picked destructible)) Equal to Tree3








(Destructible-type of (Picked destructible)) Equal to Tree4








(Destructible-type of (Picked destructible)) Equal to Tree5








(Destructible-type of (Picked destructible)) Equal to Tree6








(Destructible-type of (Picked destructible)) Equal to Tree7








(Destructible-type of (Picked destructible)) Equal to Tree8








(Destructible-type of (Picked destructible)) Equal to Tree9








(Destructible-type of (Picked destructible)) Equal to Tree10



Then - Actions




Set Temp_Point = (Position of (Picked destructible))




Destructible - Create a Grass[(Random integer number between 1 and 4)] at Temp_Point facing (Random angle) with scale 0.80 and variation 1




Custom script: call RemoveLocation (udg_Temp_Point)
GeneratorStop

Events

Conditions

Actions


Trigger - Turn off Destructibles <gen>


Trigger - Turn off Deformations <gen>


Trigger - Turn off Critters <gen>


Trigger - Turn off Terrain <gen>


Wait 2.00 seconds


Trigger - Turn off Special Terrain <gen>


Trigger - Turn on CritterSpawn <gen>


Custom script: call DestroyTrigger( GetTriggeringTrigger() )
You can move a lot of the variable assignment to a map Initialization trigger, since configurables are generally assigned on that time frame.
The trigger Config, though mostly true to its namesake, is executed on a dialog-click, which would then initialize a lot of things, before starting up the respective triggers. That is why I would prefer moving those variable assignments to another trigger, or the statement above.
The dialog button input and the terrain generator should be separate from each other, but that does not mean I am discouraging you from using it. Rather, have the terrain generator do all the things it needs to do and just build the dialog from there.
I wanted to use this system myself for an Age of Empires sort of rip off I'm doing but there are some problems with it from a practicality standpoint. Trees and doodads block building paths making it useless for RTS matches, there are no cliffs (I feel like this would be relatively easy to add too,) the randomness of it isn't that dramatic, I've ran it a few times and the tiles don't vary much nor does the environment in general. You need water, cliffs, less saturation of trees, and the option for different environments/tilesets or greater variation within the existing tileset.

