Random Spawn
Basically what I am trying to achieve is spawn an object at an interval of 1-2 minutes and also increase that interval in time; let's say after 30 minutes of play the interval between the spawns to be...
View ArticleSpawn of randomly called prefabs + enemy movement
Hi there, first of all: I am not a programmer and don't intend to become one :D I am an artist but will have to write some scripts and work in Unity for my current school project. I am working on a 3D...
View ArticleInstantiating objects at random positions with a certain distance between...
I have an Empty gameObject that creates 20 objects at the start of the game. var houses:Array = new Array(); var hs:Transform; function Start () { for(var a:int = 0; a < 20; a++) { ex =...
View ArticleEmitting objects at a progressive rate randomly in a 2D game
I am planning on developing a small 2D Android and iPhone game and I need to go over a few things before I can start building. I was wondering how to build a script in Javascript to emit a prefab...
View ArticleHow do I add force on an object(with a rigidbody) that I've randomly...
I know I need to use rigidbody.AddForce, But I'm having trouble finding how. This is what I have, but when I start the game, it spawns the object randomly but doesn't add and force to it. Any help...
View ArticleHow would 1 instantiate a cube on a random position on screen , ortographic...
Well i think the title of the question speaks for itself, i am trying to instantiate a cube on a random position on my screen. If it's possible could someone help me in C# ?
View ArticleSpawning enemies javascript
I have enemies spawning randomly in few positions. My problem is that sometimes when you kill one of them, another spawns in exactly same position without any delay at all, so when you think you have...
View ArticleSpawn random prefabs with specific tag and in a specific location.
I have a camera that is in 0 x and y axis and is moving forward to the z axis by itself with a script. I made some prefabs of some models and tagged them in different groups (e.g. "Group1", "Group2",...
View ArticleDetect if an object will collide if it moves to a position
Hi, I am trying to create a randomly generated level where i am stuck on stopping objects from overlapping. I am trying to detect if an object is in the space that the new object is being positioned. I...
View Article2D infinite runner obstacle generation?
Hi Unity, I am developing a game that has 2 types of obstacles: One that you have to jump over and one that you have to slide under. How could i generate them randomly without them generating on top of...
View Articlerandomly spawn objects and hide after hit
hi guys, hope you'll be able to help me out. I'm currently trying to implement a superpower trigger to my game (little mushroom). I want to spawn it randomly on the x and y axis. Having a sidescroller...
View Articlehow to check if a random location has spawn an object it will not spwan again...
void CreateHeliA1(){ for (int i =0; i
View ArticleHow do I spawn a gameobject at a random positing inside pov?
Hey, I am working on a game where you tap a square and it changes position. But, I have a problem where the square jumps to a random position and instantly jumps back. I also want the square to be...
View ArticleSpawn Prefab at one of 5 location cubes
Hey guys, I have a issue. Im making a game where the escape pod is the ending and I have 5 cubes on the map placed around, I need it so one of those 5 cubes will spawn a prefab which will be the...
View ArticleInstantiate prefabs at random position from array in special way
Hi guys, I'm creating a script that actually instantiate my prefabs from an array at random position but in a special way (these positions are saved in another array too) . Here is how my Gamelevel...
View Article[C#] How do I randomly pick between 3 specific numbers?
Is it possible to CHOOSE a random number between 3 numbers I have set? I want to randomly choose between -3, 0, 3 but only those exact three numbers. I want my enemies to randomly spawn in one of the...
View ArticleHow to check collisions of static objects when spawned at Random?
Hi! For my project I am spawning static rooms at random. They should not be influenced by gravity, or move at all once they are placed for that matter. In the class room only the followingis relevant:...
View ArticleRandom obstacles spawn in 2D side endless runner game ?
Hello there. I am new to Unity. I have developed scrolling backgrounds, floor, animation jump, slide and other things. The only thing left for now is an algorithm to spawn random objects, obstacles (I...
View ArticleHow to move objects randomly spawned to other random locations
Hi i have a script which spawns objects randomly outside the viewport. Now i want the objects spawned on the right side to start moving to a random position on the left side of the outside of viewport....
View ArticleRandom platform Generator
Hello, Im trying to create a random platform generator on which a character is supposed to jump higher and higher up on. but whenever i generate my map some platforms are further away or too close for...
View Article