WIP Time That Was

It has been awhile since I have posted anything on here. I have been working on a RPG game based on time travel. I really loved the back to the future series and others that were similar, but this game is probably closer to a quantum leap than anything else.
For me the story is the easy part, along with making models, animating and level design. I have been out of the coding game for awhile now and the old saying " use it or lose it" kinda coming into play more than I care to admit.

What I would really like to do is show what I have done and get feedback. Most of what I have been doing is minimal, but doesn’t look it from where I’m at. I watch a couple of tutorials from time to time, but mostly just type it out and hope for a good show. Unity 5 is easier, yet harder in certain areas. Before if I wanted to move a rigidbody up all I had to do is get that rigidbody and addforce Vector3.up * speed. Still works with somethings like fpscontroller for a ladder. Not for third person. Still stumbling over my thumbs on that one.

So here is what I will do. I will show off all I have done based on or for this game up to this morning. I would love to get some input on how to make things better or more fluid.

Thanks for the read and enjoy!

First try

Second

Third - Starting to get my mojo back

Fourth - The first start over and my own character model based on chibi - little to much MySims

Fifth - Reset setup number 2

Sixth - Reset number 3

Seventh - Now making some progress

Ok up to date now. Had to do another restart due to I got lazy and thought that the asset store would just make it easier on me. :frowning: Who am I kidding, not going to do that again. In this video I was messing with menus, day/night and audio. Not much focus on the character this time. Plan is to find out how to get the standard asset 3rd person controller to add climbing and why menus suck with xbox controls.

Just for fun you will want to see this.

Have you read Timeline? Seemed to be pretty popular book back in the day.
But don’t watch the movie and do not check out the game for inspiration. Both are bad examples within there individual entertainment genres.
The game designers set out to make a game that was to be played by people who don’t play games. :eyes: This was before the Wii - kind of did that - and casuals were a sub-genre, but they weren’t successful. Not really misguided, but delivered on a platform where people who ‘play games’ bought games to be played.

Anyway - the art style of the first couple videos is really nice. Try not to make the mistake of creating a ton of visual content before working out the game systems that are most important for players - the core mechanics of the game are most important, over visuals. :slight_smile: This coming from an artist. :slight_smile:
But this is knowledge you have - just mentioning it to help others who browse through here.

I have not, but did watch the movie.

I agree with this. That’s why the current video only has a terrain and character. Menus were just something to do while I tried to work on the character control.

Currently working on character Attack and Blocking. Anyone have an idea on how to move a player up a ladder with animation using the standard asset 3rd person controller(Ethan)? I can make the animations work fine, but going up the player just sits there playing the animation. When I get back to it, I will paste what my script looks like.

1 Like

I think this has been covered in a couple Q&A posts a while back. I don’t remember the solution since I don’t code, so it probably has something to do with that, deactivate root motion and move the character via code up the ladder, then reactivate root motion, or something along those lines.

Here’s a nice little update. Added more core mechanics. Still not sure of some of the menus, but they work for now. I know I will need to add a playerprefs here soon to keep all inventory and changes. Not to mention, gotta have a save and load feature, otherwise this game would not be worth playing.

I wonder if some of you might play around with what I have and give some tips on what you see. I would appreciate that.
Here is the download for a test run.
- Please note - Xbox controller is needed, but you should be able to change at the start up screen

  • Side note - Music is on random and some of the song have long pauses between tracks. Also the music is not made by me, just something to enjoy while building. Songs are from - Draakhen(Snes) - Zelda 0carina of Time - Witcher 3 - Skyrim - SimCity(Snes) - MySims - The last one escapes me, but enjoy!

Some of the new added functions:

  • Added inventory system
  • Added ability to equip weapons and armor
  • Added but not seen is a health system
  • Added item classes - health types, weapon types, quest types & armor types
  • Added new animations but not included in this update using stock animations for now
  • Added a loading screen - I didn’t think this was needed but saw a big difference after. Things just ran better
  • Added a compass but not needed at this time.
  • Added some outline shaders for interactables

I have noticed one mistake right off. When paused, the inventory window is able to be brought up and disable the paused game while leaving the pause menu onscreen. I will have to make a check or disable one button or the other while on the menus.

Next plan is to add inventory drops, like item stackables and the health system. Then clean up current bugs that I have seen and those that you all might have given me. Possible things that might get added is a climbing system, dialogue system, commerce system and quest system. Eventually I will add enemy ai, just don’t want the hassle of dealing with enemies while doing setup stuff. Enemy ai and quest will be tied together.

Thanks! I will look for it.

Update #6

I wanted to add more for the player to interact with for new skills, combat and commerce. So the plan with this update was to fix and add more to the level design. With the added level geo, I can focus on new core mechanics. I know I didn’t have to go to this level to add the new systems, but I had to. Just got bored with the all the nothingness when programming.

I made a new demo if you would like to play.
- Please note - Xbox controller is needed, but you should be able to change at the start up screen .Music is on random and some of the song have long pauses between tracks. Also the music is not made by me, just something to enjoy while building. Songs and some SFX are from - Draakhen(Snes) - Zelda 0carina of Time - Witcher 3 - Skyrim - SimCity(Snes) - MySims - World of Warcraft - The last one escapes me, but enjoy!

New Additions:

  • Fixed pause menu and inventory menu from popping up at the same time and vice versa.
  • Added areas for the player to explore and go on quests
  • Added stats systems - not shown
  • Added animated AI
  • Added a dungeon for the player to quest in - not shown
  • Added fish flocking - proud of this one
  • Added commerce system - not shown(not happy with it)

