Destroying Dot Actors on Map help please? :) ;)

allc1865allc1865 Member, PRO Posts: 777
hello everyone!
I need help destroying my coin actors on the miniMap after my player actor has collided with them.
I'm not sure what to do because I have them on the screen unlocked because I had to put rules in them to make them work and show up on the miniMap.
What I need to have happen is when my player has collided with the coins, they disappear on the miniMap.
Any help will be greatly appreciated!
Thanks in advance!

Best Answer

  • KeithQKeithQ Posts: 25
    Accepted Answer
    Here is the fix actually two fixes one that uses scene.///.variable to relate the two actors and one that spawns the mini-actor from each instance of the main actor (energyPointActor). The second solution means that you only need one energyPointActor and you can drag multiple instances to the screen.

    I put notes in miniEP, energyPointActor, and in the two scene unlocked actors that are purple.

    https://www.dropbox.com/s/uaqv12n7syplhcb/MiniMap-fix Game.zip

Answers

  • KeithQKeithQ Member Posts: 25
    What is the relationship between the coins and the dots? does the map shows the location of the coins or are they independently generated?
  • KeithQKeithQ Member Posts: 25
    Are you generating your dots whenever a coin actor is spawned . If not here's an idea when the coin is spawned or placed record its screen location to a database then calculate the relative location on your minimap. Adding the info of each instance to the next row in the db. Also create an index and increase it by 1 for each coin spawned. Create two booleans columns, one to determine if a mini-coin should be spawned and one to ask if it should be destroyed. Add these values to the db when spawning coins. Now on your minimap layer add an actor to spawn dots. Use the modulus as a timer and tell it to spawn the dot relative to the db xy location if the first boolean value is true and to then change that value to false or zero. Thus dots will be spawned whenever a given row in the db has a true value in it. But never spawned twice. When a coin is destroyed change that coins index second Boolean to true. The mini coin must have as it destroy condition;if its index second Boolean = true then destroy this actor. I've left out some peices but I think you can figure out the rest. Unless I've forgotten something this should work.
  • allc1865allc1865 Member, PRO Posts: 777
    @keithQ, Hi. Thanks for your reply! I set dots on my map individually creating new attributes for each one. They are not spawned.
    Here's my template to look at it?
    https://www.dropbox.com/s/44r3p3rgtum67m3/MiniMap Game.zip
    Thanks! :)
  • allc1865allc1865 Member, PRO Posts: 777
    @keithQ, if you wouldn't mind taking a look at my file and tweaking it a bit?
    Thanks ;) :)
    https://www.dropbox.com/s/44r3p3rgtum67m3/MiniMap Game.zip
  • KeithQKeithQ Member Posts: 25
    Why aren't your dots spawned in relation to the coins they represent? Tell me the purpose of your mini map.
  • allc1865allc1865 Member, PRO Posts: 777
    To show the enemies in the game and coins so the player can go to them and pick them up.
  • allc1865allc1865 Member, PRO Posts: 777
    What I did was just make a new actor, add two constrain attributes, then drag those actors on to the scene on to the miniMap. Then I dragged those same actors again on to the scene, unlocked them and constrained them to show where they were so they show the correct position for the dots on the miniMap
  • allc1865allc1865 Member, PRO Posts: 777
    If there's a better way to do it and still be able to destroy the dots on the miniMap once the player has collected them, I'll do that. Thanks for your help.
  • allc1865allc1865 Member, PRO Posts: 777
    @KeithQ, thank you so much! This is much better. This is more realistic than the one I originally had.
Sign In or Register to comment.