Scrolling Map in GameSalad help please? :)

allc1865allc1865 Member, PRO Posts: 777
Hello everyone, I wanted to make my miniMap scrollable so that wherever the player dot goes, the map goes with it. I do have it in a HUD, but I can only go so far and then the dot will go off the map and you can't see it anymore.
Can anyone help me with this, please? Thank you! :) ;)

Best Answer

  • tatiangtatiang Posts: 11,949
    edited December 2013 Accepted Answer
    But..... no matter what size your background is, you can use any size mini map and it will still work. It's based off of attributes and it basically takes the percentage of the background (let's say you're 25% of the way across the scene) and applies it to the mini map (25% of the way across the mini map area).

    If your background is 1,000 x 2,000 or 2,000 x 4,500, it should still work to have a mini map that is 100x200.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Answers

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • allc1865allc1865 Member, PRO Posts: 777
    @tatiang, thanks for your reply. That's what I have. I guess I was hoping that no matter how long my game was, say, 4,000 wide or high, I could make my map scrollable so that it follows my dot no matter how tall or wide it is. Like this:

    image

    as the dots keep going up or down or whatever, so does the map.

    Thanks for your help :)
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    So you want a mini map that is scrollable? I guess I missed that part of it. I thought you just wanted a scrollable gameplay area with a mini map. I actually don't see the point of having a scrollable mini map. Is that just so that you can use a larger image for the background of the mini map? Because otherwise, the mini map area is just a ratio of the width and height of the gameplay area and it shouldn't need to scroll.

    Do you realize that the demo I made constrains the mini map dots so that they never leave the mini map area?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • allc1865allc1865 Member, PRO Posts: 777
    Yes. It's supposed to be a portion of your background's size, which I understand. If your background is 1,000x2,000, your miniMap would be 100x200, however if I wanted to make my background bigger, I would have to make my miniMap bigger, which I do not want to do. So, I was wondering if there was a way to make my miniMap scrollable so I would not have to make it bigger in size...because I want to have obstacles up ahead and those obstacles I want to be placed on the map so that the player can see what's ahead.

    I do realize that now that your dots constrain to the miniMap. That will be useful, thanks! I'm going to go ahead and add that feature to my map.

    Thanks for your help :)
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    As an example, I took the file and doubled the width of the scene. I had to change the player actor constrains to the new width (3840 instead of 1920) but otherwise it's exactly the same code. I just stretched the image so it would fit the new width... it doesn't look great.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • allc1865allc1865 Member, PRO Posts: 777
    Hi, @tatiang. Thanks for the template. That's actually what really what I need. I'm going to add that to my map.

    I just have one question, maybe I'm not seeing it. When you say in the actors, "see instance for rules", what do you mean by that?

    Thank you so much! :)
  • allc1865allc1865 Member, PRO Posts: 777
    Okay. I see it. You unlocked the actor in the scene itself.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    A prototype actor is one that is still locked and whose rules are the same for every copy of itself in a scene.

    An instance is an unlocked copy of an actor with rules that are unique to that copy.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • allc1865allc1865 Member, PRO Posts: 777
    Right. That makes sense, thanks.
    I applied your template rules to mine and it seems to be working great.
    I had hoped there was a way to do this, so I'm glad there is. #:-S
    Thanks so much for your help :)
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    You're welcome!

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.