viernes, 27 de mayo de 2022

AUTHOR DE THE WOLF MAN, CRAZY;

 https://tozudo415.itch.io/author-de-the-wolf-man-crazy

COMENTANDO LO APRENDIDO ASTA FECHA DE 27-05-22.

jueves, 26 de mayo de 2022

THE WOLF MAN, CRAZY macabre scenes demo 7;








 

ALGUNOS SCRIPTS DEL VIDEOJUEGO EN C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class lekitavestidoconbarradevidas : MonoBehaviour {


        public int damage;
        public int vidaEnemigo;
        public Slider BarraVidaEnemigo;





        //public Rigidbody cubo;/// pruebas

        public Rigidbody ENEMIGOSALTAEXPLOTADO;/// pruebas
    public Rigidbody ENEMIGOSALTAEXPLOTADO2;/// pruebasIMBENTADO POR MIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII

        //public Rigidbody source;/// pruebas


        //public Rigidbody  targetGameObject;/// pruebas


        void Update () {

            BarraVidaEnemigo.value = vidaEnemigo;

        }


        void OnTriggerEnter(Collider other) {
            //    if (other.gameObject.CompareTag ("Player")){
            if (other.gameObject.CompareTag ("caca")){

                vidaEnemigo-=damage;

                if (vidaEnemigo <= 0) {

                    Destroy (this.gameObject);/////destruye funciona

                    //    Application.LoadLevel (0);




                    //Rigidbody p = Instantiate(cubo, transform.position, transform.rotation);////pruebassss
                    Rigidbody p = Instantiate(ENEMIGOSALTAEXPLOTADO, transform.position, transform.rotation);////pruebassss
                Rigidbody p2 = Instantiate(ENEMIGOSALTAEXPLOTADO2, transform.position, transform.rotation);////pruebassssIMBENTADOPOR MIIIIIIIIIII
                    // Instantiate(source, targetGameObject.transform.position,
                    //targetGameObject.transform.rotation);




                //    Application.LoadLevel (3);///cambia la escena donde quiero funciona


                }


            }}

    }




------------------------------------------------------------------



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

public class persiguemaloachoke : MonoBehaviour {


        Transform player;

        UnityEngine.AI.NavMeshAgent nav;


        void Awake ()
        {


            player = GameObject.FindGameObjectWithTag ("choke").transform;


            nav = GetComponent <UnityEngine.AI.NavMeshAgent> ();
        }


        void Update ()
        {

            nav.SetDestination (player.position);

        }
    }




--------------------------------------------------------------

----------------------------------------------------------------




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

public class suenacuandotocalaniña : MonoBehaviour {




        public AudioSource tickSource;


        void Start () {






            tickSource = GetComponent<AudioSource> ();









        }

        void Update () {
        }

   


        void OnTriggerEnter(Collider other) {
            if (other.gameObject.CompareTag ("choke")){



          






                tickSource.Play ();







            }}

    }



----------------------------------------------------------------------



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

public class DISPARATIRITO : MonoBehaviour {

        public Transform player;

        //  public float range = 1f;
        //public float range = 4f;
        public float range = 0.04f;


        public float bulletImpulse = 0.1f;

        private bool onRange = false;

        public Rigidbody projectile;

        void Start()
        {
             float rand = Random.Range(1.0f, 2.0f);/////ORIGINAL
            //float rand = Random.Range(0.04f, 2.0f);/////tambien funciona///////////////////////////EL QUE VENGO USANDO
            //float rand = Random.Range(0.04f, 0.5f);/////tambien funciona
            //float rand = Random.Range(0.04f, 0.08f);/////tambien funciona





            InvokeRepeating("Shoot", 2, rand);//////ORIGINAL



        }

        void Shoot()
        {

            if (onRange)
            {

                Rigidbody bullet = (Rigidbody)Instantiate(projectile, transform.position + transform.forward, transform.rotation);
                bullet.AddForce(transform.forward * bulletImpulse, ForceMode.Impulse);

                Destroy(bullet.gameObject, 2);
            }


        }

        void Update()
        {

            onRange = Vector3.Distance(transform.position, player.position) < range;

            if (onRange)
                transform.LookAt(player);
        }


    }

--------------------------------------------------------------------



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)) {/////ORIGINAL

            
                                
                            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);



                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }

}


