Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Best Way to Spawn Chunks of Actors Continually

If I've got 7 10x10x10 blocks or chunks of space (7 blueprint classes) each with multiple actors with their own event components, what is the best way to spawn them next to each other continually, randomly placing either 1-7 until a target point is reached? Say, all of them being spawned in the x-coordinate direction.

Event -> Randomly GetActorClass (1-7), spawn at point zero -> delete after time again --> Randomly choose then generate ActorClass 1-7, at spawn point + 10 coordinates in x-direction (next spot after spawn point zero) --> delete after same time limit etc. ?

What nodes would be good for setting the spawn of which chunk of space (1-7) randomly? I can deal with the placing of the actors, just am unsure of whether an index and how to set that to randomly choose which actor 1-7 to place, or some other type of getActorByClass -- sorting the 7 areas of space Any advice would be greatly appreciated, thanks.

Product Version: UE 4.9
more ▼

asked Oct 23 '15 at 02:10 AM in Blueprint Scripting

avatar image

170 48 49 60

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Create an integer array variable and set its elements to 1-7 at the beginning of each calculation then shuffle it with the "shuffle" node. You can then use a foreach loop and get a random number between 1 and 7 without any repetition concerns.

more ▼

answered Oct 23 '15 at 11:14 AM

avatar image

2k 62 24 111

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question