Euflorium: The Eufloria Community

Eufloria => Eufloria Classic => Eufloria Classic Mods => Topic started by: Souldiver on November 03, 2010, 01:16:38 AM

Title: A Swiss "noob" needs some scripting help
Post by: Souldiver on November 03, 2010, 01:16:38 AM
Hi

First of all a HUGE thanks to all people involved into the "Eufloria project" - I just LOVE this game! In the last 20 years I only found few games that were so great fun (Endorfun, Bolo/DiaBolo or Logical to name a few). The fact that I can create own levels even doubles its value and your tutorial really makes the first steps easy. Still, I have some problems and I hope that someone can help me out. I must confess that although I spent hours reading threads now, there are some things I couldn't find out or I just did not understand, due to my limited knowledge in English langauge. I thought the easiest way is to post the actual "problem" and ask for some help. So, there we go; could please someone tell me what has to be written in place of the dots between the brackets? Any help is highly apreciated - Thank you!


function LevelSetup()

  -- Appearance
  SetBackdropColor(255,170,85)


  -- Set Global Values
  Globals.G.Asteroids=(0)               
  Globals.G.EnemyFactionsMin=(1)            
  Globals.G.EnemyFactionsMax=(1)            


  -- Mary - starting asteroid
  Mary = AddAsteroidWithAttribs(0,0, 1.0,0.1,0.1)
  Mary.Owner = 1
  Mary.TreeCap = 4
  Mary:SetRadius(400)
  Mary.SendDistance = 2500
  Mary.Moveable = false
  (...)            -- IN game Asteroid name is "Mary's Place"
  (...)            -- use Symbol "xy" for player "Mary"
  (...)            -- Asteroid "Mary" is red
  (...)            -- Color "Mary's" seedlings (e.g. red grain / yellow wings)

  Sun:AddSeedlings(50)


  -- Peter
  a = AddAsteroidWithAttribs(-2000,0, 0.1,1.0,0.1)
  a.Owner = 2
  a.TreeCap = 3
  a:SetRadius(300)
  a.SendDistance = 2500
  a.Moveable = false
  (dito)            -- Asteroid name IN game is "Peter's Den"
  (dito)            -- use Symbol "abc" for AIplayer "Peter"
  (dito)            -- Asteroid "Peter" is green
  (dito)            -- Color "Peter's" seedlings (e.g. green grain / petrol wings)

  a:AddSeedlings(80)
 

  -- Paul
  a = AddAsteroidWithAttribs(2000,0, 0.1,0.1,1.0)
  a.Owner = 3
  a.TreeCap = 3
  a:SetRadius(300)
  a.SendDistance = 2500
  a.Moveable = false
  (dito)            -- Asteroid name IN game is "Paul' Pub"
  (dito)            -- use Symbol "blah" for AIplayer "Paul"
  (dito)            -- Asteroid "Paul" is red
  (dito)            -- Color "Paul's" seedlings (e.g. blue grain / turquoise wings)

  a:AddSeedlings(80)


end

function LevelLogic()

end
Title: Re: A Swiss "noob" needs some scripting help
Post by: Pilchard123 on November 03, 2010, 02:04:15 AM
Well, I haven't done much scripting recently, but I'll have a go.

IN game Asteroid name is "Mary's Place"
Replace the brackets with Mary.Name = "Mary's Place" The quote marks are IMPORTANT!! If the you use apostrophes instead, it will not work.

use Symbol "xy" for player "Mary"
Hmmm.  Possible, I think, but it would require quite a lot of scripting which I've never used. I don't think it's too complicated, just long.
(click to show/hide)

Asteroid "Mary" is red
I don't think that's possible.

Color "Mary's" seedlings (e.g. red grain / yellow wings)
I don't think this is possible either.

Also, welcome!
Title: [OT] Gruezi
Post by: Bonobo on November 03, 2010, 02:07:13 AM
Just a little [OT] “Gruezi” to Souldiver from Germany.

Tom
Title: Re: A Swiss "noob" needs some scripting help
Post by: Rudolf on November 03, 2010, 06:11:03 AM
Wilkommen soul diver. Danke fur die nette worter.

Hmm not quite right I think. Also, being from Switzerland you could speak like, 6 languages.  ;)
Title: Re: A Swiss "noob" needs some scripting help
Post by: annikk.exe on November 03, 2010, 07:21:15 PM
Hi Souldiver,

Looks like Pilchard has already answered this, but I did just want to point something out...


Code: [Select]
 -- Mary - starting asteroid
  Mary = AddAsteroidWithAttribs(0,0, 1.0,0.1,0.1)
  Mary.Owner = 1
  Mary.TreeCap = 4
  Mary:SetRadius(400)
  Mary.SendDistance = 2500
  Mary.Moveable = false
  (...)            -- IN game Asteroid name is "Mary's Place"
  (...)            -- use Symbol "xy" for player "Mary"
  (...)            -- Asteroid "Mary" is red
  (...)            -- Color "Mary's" seedlings (e.g. red grain / yellow wings)

  Sun:AddSeedlings(50)


What is "Sun"?  You're trying to add 50 seedlings to what I presume is meant to be an asteroid, but you didn't actually create an asteroid called "Sun" yet!  This will not work.  You need to create an asteroid called "Sun", and so far you've only created an asteroid called "Mary".  Alternatively you could remove that command, or comment it out.