Skip to main content

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

Ask a Professional Game Developer

A topic by Game Professor created Feb 08, 2021 Views: 2,866 Replies: 83
Viewing posts 21 to 24 of 24 · Previous page · First page

I have a question, I have always struggled with enemy spawning, could you help me?

Submitted

What about it? You could have a public gameobject reference in the script that spawn it, and use Instantiate(enemy prefab, position, rotation)

Submitted

I'm making a 2d platformer, how could I make a good death effect?

as in animation?

I am getting this error in the unity console

"Assets\PlayerMovement.cs(13,10): error CS1519: Invalid token '=' in class, struct, or interface member declaration"

My Code

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

public class PlayerMovement : MonoBehaviour
{
    public CharacterController2D controller;

    public float horizontalMove = 0f;

    float runSpeed = 40f;

    bool = false; 

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

        horizontalMove = Input.GetAxisRaw("Horizontal") * runSpeed;

        if (Input.GetButtonDown("jump"))
        {
            jump = true;
        }
    }
    void FixedUpdate()
    {
        controller.Move(horizontalMove * Time.fixedDeltaTime, false, jump);
        jump = false;
    }

}

Submitted

you didn't name the boolean!

Submitted

It just says bool = false

yes i noticed when i posted it lol, it mainly wasn't working tho because i didnt capitalize the j in "jump" lmao

Submitted

Hello! I just have 1 question: when do I make my first big game? Like, my first game that takes more than 10 minutes to play? Do I make a few small projects, or a lot, or is it best to wait a certain amount of time?

Viewing posts 21 to 24 of 24 · Previous page · First page