x

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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Spawn Blocks at Random X and Z Location

Hey Guys, im doing a simple 2d endless runner game. The endless spawning process is doing fine but i just can't get the random location thing to work. What i want is that my tiles are spawning in a random in range X and Z position. Where and how do i implement this? I reverted all BP´s to the starting state before my endless fails :)

alt text

Just like in the endless runner tutorial i made a attach point at my Block where further Blocks are spawned. And also a Trigger at the end of the Block for spawning new Blocks and deleting the last.

alt text

Thats the overlap event of the Trigger. Where it also calls the AddBlock and deletes old Blocks after 2 Seconds.

alt text

The Graph of my custom Gamemode where it with the loop for the first 3 Blocks at the start of the game.

alt text

Thats the Addblock function in the custom Gamemode BP. So, where and how do i implement the random X and Z location spawning? Any help is appreciated.

Product Version: UE 4.10
Tags:
attachtransform.png (232.7 kB)
block_graph.png (256.5 kB)
gamemode_graph.png (235.9 kB)
more ▼

asked Jan 26 '16 at 08:13 PM in Blueprint Scripting

avatar image

ZenRigpa
15 4 4 6

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

1 answer: sort voted first

Hi,

here is a solution that should work:

https://gyazo.com/4d92bb9ad856cc36557d85193f6ddfbd

more ▼

answered Jan 26 '16 at 08:55 PM

avatar image

dr4ch
21

(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