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"

Force your character to walk?

Hi! In my game, the main character and an NPC are supposed to walk next to each other and have a conversation! But I don't know how I can force my main character to walk! Can I use triggers? Is there something I need to edit somewhere? I'm kind of stuck here...

You are going to control the character but I don't want to run ahead of the NPC.

Using UE 4.6 and Third person template.

Product Version: UE older version
Tags:
more ▼

asked Mar 16 '16 at 08:49 PM in Blueprint Scripting

avatar image

13chsakk
7 2 3 5

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

1 answer: sort voted first

If you are wanting to slow the player down during this conversation time frame you can set the max walk speed in the movement component to a normal walk speed (somewhere in the 210-270 range should work) the default walk speed is 600 which allows the character to run. Then after the conversation time is over set it back to the default or whatever value you want the same way

alt text

set max walk.png (34.4 kB)
more ▼

answered Mar 16 '16 at 08:56 PM

avatar image

Black Phoenyx
4.2k 165 9 170

avatar image 13chsakk Mar 16 '16 at 09:32 PM

Thank you! I got it to work! This may be a stupid question (I'm a noob) but is it possible to make this work on THIS level? I don't want it to affect the other ones.

avatar image Black Phoenyx Mar 16 '16 at 09:37 PM

Absolutely you can have the event or function to set the values called once or how ever often you like...they can be in the level BP or in the character BP if you want to have access to them over multiple levels etc

avatar image Black Phoenyx Mar 16 '16 at 09:38 PM

Also don't forget to mark this as resolved/answered

avatar image 13chsakk Mar 16 '16 at 09:51 PM

Sure thing! I hate to bother you like this but I don't know how to do that. If you don't want to show me, that's fine. I can ask my teachers next week. But it would be very appreciated!

avatar image Black Phoenyx Mar 16 '16 at 10:09 PM

If you want it to effect the character in just the one level and from the moment the level starts you can set it up in the Level BP, so open the level BP and create an EventBeginPlay node and a reference to your characters from the character drag the pin out and type "get character movement"then from there you can add the nodes from the post above and from BeginPlay connect it to the Set Max Walk node. Like This: alt text

setwalklevelbp.png (82.0 kB)
avatar image 13chsakk Mar 16 '16 at 10:26 PM

I had to connect the player controller instead of that "BaseCharacter_BP" but it works as I want now! Thank you so much!

avatar image Black Phoenyx Mar 16 '16 at 10:30 PM

That BaseCharacter is the Character BP in the level that I was referencing, glad you got it working.

(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