Forum rules - please read before posting.

Start an ActionList from a script - OnMouseOver

I have a simple script for a Mouse Over.


function OnMouseOver() {
     GetComponent.<Renderer>().material.color = Color.red;
     
 }


Instead of turning this item red, I would like to trigger an ActionList that switches cameras.

So basically, what is the code that will start an Actionlist.


Comments

  • An ActionList can be run by calling it's Interact() function.

    Are you referring to the mouse hovering over a Hotspot?  v1.49 introduced the ability to call events when a Hotspot is highlighted (even if the highlight effect itself is disabled).
  • Thanks,  I'm looking at the new (v1.49) highlight option to call a function.  Its not clear what I should use to call an ActionList.    ActionList is not one of the options.

    Or, referring to the Interact() function you mentioned, an option that would be Object -> interact.

    Also, setting this up theres no other object involved, so I put the highlight script on the hotspot and I have it highlight itself.  If done this before and it seems ok. Any reason I shouldn't?
  • Placing the Highlight script on the Hotspot is fine - and a common way of doing it.

    Cutscenes, Interactions, Dialogue Options and Triggers are all subclasses of ActionList.  If you're calling a Cutscene, that will also have an Interact() function you can call.
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.