Questions tagged [spawning]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1
votes
2answers
45 views

How to Spawn GameObjects at Random Positions in Unity? [closed]

Hello GameDev Community, I have a problem with this pice of code. If I start the "Game", it crashes right away. Probably is its the list of GameObjects or the foreach loop. I have no idea ...
0
votes
1answer
49 views

Recycling bullets versus spawning them on demand

Until now, I know 2 bullets' algorithms/configurations : (I mean 2 ways of logically creating a bullet class) Make a bullet class and create only one instance from it that represents the bullet. The ...
1
vote
1answer
64 views

Ensure that random enemies don't spawn just near the player

I need to find a method using which I can ensure that random enemies and objects don't spawn just near the player. In fact, if they do, the player will be more likely to collide with them and lose. ...
0
votes
0answers
27 views

Platforms are gradually being spawned further and further away in the Z-axis in a 2D Endless runner game, until they spawn behind the camera

I am creating a 2D endless runner game, where new platforms get spawned when the player reaches a certain distance to the last platform spawned. The issue that I found was that after the player ...
0
votes
1answer
47 views

Why does my spawner spawn multiple times at start-up, only in build?

I'm making a small game similar to Super Hexagon. I've recently asked a question about making the game harder as the player progresses by increasing the obstacles' spawn rate. I was able to implement ...
0
votes
1answer
34 views

Random Spawning Traffic at Pace Fitting "Frogger"-style Gameplay

In my game level, you have to cross a busy road to buy something and then cross back again. The general gameplay mechanics are now set up and playable. But I wanted to know if this routine I used to ...
0
votes
0answers
78 views

How can I improve the current enemy spawning system for my strategy game

I'm currently making an RTS game for mobile where mini battles would take place on tiny battlegrounds. The problem is that currently the player is spawning its units based on a currency system, ...
0
votes
1answer
51 views

Unity 2d...Bullet Intantiate on left....but instantiate on right but not showing in game mode

I created the gameobject player and add script to it: ...
0
votes
2answers
36 views

Spawning a customized sprite with text

I'm making a game where I have circles filed with words or pictures drop from the top of the screen to the bottom. they should spawn right above and then drop. I just started using unity a couple days ...
0
votes
0answers
37 views

Spawning projectile: it's there but does not show

Here is the code and very simple. I can see the object in the blue print and has nothing except the object itself. so all the issue should be on the C++ code. ...
1
vote
2answers
564 views

Unity 3D mirror, sync player spawn name

I am using Mirror for doing my little multi-player car racing project which I want to rename the game object automatically after the NetworkManager auto create the game object. Here is my ...
0
votes
0answers
22 views

(Unity) Spawning AI cars - weighted to ahead of camera?

I'm working on a little project where I drive around a small city with a top-down but slightly angled camera view (like GTA Chinatown Wars). Cars are instantiated from spawners that aren't in camera ...
0
votes
0answers
88 views

photon unity why error GO:Networking Manager appears when trying to make the scene not restart / reload when another clients join the room

photon unity why error Debug.LogError("Illegal view ID:" + view.viewID + " method: " + methodName + " GO:" + view.gameObject.name); appear the code ...
0
votes
2answers
68 views

Spawning prefab on touch after previous spawn(s) had been destroyed

I wrote a script which pawns an object (instantiated prefab) each time the player touches the screen. The maximum number of these spawned objects active in the scene at once is 3, and when they are ...
0
votes
1answer
25 views

Attach movement to each list object

How would i move every sphere that gets spawned every 2 seconds ? Basically i want every sphere to follow the previous spawned sphere or even all N-1 spheres should follow the first spawned sphere ...
0
votes
1answer
208 views

Tetris block kinematic rigidbodies pass through one another with Transform.Translate

I am trying to build a Tetris 3D game in Unity but I am stuck at getting the different blocks to interact (to detect each other, to sit one on top of the other rather than going through each other). I ...
1
vote
1answer
446 views

UE4 Blueprint Multiplayer Spawning Issue

