Skip to main content

Questions tagged [spawning]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
91 views

Dynamically-created cube with mouse follow script does not follow mouse

The goal of this script is that the object it's attached to should move with the mouse. ...
RBull's user avatar
  • 13
3 votes
2 answers
1k views

Godot: Spawn an object in 3D

I'm working on a FPS game in Godot, and I want to be able to drop a flare on the ground at the player's position. I created a scene with a "flare", which right now is basically just a sphere ...
AndyD273's user avatar
  • 163
0 votes
0 answers
101 views

How do I add a Mesh to an AActor at runtime in c++ in Unreal Engine 5.3

For Unreal 5.0, 5.1 and 5.2 I used the following code to do this: ...
marc40000's user avatar
  • 163
0 votes
0 answers
79 views

Spawn prefabs in a vertical stack with a fixed gap

I am making a simple game with a ball that moves left and right when it hits a wall. I want the game to be like an arcade type game where the ball is on a platform and it keeps jumping up. I've ...
Abraham Titus's user avatar
1 vote
2 answers
1k views

how do i NOT let this object spawn at a certain area?

...
Shihs Shihis's user avatar
0 votes
0 answers
244 views

transform.localPosition does not wok in Unity

When im breaking fence GameObject there should pop up scores, so it works fine. But position of pop up scores is too low, im trying to raise it by ...
Silz's user avatar
  • 37
0 votes
1 answer
996 views

Spawn crops/3D game objects randomly on a mesh/plane surface

I am stuck on a problem that might be quite simple yet it's getting on my nerves. I want to spawn crops on different plane shapes like in the attached screenshot. So far my progress is that I am able ...
Syed Munim Raza's user avatar
0 votes
2 answers
2k 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 ...
Paski7's user avatar
  • 103
0 votes
1 answer
117 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 ...
Salem's user avatar
  • 226
1 vote
1 answer
240 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. ...
Salem's user avatar
  • 226
0 votes
0 answers
91 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 ...
cikkuabdilla's user avatar
0 votes
1 answer
76 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 ...
Ali's user avatar
  • 55
0 votes
1 answer
189 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 ...
I_Keep_Trying's user avatar
0 votes
0 answers
178 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, ...
StuckInPhDNoMore's user avatar
0 votes
2 answers
158 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 ...
eitan905's user avatar
0 votes
0 answers
372 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. ...
Pablo Salas's user avatar
1 vote
2 answers
3k 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 ...
HCCY's user avatar
  • 11
0 votes
2 answers
273 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 ...
Cpt Teemo's user avatar
0 votes
1 answer
52 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 ...
mavish's user avatar
  • 151
0 votes
1 answer
593 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 ...
mavish's user avatar
  • 151
1 vote
1 answer
1k 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 ...
Luke Hewitt's user avatar
0 votes
1 answer
190 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 ...
Matheson's user avatar
0 votes
1 answer
263 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: ...
single arrow games's user avatar
0 votes
1 answer
360 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 ...
EchtFettigerKeks's user avatar
0 votes
0 answers
41 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?
next age's user avatar
0 votes
1 answer
684 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 ...
Miguel Pagkatipunan's user avatar
0 votes
0 answers
36 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 ...
Michael Hampshire's user avatar
1 vote
1 answer
5k 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. ...
Spartk's user avatar
  • 11
0 votes
1 answer
159 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 ...
DyingIsFun's user avatar
  • 1,317
0 votes
1 answer
393 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-...
Levi C. Olson's user avatar
0 votes
0 answers
86 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.
user62039's user avatar
  • 113
0 votes
2 answers
171 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 ...
Michael Hampshire's user avatar
0 votes
2 answers
583 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 ...
Boneco Sinforoso's user avatar
0 votes
0 answers
280 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?
Ehtizad Zashkiyor's user avatar
0 votes
1 answer
1k 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: ...
Boneco Sinforoso's user avatar
0 votes
1 answer
6k 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 ...
user avatar
0 votes
0 answers
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 ...
Vijay Viknesh Manivannan's user avatar
3 votes
1 answer
315 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, ...
Omer's user avatar
  • 214
0 votes
1 answer
260 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 ...
Omer's user avatar
  • 214
0 votes
1 answer
766 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 ...
Row Rebel's user avatar
0 votes
2 answers
1k 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, ...
Ginger and Lavender's user avatar
6 votes
1 answer
3k 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 ...
Vamshi Krishna's user avatar
2 votes
4 answers
7k 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 ...
Jay's user avatar
  • 23
-3 votes
1 answer
847 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 ...
Scarecrow's user avatar
-1 votes
1 answer
400 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, ...
Scarecrow's user avatar
4 votes
1 answer
4k 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 ...
user3287178's user avatar
0 votes
1 answer
213 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 ...
zorrotito's user avatar
0 votes
1 answer
570 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 ...
jacks111's user avatar
1 vote
2 answers
106 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")...
detdimples's user avatar
1 vote
1 answer
156 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 ...
Jayamohanan kadaplackal's user avatar