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"

my actors spawn in the same target point

I have 4 target point and 4 actors. so I spawn my actors but my actors in the same target point.

I want to one target point to one actor.

Target point : A, B, C, D

My Actors : 1, 2, 3, 4

EX) A-2, B-3, C-1, D-4 or A-1, B-2, C-3, D-4

this matching is random!

alt text

Help me please.

Product Version: UE 4.11
Tags:
캡처.jpg (79.3 kB)
more ▼

asked Jul 20 '16 at 06:13 AM in Using UE4

avatar image

calewell
3 1 3

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

1 answer: sort voted first

hi calewell ! if you use a random for generating the index of the array you read, it will randomize number and often returns the same index, that s why you have actor spawning on the same spawn.what you can do is creating an array of bool, synced to you array of spawner, and set the bool to 1 when the spawn is "occupied" : for exemple , set the bool array [3] to 1 if spawner 4 is already occupied and then randomize with the reamining free indexes to spawn next actor. fell free to download my project here : https://forums.unrealengine.com/showthread.php?116088-FREE-Blueprints-multiplayer-replicated-bonus-spawn-system&highlight=free+replicated i use this method to spawn the bonuses and to prevent to have 2 bonuses at the same point

more ▼

answered Jul 20 '16 at 09:26 AM

avatar image

expose
769 26 6 43

avatar image expose Jul 20 '16 at 09:27 AM

an other way would be to remove from your array of spawner, the spawner you just got. easier but that would mean rebuild the array anytime you may need it later

(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