Eufloria > Eufloria Classic Mods

Lua scripting in Eufloria - reference

<< < (10/13) > >>

Aino:
Any way to select each and every seed in the whole game?

Like:


--- Code: ---for i = 1,NumSeedlings() do --NumSeedlings can be a variable by adding all the current seeds frome ach empire in the game, thats not the problem :)
if Agent(i) ~= nil then
x = Agent(i).position.X   --position.X is existing for all game enitites, so I guess that would work if you can call each and every agent alone :)
--make a variable containing x, if there is anything like this, is there then possible to track(if the seeds are on move) where they are going(asteroid wise)?
end
end
--- End code ---

Now I am asking before I have experimented though... as usual -.-

Pilchard123:
Just brainstorming, but here goes:

Get the number of empires, the number of asteroids, and the number of seedlings on each asteroid.

At EVERY roid, run a FOR loop for each empire, for the number of their seedlings on that roid. This loop would pick up a specific seedling, there is a way of doing this, but I'm not sure how just atm. Add this collected seedling to a variable.

This variable will hold all seedlings.


...


Maybe.

Aino:
o.O...

Just do a for loop for all empires and NumSeedlings?

Pilchard123:
Or that, either way. Why did I not think of that?

annikk.exe:
I recall there is a way to access an inbuilt array of seedlings, organised per asteroid.  Can't remember offhand how to do it though.
If you make your own array and store the seedlings in it, you could then run commands on them even if they are mid-flight between two asteroids.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version