-----------------------------------------------------------------------

using UnityEngine;
using System.Collections;

public class TransformFunctions : MonoBehaviour
{
    public float moveSpeed = 10f;
    public float turnSpeed = 50f;


    void Update ()
    {














        if (Input.GetKey(KeyCode.W))////funciona contantemente al apretar W mayusculas a de ser
        //if (Input.GetKeyDown(KeyCode.W))// funciona pasito a pasito
        //if(Input.GetKey(KeyCode.UpArrow))
            transform.Translate(Vector3.forward * moveSpeed * Time.deltaTime);


        if (Input.GetKey(KeyCode.S))////funciona contantemente al apretar W mayusculas a de ser
        //if(Input.GetKey(KeyCode.DownArrow))
            transform.Translate(-Vector3.forward * moveSpeed * Time.deltaTime);


        if (Input.GetKey(KeyCode.A))////funciona contantemente al apretar W mayusculas a de ser
        //if(Input.GetKey(KeyCode.LeftArrow))
            transform.Rotate(Vector3.up, -turnSpeed * Time.deltaTime);

        if (Input.GetKey(KeyCode.D))////funciona contantemente al apretar W mayusculas a de ser

        //if(Input.GetKey(KeyCode.RightArrow))
            transform.Rotate(Vector3.up, turnSpeed * Time.deltaTime);












    }
}

 

 -----------------------------------------------------------------------

 

 

  using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class otalovolidermenguasulobos : MonoBehaviour {

//    public int cura;
        public int damage;
        public int vidaEnemigo;
        public Slider BarraVidaEnemigo;


        void Update () {

            BarraVidaEnemigo.value = vidaEnemigo;

        }


        void OnTriggerEnter(Collider other) {
            //if (other.gameObject.CompareTag ("MATA")){
            if (other.gameObject.CompareTag ("pipi")){

                vidaEnemigo-=damage;



                if (vidaEnemigo <= 0) {




                    Application.LoadLevel (3);



                }


            }}

    }



 

 -------------------------------------------------------------------

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

public class cambiaanimacionadasingirarlo : MonoBehaviour {


        // Use this for initialization
        //void Start () {

        //}
        public Animator Anim;
        public float WalkSpeed;
        // Update is called once per frame
        void Update () {



        }

        void OnTriggerEnter(Collider other) {//////////////////////////////////////MIO NUEVO




            if (other.gameObject.CompareTag ("pollo")){




                //transform.Rotate (new Vector3 (0 * Time.deltaTime, 700, 0), Space.Self);///////////////nuebo mio




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





                //If (other.gameObject.CompareTag ("repartidor (1)")){


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


                }
            }
        }}




 

 

martes, 24 de mayo de 2022

THE WOLF MAN, CRAZY-ESCENAS MACABRAS;


Las imágenes que sales en el video aun no las e publicado en el video juego, lo are en próximas versiones.

 

Boy a explicar un poco la tendencia de este videojuego para explicar en mi blog, y llenar tema ,que solo estoy poniendo demos, videos, fotos, y ejecutables del videojuego en webGL,

sin darme cuenta le estaba dando un aire al juego de comicidad y escatologia, en este video quiero volver a darle en las próximos adelantos del videojuego un aire de verdadero horror y gore y macabro ambiente, jugar con las luces y salirme de la comicidad, el contraste si consigo reflejarlo en el videojuego puede ser chocante.

Estoy aprendiendo a compaginar cambios de escenas y a hacer cambios de planos con la cámara,

De momento tengo echo escenas absurdas como La caperucita roja en un bagon de metro lanzando manzanas al hombre lobo, a blanca nieves lanzando copos de nieve al hombre lobo y a los 7 enanitos escupiendo al hombre lobo, cara impacto mengua la barra de vida del hombre lobo este a su vez mengua la barra de vida de estos singulares y absurdos enemigos, y luego tenemos al chiflado con un acha que va persiguiendo al hombre lobo por el bagon y dándole hachazos, inspirado en La película “el resplandor”, también hay 2 niñas que cuando ven al hombre lobo son ellas las que lo muerden a el…...y asta aquí voy jugando trabajando el videojuego,,,haber a donde me lleva.

 

 https://tozudo415.itch.io/the-wolf-man-crazy-demo-6

