Questions tagged [spawning]

143 questions
1
vote
2 answers

XNA Simple way to spawn enemys

Im trying to spawn enemies from a list. I've tryed multiple ways in doing so. However I can't get it to work. Is there a simple way to spawn enemes every 3 seconds? EDIT I tried spawning it like this: problem: only spawns once protected void…
1
vote
2 answers

XNA Game Programming: Spawning Enemies in a circle (Code)

Could someone please give me some direction on how to spawn enemies in a circle (XNA Programming)? I want the enemies to randomly spawn along the circumference of a circle that is just outside the bounds of the window. I want them to move in…
jdewitte
  • 131
  • 3
  • 13
1
vote
3 answers

Spawn delay between enemies

I am working on a tower defence game in XNA, and I have a class called Tank which creates an enemy that follows a route around a map that is found via A*. Right now, I can create multiple instances of Tank, but they all spawn at the same time. This…
0
votes
1 answer

Issues with Platforms? (Cocos2D)

In my game I have platforms similar to Doodle Jump. They each have their own animation but they all in the end have the same tag for a b2ContactListener. Right now I am using a CCSprite but I do not think that will work. What should I do…
SimplyKiwi
  • 12,376
  • 22
  • 105
  • 191
0
votes
0 answers

javascript game enemies and player are invisible no errors

iam trying to recreate supercrate box on a webpage but somehow my enemies and my player are invisible this the code / Get the canvas element and context const canvas = document.getElementById('game_canvas'); const ctx = canvas.getContext('2d'); //…
0
votes
2 answers

Spawned processes becoming defunct

I use posix_spawnp to spawn child processes from my main process. int iRet = posix_spawnp(&iPID, zPath, NULL, NULL, argv, environ); if (iRet != 0) { return false; } Sometimes, after a child process is spawned…
Gayan
  • 1,697
  • 7
  • 26
  • 35
0
votes
0 answers

Is it possible to destroy a prefab with code from another prefab?

I have a frog in my 2d game. It has an attack where it sticks its tongue out. I didn't make an animation for this, I made tongue fragment prefabs that spawn one after another. They obviously start at the frog's mouth. I want to make it look somewhat…
0
votes
2 answers

I have a question about a YT tutorial because I wanna customize it a little

in this video, https://youtu.be/klBvssJE5Qg I shows you how to spawn enemies outside of a fixed camera. (this is in GDscript by the way) How could I make this work with a moving camera? I wanna make a zombie fighting game with a moving camera and…
0
votes
1 answer

How to create a winning condition when a certain number of game objects have spawned

I am trying to get my 3-D Tic-Tac-Toe game project to work, I have game objects which are named cells that are instantitated I press OnMouseDown() click it makes a cell object spawn in its grid space. I don't want to use UI with the basic prefabs I…
0
votes
0 answers

Increasing spawnrate (speed at which a instantiate function gets called) over time

I'm trying to make objects (meteors) that spawn in my game increase in spawnrate over a certain duration, but I can not for the life of me seem to be able to allow it to do so. I started by using an invokeRepeating but since you place that in the…
Rick
  • 11
  • 2
0
votes
1 answer

objective-c image moving problem

hey i am running into a problem. i maade an image object that gets added every 2 seconds by an nstimer. and an update timer updates it so the image goes forward. but it only goes forward until a new one gets added and i can't solve why. this is the…
Jan Vos
  • 63
  • 1
  • 3
  • 9
0
votes
1 answer

how do i make an objects continuously spawn on kaboom.js

When I shoot the asteriod they disapear which is what i want however I want more asteriods to spawn instead of them just disapearing forever.Im not sure what to add in this code to make more spawn into the game. any help is appreciated i thought…
Ivanna
  • 3
  • 3
0
votes
2 answers

Enemy Spawner While Loop Not Spawning Correct Number Of Enemies

I am trying to automatically spawn a desired amount of enemies within an area, which is currently a test area. The idea is that if the current amount of enemies are less than the amount of desired enemies, then the keepSpawning boolean is set to…
WolfPG
  • 25
  • 5
0
votes
1 answer

GameObject can't be found once per frame, even though it exists

at the moment I am creating a wave based game but I have a problem when it comes to checking whether all the enemies were killed. I have three different Enemies with the Tags "Enemy1", "Enemy2" and "Enemy3". Every second, I am using…
Josh
  • 17
  • 3
0
votes
1 answer

Respawning enemies on player death

I have a class, where my enemies spawn at the start of the game. When my player dies, I wanna call the spawn class again to let the enemies spawn again. But when I do so, nothing is happening. public class EnemySpawn : MonoBehaviour { public…
HappyJava
  • 19
  • 5