[Begginner Question] Need help with a task..

so i got paired with a group for a game prototype and my task is to :

create 2 blueprint - a spawner and a ball (basicly the default actor) and i have to set some spawn… let say 4 spawnpoint and every like 4 minute a ball will be on a spawnpoint randomly.
if all spawnpoint are used it wont summon another ball.

How will you do that? im really new and i need much help for that thanks and i hope its kind of clear ( english isnt my first language)…

but basicly i need to set spawn in a map and everytime 4 minutes a ball will spawn randomly in my spawn location.

Basically what you’ll want to do is to create 2 Blueprint classes, one the Spawner and another the Ball, for example.

Create a Timeline inside your Spawner BP and set it to auto-play and loop. Make it last 4 minutes. Create an event track and put an event at your desired . From that event track fire a “Spawn Actor from Class” node.

You’ll need to provide the spawn transform (location, rotation and scale) and you’ll need to set up some control variables to keep track of which spawn points have already been used and forbid further spawning at those points, and, if all are used, no new ball will spawn.

Note that this is only one possible way of doing this. There are many :).

yea i kind of see what you say but problem is it my first using UE and… programming so yea… kind of lost ( its a school project and i dont know why ive been tasked that) but thanks very much its help!

My messy way would be do it in world BP for spawning and the 2nd BP as you ball.

If you put a target point in the level, have it selected, you can go to world BP, right click and reference it.

Then you can get its location and promote to variable. Do the 4 times and you have your spawn points.

You could put it in an array, set a line delay for 4 mins, spawn another with a ckeck to see if anything is there, if so check the next spawn point

I dont think I can do it that way, basicly its a group projet, my teamates told me that they want to place the spawnpoint where they want and how many they want, so i need to build 2 BP so that the ‘orb’ (or in this case the actor default ball) to spawn to each spawnpoint randomly for each 2 minute

it is okay if the same spawn point is used again before all of the spawn points are used? I can show you how to do this

Well he said that he want to place a number of spawnpoint that he want, first 2 minute a ball will spawn on a spawnpoint till ALL are used then no more ball will show up

ok i’ll see what i can do

Thanks you very much

One another note, he said that it need to be a function in MainGameMOde (its a multiplayer game) so i guess my function should call my separete BP?

So this is for a class right? Did your teacher/professor tell you to do it a certain way, or is it the other members of the group who are telling you to do it a certain way. There are many ways to do this. You don’t have to put it in GameMode, unless your professor told you to. Just let me know. I am pretty sure I can do this and will record a video showing you how today when I get home from work, around 6:00pm Central Standard . :slight_smile:

Its my teamate that told me that :confused: they said I have to put my timer function in MaingameMode but i dont know how to built that fonction and how to call the 2 actor (spawner and ball) or if i can create 2 BP and in the ball and spawnpoint BP i can cast to maingamemode it can work, as long maingamemode is in

Basicly I only created two actor blueprint for now ( spawner and ball) and in the event graph in MainGameMode en event when begin play to start my function. But yea my fuction is empty for now ^^’ (this task making me crazy : ( )

hey guys! im almost theyre but i still need help with my nodes if you look at this picture i have a timer set to every 2 seconde that spawn my ball on a spawnpoint, but how you would do to make it spawn to every spawnpoint? and randomly? because this blueprint just spawn 1 ball to 1 spawnpoint for now

Not sure for multi player, but I would put your spawn points in to an array, then call a random number to choose a random point. run a check to make sure it is not used and spawn or repeat.

Set array.


Get random position.

Then have array that holds what number is used, and check against it.

This may not work, but give it a go.

Adding to array

Hey thanks for the picture :slight_smile: but with many try im at this point, all my ball spawn at a spawnpoint every 2 second, but i need to say to not spawn where a ball is already and stop the function when all spot are filled… any ideas?