Author Topic: How to create a random starfield in flixel 2?  (Read 1227 times)

Evan Zenker

  • Member
  • **
  • Posts: 12
  • Karma: +0/-0
    • View Profile
How to create a random starfield in flixel 2?
« on: Wed, Oct 20, 2010 »
The snippet spits a bunch of errors which makes me think it was written for 1.0.
« Last Edit: Wed, Oct 20, 2010 by Evan Zenker »

konamicode

  • Member
  • **
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: How to create a random starfield in flixel 2?
« Reply #1 on: Wed, Oct 20, 2010 »
Just tested it by straight copying the text from the snippet into a class. Worked perfectly.  What sorts of errors are you getting?

OmegaStorm

  • Member
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
    • OmegaStorm Productions
Re: How to create a random starfield in flixel 2?
« Reply #2 on: Wed, Oct 20, 2010 »
It works as far as I know. What are the errors?

initials

  • Contributor
  • ****
  • Posts: 378
  • Karma: +0/-0
  • Initials
    • View Profile
    • Initials Blog. Code and other things.
Re: How to create a random starfield in flixel 2?
« Reply #3 on: Wed, Oct 20, 2010 »
I can confirm it works great in Flixel v2.35.

You may need to stagger the code. Declare variables in up the top and then in the constructor call the StarField constructor.
Initials: Super Lemonade Factory, Super Lemonade Factory Part Two, Above The Clouds, Revvolvver, Four Chambers of the Human Heart

Evan Zenker

  • Member
  • **
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: How to create a random starfield in flixel 2?
« Reply #4 on: Thu, Oct 21, 2010 »
I figured it out... I was trying to put the class in the root flixel folder. It didn't work so I fixed it by putting it in the projects src folder...  :-\