Тёмный
No video :(

Hold 'E' To Interact | Time Dependant Progress Bar - Unreal Engine 4 Tutorial 

Matt Aspland
Подписаться 81 тыс.
Просмотров 27 тыс.
50% 1

Hey guys, in today's video, I'm going to be showing you how to hold a button to fire off code. For example, having to hold 'E' to interact with something. We will also be adding a visual progress bar on screen for the player to see. This will increase as the player holds the button.
#Ue4 #UnrealEngine4 #Ue4Tutorial
___________________________________________________________________________
00:00 - Intro
00:19 - Overview
01:10 - Tutorial
16:30 - Final Overview
16:50 - Outro
___________________________________________________________________________
Unreal Engine 4 Tutorials Playlist: • Unreal Engine 4 Tutorials
The Basics Of Nodes Playlist: • The Basics Of Nodes In...
Blender Tutorials Playlist: • Blender Tutorials
___________________________________________________________________________
If you enjoy make sure to subscribe: / @mattaspland
Join My Discord Server: / discord
Follow Me On Instagram: / matt_aspland_
___________________________________________________________________________
If you want to support me, you can PayPal me at "matt.aspland.1@gmail.com". This is by no means expected or required. It is just a nice support :)
Link to PayPal: www.paypal.com/
You can also support me on Ko-Fi following this link: ko-fi.com/mattaspland
Thank you :)
___________________________________________________________________________
♫Music By♫
●Kronicle - Chill Noons
●Soundcloud - / the-chemist-10

Опубликовано:

 