domingo, 22 de mayo de 2022

THE WOLF MAN, CRAZY-demo-6;

 







jueves, 19 de mayo de 2022

THE WOLF MAN, CRAZY-demo-5;

 









miércoles, 18 de mayo de 2022

THE WOLF MAN, CRAZY demo 4;

 Detalles del videojuego y el cine como me influencia....y un homenaje y admiracion al actor de EEUU 

Jack Nicholson






lunes, 16 de mayo de 2022

The-wolf-man-crazy-demo-3;

 


domingo, 15 de mayo de 2022

THE WOLF MAN, CRAZY-2-demo;

 








sábado, 14 de mayo de 2022

THE WOLF MAN, CRAZY...demo;

Me estoy desarrollando a este personaje, es lo mas visitado que tengo en


itch.io/


https://tozudo415.itch.io/

 


Me estoy desarrollando a este personaje, es lo mas visitado que tengo en


itch.io/


https://tozudo415.itch.io/.

viernes, 6 de mayo de 2022

FREE;


jueves, 5 de mayo de 2022

Como hacer con unity una persecucion de enemigo que dispara y ver los efectos.;

 

¿Como e echo el videojuego “Mission a-4”?

De momento voy a explicar una secuencia del videojuego en la que un enemigo persigue al player ,al protagonista del videojuego, y le va disparando.

En el video veis lo que explicare ahora.

Pondré los scrips siempre en C#.

Primero el script que hace que persiga al player, lo tiene el enemigo...


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

public class mepersigeelmalote : MonoBehaviour {

        Transform player;

        UnityEngine.AI.NavMeshAgent nav;


        void Awake ()
        {


            player = GameObject.FindGameObjectWithTag ("cano").transform;


            nav = GetComponent <UnityEngine.AI.NavMeshAgent> ();
        }


        void Update ()
        {
            
            nav.SetDestination (player.position);

        }
    }

--------------------------------------------------------------------

----------------------------------------------------------------

 

El enemigo ademas de este script necesita un NavMesh Navegation



 

Este elemento y el script consiguen que el enemigo persiga al player.

El player a de tener un tag para que lo reconozca el script, en este caso le llamamos “cano”, pero puede ser otro cualquiera que imaginemos un tag es un nombre inventado…

También tiene un script el enemigo para usar una barra de vida y que al recibir los disparos del player la barra de vida del enemigo mengue asta cambiarlo por otro enemigo una copia del mismo con la animación de estar abatido o muerto...es este script..

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ARRASA : MonoBehaviour {

    public int damage;
    public int vidaEnemigo;
    public Slider BarraVidaEnemigo;





    //public Rigidbody cubo;/// pruebas

    public Rigidbody ENEMIGOSALTAEXPLOTADO;/// pruebas
    //public Rigidbody source;/// pruebas


    //public Rigidbody  targetGameObject;/// pruebas


    void Update () {

        BarraVidaEnemigo.value = vidaEnemigo;

    }


    void OnTriggerEnter(Collider other) {
    //    if (other.gameObject.CompareTag ("Player")){
            if (other.gameObject.CompareTag ("caca")){

            vidaEnemigo-=damage;

            if (vidaEnemigo <= 0) {

                Destroy (this.gameObject);/////destruye funciona

            //    Application.LoadLevel (0);




                //Rigidbody p = Instantiate(cubo, transform.position, transform.rotation);////pruebassss
                Rigidbody p = Instantiate(ENEMIGOSALTAEXPLOTADO, transform.position, transform.rotation);////pruebassss

        // Instantiate(source, targetGameObject.transform.position,
                    //targetGameObject.transform.rotation);




            //    Application.LoadLevel (1);///cambia la escena donde quiero funciona


            }


        }}

}



También un script, siempre en C# para el sonido que al recibir un disparo el enemigo emita un sonido, de dolor o choque lo que se tercie...

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

public class SONIDOPUPAALMALO : MonoBehaviour {


        public AudioSource tickSource;

        void Start () {

            tickSource = GetComponent<AudioSource> ();

        }

        void Update () {
        }


        void OnTriggerEnter(Collider other) {
            if (other.gameObject.CompareTag ("caca")){

                tickSource.Play ();

            }}

    }

--------------------------------------------------------------

