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"

Stop Character Movement

Hello again everyone. I'm in dying need of help and would highly appreciate it if anyone could help me. I'm trying to have my character stop moving after overlapping a trigger switch so I can display my widget. I got the trigger to do other things but for some reason I can't get it to stop my characters movement.

Product Version: UE 4.19
more ▼

asked Sep 29 '18 at 05:03 AM in Blueprint Scripting

avatar image

30 1 5 7

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

2 answers: sort voted first

Hi! I have a similar setup, if you want the character to stop on overlap, you just need an event on overlap, then cast the overlapping actor to the character. get its movement component and from that use the set movement mode node and set the movement mode to none. This should disable your character movement

more ▼

answered Sep 29 '18 at 05:34 AM

avatar image

124 2 3 5

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

You'd need to create a boolean, something like bIsWidgetActive, then set is as true, when the character overlaps with the trigger, before the widget is displayed and set the boolean to false when the widget is closed/destroyed. Then create a branch for moveforward and moveright, like seen in the picture, and hook the movement input to false and the boolean to the condition. alt text

segseg.png (167.1 kB)
more ▼

answered Sep 29 '18 at 05:40 AM

avatar image

14 4 4 8

avatar image animerick Sep 29 '18 at 05:50 AM

Thanks for replay back guys, just another silly question. I would have to do this in the character blueprint and not the level blueprint, right?

avatar image UmeerFI Sep 29 '18 at 06:02 AM

yes, you can access the boolean in the level blueprint with a cast to the character, if you create the boolean inside the character blueprint

avatar image animerick Sep 29 '18 at 06:48 AM

Thanks a lot, just have one more question if you don't mind. How would I get a widget button to play a matinee animation?

avatar image UmeerFI Sep 29 '18 at 07:33 AM

No worries. You can get a reference to the matinee actor in your level by right clicking in the level blueprint. it should be one the first few items and it will be called Create a reference to "MatineeActor" (your name might be different). Then if you drag off of the reference, you should be able to search for play. All you have to do then is to hook it up to the event that it's supposed to be played with. alt text alt text

sdfsef.png (27.7 kB)
sdf.png (28.8 kB)
avatar image UmeerFI Sep 29 '18 at 07:36 AM

I forgot to mention, that you have to set the boolean "is widget active" back to false, when the widget is closed or the matinee animation has finished playing, if you want to be able to move again. Sorry about that.

avatar image animerick Sep 29 '18 at 10:16 PM

Thanks, I appreciate it but how do I get the onclick button from the widget BP to the level BP like I have in the picture. So I can play the matinee in the lvl blueprint?alt text

bp-example.jpg (172.9 kB)
avatar image animerick Sep 30 '18 at 03:46 AM

Hey I got it to work by using an event dispatcher.

(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