Next plan is to fix the commerce system, add the health system previously made and add the dialogue system. Still need to implement inventory stacking and dropping.

Enjoy!

Hello to all in the forum! I have been working on a ladder script and I need some help with clearing up the code.
The problem I am having is when the player walks into the trigger it bounces the player back and then maybe the player will go up. Sometimes it plays the animations and sometimes it doesn’t. Also I would like to sorta attach the player to the ladder on button press, how would go about fixing this?

Little video to see what it is doing:

Here is the script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityStandardAssets.Characters.ThirdPerson;

public class Ladder : MonoBehaviour
{
    public bool PlayerGrip = false;
    public float Speed = 5f;
    public Animator anim;
    private ThirdPersonCharacter m_Character;
    public Rigidbody m_Rigidbody;
  
    void Start()
    {
        anim = GetComponent<Animator>();
        m_Character = GetComponent<ThirdPersonCharacter>();
    }
  
    void Update()
    {
        if(PlayerGrip)
        {
            if(Input.GetAxis("Vertical") != 0f)
            {
                m_Character.m_Rigidbody.velocity = new Vector3(m_Rigidbody.velocity.x, Speed, m_Rigidbody.velocity.z);
            }
        }
    }
  
    void OnTriggerEnter(Collider Col)
    {
        if(Col.gameObject.tag == "Ladder")
        {
            PlayerGrip = true;
            m_Character.m_IsGrounded = false;
            m_Character.m_Animator.applyRootMotion = false;
            anim.SetBool("Climb", true);
        }
    }
  
    void OnTriggerExit(Collider Col)
    {
        if(Col.gameObject.tag == "Ladder")
        {
            PlayerGrip = false;
            m_Character.m_Animator.applyRootMotion = true;
            m_Character.m_IsGrounded = true;
            anim.SetBool("Climb", false);
        }
    }
}

I know progress is slow, but I want it to be right. Still having problems with the UI. For example, if I try to kill an enemy, the player’s health goes down based on what I really don’t know. Could it possible that because I have only one EventSystem it is messing with everything else. Inventory panels are having the same problem. Seems like I fix one problem and get 10 more in its place.

Oh well, but for now here is the current progress of the RPG Setup.

Latest Update!

I have been working on this from time to time trying to get ladders, combat and other things to work well together. I am noticing that certain elements are not working well together. For example, inventory, store and health UI are not working as individuals but as whole. If the player adds damage to an enemy, the player also gets damage. I thought at first that the scripts were using to much of the same code so I changed that. Still the player was receiving damage. Removed enemy attack and again still draining player health. Also noticed that the player can just run into the enemy and it will lose health, no sword needed. It is certain I am missing something. For now I will stop with this and come back to it.

Next problem I am seeing is that fact that controlling both the inventory and store UI are not working. I wanted something similar to that of the Witcher 3 and WOW. Seems I have missed something here as well. I looked at several tutorials on inventory, but I am not seeing my issues in those tutorials. Is it possible to have more than one eventsystems? Could this be my issues? I will remove this element for now and come back to this as well.

Now for my latest update. I have managed to get a working ladder script. I say working because that is pretty much all it does. I am able to move up and down with animations, but the player does not face the ladder when climbing. I could set it as a target transform, but not been able to do so.

Also having trouble with the fact that the player will drop if it stops. Meaning if going up and the button is released the player drops down to the ground. Also having trouble with the animations. I want the player only to animate when the button is pressed. I am guessing I need to SetFloat instead of SetBool. Any help would be great.

Here are my ladder scripts. If anyone can help with the refinement of the two scripts would be much appreciated. Not asking for a hand out, just a pointer. I can do the leg work.

This is attached to the player.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityStandardAssets.Characters.ThirdPerson;

public class Ladder : MonoBehaviour
{
    public GameObject go;
    public float speed = 10f;
    public bool isClimbing;
    public Rigidbody m_Rigidbody;
    public float exit = 0.1f;
   
    void Start()
    {
        m_Rigidbody = GetComponent<Rigidbody>();
    }
   
    void Update ()
    {
        if(isClimbing)
        {
            go.GetComponent<ThirdPersonUserControl>().enabled = false;
            go.GetComponent<ThirdPersonCharacter>().enabled = false;
            m_Rigidbody.useGravity = false;
            float v = Input.GetAxis("Vertical");
            if(v !=0)
            {
                go.transform.Translate(Vector3.up * v * speed * Time.deltaTime);
            }
        }
        else
        {
            go.GetComponent<ThirdPersonUserControl>().enabled = true;
            go.GetComponent<ThirdPersonCharacter>().enabled = true;
            m_Rigidbody.useGravity = true;
        }
    }
   
    void OnTriggerExit(Collider Col)
    {
        if(Col.gameObject.tag == "Ladder")
        {
            transform.Translate(Vector3.forward * exit);
        }
    }
}

This is attached to the trigger.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class LadderTrigger : MonoBehaviour
{
    public Ladder climb;
    public Animator anim;

   

    void OnTriggerEnter(Collider other)
    {
        if(other.tag == "Player")
        {
            climb.isClimbing = true;
            anim.SetBool("Climb", true);
        }
    }
    void OnTriggerExit(Collider other)
    {
        if(other.tag == "Player")
        {
            climb.isClimbing = false;
            anim.SetBool("Climb", false);
        }
    }
}

Little video if what the ladder script is doing.

I think I have it! A working ladder script! Onward to the next issues!