----------------------------------------------------------

------------------------------------------------------------

Este también tiene un Tag, nombre “caca” es el nombre de la bala del player que choca con el enemigo y provoca el sonido cuando le da....


 

En esta captura de encima de pantalla 2 scripts muy buenos para que el enemigo dispare al acercarse a cierta distancia del Player y que aga un fogonazo su arma, los dos funcionan exactamente igual solo hay que manipular algunos valores para que dispare desde mas cerca o mas lejos, mas rápido o mas lento, tiro a tiro o a ráfaga….están en un cubo que es hijo del gameobject arma.

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

public class DISPARATIRITO : MonoBehaviour {

        public Transform player;

        //  public float range = 1f;
        //public float range = 4f;
        public float range = 0.04f;


        public float bulletImpulse = 0.1f;

        private bool onRange = false;

        public Rigidbody projectile;

        void Start()
        {
             float rand = Random.Range(1.0f, 2.0f);/////ORIGINAL
            //float rand = Random.Range(0.04f, 2.0f);/////tambien funciona///////////////////////////EL QUE VENGO USANDO
            //float rand = Random.Range(0.04f, 0.5f);/////tambien funciona
            //float rand = Random.Range(0.04f, 0.08f);/////tambien funciona





            InvokeRepeating("Shoot", 2, rand);//////ORIGINAL



        }

        void Shoot()
        {

            if (onRange)
            {

                Rigidbody bullet = (Rigidbody)Instantiate(projectile, transform.position + transform.forward, transform.rotation);
                bullet.AddForce(transform.forward * bulletImpulse, ForceMode.Impulse);

                Destroy(bullet.gameObject, 2);
            }


        }

        void Update()
        {

            onRange = Vector3.Distance(transform.position, player.position) < range;

            if (onRange)
                transform.LookAt(player);
        }


    }

 -----------------------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------------------

-----------------------------------------------------------------------------------------------------------------------

-----------------------------------------------------------------------------------------------------------------------

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

public class FOGONAZOENEMIGO : MonoBehaviour {

        public Transform player;

        //  public float range = 1f;
        //public float range = 4f;
        public float range = 0.04f;


        public float bulletImpulse = 0.1f;

        private bool onRange = false;

        public Rigidbody projectile;

        void Start()
        {
            float rand = Random.Range(1.0f, 2.0f);/////ORIGINAL
            //float rand = Random.Range(0.04f, 2.0f);/////tambien funciona///////////////////////////EL QUE VENGO USANDO
            //float rand = Random.Range(0.04f, 0.5f);/////tambien funciona
            //float rand = Random.Range(0.04f, 0.08f);/////tambien funciona





            InvokeRepeating("Shoot", 2, rand);//////ORIGINAL



        }

        void Shoot()
        {

            if (onRange)
            {

                Rigidbody bullet = (Rigidbody)Instantiate(projectile, transform.position + transform.forward, transform.rotation);
                bullet.AddForce(transform.forward * bulletImpulse, ForceMode.Impulse);

                Destroy(bullet.gameObject, 2);
            }


        }

        void Update()
        {

            onRange = Vector3.Distance(transform.position, player.position) < range;

            if (onRange)
                transform.LookAt(player);
        }


    }

 

 ----------------------------------------------------------------------

---------------------------------------------------------------------

---------------------------------------------------------------------------

 

Detalles particulares de estos scripts son los prefabricados que usamos el del proyectil tiene el Rigidbody con la gravedad activada. El del fogonazo la tiene en Is Kinematic para que no se mueva, y los dos prefabricados tienen a su vez un script de tiempo para que se borren de la memoria cara ciertos segundos o décimas de segundo y el juego no se ralentice.

using System;
using UnityEngine;

namespace UnityStandardAssets.Utility
{
    public class TimedObjectDestructor : MonoBehaviour
    {
        [SerializeField] private float m_TimeOut = 1.0f;
        [SerializeField] private bool m_DetachChildren = false;


        private void Awake()
        {
            Invoke("DestroyNow", m_TimeOut);
        }


        private void DestroyNow()
        {
            if (m_DetachChildren)
            {
                transform.DetachChildren();
            }
            DestroyObject(gameObject);
        }
    }
}

 

 CONTINUARA EN CONSTRUCCION........