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. 

How do I make an enemy pace back & forth?

Hi. I would like to know how to make a simple blueprint of a Paper 2D enemy to walk back and forth. Just like a koopa turtle on mario. -Thanks!

Product Version: UE 4.10
Tags:
more ▼

asked Mar 31 '16 at 09:47 PM in Blueprint Scripting

avatar image

snortastic
25 9 15 14

avatar image haruna Apr 18 '16 at 06:59 AM

mamoniem has made a great step by step tutorial of an enemy that moves between points A and B. He goes into great detail in this video: https://www.youtube.com/watch?v=341kvrXgikk

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

1 answer: sort voted first

I don't know much about Paper 2D but the logic for this should be quite simple. You would just have a variable for its position that it's being constantly updated. For example say that you have variable X for the horizontal position and you have another variable dx which is how fast you want it to move. Every tick you would add dx to X, but under certain condition, say reaching a certain point, you would turn dx negative which means that now your object should go in the opposite direction and once again when it reaches a certain point you would turn dx positive back again.

more ▼

answered Mar 31 '16 at 11:16 PM

avatar image

MacDx
600 17 9 32

(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