Hello, first post!
I have a menu with a handful of 'tools' (menu buttons), and each one has a custom cursor texture. I have the actionlist set up so when you click on the tool, it changes to a respective integer value.
I have a simple custom cursor script running where I load in the textures and it changes the AC cursor based on the int, which looks like this:
public class CursorChange : MonoBehaviour
{
public Texture[] CursorType;
public void Update()
{
int ToolCheck = AC.GlobalVariables.GetIntegerValue(1);
AC.KickStarter.cursorManager.pointerIcon.ReplaceTexture (CursorType[ToolCheck]);
}
}
I want a hotspot to do something different depending on the tool, and it looks like the most compact and efficient way might be with the Variable: Pop Up Switch action.
I'm having some trouble figuring out the best way to have a Pop Up variable and use the AC API to parse that string of tools into an integer, so it still works like the script above.
Hope that makes sense, or maybe thats not the most efficient method, not sure! Appreciate the help ![]()
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Welcome to the community, @Bitcrush.
A Pop-up variable is essentially just an Integer with discrete values, so the code above should still work for both Integer and PopUp variable types.
The general behaviour you're describing, however, of clicking menu buttons to change the cursor, which then alter Hotspot behaviour, is essentially the same as AC's Choose Interaction Then Hotspot interaction method. In this mode, each icon listed in the Cursor Manager can be represented by an Interaction element in the Menu, and then Hotspot Use icons can be filtered by specific icons.
Does your intended gameplay involve more to it than what this provides?
Ahh ok good to know thank you!
As for my menu, the vibe of the UI is esentially very similar to programs like KidPix, where the player will choose a tool and use it on various objects in the scene. It's more than just 'use' and 'interact' style functions, but tbh I haven't tried to make the Choose Interaction Then Hotspot feature work with my options yet, but I will give it more of a look now!