This isn't exact, because I only used one file, and changed it, but here's what I can remember:
function LevelSetup()
-- Set Global Values
Globals.G.Asteroids=(0)
Globals.G.EnemyFactionsMin=(0)
Globals.G.EnemyFactionsMax=(0)
-- Asteroid 0 - starting asteroid
a = AddAsteroidWithAttribs(0, 0, 1,1,1)
a.Owner = 1
a.TreeCap = 8
a:SetRadius(500)
a:AddSeedlings(100)
-- Asteroid 1
a = AddAsteroidWithAttribs(3000, 0, 0.5,1,1)
a.Owner = 0
a.TreeCap = 6
a:SetRadius(100)
end
function OnAsteroidTaken()
Rotate180(GetAsteroid(0))
end
function LevelLogic()
end
and
function LevelSetup()
-- Set Global Values
Globals.G.Asteroids=(0)
Globals.G.EnemyFactionsMin=(0)
Globals.G.EnemyFactionsMax=(0)
-- Asteroid 0 - starting asteroid
a = AddAsteroidWithAttribs(0, 0, 1,1,1)
a.Owner = 1
a.TreeCap = 8
a:SetRadius(500)
a:AddSeedlings(100)
-- Asteroid 1
a = AddAsteroidWithAttribs(3000, 0, 0.5,1,1)
a.Owner = 0
a.TreeCap = 6
a:SetRadius(100)
end
function OnAsteroidTaken()
GetAsteroid(0):Rotate180()
end
function LevelLogic()
end
and
function LevelSetup()
-- Set Global Values
Globals.G.Asteroids=(0)
Globals.G.EnemyFactionsMin=(0)
Globals.G.EnemyFactionsMax=(0)
-- Asteroid 0 - starting asteroid
a = AddAsteroidWithAttribs(0, 0, 1,1,1)
a.Owner = 1
a.TreeCap = 8
a:SetRadius(500)
a:AddSeedlings(100)
-- Asteroid 1
a = AddAsteroidWithAttribs(3000, 0, 0.5,1,1)
a.Owner = 0
a.TreeCap = 6
a:SetRadius(100)
end
function OnAsteroidTaken()
GetAsteroid(0).Rotation = 1.5
end
function LevelLogic()
end
and
function LevelSetup()
-- Set Global Values
Globals.G.Asteroids=(0)
Globals.G.EnemyFactionsMin=(0)
Globals.G.EnemyFactionsMax=(0)
-- Asteroid 0 - starting asteroid
a = AddAsteroidWithAttribs(0, 0, 1,1,1)
a.Owner = 1
a.TreeCap = 8
a:SetRadius(500)
a:AddSeedlings(100)
a:Rotate180()
-- Asteroid 1
a = AddAsteroidWithAttribs(3000, 0, 0.5,1,1)
a.Owner = 0
a.TreeCap = 6
a:SetRadius(100)
end
function LevelLogic()
end
and
function LevelSetup()
-- Set Global Values
Globals.G.Asteroids=(0)
Globals.G.EnemyFactionsMin=(0)
Globals.G.EnemyFactionsMax=(0)
-- Asteroid 0 - starting asteroid
a = AddAsteroidWithAttribs(0, 0, 1,1,1)
a.Owner = 1
a.TreeCap = 8
a:SetRadius(500)
a:AddSeedlings(100)
a.Rotation = 1.5
-- Asteroid 1
a = AddAsteroidWithAttribs(3000, 0, 0.5,1,1)
a.Owner = 0
a.TreeCap = 6
a:SetRadius(100)
end
function LevelLogic()
end
and a bunch more, but that's all I can remember.
EDIT: I thought that it could make a good defense thing - if a planet is attacked,spin the trees away, but of course, it won't work. The new patch might allow this, and trees on growing/shrinking roids.
I've tried this and no error message or no crashes but no result ???
function LevelSetup()
-- Set Global Values
Globals.G.Asteroids=(0)
Globals.G.EnemyFactionsMin=(1)
Globals.G.EnemyFactionsMax=(1)
-- Asteroid 0 - starting asteroid
a = AddAsteroidWithAttribs(0,0, 0.7,0.6,0.5)
a.Owner = 1
a.TreeCap = 1
a:SetRadius(250)
a.SendDistance = 2500
a:AddSeedlings(90)
-- AddAsteroidWithAttribs( x, y, energy, strength, speed )
--a.Owner = 0 : eigenaar
--a.TreeCap = 5 : aantal boomen
--a:SetRadius(900) : groote
--a.SendDistance = 5000 : verzend afstand
-- Asteroid 2 - lege asteroid
a = AddAsteroidWithAttribs(-2500,0, 1,1,1)
a.TreeCap = 5
a:SetRadius(900)
a.SendDistance = 5000
end
function LevelLogic()
GetAsteroid(0)get_Rotation(360)
end
but where must i put this :
rotation = 0
just in your Asteroid settings?
I go a error : function LevelSetup()
-- Set Global Values
Globals.G.Asteroids=(0)
Globals.G.EnemyFactionsMin=(1)
Globals.G.EnemyFactionsMax=(1)
-- Asteroid 0 - starting asteroid
a = AddAsteroidWithAttribs(0,0, 0.7,0.6,0.5)
a.Owner = 1
a.TreeCap = 1
a:SetRadius(250)
a.SendDistance = 2500
a:AddSeedlings(90)
a.rotation = 0
-- AddAsteroidWithAttribs( x, y, energy, strength, speed )
--a.Owner = 0 : eigenaar
--a.TreeCap = 5 : aantal boomen
--a:SetRadius(900) : groote
--a.SendDistance = 5000 : verzend afstand
-- Asteroid 2 - lege asteroid
a = AddAsteroidWithAttribs(-2500,0, 1,1,1)
a.TreeCap = 5
a:SetRadius(900)
a.SendDistance = 5000
end
function LevelLogic()
rotation += 0.01
GetAsteroid(0).Rotation = rotation
end
If i load a othere level, I get this to appear :