Author Topic: Lua scripting in Eufloria - reference  (Read 163409 times)

0 Members and 1 Guest are viewing this topic.

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: Lua scripting in Eufloria - reference
« Reply #30 on: January 03, 2011, 09:44:22 AM »
Probably better to do this on a case-by-case basis. I don't know of any rotters in there that take more time than they ought, I'd have to take a look to see which are the most hefty.

I'll have a look in the thread now...

Avaguard

  • Seedling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 40
  • SO what if im a girl that plays games
Re: Lua scripting in Eufloria - reference
« Reply #31 on: January 25, 2011, 03:38:33 AM »
heres 1 u can maybe add RevealAll() although maybe everyone already knew...........maybe i did something wrong just now :-\
People really need more GUARDS

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: Lua scripting in Eufloria - reference
« Reply #32 on: January 25, 2011, 04:10:16 AM »
You could just do it this way:


Code: [Select]
for i = 0,numberofasteroidsinyourlevel do
GetAsteroid(i):Reveal(1)
end

:>

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: Lua scripting in Eufloria - reference
« Reply #33 on: January 30, 2011, 12:35:23 AM »
RevealAll() is a command that was added and should now work. I haven't updated this docs thread in ages, sorry.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 27
  • Posts: 1,523
  • They'll eat you next!
  • Eufloria: Yes
Re: Lua scripting in Eufloria - reference
« Reply #34 on: March 26, 2011, 08:37:33 AM »
Is there anyone that wants to make a writing program just for Eufloria? So it will recognize all these codes automatically instead of going up here just to figure out? :)

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 21
  • Posts: 929
  • Eufloria: Yes
Re: Lua scripting in Eufloria - reference
« Reply #35 on: March 27, 2011, 04:22:07 AM »
I'm working one one, I have been for a while now. Search for "EUCLiD". The uploaded one at the moment is rather basic, but will get maps done quick. EUCLiD 2 will be much more functional.


http://www.dyson-game.com/smf/index.php?topic=834.0 is the announcement thread, has a link to a download thread.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 27
  • Posts: 1,523
  • They'll eat you next!
  • Eufloria: Yes
Re: Lua scripting in Eufloria - reference
« Reply #36 on: March 27, 2011, 05:32:21 AM »
I would really like a coding window, and as I see it now, you are using some kind of Visual C... So you know what I mean maybe... If you use some kind of Visual C thingy...

What I meant was a nice program that was just like a notebook or notepad or whatever that recognizes parts of codes and show some examples of codes that looks a little alike...

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 21
  • Posts: 929
  • Eufloria: Yes
Re: Lua scripting in Eufloria - reference
« Reply #37 on: March 27, 2011, 05:46:40 AM »
Ah. Try programmer's notepad, or notepad++

I'll probs put in a coding window to EUCLiD too.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 27
  • Posts: 1,523
  • They'll eat you next!
  • Eufloria: Yes
Re: Lua scripting in Eufloria - reference
« Reply #38 on: March 27, 2011, 10:39:23 AM »
I use notepad++ already :) What I am talking about is a way to not need to go in here and look after the thing you seek... Simply jsut either search for it in the program or it will pop up in a littl box when you write and you can choose from several(depends) built-in methods to put in...

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 27
  • Posts: 1,523
  • They'll eat you next!
  • Eufloria: Yes
Re: Lua scripting in Eufloria - reference
« Reply #39 on: March 29, 2011, 01:50:38 AM »
Is there any way to GET the attribs of an entity? Like entity.attribs.speed?

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: Lua scripting in Eufloria - reference
« Reply #40 on: March 29, 2011, 06:45:49 AM »
Yes.

roidstrength = GetAsteroid(x).attribs.strength

For example :>

".attribs.strength" should work for other entities too.  And of course you can call energy and speed, not just strength.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 27
  • Posts: 1,523
  • They'll eat you next!
  • Eufloria: Yes
Re: Lua scripting in Eufloria - reference
« Reply #41 on: March 29, 2011, 09:29:05 PM »
God -.- I have been close though, cause Lua is case sensitive?

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: Lua scripting in Eufloria - reference
« Reply #42 on: March 29, 2011, 09:33:50 PM »
Hmm,  not sure.. :>

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 27
  • Posts: 1,523
  • They'll eat you next!
  • Eufloria: Yes
Re: Lua scripting in Eufloria - reference
« Reply #43 on: March 29, 2011, 09:36:02 PM »
not working :/ Better check it closeluy then...

Code: [Select]
if GetAsteroid(i).attribs.energy > HighestEnergy then

HighestEnergy = GetAsteroid(i).attribs.energy

end

I get the error: invalid arguments to method call, the function is the AI... and I suspect the attrib part to be the fault...

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 27
  • Posts: 1,523
  • They'll eat you next!
  • Eufloria: Yes
Re: Lua scripting in Eufloria - reference
« Reply #44 on: March 29, 2011, 09:42:53 PM »
Solved I think, I saw an error though, I was calling i when it wasn't in a for loop or the variable i was existing :) Changing now :D