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"

Continuous Forward Movement

I'm creating a level for a game where the player will be constantly moving forward in a flying object. They will have a target ahead of them which is doing the same which they will move left and right to shoot at. Left and right movement will be limited (I was thinking I could do this with a blocking volume).

I'm not sure where to start on coding them to continuously move forward though. There's a specific Sega or Nintendo game which is based on this but it's slipping my mind right now. Off the top, a brief example could be the Hog Wild level from Crash Bandicoot, the way the player is always moving forward with limited left and right movements.

I'm thinking this would be a case of locking the Z axis, and restricting the X axis (just incase those are wrong, the up and down axis and left and right axis). Then some form of code to create a continuous forward movement (along the Y axis I believe).

Apologies if this is vague, which it is, but I'd really appreciate anyone at least trying to help. I'll answer any questions because maybe you guys can help me explain what I'm failing to say a bit better haha.

Product Version: Not Selected
Tags:
more ▼

asked Apr 13 '15 at 01:31 AM in Blueprint Scripting

avatar image

GaryFriel
16 2 3 4

avatar image Ranz Apr 13 '15 at 03:20 AM

Are you using Add Movement Input?

There is a pin called Force, once true, it will continuously move the character to that direction.

avatar image GaryFriel Apr 13 '15 at 08:20 AM

I believe i tried Add Movement and wasn't 100% sure of how to get it working. I will try your suggestion and let you know the results. Thanks for replying mate.

avatar image GaryFriel Apr 13 '15 at 05:42 PM

I'm really struggling to kick off using add movement. I haven't had a lot of experience with actor blueprints before so I really don't know where to start.

Here's the example I was thinking off before. Forgetting all the complex stuff, having the player fly forwards with the ability to navigate left and is what I'm looking for.

https://www.youtube.com/watch?v=igc7hWLqckY&feature=youtu.be&t=2m56s

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

1 answer: sort voted first

Just in case anyone ever searches for this, what I wanted was relatively easy. I haven't got as far as the video above but in general I have been able to solve the continuous forward movement.

Using the Third Person template, go to the Movement Input section within the My Character blueprint.

From there, replace InputAxis MoveForward with an Event Tick. Plug the the white to the white on Add Movement Input and leave the Delta Seconds clear. This will make your character run endlessly forward.

I have done some edits like changing the pawn to a plane and gave the enemy the same settings. Now I'm just working on giving the enemy AI to move slightly left and right and to add a damage calculator onto it.

more ▼

answered Apr 17 '15 at 09:46 PM

avatar image

GaryFriel
16 2 3 4

avatar image Benni.Lodge Nov 08 '16 at 03:11 PM

I'm doing something very similar to this. My game is a motorbike game in which the player can never fully stop. I want for enemy bikes to always move forward too, but to be able to slow down and speed up to keep up with the Player. They also need to move left and right and use pathfinding to avoid traffic. Any chance I can look at your work to see if it helps?

avatar image GaryFriel Nov 09 '16 at 02:07 PM

Since it was like a year ago, I dunno if I'd remember it off the top and I imagine the files long gone.

In my new university course, we start on UE4 I believe in about a week or two. When I get it redownloaded and fired up, I'll try to recreate the code for it and let you know how I get on. If I can get it working, I'll send you a file or something. You know yourself, once you stop using the software for a few months it's like going back to square one all over again :(

(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