Mini Map Tracking issue
SingleSparq
Member Posts: 1,339
This is to demo a mini map tracker.(based on the mini map demo)
http://gamesalad.com/game/play/30767
Like in the old defender games where enemies would appear on a mini map of the scene layout.
As the orange actors are randomly displayed the actor also spawns the mini dot actor and tracks the main object as the position moves.
Unfortunately there is one problem with this scenario. If you hit your right movement key to scroll the scene, you will note the mini dots do not stay in the map HUD - this is because they (like the orange actor) are spawned on a scrollable layer. The catch 22 is that in order to track the Orange objects individually the orange object must spawn the mini objects (and the Orange object need to be on the scrollable layer).
If I change it where the mini object is not part of Orange object and on it's own (non-scrolling) layer it will only track one object at a time.
Does anyone know of a different way to achieve what I've done here with Orange Actor (on scrolling layer) that can be tracked with a mini Actor (on non-scrolling layer )for each instance of that Orange Object?
http://gamesalad.com/game/play/30767
Like in the old defender games where enemies would appear on a mini map of the scene layout.
As the orange actors are randomly displayed the actor also spawns the mini dot actor and tracks the main object as the position moves.
Unfortunately there is one problem with this scenario. If you hit your right movement key to scroll the scene, you will note the mini dots do not stay in the map HUD - this is because they (like the orange actor) are spawned on a scrollable layer. The catch 22 is that in order to track the Orange objects individually the orange object must spawn the mini objects (and the Orange object need to be on the scrollable layer).
If I change it where the mini object is not part of Orange object and on it's own (non-scrolling) layer it will only track one object at a time.
Does anyone know of a different way to achieve what I've done here with Orange Actor (on scrolling layer) that can be tracked with a mini Actor (on non-scrolling layer )for each instance of that Orange Object?
Comments
game.badguy1x / (map scale - see below) + offset
So lets say your scene is 1000 pixels wide and the mini map is 100 pixels wide your map scale would be 10 because 100 is 1/10 of 1000.
The offset number is simply how far your minimap is placed from the edge of the screen.
Just make sure that you place the dot actors on a non-scrolling layer. Good Luck!