Quantcast
Channel: Questions in topic: "random spawn"
Browsing all 125 articles
Browse latest View live

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 Article


Random 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 Article


Multiple 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 Article

How 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 Article

Random 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 Article


2d 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 Article

spawn 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 Article

Random 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 Article


How 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 Article


Problem 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 Article

Randomly 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 Article

Damn 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 Article

Spawning 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 Article


Enemy 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 Article

Spawn 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 Article


How 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 Article

Instantiate 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 Article


Spawning 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 Article

Random 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 Article

Hello. 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
Browsing all 125 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>