1 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 79   
@thefacelessman808
@thefacelessman808 2 года назад
If anyone is having an issue with the widget not disappearing then do this: in your item BP add a "Do Once" between "Enable input" and "Create Widget" Then create a custom event and plug it in to the reset of the "Do Once". Trigger the custom event at the end of the code after the "Gate" and in-between the set "Is Held" and the "Close" on the Gate.
@4rzky536
@4rzky536 Год назад
its working perfectly, but when i move away from the box and closer again the widget is not showing, what should i do, pls 😭
@youngjojo3052
@youngjojo3052 2 года назад
I swear every time I need something Matt already have it done
@CommanderColson
@CommanderColson 3 года назад
This is amazing man thank you so much for this tutorial 😭
@MattAspland
@MattAspland 3 года назад
Thank you massively man, so happy I could help! :)
@DragonWarpFX
@DragonWarpFX 3 года назад
Love your tutorials!
@MattAspland
@MattAspland 3 года назад
Thank you so much, I really appreciate it :)
@techyspace5713
@techyspace5713 3 года назад
Dude, I love your tutorials, keep it up, like actually
@MattAspland
@MattAspland 3 года назад
Thank you so much bro, that means a lot to me!
@techyspace5713
@techyspace5713 3 года назад
@@MattAspland I've been looking for a way to simulate NPCs similar to those from GTA V, like how when you throw a grenade the cars start driving like crazy and things like that, I feel like if you were to make tutorials or a video series teaching similar GTA mechanics that'd make your channel grow a lot my guy
@MattAspland
@MattAspland 3 года назад
@@techyspace5713 Yeah that sounds like a great idea man, cheers for the suggestions!
@stevenwynn819
@stevenwynn819 3 года назад
Nice job!
@MattAspland
@MattAspland 3 года назад
Thanks Steve!
@MorganFuse
@MorganFuse 3 года назад
Fantastic !
@MattAspland
@MattAspland 3 года назад
Thank you so much!
@Zeronity
@Zeronity 2 года назад
Hey! Quick problem around 12:00, when I try to call TimeHeld from the WidgetRef, it doesn't show up in the search. Adding it without "Context Sensitive" selected make it say it's not compatible. Any ideas on how I could fix this?
@GaryParkin
@GaryParkin 2 года назад
Matt, thanks for the tutorial. You always seem to save the day. I have an issue where the remove from parent doesn't seem to be working. I can walk away and the hud is still active. I'll look at it again later when I have time. I'm on a later version but that shouldn't make any difference.
@ThriveOSRS
@ThriveOSRS 3 года назад
Hi matt ive tried adding this to a character blueprint class as a pickpocket system on the back of an ai instead of an actor class and this doesnt seem to work, i was wondering if you have any idea why this is?
@KillerSneak
@KillerSneak 3 года назад
How would this work with replication? (as this setup won't work and will show the interact widget on both server and client)
@hibye5833
@hibye5833 2 года назад
If you're using UE5, be sure to add the Canvas Panel first
@ShaunOfTheN00bs
@ShaunOfTheN00bs 3 года назад
This is exactly what I was looking for to code a progress bar for my game, but a question: is there a way to implement non-standard progress bar movements to go with custom UI elements? For example, I want to add a circular progress bar that advances in a clockwise rotation, similar to the lockpicking interaction in Payday 2.
@ShouldersofGiantsGames
@ShouldersofGiantsGames 3 года назад
Hey Matt, great tutorial, any assistance with the following would be greatly appreciated! Upon filling up the bar I dont want it to fill again untill you release and press E again, at the moment they can continually hold E and fill the bar but it doesnt always fire off the "destroy actor" section or in my case spawning another actor. Either fix to stop untill you press E again or a fix to keep spawning items when bar keeps filling up
@TheDreadedShredder
@TheDreadedShredder Год назад
Hi @Matt Aspland, first I just wanted to say thank you so much for your tutorials, you are really helping the dream of creating my own survival horror game, a reality. I know this is super late, but my progress bar does not fill, everything else works perfectly. The bar comes up on screen, but the visual of the bar filling up isn't working. Any help or suggestions would be greatly, greatly appreciated. Thank you again for you awesome tutorials Matt.
@keremius5201
@keremius5201 3 года назад
AWESOME : D
@MattAspland
@MattAspland 3 года назад
Thank you so much! :)
@avrahamrosenberg2905
@avrahamrosenberg2905 7 месяцев назад
hey i want it that when u let go of the button and start again it will start from where u left of i managed to make it destroy the object but the ui always restarts help will be much appreciated
@blendersovann5123
@blendersovann5123 3 года назад
Amazing
@MattAspland
@MattAspland 3 года назад
Thanks so much!
@Alex00m
@Alex00m 3 года назад
Cool bro 😌👍
@MattAspland
@MattAspland 3 года назад
Thank you so much Sangeeth :)
@Grand-warden
@Grand-warden 3 года назад
Thanks 😊
@MattAspland
@MattAspland 3 года назад
Happy to help :)
@crimsontyrs
@crimsontyrs 3 года назад
Hey Matt this worked really well except that after I pick the item up the progress bar and the text doesn't disappear? Even after I have moved out of the box's region. Thoughts? On further examination, it has something to do with how close I am to the item. It works fine if I am farther away from it.
@Shirotsune-Tomuro
@Shirotsune-Tomuro 3 года назад
if you slap a do once before the widget creation on your bp and then have it reset after the widget is destroyed, it'll solve your problem
@mihajlodjordjevic3292
@mihajlodjordjevic3292 3 года назад
Hey @Matt Aspland i have an issue 12:00 if i try to put widget ref to target self on set timeheld variable it says it is not compatible? Edit:I Fixed it the issue was widget ref was on User widget blueprint and it needts to be on hold widget
@MattAspland
@MattAspland 3 года назад
Hey, glad to hear you fixed it, sorry for my delayed reply. Thanks for leaving your fix for others to see too :)
@abdullahsohail5395
@abdullahsohail5395 3 года назад
Nice video
@MattAspland
@MattAspland 3 года назад
Thank you!!
@canokan_
@canokan_ 3 года назад
nice
@MattAspland
@MattAspland 3 года назад
Thanks :)
@sithmaster
@sithmaster 3 года назад
Hello Matt! First, thanks for this awesome tutorial. While it should work out of the box, I try to use it for a little different case and ran into a big problem. In detail, I just want to have the progress bar on my title screen (similar to games like Cyberpunk with the "Hold a button to start" and the progress bar fills up before any menu gets called. Problem in short: The progress bar won't update. My setup: - I actually have the progress bar inside a Widget BP that gets called with a Blueprint Interface at begin play inside a main menu controller (player controller) - The whole function like seen in your video is build inside this player controller Working result: - The hold function itself works and in the end I can make the hold button widget destroy and call my character selection screen Big Problem: - The Bar is not updating. I am searching on tutorials, solutions..event dispatcher things and whatever for a week now and can't make it to work. I tried it inside the level blueprint, player controller, some blueprint actor. Whatever I do, the progress bar is not filling up. I added a lot of print strings to test and when holding a button, the "Max Time Held" fills up from 0 to 1 in a second (float) so at least its doing "something". Do you have a clue why the UI does not update the progress bar or would you love to create some little tutorial on how to actually setup systems that don't need any in-level additions or actors but actually just work between the players input and the UI alone? All tutorials I found were either about stamina and health bars or pickup systems that need actors or in-game interactions but none of them tackled things like that. Cheers and sorry for the long text. Toby
@MattAspland
@MattAspland 3 года назад
Hi Toby mate, that sounds like a great idea. Yeah it sounds like everything works as it should, everything apart from visually seeing the bar fill up. So my first thought would be to make sure that you are setting the percentage filled in the bar in the widget correctly. I.e. you are doing it, it's in the correct widget, etc. If you want you can send me some screenshots via my email found on my channel's about page. And I can also add this onto my video list; Hold button to start game? All the best! Matt
@sithmaster
@sithmaster 3 года назад
I believe I probably messed up when it comes to casting or something else. Actually the widget is being called over an BP Interface, maybe thats a reason. One on Unreal Slackers told it could be that the Event Timer may hold it back from being updated on runtime on the widget. -- Actually the journey to a thing where I personally thought it would be an easy one took about a week to achieve. But from all tutorials.. your's really was the best to have for that. Big kudos to you! Cheers!
@MattAspland
@MattAspland 3 года назад
@@sithmaster Ah right okay, well narrowing down to where the issue starts is always a great step forward in figuring out! Glad that I could help with my tutorials though mate, that's great to hear, glad I could do so. All the best mate, and let me know if there's anything you ever need again! :)
@sithmaster
@sithmaster 3 года назад
@@MattAspland Thank you so much! As a pure Senior Environment Artist with very little knowledge about coding, your knowledge and your videos are saving my day since I try to kick-off a vertical slice on my own - which hopefully becomes a bigger official project where real code-magicians will hopefully kill my current "Blueprints From Hell"..
@MattAspland
@MattAspland 3 года назад
@@sithmaster No problem at all mate, it's always a pleasure to help out. I know what it's like trying to make a vertical slice, and even a full game, on your own, so any time I can help out, just let me know! I wish you all the best man, good luck with this vertical slice, I'm sure it will be great and you'll get some programmers intrigued and joining!
@emilweinbergjensen3565
@emilweinbergjensen3565 7 месяцев назад
Is it possible to make it so it appears in the world and not sticks to the screen
@thorlightning1249
@thorlightning1249 3 года назад
Do you mind if you can just do: On-screen text when near a character. So when I come up to a character it will say Press Enter To Switch. You click enter then you switch and it takes one second like you did for your first one in 14:45. Without the bar, just the text Can you pls do that?
@MattAspland
@MattAspland 3 года назад
Hey, you can do this exact same process I did with creating the widget on begin and end overlap. I responded to your comment before about this, maybe you didn't get notified. I have a video on a widget appearing and disappearing from your screen based on your proximity to something, and one on changing characters. Hope it helps :) On Screen Prompt: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Os7uf-wiU8o.html Changing Characters: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-GAlBfDtTcYE.html
@davidfattore
@davidfattore 3 года назад
Hey Matt, this is amazing, exactly what I've been looking for fundamentally, I noticed @HoneyHive's comment and I can't say that I've played Day' Gone, so my request may be similar, but is there a way of making the progress bar a square shape or a circle, with the "E" key in the middle and having the progress bar gradually fill itself up clockwise around the key?
@luka6239
@luka6239 Год назад
I have thought exactly the same, binding it to the animation. Have you done it?
@mohamedkhalid9996
@mohamedkhalid9996 3 года назад
great tut thank you so much but there's a bug when you are holding E and go away from the collision the event still going on edit: for people having the same bug you have to set IsHeld? variable to false after removing the widget for parent
@user-ul5gh1dt7t
@user-ul5gh1dt7t Год назад
Thank you Thank you Thank you very much!!
@nobIeseis
@nobIeseis Месяц назад
for some reason if i press it it just keep holding but is held is being set to false i dont know why :/
@vladaslav
@vladaslav 3 года назад
Welldone man, can this also be implemented as a "Press A Repeatedly" mechanic?
@MattAspland
@MattAspland 3 года назад
Thanks man, and absolutely! I may also do one for specifically that too
@vladaslav
@vladaslav 3 года назад
@@MattAspland nice can't wait man 🤘
@mateuszsieczka7989
@mateuszsieczka7989 3 года назад
Hey! Good tutorial, but I was wondering how could You make progress bar fill smoothly, if You know what I mean. I'd love to see tutorial for that!
@MattAspland
@MattAspland 3 года назад
Hey, to increase it more smoothly you'd essentially want to increase the values by a smaller amount. I can maybe look into alternatives too :)
@mateuszsieczka7989
@mateuszsieczka7989 3 года назад
@@MattAspland Yup, that's one idea, but I think You have to do something else to make it really smooth.
@MattAspland
@MattAspland 3 года назад
@@mateuszsieczka7989 Yeah I think there is as well, I believe I've done it before so I'll keep looking into it more :)
@coffeediction
@coffeediction 2 года назад
Why MaxTimeHeld? Isnt it JUST TimeHeld
@aliahmedgaming6083
@aliahmedgaming6083 3 года назад
How to make inventory system in unreal engine 4 Two objects Please
@MattAspland
@MattAspland 3 года назад
Hey like I've said, I've added it onto my list :)
@CommanderColson
@CommanderColson 3 года назад
I'm having an issue where the timer seemingly doesn't stop after I activate the hold mechanic (the action is a mesh that moves back and forth every time I hold E) ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-PMaurpsYprU.html Help?
@iiior605
@iiior605 3 года назад
bro, could you show how to make a destination point appear on the screen at a specific location (as in cyberpunk for example)
@MattAspland
@MattAspland 3 года назад
Hey man, I could definitely look into that one yeah!
@iiior605
@iiior605 3 года назад
@@MattAspland wohoo🤩👌
@sriram7286
@sriram7286 3 года назад
Can we get a decent performance of unreal engine in 8gb ram in pc
@MattAspland
@MattAspland 3 года назад
Hey, you can definitely get decent performance. I started with 8gb and only found an issue with it when I started to build the games of larger maps. But yeah 8gb is definitely good enough.
@supermariogolden6444
@supermariogolden6444 3 года назад
When I walk away the widget still stays on my screen
@wildrynogames
@wildrynogames 2 года назад
im getting this too
@user-yb2ec5rr4c
@user-yb2ec5rr4c 3 года назад
Remove from parent not working for me how fix?
@MattAspland
@MattAspland 3 года назад
Hey, make sure that it is connected properly I.e. the target is in our widget reference or the create widget. Also, make sure it is off of "End Overlap". Keep me updated :)
@eddr6124
@eddr6124 3 месяца назад
this mf explains so well😭
@furrybproductions
@furrybproductions 3 года назад
HA! Where was THIS a few months ago!? 😂😂😂
@MattAspland
@MattAspland 3 года назад
Haha, sometimes stuff it too late unfortunately lol
Далее
Sprinting And Stamina - Unreal Engine 5 Tutorial
17:00
The Entirety of Spongebob but Only the Memes
1:41:28
Просмотров 1,9 млн
Brawl Stars Animation: PAINT BRAWL STARTS NOW!
00:52
Просмотров 3,9 млн
кукинг с Даниилом 🥸
01:00
Просмотров 2,2 млн
Unreal Engine 4 Tutorial - Saving Level States
26:39
Просмотров 26 тыс.
Brawl Stars Animation: PAINT BRAWL STARTS NOW!
00:52
Просмотров 3,9 млн