Opacity/connection issue? Maybe?

Discussion in 'Buildbox General Discussion' started by Lazlow, Jan 25, 2016.

  1. Lazlow

    Lazlow Boxer

    Joined:
    Nov 23, 2015
    Messages:
    50
    Likes Received:
    6
    Not really sure how to explain this one.

    I want to animate a fish swimming by in my game. I'm using a flag effect with the fish image set as the texture. I have the wave settings set so it looks like it's swimming nicely, fine. That works.

    In order for it to move across the screen, I connect it to an object (in this case, the fish again) and have the fish object move. The fish object moves and takes the flag effect with it. That works too. So when my character comes close (wake up set to 500, which is another problem altogether because with other objects it only needs 50, but that's another thread/support ticket) the fish object and the animated fish both swim by. Fine. But it's two fishes on top of each other, one swimming and one static.

    Now, in order to fix this I should just set the opacity of the (non-animated) object to 0 and it should work. I did this in BB1, it looked and worked great. However, in 2.0 both the object and the flag effect disappear. I try scaling the object down and they both disappear, too. I tried setting the opacity to 0.1 and it makes no difference, anything between 0.1 and 1 is exactly the same.

    I can hide the static object's layer, and THEN I see only the animated fish - but it doesn't move, it's as if the object isn't there at all.

    Any suggestions?
     
  2. steve

    steve Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    103
    Likes Received:
    36
    Instead of using the fish object to tow the other fish along, try importing another object to your game (can be anything - a small 10x10 image should work fine). Give that the wakeup and move values you gave to the fish object and attach the flag effect fish to that object. Then rather than changing the opacity of the object, delete the image from the default animation. The invisible object should pull your fish along as required. To make changes to the invisible object, turn debug on and you'll be able to see it.
     
  3. Lazlow

    Lazlow Boxer

    Joined:
    Nov 23, 2015
    Messages:
    50
    Likes Received:
    6
    Yep, this is what I ended up doing, and it works great. Thanks!
     

Share This Page