Random Object Spawning
Hello im trying to spawn two Objects but i get a error "NullReferenceException: Object reference not set to an instance of an object" I know what that means but i cant find my error. The error marks me...
View ArticleRandom bitmap generator
Hi! I've been pouring through these posts, but I haven't found anything that could really point me in the right direction. I just want to preface this by saying that I'm a complete beginner when it...
View ArticleMultiple spawn location with random game object in random time spawn c#
I have this codes but when I run, sometimes the gameobjects spawn at the same time and at the same place. I need help. public Transform player; public float maxTime; public float minTime; public int...
View ArticleHow to use a randomobject script on walls?
I want to randomly place a poster I made on the walls in my game. My teacher showed me a randomobject script, but it just places the selected model randomly throughout the Terrain. How could I edit...
View ArticleRandom Respawn,Random Spawn
Currently, I'm making a shooting game. I want to respawn enemies randomly. This is the code i've made: using System.Collections; using System.Collections.Generic; using UnityEngine; public class...
View Article2d game for different screen resolutions
I want to develop a 2d game for mobiles. The concept will be like, the bubbles will be created at a random position and moves till top of the screen. Below are my questions. 1. How to get a...
View Articlespawn random object and move it
I need help with scripting on how to spawn a cube at a random position (In 3d) .. say its a falling object. And how could you make this as efficient as possible?? :D
View ArticleRandom Generation problem GameObject
I have a problem how to set a Random object in a polygon without placing it on another object in that polygon Code is: public float XSize = 8.7f; public float ZSize = 8.7f; public GameObject...
View ArticleHow to Detect if a Collider is in the Area, Move Away, Rinse and Repeat?
Hello, everyone. In my 2D game, since I couldn't figure out how to prevent them from originally spawning on top of each other, a few random platforms are generated within a certain area by an empty...
View ArticleProblem with instantiating the object in untiy at certain time intervals
Hello Community I'm a complete beginner in untiy and trying to figure spawn objects randomly at fixed time intervals (every 1 or 2 seconds).. But the issue I'm facing in my script is that the random...
View ArticleRandomly generated interior in the Pacman-clone game
Hi! I am facing a quite problematic issue here. What I want to achive is to spawn random objects (from 12 builded prefabs) in the random places - but the place itself cannot be totally random - it has...
View ArticleDamn Compiler Errors, pls help me
Greetings Fellow Developers, I'm constructing a Game for a Project which requires me to spawn in random blocks (or Prefabs to use technical terms) on the end of the map so they spawn a random Block...
View ArticleSpawning a specific Tile in a random position a certain distance from the...
So i'm making a 2D game and I am using a Tilemap. I want to spawn a specific Tile at a random location on the Tilemap, but it has to be 6 tiles away from the player characters Tile position (the player...
View ArticleEnemy spawn logic not working
I am making a top down 2D game. I have 12 predefined spawn points for enemies, represented by a sprite on screen. on this sprite I have the following script. using System.Collections; using System;...
View ArticleSpawn in one given position randomly
Hey guys, I need help. I have three spawnpoints, each one in an different room and I have an object. I want the object to spawn in one of the three spawn points randomly each time I start the game but...
View ArticleHow to generate 3D random roads?
Hi, I need some help: I would like to do a 3D random roads generation system, but I really don't know how do it :( This are my 3D roads: https://ibb.co/vqwTKMr This is an example of what I would like...
View ArticleInstantiate objects in given range
I am trying to Instantiate objects on the right and the left side of the player but not in front of it. ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ So let's assume the player's...
View ArticleSpawning Random GameObjects at Random Prefab Locations
Hi, I'm trying to create a basic bubble shooter like game, with randomly generated levels. What would be the best way to spawn one of three colored bubble at a defined location? At the moment i have...
View ArticleRandom X position 2D
I was trying to make an object move to a random X position. But when I run the code the object just stays in the same position. public class RandomSpawn : MonoBehaviour { Rigidbody2D body; float Y =...
View ArticleHello. How to make random items on map?
Hey. I am creating location-based game like Pokemon GO. And as I said in topic I want to make random items spawning on the map (but SCPs will be here instead of pokemons). Thanks for any kind of help.
View Article