Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Steven2PM

677
Posts
9
Topics
42
Followers
44
Following
A member registered Mar 21, 2021 · View creator page →

Creator of

Recent community posts

Here is my gameplay! (sorry to advertise)

Hola buenos dias

Ohhhh i'm spanish too!

(2 edits)

Your welcome :) i'm going to possibly make a video of this game or one of your game tomorrow because why not.

Your so talented man, round of applause! 🙌

T'aurai du commenter sur mes jeux hehe

Comment j'ai pas checké ce compte avant T_T

It is so cool

Welcome back

Ah d'accord

Oui je vais bien et toi? comment ca se passe dans ton jeu?

Ah. je te dirai si j'ai trouvé que ce qu'il va pas.

(1 edit)

Ah ok je vois le genre. je te dirai si j'ai tout compris

Déjà tu veux que le joueur attaque comment, avec une epée ? si oui ca serait pas vraiment dur de le faire.

Alors par contre je vais essayer de chercher ca de comment vraiment faire ca car j'avais pas pensé avec la partie de "tuer l'ennemi"

Je suis heureux que ca marche pour toi :) et voici le script le l'ennemi : 

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

using UnityEngine.AI;

public class Enemy : MonoBehaviour

{

    private NavMeshAgent Mob;

    public GameObject Player;

    public float MobDistanceRun = 4.0f;

    // Start is called before the first frame update

    void Start()

    {

        Mob = GetComponent<NavMeshAgent>();    

    }

    // Update is called once per frame

    void Update()

    {

        float distance = Vector3.Distance(transform.position, Player.transform.position);

        // Run towards player

        if (distance < MobDistanceRun)

        {

            Vector3 dirToPlayer = transform.position - Player.transform.position;

            Vector3 newPos = transform.position - dirToPlayer;

            Mob.SetDestination(newPos);

        }

        

    }

}

Mais aussi ta déjà un script pour que l'ennemi peut te tuer aussi ?

Peut-être

Peut-être essaye de corriger le Range? si le nombre est trop haut il pourra pas bouger.

D'accord!

Je suis content que ca a marcher ! derien ;)

Derien :)

Derien!

(1 edit)

J'avais fait un tuto de comment faire un joueur il y'a des mois, si tu veux le voir c'est ici : 

Ok!

Le script de mon joueur: 

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

public class PlayerMovement : MonoBehaviour

{

    public CharacterController controller;

    public float speed = 12f;

    public float gravity = -9.81f;

    public float jumpHeight = 3f;

    public Animator walk;

    public Transform groundCheck;

    public float groundDistance = 0f;

    public LayerMask groundMask;

    AudioSource audiosource;

    Vector3 velocity;

    bool isGrounded;

    // Update is called once per frame

    void Update()

    {  

        isGrounded = Physics.CheckSphere(groundCheck.position, groundDistance, groundMask);

        if(isGrounded && velocity.y < -20)

        {

            velocity.y = 0f;

        }

        float x = Input.GetAxis("Horizontal");

        float z = Input.GetAxis("Vertical");

        Vector3 move = transform.right * x + transform.forward * z;

        controller.Move(move * speed * Time.deltaTime);

        if (Input.GetButtonDown("Jump") && isGrounded)

        {

            velocity.y = Mathf.Sqrt(jumpHeight * -2f * gravity);

        }

        velocity.y += gravity * Time.deltaTime;

        controller.Move(velocity * Time.deltaTime);

    }

}


Et celui pour bouger la tête :

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

public class MouseLook : MonoBehaviour

{

    public float mouseSensitivity = 100f;

    public Transform playerBody;

    float xRotation = 0f;

    // Start is called before the first frame update

    void Start()

    {

        Cursor.visible = false;

        Cursor.lockState = CursorLockMode.Locked;

    }

    // Update is called once per frame

    void Update()

    {

        float mouseX = Input.GetAxis("Mouse X") * mouseSensitivity * Time.deltaTime;

        float mouseY = Input.GetAxis("Mouse Y") * mouseSensitivity * Time.deltaTime;

        xRotation -= mouseY;

        xRotation = Mathf.Clamp(xRotation, -90f, 90f);

        transform.localRotation = Quaternion.Euler(xRotation, 0f, 0f);

        playerBody.Rotate(Vector3.up * mouseX);

    }

}

Oui

Déjà ton jeu est en 2D ou en 3D? Parce que j'ai un character controller qui est pour le 3D

Bon déjà, j'ai copié collé le script, pour moi le script marche en tout cas.

(1 edit)

D'accord pas de souci. de toute facon je vais également faire des trucs à mon coté, à toute!

Tu peux faire une capture d'écran?

Je vais bien merci! et toi?

Salut!

Thanks!

I'm doing good, i went in an online school last year and i finished it in late november, it was about learning Unity, and i learned more. now i'm on another online school about learning python, i started in january 3rd and i will finish it in 2027.

Welcome back!

Oh it's here now!

I don't even know

Your welcome! and oh this is how the jumpscare wasn't appearing, allright i understand

Allright

Yes, that's why it wasn't supposed to be uploaded lol