Hi!
I'm very new to AC, this might be asked a ton but I wonder if there's any way to make hotspot(like a location on a world map/items) shows up only after the player has gone through the first location or picked up something first?
(and just to make sure) After clicking, if I want to make a slightly different sprite been shown(ex.: a flipped curtain/opened chest)do I only need to add a different sprite to the action list or I need other commands too in the action list?
Thanks!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Welcome to the community, @francisx.
A Hotspot can be turned off by default by attaching the Remember Hotspot component to it, and configuring it's Hotspot state on start value.
You can use the Inventory: Check Action to determine if the Player is carrying a particular item. You could run this in e.g. your scene's OnStart cutscene to work out if the Hotspot can then be turned on (using Hotspot: Enable or disable).
You can also rely on a variable to determine if this should occur. For example, a Global Boolean variable named "Town is now accessible" can be set to True when the Hotspot should be made active (using Variable: Set), and then have this value read when appropriate (Variable: Check).
Variables are generally the way to record states or make changes to your game, but in the case of your example (where a change only depends on a character holding carrying an item), you can also get by with just an Inventory: Check.
You could either have both sprites in the scene and a pair of Object: Visibility Actions to ensure that only one is shown at a time, or you could use just one and attach an Animator component. In this Animator, you'd then provide animations that cause it to show one of two sprites (see Unity's own documentation for this, since this is a general Unity workflow). In the ActionList, you can then control which animation is played with the Object: Animate Action.