HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: Minimap and Icons  (Read 2232 times)

ExileDarren

  • Developers
  • *
  • Posts: 2
    • View Profile
Minimap and Icons
« on: Jul 20, 14, 07:56:03 PM »

Hello all,

I've been trying to work on a minimap system, and have reached the point that I need to be able to add icons to the map. Things indicating the location of say, shops, repairs, quests.

And I've run into a brick wall.

I cannot seem to find any reasonable way to do it.

I have tried:

Checking NPCs in the area for a script with a flag indicating what they should have. I can't find any way to scan an area, so that method doesn't work.

Adding to our NPC script so that on replication, if you've toggled the boolean for say, Merchant to true, it adds to an Entity list for the player. Except, as far as I have been able to tell, adding fields to the properties of NPCs so you can adjust it in the game editor isn't actually possible, so that method is out.

Adding a script for every type of icon to the object. So a merchant NPC will get a script named NPC_Merchant, and on spawning on the player side, added to a list. Except, the list field seems to be per script, not per player, so i can't do it that way.

I've run out of ideas on how to possibly get the info to add objects a map, and really hope someone can give me some guidance, please?
Logged

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: Minimap and Icons
« Reply #1 on: Jul 20, 14, 09:13:13 PM »

When you add an object to the world, you can choose to set if it's visible to world, map, or both.

Can set the object in the world with no collision, and set it to map only. This removes it from being visible in the world but lets it show up on the minimap.

Also useful for when you want to have things in the world but not on the minimap.
Set it to world only and it won't show up on minimap.
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

ExileDarren

  • Developers
  • *
  • Posts: 2
    • View Profile
Re: Minimap and Icons
« Reply #2 on: Jul 21, 14, 12:29:50 AM »

That limits you to 3d objects only then, not GUI objects. And also limits you to using the minimap textures, not the common pre-rendered/drawn maps for world view.

It has to be possible, everything points at the whole Actors container for things, linking them to objects like you can with the player icon, but without being able to get the creature data, I don't see how it can be used.
Logged

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: Minimap and Icons
« Reply #3 on: Jul 21, 14, 01:05:43 AM »

It can be a flat plain that has a single texture facing upwards.

Also its using the pre-drawn maps for the world view. It's no different then the minimap rendering a tree versus the item.

For quest type items that need to be shown or not shown you can use the prop system in conjunction to turn on the markers for the player or not.

Or you can dig into overriding the  The $GUI system node classes to add custom things like markers for quests. That will depend on how you do your quest system or such. In regards to the minimap knowing the player data so it can determine if it should show the marker or not and where to show it on the map.

I was just pointing out that you can do a lot without having to redo any of the mini map. I've done lots of markers with just making simple flat plains and textures.
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]