Author Topic: Problem with GetFlower()  (Read 6549 times)

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Problem with GetFlower()
« on: December 28, 2010, 03:11:32 AM »
I'm having problems with the "GetFlower()" command. 


Code: [Select]
-- do we have a flower?
flower = checkedroid:GetFlower(checkedroid.owner)


if checkedroid.owner > 1 then
flower:Pluck()
flower:PlantOnRandomDysonTree()
end

It does not seem to return a flower if the flower is still attached to the tree.  :<
So it seems like there is still no way to return a flower that has grown on a tree through probability rather than scripting, and pluck it.

Once the flower is plucked, "checkedroid:GetFlower()" works fine, and correctly returns the flower.

But how to refer to a flower that is still on the tree, in order to pluck it?
Anyone know?
Is this a bug?

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: Problem with GetFlower()
« Reply #1 on: December 30, 2010, 04:18:52 AM »
Try calling GetSuperSeedling() on a tree - if there's one growing it should give you a reference to it, whether it is a mine or a flower. Confusingly, internally the mines and flowers are called "SuperSeedlings" even though the in-game super seedlings are just powered up regular seedlings.

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: Problem with GetFlower()
« Reply #2 on: December 30, 2010, 07:00:46 AM »
Thanks!  Will give this a try.  :>

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: Problem with GetFlower()
« Reply #3 on: December 30, 2010, 07:13:40 AM »
Alex, you're a genius. :>  It works!