Constraining to X and Y

So I've been working on this game for some time now and I'm going through tweaking the graphics.
I have four different coloured lanterns that fly upwards, they all have an animation behaviour to make them look 3D like they are spinning. I want to put a slight translucent glow behind each of them so they look more appealing.

Each animation is about 30 fames by the 4 actors 120 images. I want to save some time and file size so i figure i add an "glow" actor for each of them and constrain the X and Y from the glow to the lantern of its colour. Each time a new lantern spawns i spawn a new glow actor. when they reach a certain Y value they destroy.

The issue is if a lantern is half way up the screen not yet at the peak Y value and a new lantern spawns at the bottom the glow actor will jump from the top one down to the new one and so on.

Any ideas guys?



Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    You need to have each lantern reporting to a seperate x and y variable so make four seperate lantern actors and four seperate glows one for each. Have each of the four report to a set of variables dedicated to it. When one dies have it spawn it's copy so lantern one would spawn lantern one et... Same with the glows.
  • Pocket_TechPocket_Tech Member Posts: 50
    Yeah sorry i should have also explained i have 4 prototypes red green yellow and purple which are spawing at various intivals, at any given time i could have on screen 6 red, 7 green, 4 yellow and 5 purple. They are constantly spawning as they are a major component of the game. In one play over 50 red lanterns could enter the screen during the game. Do i need 50 instances for this to work?
  • mataruamatarua Auckland, New ZealandMember Posts: 854
    You may find some stuff with a search of the forums like this...

    http://forums.gamesalad.com/search?Search=unique+spawn
Sign In or Register to comment.