Forum rules - please read before posting.

Navmesh and Markers questions.

edited November 2015 in Technical Q&A
Hi AC friends!

I have a couple of questions that will surely be easy to solve for the gurus of "Adventure Creator":

Question 1.- In my scene, the player can not access an area until it has made one specific action, and should only say, from a specific point of the scene, "I'm far away.". Can I change hotspots markers listed in the "walk-to-marker" property? What is the correct way to do it?

Question 2.- In the same scene, I need a little "island" in the navmesh, one area separated in the navmesh. If the player make one action, is teleported to this island, and if makes another action, go back to the "big" navmesh area.
How can I do it?. I tried adding a new "Polygon Collider 2D" in the default navmesh but not working. Do I have to create a new navmesh and indicate in the ActionList Editor somehow change navmesh default?


As always, thank you very much for your help !!

Comments

  • 1) You're better off having two separate Hotspots, each with a different Walk To Marker, and then using the Hotspot: Enable or disable Action to swap the active one during gameplay.

    2) Adding polys to the existing NavMesh is better used for holes or obstacles, rather than new areas.  If you create a separate NavMesh, you can switch to it during gameplay by using the Engine: Change scene settings Action.
  • edited November 2015
    2) I'd also like to note that you could deactivate one navmesh and activate the second.after the teleport
  • Millions of thanks!!! All of my questions above about this concepts are solved!! All run perfect!!
  • how to activate  or deactivate  navmesh ?
  • @Jojo: Use the Engine: Change scene settings Action.  You can do this is your Pathfinding method is set to either Polygon Collider or Mesh Collider.
  • Sorry, one more noob question
    How to make start actions automatically after entering to scene?
  • You could make a trigger for that or if your game exists out of multiple levels you could put it in OnLoad.
  • OnLoad is for when you load a saved game located inside that scene.  If you want a Cutscene to play when you enter a scene during normal gameplay, assign it as your scene's OnStart Cutscene, in the Scene Manager.
  • @ChrisIceBox Ok, so I'm attempting to do the same thing as in point #1 of the original post... but with a slight difference: what if my "walk-to marker" is attached to an NPC hotspot? I'm able to attach 2 hotspots to my NPC sprite but how do I call one or the other?
  • I got something simular, where i got an animal #, and if i get close it plays growl and player walks back.

    I achieved this by having a trigger near the animal,. and when player entered it stops the player moving, and he walks back to a marker before talking.

    Would triggers work ?
  • @minhta: The Hotspot: Enable or disable Action should still be valid for Hotspots that are placed on an NPC.
  • Thanks Chris, I'll have a second look.
  • edited January 2016
    @ChrisIceBox Hi Chris, maybe there's an obvious answer to this, but when I assign a hotspot to my NPC, I must attach it to the child sprite, which in turn has a unique name that I must select from within the Hotspot: Enable or disable action. But when I add a second hotspot to that same sprite, all I see in the "Hotspot to change" drop-down is the one and only sprite name. If that is the case, how can I disable one and enable the other?
  • Add your second Hotspot as a child of the sprite child.  You may also need to add another Trigger to the new child.
  • @ChrisIceBox Hmm, does that mean I need to add an actual graphical sprite to attach the Hotspot to? For example, I already have a shadow sprite set as a child of the child sprite, can/should I attach the Hotspot to it? And by adding a trigger I guess a Box Collider 2D is appropriate? 
  • @ChrisIceBox Got it! Ok, so I ended up attaching the hotspot to the child shadow sprite I already had... but, what if there is no such secondary graphic, do I just put in an invisible sprite?

    Thanks so much for the help!
  • You don't need a sprite for your Hotspot - that's just a way of letting your player know where to click, if it's not already obvious.
  • Awesome, thanks so much Chris!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.