Forum rules - please read before posting.

I can't understand how i can add highlight mechanic

Hello, everyone, i'm newbie at using Adventure Creator asset, but i'm really like it and glad that i'm working with it.

I want to add the highlight mechanic into my game, found some tutorials about this theme, but can't really understood what i did wrong.

I created a cube object, added the hotspot on it, mark the object to highlight graph correctly but also misunderstood what i did wrong.

Attaching screenshots to show what i have and what's the error message is.

Using Unity 2022.3.20f1 version and the almost last version of AC(i can't really find where i can check the version of it, sry)

https://imgur.com/a/dWkKnDb

Comments

  • Welcome to the community, @m0rph1y.

    The Highlight component has "Test" in its Material override field, which means it'll look for a Float property in the shader that goes by this name.

    The object it's attached to uses the Standard shader, so "Test" won't exist in its shader.

    It looks like you have a custom shader / material, but it's not assigned in the Renderer component. Does this shader have a "Float" property? This is what the Highlight component will be looking for, and will control its value from 0 to 1 when highlighting.

  • edited December 2024

    Okay, I understand now. Thank you very much!

    I have two more questions for this mechanic, i want to make this mechanic on my right mouse button to activate(means that when player press right mouse button all highlitable objects will be highlight), how can i change the "FlashHotspots" input into right mouse button into input manager?

    And i want to make this highlight much longer than only 1 second, how can i make this mechanic to work while holding button( if i hold button - icons will be always enable, while i holding button and don't release this)?

  • how can i change the "FlashHotspots" input into right mouse button into input manager?

    Set the Input's Positive button field to mouse 1.

    And i want to make this highlight much longer than only 1 second, how can i make this mechanic to work while holding button

    A custom script that provides this behaviour can be found on the AC wiki here:

    https://adventure-creator.fandom.com/wiki/Hold_input_to_flash_Hotspots

  • Thank you very much, you're awesome!!! All works how i want to!

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.