Family and Containers problem

0 favourites
  • 2 posts
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • Hi everybody

    Ok here is my problem: I have two families: The first one contains objects representing ammo cases, the second one are off-screen indicators. each ammo case has a container composed of one the objects from the Indicators family (off screen indicators), then, and just to be clear, each ammo case contains (or is contained) an indicator. Ok, so far so good, now the real problem is that to be able to position an off-screen indicator I use a for loop that iterates through all the ammo cases (AmmoCase family is being used in the loop) currencly on screen, it uses some simple math to ensure that the indicators only appear on the screen as long as the ammo case that it "indicates" is not currently being shown up, the actual problem here is that if I have say 4 ammo cases all the 4 indicators are being positioned relative to the position of 1 of the 4 ammo cases, I suppose it has something to do with the loop or something... any help would be appreciated. Thanks

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ok no worries, problem solved :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)