I'm attempting to copy/modify the MultiplayerShootout project's multiplayer functionality for my own project. I'm running into issues when Player 2 joins a running session though. Finding it very hard ...
0
votes
1answer
95 views

Unity 3D platform spawning problems

I'm making an infinite runner game in Unity 3D. I have it so that platforms spawn and move backwards toward the player and they are destroyed once past the player. Over time when the platforms are ...
0
votes
1answer
82 views

Increasing spawn difficulty

I'm trying to increase the difficulty of the game over time. I'm using InvokeRepeating to spawn enemies and in the update function I calculate the next spawn time using the following code: ...
0
votes
1answer
140 views

How to manage network spawning?

I'm developing an multiplayer game "from scratch" (not using a big Engine-Suite like Unity but the lower-level libgdx). Currently I've got a NetworkManager which handles the sending of messages on ...
0
votes
0answers
24 views

How can I spawn and drag 2d object from a Canvas button?

I want to create and drag an object from canvas button to scene. How can I do this?
0
votes
1answer
206 views

Spawn Array of GameObjects to Array of Transforms

I have a question regarding spawning an array of GameObjects in Unity. What I want to happen is that when a big enemy dies, it will spawn enemies into their respective Transform positions (i.e., Enemy ...
0
votes
0answers
35 views

Why does my "spawnedEnemies" variable not update when enemies are destroyed?

I'm creating a shooter game and I'm trying to update the current count of enemies on screen. When the laser hits an enemy, it is supposed to subtract 1 from the "spawnedEnemies" and then destroy the ...
1
vote
1answer
3k views

Issues using NetworkServer.Spawn with Unity and Mirror-Networking

I am using Mirror to handle the networking aspect When I spawn an object on the network, I Instantiate it on the server and then use NetworkServer.Spawn to notify all clients to spawn the object. ...
0
votes
1answer
114 views

How to implement arcade-style spawning?

In many arcade-style games with a horizontally scrolling camera, enemies spawn offscreen, either left or right, and traverse the screen in the opposite direction. Spawning enemies is easy enough, but ...
0
votes
1answer
165 views

How can I add a delay to my enemy spawning in Greenfoot?

How can I add a delay between spawning my enemies in Greenfoot? I'm doing it from a class that is neither a world nor an actor, its made totally by me. I need to it spawn 3 enemies, 3 times, with a 1-...
0
votes
0answers
49 views

How can I spawn objects in a volume without intersection?

I am generating a 3D scene that involves spawning lots of 3D objects in a finite volume. I need to avoid intersection of objects.
0
votes
2answers
116 views

My GameObject keeps spawning when it shouldn't

I'm trying to instantiate a new gameObject when the current gameObject gets to a select point. The problem comes when the program gets to the second if() statement. It sets the floorsSpawned to 1 and ...
0
votes
2answers
197 views

How can a variable have two values at the same time?

Just to clarify, I do not want to know how to make a variable display 2 values ​​at the same time. I want to know how this is happening in my project. In the Level Blueprint I have a timer that ...
0
votes
0answers
102 views

How to spawn objects and control the content in each spawn

I'm using unreal engine and would like to spawn multiple actors and control the text in each spawned actor. How can this be achieved in unreal engine?
0
votes
1answer
49 views

Actor does not perform action when spawned?

In the level blueprint I made a code so that after 5 seconds an NPC was spawned, it happens that it does nothing. Only the NPC I added by the level editor acts correctly. Image of what happens: ...
0
votes
1answer
3k views

How to Destroy an Instance of a Prefab Without Removing the Prefab?

I'm making a simple runner game where obstacles spawn off in the distance and move towards the player. I want to remove them after they're invisible to the player. I made an ...
0
votes
0answers
22 views

Spawn a gameobject from list when grip button is clicked? [duplicate]

I wanted to spawn gameobjects from the list one by one when the grip button in the controller is clicked. I have attached my code and the inspector which contains the list of gameobject but the code ...
3
votes
1answer
216 views

Instantiate object with spawn time?

I have script that makes waves of enemies. It selects enemy from array randomly. I want to add function allow me to select any object in my array and instantiating it for number of times. In wave 1, ...
0
votes
1answer
165 views

Rotate object to closest clone?

I'm working on a tower defense game. I'm trying to make my gun object rotate and shoot the nearest instance of the "enemy" object. My problem here is my gun script rotates only to the main enemy ...
0
votes
1answer
525 views

How do open world games handle efficiently enemy respawn?

I'm currently working on a 2D open world game loaded in chunks, initially I thought It would be sufficient to spawn entities randomly in a specific "radius" close to the player, and periodically ...
0
votes
2answers
920 views

How do I respawn a prefab that matches the name of the game object I just destroyed?

In my game the player can interact with certain objects like coins, clouds and springs. After these interactions the game objects are destroyed. All of these game objects have their own properties, ...
5
votes
1answer
2k views

Unity: Player Gets Stuck Between Tiles

I am creating an endless game, which constantly spawns tiles. The problem is that after a few tiles the player gets stuck on random tile and stops moving. I noticed this problem even when i was ...
2
votes
4answers
6k views

How can I spawn items based on probabilities?

I'm working on a game where I want to choose which object to spawn based on probabilities. Assuming the decision to spawn the object has been done by some other process, I'd like the object with the ...
-3
votes
1answer
719 views

Game maker studio 2 Random spawn locations are not random [duplicate]

This is a redo of another question I asked. First I want to clarify that I am indeed using drag and drop. So saying something like "maybe switching to gml will fix your problem" is appreciated, but ...
-1
votes
1answer
331 views

How to limit where an object spawns GameMaker Studio 2

When the game starts, I am trying to generate an object in a random area. It's working, but sometimes the object spawns in the players view. How to have an object that generates in a random location, ...
4
votes
1answer
3k views

Why does UE crash when I spawn a tile actor like this?

I'm trying to replicate a version of "Paper.io" using Unreal Engine and C++ as an exercise. My idea is to have an instance of an Actor (that is my "Grid class" in this case), and another Actor acting ...
0
votes
1answer
136 views

Make enemy disappear after spawn

I have enemies that spawn in different positions but what I want to do is that if you don't kill it after three seconds, the enemy disappears (but the spawning keeps happening of course, the enemy ...
0
votes
1answer
350 views

Animation after enemy spawns

right now in my game, four enemies spawn in four spawn points with a delay, but what I want to do is that if you don't kill the enemy after a couple seconds, an animation (it's an animation of a ...
1
vote
2answers
95 views

Display image a couple seconds after an enemy spawns?

So right now I have enemies that spawn behind objects with a delay. What I need is to display an image on the screen 5 seconds after each enemy spawns (it's to show the player it has been "attacked")...
1
vote
1answer
119 views

How to synchronize the speed of spawned object and spawning time interval?

I want a stream of enemies coming from the top of the screen one behind other in a line, with their speed (speed of the whole stream i.e. every enemy) increased over time. When I simply increased ...
6
votes
1answer
308 views

How to make sure that the set of randomly spawning obstacles is passable?

Prompt Suppose we have a little mini-game where you have to avoid incoming obstacles by moving the blob up and down at a constant speed. The blob's x coordinate is fixed and the obstacles will spawn ...
2
votes
3answers
87 views

Spawn rates and variable time steps

How would I work a spawning algorithm into a sim engine with variable time steps? If each engine step is, say, 1/30 of a second and I have some event occur with a 0.001 probability each step, how do ...
0
votes
1answer
240 views

Object array in unity not instantiating properly

I'm trying to instantiate my CarMovement class with my population class for a Genetic Algorithm, but when i run the project, the car prefab doesnt spawn. Everything is wired up in the inspector ...
2
votes
1answer
1k views

How to spawn GameObject exactly in front of another object?

I'm working on a 3D game in Unity and I'm having a problem trying to spawn an object exactly in front of a wall in my game, like hanging a picture on it. I don't want the object to look like it's too ...