Quantcast
Channel: Questions in topic: "random spawn"
Browsing index pages (125 articles)
↧

How to spawn a prefab randomly only once

I'm working on a small game, where the player has to find their home. Ideally the house would spawn at a new location every time the game is played. I am new to coding so I'm not sure if what I have...

View Article


Counter is increased according to the amount target while i only clicked 1...

So i was making an Aimlab mockup and made a counter variable to store how much target i clicked in the span of time i had. The game is pretty much done, so when i clicked one of the target it will move...

View Article


Spawn prefab randomly over polygon collider 2d

I have attached pollygon collider 2d on this gameObject. ![alt text][1] This gameObject is parent of another gameObject (just small circle). **I want that small circle to randomly spawn somwhere on...

View Article

How can I randomise location of objects in a room?

Hi guys. What Im trying to do in the room I've created for the game is to have a desk randomly located in different locations in the room but to also have objects that may go inside or on top of the...

View Article

Spawning prefabs randomly on top of existing tiles

Good day everyone! I'm currently in the process of building a 2D Game, and as for my next step I'd like to randomly spawn collectable gems (prefabs) on top of my tiles for the player to collect. My...

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

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

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


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


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

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

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

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


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

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


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

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


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

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

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
Browsing index pages (125 articles)


Latest Images