domingo, 20 de junio de 2021

COMO ESTOY HACIENDO UN VIDEOJUEGO EN UNITY Y BLENDER; MAS DE HOMBRE LOBO;

 


Detalles de mi videojuego con mi voz en of.

MagicMirror,; el recurso es free gratuito,De hombre lobo.;

 


Y mas detalles amedida que voy trabajando el videojuego, pongo otro video de youtube, en este video muestro y explicare lo mejor que pueda como e asignado el movimiento por teclas del personaje, me a resultado muy sencillo de hacer aprovechando los recursos de mis anteriores videojuegos inspirados en la ll guerra mundial.

 

 https://gamejolt.com/games/THE_END_WARLIKE_FEATS/609220

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

public class CONTROLREPARTIDOR : MonoBehaviour {

    public Animator Anim;
    public float WalkSpeed;

    void Update () {

        if (Input.GetKey (KeyCode.E)) {
            Anim.SetBool ("CORRER", true);
            transform.Translate (Vector3.forward * WalkSpeed * Time.deltaTime);
        } else {
            Anim.SetBool ("CORRER", false);

            if (Input.GetKey (KeyCode.W)) {
                Anim.SetBool ("ANDA", true);
                transform.Translate (Vector3.forward * WalkSpeed * Time.deltaTime);
            } else {
                Anim.SetBool ("ANDA", false);

                if (Input.GetKey (KeyCode.S)) {
                    Anim.SetBool ("ATRAS", true);
                    transform.Translate (Vector3.forward * WalkSpeed * Time.deltaTime);
                } else {
                    Anim.SetBool ("ATRAS", false);

                    if (Input.GetKey (KeyCode.A)) {

                        Anim.SetBool ("CORRER", true);
                        transform.Translate (Vector3.forward * WalkSpeed * Time.deltaTime);
                    } else {
                        Anim.SetBool ("CORRER", false);

                        if (Input.GetKey (KeyCode.P)) {

                            Anim.SetBool ("BOMBA", true);
                            transform.Translate (Vector3.forward * WalkSpeed * Time.deltaTime);
                        } else {
                            Anim.SetBool ("BOMBA", false);


                            if (Input.GetKey (KeyCode.O)) {

                                Anim.SetBool ("BOMBA", true);
                                transform.Translate (Vector3.forward * WalkSpeed * Time.deltaTime);
                            } else {
                                Anim.SetBool ("BOMBA", false);

                                if (Input.GetKey (KeyCode.D)) {

                                    Anim.SetBool ("CORRER", true);
                                    transform.Translate (Vector3.forward * WalkSpeed * Time.deltaTime);
                                } else {
                                    Anim.SetBool ("CORRER", false);


                                            if (Input.GetButton ("Fire1")) {
                                            
                                            Anim.SetBool ("DISPARANDO", true);
                                            transform.Translate (Vector3.forward * WalkSpeed * Time.deltaTime);
                                        } else {
                                            Anim.SetBool ("DISPARANDO", false);


                                                if (Input.GetKey (KeyCode.M)) {
                                                Anim.SetBool ("LANZAR", true);
                                                transform.Translate (Vector3.forward * WalkSpeed * Time.deltaTime);
                                            } else {
                                                Anim.SetBool ("LANZAR", false);



                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }

}






También desde el Asset store e descargado unos recursos de reflejos en espejos para que pueda simular lo mejor que sepa los reflejos de los cristales de las puertas y ventanas del entorno de un tren de metro subterráneo de cualquier ciudad.

MagicMirror, el recurso es free gratuito, y se consigue con facilidad hacer reflejos de superficies planas, solo hay que arrastrar los gráficos y el script que viene en sus carpetas.





Detalles de programación para provocar el movimiento y el sonido de un rugido cuando da el personaje un zarpazo….


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

public class suenaalapretarbotonratonizquierdo : MonoBehaviour {



        private AudioSource sonido;
        public AudioClip elcamion;
        // Use this for initialization
        void Start () {
            sonido = GetComponent<AudioSource>();    
        }

        // Update is called once per frame
        void Update ()
        {

    
    

        //if (Input.GetButton ("Fire1")) {//////al soltar suena AL SOLTAR SUENA
        if (Input.GetButtonDown("Fire1")) {///////AL APRETAR AL INSTANTE SUENA


    //if( Input.GetKeyDown( KeyCode.E ) ) {////////////// sonido al apretar

                //if (Input.GetKey (KeyCode.S)) {
                sonido.clip = elcamion;
                sonido.Play ();

                if (Input.GetKey (KeyCode.S)) {
                    sonido.clip = elcamion;
                    sonido.Play ();
                    if (Input.GetKey (KeyCode.A)) {
                        sonido.clip = elcamion;
                        sonido.Play ();
                        if (Input.GetKey (KeyCode.D)) {




                            //if (Input.GetKeyDown.W(KeyCode.W)){
                            sonido.clip = elcamion;
                            sonido.Play ();
                        }
                    }
                }
            }
        }
    }

Tareas que e de realizar, trabajar los gráficos del vagon de metro, trabajar los personajes, que están sentados en el vagón del metro, crear mas animaciones, en este videojuego me resulta mas faciles hacer yo las animaciones con blender de los personajes que están sentados, y es sencillo poner el nombre de cada animación en particular y necesario para no confundirlas con otras ya echas,

También exportar esos personajes retocados con blender, pintados y animados en formato fbx para ser utilizados por Unity.

 https://unity.com/

 

 https://www.blender.org/

 

Los personajes no están modelados desde cero a partir de blender, supongo podría con muchísimo trabajo hacerlos y ponerles el esqueleto y conseguir un resultado aceptable, pero para eso utilizo el programa gratuito “ makehuman-community”, luego lo manipulo con blender.

podéis descargar desde internet.“ makehuman-community”

(poner enlace)

 http://www.makehumancommunity.org/content/downloads.html

And more details as I work on the video game, I put another YouTube video, in this video I will show and explain as best I can how I assigned the movement by character keys, it has been very easy for me to do taking advantage of the resources of my previous video games Inspired by World War II.


(put link) (put script) (explain something)


Also from the Asset store I have downloaded some resources of reflections in mirrors so that you can simulate the best you know the reflections of the glass of the doors and windows of the surroundings of an underground subway train in any city.

MagicMirror, the resource is free, and you can easily make reflections of flat surfaces, you just have to drag the graphics and the script that comes in their folders.


(put link or capture)


Programming details to provoke the movement and the sound of a roar when the character gives a claw….

. (put script and script detail)


Tasks that I must perform, work on the graphics of the subway car, work on the characters, who are sitting in the subway car, create more animations, in this video game it is easier for me to make the animations with blender of the characters that are seated , and it is easy to put the name of each animation in particular and necessary so as not to confuse them with others already made,

Also export those characters retouched with blender, painted and animated in fbx format to be used by Unity.

The characters are not modeled from scratch from blender, I suppose I could with a lot of work make them and put the skeleton on them and achieve an acceptable result, but for that I use the free program "makehuman-community", then I manipulate it with blender.

you can download from the internet. "makehuman-community"

(put link)