Forum rules - please read before posting.

run cutscene by pressing a button

hi i was trying to access a cutscene/ action list by pressing a button.

the intent is to switch my player by pressing a button:

1) i created inside the scene a cutscene that call the action list.
2) i created a script that once pressed should run the cutscene.

using AC; 

if (Input.GetKeyDown ("joystick button 5")) {
        // Run the action list!
//AC.AdvGame.RunActionListAsset (changeCharacter);
}
}


the error is: the name changeCharacter does not exist in the current contex.

i tried read the documentation but im not a coder so i didnt figure out what i am doing wrong.

:( 

Comments

  • Indeed - you need to supply a public ActionListAsset variable named changeCharacter in order to set it:

    public ActionListAsset changeCharacter.

    However, it should be necessary to rely on a custom script for this.  See the chapter on "Active inputs" in the Manual, which allow you to trigger ActionList assets when input keys are pressed.
  • thank you chris it worked... :)
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.