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 Homing Target

Hello, I have a projectile which I have set to home in on a specific target. However, I wanted it to randomly home in on 1 out of 3 targets every time it spawns.

I tried scripting it ( Will attach screenshot of my script ), and it kind of worked. Only issue is, when I run the game through my randomization script, It spawns my projectile standing still for the first 3 spawns before it starts randomly homing.

The projectile spawns and homes in on the target perfectly when I dont pass it through the randomization script. Is the problem from my randomization script?alt text

Please help.

Product Version: UE 4.18
2018-01-04.png (510.4 kB)
more ▼

asked Jan 04 '18 at 08:25 AM in Blueprint Scripting

avatar image

41 7 12 12

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

1 answer: sort voted first

Hi! I'm not totally sure I've understand the issue, so correct me If I'm wrong.

With the randomization script the projectile spawn, it smile at you trolling for 3 seconds and then he decide to reach its target.

If I guessed the problem is because the "Set timer by event" node don't start the event istantly, he wait for the time you set up. You can make it start istantly calling the event right after the timer (easly, call the "TargetLoop" event just after the Set timer by event node).

If I was wrong explain me the prolem in order I can help you :)

Have a nice day!

more ▼

answered Jan 04 '18 at 10:04 AM

avatar image

696 23 13 28

avatar image Grey27 Jan 04 '18 at 05:05 PM

Hello, sorry I had left for work. Will give what you said a try and get back to you.

avatar image Grey27 Jan 04 '18 at 05:32 PM

Hello, I figured out what I did wrong, connected the wrong nodes. Should have connected the Event by timer to the switch instead of the Target Loop event. Thanks though.

avatar image Iohoilpotere Jan 04 '18 at 05:55 PM

Well, is actually the same things but less correct :P

(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