Author Topic: Flower chance?  (Read 4510 times)

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 24
  • Posts: 932
  • Eufloria: Yes
Flower chance?
« on: June 03, 2010, 10:56:14 PM »
I'm fairly certain that there was a variable that affected the likelihood of a flower growing on a tree. What was it, or was I dreaming?

I think annik was involved in the discussion that I heard/read of it in, and the number 0.05 or similar came up.


EDIT: Never mind - went trawling through annik's posts and found it.
« Last Edit: June 03, 2010, 11:26:04 PM by Pilchard123 »

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: Flower chance?
« Reply #1 on: June 04, 2010, 07:19:27 PM »
The scripting reference thread is your friend :D

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 24
  • Posts: 932
  • Eufloria: Yes
Re: Flower chance?
« Reply #2 on: June 04, 2010, 10:25:49 PM »
I know, but I couldn't find it in there - I was looking in globals, not asteroid properties.  SetFlowerProbability(), yeah?

Another question - does that have to be done in LevelLogic() or can it be done in LevelSetup() when you make the asteroid?

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: Flower chance?
« Reply #3 on: June 09, 2010, 11:03:16 PM »
You can set the flower probability any time you like, yep.

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 24
  • Posts: 932
  • Eufloria: Yes
Re: Flower chance?
« Reply #4 on: June 10, 2010, 06:35:49 PM »
kk. Thanks.

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: Flower chance?
« Reply #5 on: June 10, 2010, 07:08:28 PM »
Globals.Structures.FlowerProbability (float) is the command to set the default value for all asteroids in the level.

You can then specify individual asteroids to have a different probability, if you wish.

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 24
  • Posts: 932
  • Eufloria: Yes
Re: Flower chance?
« Reply #6 on: June 10, 2010, 07:20:47 PM »
Didn't know about the global one. Thanks, I'll remember that.

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: Flower chance?
« Reply #7 on: June 11, 2010, 01:15:18 AM »
The global one might not work after the levelsetup, as asteroids might use that value when they are created but not afterwards. Think so.