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"

Random Object spawning.

Hey guys so basically there objects i wish to randomly spawn around the map once by using a teleport and a target system. As you can see the the image i have attached below that is my spawn system however sometimes one one is teleported to the target and the rest aren't. Two have manged to be teleported also but there's always at least one that wont. I have already made sure the objects are movable. Any help would be greatly appreciated! alt text

Product Version: UE 4.10
untitled.jpg (452.5 kB)
more ▼

asked Dec 17 '15 at 10:37 PM in Blueprint Scripting

avatar image

21 15 16 20

avatar image _cDub Dec 18 '15 at 12:24 AM

You could simplify this by a lot by using arrays. Simply have arrays of target points and use and random int to select one.

avatar image Pantlessnoodle Dec 18 '15 at 10:09 AM

Ooh ok thanks for the reply! Is there any way you could possibly have a image of what you mean? I am kinda new to unreal engine. :)

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

1 answer: sort voted first

Hi man , there are more than one way to do it so, here an example.

I shatter across the map my target point. I use the node , get all actor from class, to have the full list. i pick up one of them , randomly, using the length as max range . i get his location and teleport something there.

alt text

more ▼

answered Dec 18 '15 at 11:54 AM

avatar image

1.2k 58 12 62

avatar image _cDub Dec 18 '15 at 02:16 PM

Don't forget to take length - 1. And it would be good to take this, but make 3 arrays manually seeing as how each item has its own group of target points. Array 1 cold be sparkplug target, 2 would be wheel target....

Here is a page to help you with arrays. https://docs.unrealengine.com/latest/INT/Engine/Blueprints/BP_HowTo/WorkingWithArrays/index.html (to the OP that is)

avatar image Pantlessnoodle Dec 18 '15 at 05:12 PM

Awesome sauce! Thanks very much bud!

(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