Euflorium: The Eufloria Community
Eufloria => Eufloria Classic => Eufloria Classic Mods => Topic started by: Aino on February 22, 2011, 09:07:43 PM
-
Ok, I know that you can sue:
Tree = GetAsteroid(i):GetRandomDysonTree()
if Tree ~= nil then
Flower = Tree:GetSuperSeedling()
to find flowers on trees, but what about roids when the flowers/mines are plucked already?
-
Asteroid:GetSuperSeedling()?
Not certain, but it sounds logical.
-
Gonna test :)
-
Ok, but how to find Mines?
-
GetMine()
Needs an empire as a parameter, though it may just use the 'roid's current owner by default.
READ:
http://www.dyson-game.com/smf/index.php?topic=212.0
-
I use two different methods:
1. If I used Flower = Tree:GetSuperSeedling() to Pluck the flower, then I just continue to refer to that flower as Flower. Or, if I know there will be lots of flowers, I refer to it as an array - Flower.
2. If it's an arbitrary flower that hasn't been named yet, I check each asteroid and try to assign any flowers on it to a variable such as Flower using the GetFlower(int faction) command.
-
By the way, both GetFlower(int faction) and GetMine(int faction) must be run on an asteroid.
EG: Flower = GetAsteroid(j):GetFlower(i)
-
Kay :)
Need to do some changes...
-
But in the frist place, how do I find mines?
EDIT: Forgot the stuff some lines above :)
-
GetMine()
Needs an empire as a parameter, though it may just use the 'roid's current owner by default.
READ:
http://www.dyson-game.com/smf/index.php?topic=212.0
But will that return all of the mines/flowers? Or just one???
-
It returns a random one. :>
-
Mhm... so this code will work?
if CCFPriority[i] > CCFPriority[Neighbour[j]] and CCBarrier[i] == false and GetAsteroid(i).owner == 1 then
CCFPriority[i] = CCFPriority[Neighbour[j]] + 1
if GetAsteroid(i):GetNumFlowers(1) > 0 then
CCFlower = GetAsteroid(i):GetFlower(1)
CCFlower:SendTo(Neighbour[j])
end
end
-
Yup, should do :>
-
But it doesn't -.-
-
Do you get any error message?
-
Ye... Error with Flower.SendTo and I wrote Flower:SendTo() ... What the heck?
-
Annikk I'lls end the code, please try to help... it's the last thing before the release :/
-
Any luck with this? I've not had time to try this myself as I've been busy with work. I'm actually in Abu dhabi at the moment. Flying home tonight.
-
Nope... Want it to work, but no succes :/
My coding sudenly dropped, after I encountered that problem, a new update for Minecraft came and I sudenly stopped... Hope I will code again soon though :)