spawning actors on miniMap?
allc1865
Member, PRO Posts: 777
Hey everyone! I have my miniMap set up, but I want to have it show all the energy stars that my player has to collect. Right now I just have one set up, but when I go to do another, it doesn't work. So I was wondering how to do it... Thanks for any help!
Best Answers
-
tatiang Posts: 11,949Here's a really simple demo. It gets trickier when you're dealing with camera origin attributes and larger scenes but this will show you the math if that's what you're having trouble with. The formula is basically taking the percentage of the larger "map" area that the coin is positioned in and applying it to the smaller map area to position the smaller coins.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
-
jamie_c ImagineLabs.rocks Posts: 5,772You'll need to keep trouble shooting.
Think about what is supposed to happen when the player collides with things. If there are several things you have set up, eliminate them one at a time until you find what was causing the crash. Or even delete them all and start over, testing each event first before you add another to make sure each one works first before you add another.
Answers
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thanks
Most likely, then you would have each larger coin spawn a smaller mini map coin at the correct location.
What are you having trouble with?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
My game crashes, though. I think that's my main problem. I have all my coins in there, and when my character collides with the enemy, it crashes. Would you know why this is?
Thanks again! The file size is 861 KB
So it's rarely effective to write "My main character disappears when I reach a door" or even "I have this rule that says when my monster is higher than a certain position, increase the acceleration." What we really need is the EXACT rule(s) in question. So, for example, you might write:
When [attribute] self.Position.X >= 350
Change Velocity [direction=90] [speed=game.theSpeed] [relative to: scene]
I'm just pointing that out because you are frequently telling what is wrong without providing the necessary details for us to help you solve the problem.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
My problem is that when my actor collides with the enemy, my project file game will crash.
This didn't start until I added in the images for my coins; they started out as boxes, but when I added in my images, when I go to give it play test, if my actor collides with the enemy it'll crash. These enemies are spawned from different Y positions, by the way.
I have two enemy actors in the actors panel itself that are spawning. I have quite a few rules that would take up a few screenshot images, but if you still want images, I'll post them all. But basically the enemy actors have magnitude on them both...when the player gets a certain distance away from the enemy, they'll spawn. I also have 1 actor named cameraSnatch placed in my scene. I unlocked it and placed two constrain attributes in the actor that say: game.cameraX to scene.Camera.Origin.X
the second one says:
game.cameraY to scene.Camera.Origin.Y
And like I wrote, my game file size is 860KB.
If you need anything else, let me know!
Thanks!
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User