Hello community!
I'm developing an adventure game in which we can execute extra actions such as climb ladders or ropes, push objects, go up&down stairs... like in Pan-Pan: A tiny big adventure or Lara Croft Go games, for example.
For testing game, I downloaded a character from Unity Asset Store that is ready to be configured using Mecanim.
By other hand, I downloaded animations from Mixamo that I need.
Following 3D Adventure Tutorial I was able to configure the basic actions such as Idle, Walk, Run... but I don't know which is the valid system to use with AC to recognize and execute correctly those extra animations.
At first, I test with the climbing ladder.
My idea is:
- Add Animation in Animator Controller.
- Execute an Actionlist when the player interacts with ladder.
- Runs a "climbing ladder" animation, and the player goes to the upper level.
- With a trigger on the top of the ladder, runs an animation like "finish climbing" and finishes the "climbing" animation.
- If this works, use the same system but inverse for the character to go down.
Now, the action is executed properly but the character doesn't ascend.
My questions are:
Is it possible to do all this system using AC, or it's necessary to do it through scripts?
Is AC compatible with programming a character by scripts?
Thanks!
Comments
The games references I told is by type of animations.
Video game that I really want to develop is a 3D Isometric graphic adventure and, in some cases, I would like the character to be able to perform these actions but as if they were a "cutscenes".
My programming level is very basic so I've been searching for different Unity tutorials.
So far I've got run the action "climb ladder" on the player when play the game, and goes up in Y axis, but I just didn't get is controlling that action so it runs when we click on the ladder.
I understand that I must use the parameter created "IsClimbing" so that, when it's TRUE, the player executes the climb action.
I have created an interaction with ladder that changes the state of "IsClimbing" to TRUE but I don't know how to indicate this change into the script.
Somebody can help me?
Thanks!
<code>
public class PlayerExtraAnimations : MonoBehaviour {
public Animator anim;
Vector3 tempPos;
// Use this for initialization
void Start()
{
anim = this.gameObject.GetComponent<Animator>();
}
// Update is called once per frame
void Update ()
{
Climb();
//ClimbRope();
//Stairs();
//PushObject();
}
void Climb()
{
tempPos = transform.position;
anim.Play("ClimbLadder");
tempPos.y += 0.01f;
transform.position = tempPos;
}
</code>
https://www.dropbox.com/s/ojp6ahimt9i4gnv/VerticalStair_Use.png?dl=0