Going over and under a bridge in GameSalad

allc1865allc1865 Member, PRO Posts: 777
Hi everyone! Is it possible to make a bridge and then go under it, but then also be able to go on top of it in Gamesalad? I know you can go under something, but I wasn't sure how to go on top. Any ideas on how to do this?

Any help would be great! Thanks!

Best Answers

  • FallacyStudiosFallacyStudios Posts: 970
    edited December 2013 Accepted Answer
    Well you can't currently adjust layer levels at runtime. It would be nice to have that option.

    In the meantime you can try this. When your character, or whatever it is, collides with bridge. Have the bridge spawn your actor above or below and delete the previous one.
  • TheGabfatherTheGabfather Posts: 633
    edited December 2013 Accepted Answer
    Are you designing your game in 2D side-scroller fashion, or pseudo-3D (think Temple Run), or top-view?

    If it's the side-scroller, you can make use of 2 Actors. One for the upper-half of the bridge which contains the collision Rule, and another for the lower half of the bridge which contains no collision Rule and is on a higher-level layer as that of your character.

    If it's pseudo-3D, I don't know.. I'd probably give up given the complexity and just continue using another game engine that's more suited for that.

    if it's top-view, as @FallacyStudios said you cannot change Actors' layers at runtime currently. His method will work just fine. Although I believe changing layers at runtime as a feature isn't such a far fetched idea -- we'll see it in Creator one of these days, I'm positive :)
  • BBEnkBBEnk Posts: 1,764
    Accepted Answer
    @TheGabfather, Thanks! It's from the top view, and so I guess it can't be done just yet. I'll simply have them going under bridge instead of on top.
    Giving up so easy want make you a better game maker,lol..

    Without much thought on this I would just have two images of the bridge on different layers and one set alpha to 0 other to 1 by dafualt and then have a trigger system around the bridge which would decided who is visible when actor passes depending on which trigger is hit, or you could even do this based on direction of approach.
    Or better yet make image area around bridge bigger then bridge so when actor touches then the rules kick in checking position of actor to decided which image will be shown so that he goes under or over. Theres lots of ways to do this.

Answers

  • allc1865allc1865 Member, PRO Posts: 777
    FallacyStudios, Thank you! That's a good idea!
  • allc1865allc1865 Member, PRO Posts: 777
    @TheGabfather, Thanks! It's from the top view, and so I guess it can't be done just yet. I'll simply have them going under bridge instead of on top.
  • allc1865allc1865 Member, PRO Posts: 777
    @BBEnk, that worked. Thank you so much! I didn't even think of that.
    I used the alpha's and the triggers around the bridge to get it to work. Thanks again!
Sign In or Register to comment.