#blueprint
402296 messages ยท Page 633 of 403
Code below is the exact same as the 'M_Spline_Tool' the bottom code works, the macro doesn't
I think it's within this section that's the issue for the Macro library, I tried moving the for loop out of the macro and in construct, made no diff
Hello, im trying to use a sphere trace to determine whether character can climb right on a ledge climb, however as you can see the trace stays on a certain rotation even if the character does not. How can i get the sphere trace to stay on the right hand side of the character?
Sphere trace BP so far
how would the macro library know what "self" is refering to. When you use it in the pawn you get a pawn reference
You are adding to the Y axis, which doesn't make sense because as the character rotates his right won't be on the Y axis anymore. Multiply the right vector of your actor by that amount, add it to the location and use that
@left niche Ah that worked perfectly thanks!
Got a small question I can't find the solution to. I'm working on creating examples of the different multiplayer relevancy options. Always relevant and net cull distance are working,, but I am struggling to get " Only Relevant to Owner" working. Currently only the Server sees the door (I use door in this example) open but neither of the client sees it. So I thought, sure I need to set an owner in the door Blueprint, but I still get the same issue ;).
The interface grabs the player character
@left niche Hey thanks for the response, where are you seeing "Self" that it would need to refer to?
oh you mean on the spline mesh component! This is also left as Target 'Self' in the working version, so what is the difference that makes one system work and the other not?
is there any reason why this would have no elements even though there's an actor on the map?
for some reason if I make a blueprint class based on the C++ class it works
but not with my C++ class
Nah it's definitely the C++ class, I didn't even have the BP class when I made the blueprint
And I'm on the same Exec Line too
anyway I guess the workaround is using the BP class instead so that's not so bad
GetActorOfClass returns only the first Actor instead all of them ^-^
In the pawn BP self is the actor in which you are using the node. idk what self would return in a macro library. Make an input variable and input it instead of self. When you call the macro pass the self reference into macro and see if it works
perhaps I'll use that then @frank rover
I wasn't sure if it would return the right one
Anyone know why my tilemaps maybe appearing highly pixellated when the level first loads? As per the screenshot, it can take about 6 seconds before they seem to correct themselves and the display looks good again...? (level has a 15 second countdown)
mipmaps ๐
and texture streaming probably
you should make sure they are scaled right and in your texture setting choose UI and NoMipmaps ^-^ Actually I have never made a 2D game, that looks cool ๐
however 6 seconds load time sounds like a lot
I will check those settings now... and thank you... its a bit noddy really, its a project for a Research Project I'm carrying out for accessibility devices, so very little mechanics.
GameArt2D.com for the sprites etc... TileSet/TileMap from UE4... then just me experimenting ๐
@covert stirrup this is part of the type of macros. Actor macros can assume Self is Actor. Pawn macros can assume Self is Pawn
Did you mean these settings? There's also some under "Compression" etc
@keen wedge what resolution are those textures? There is a value called "Mip Bias", you can increase this, and it should load the textures faster. If you have for example a 1024x1024 texture, Mip Bias 1 will "convert it" to a 512x512 in the game.. this is quite useful for performance and packaging. For this, mipmaps must be enabled ofc
You can make a macro library associated with any type. Just be careful because it cannot be used directly in the class it is based on - BP_PlayerPawn Macros can only be used with children of BP_PlayerPawn and not the class itself. This is because the assumption your macro classes are based on native types. @left niche @covert stirrup
oh, texture group 2D pixels is interesting, never have seen that ๐
nono, it's fine. Seems like it's allright already..
it seems strange that it loads this long for some textures.. what resolution is the texture and how many of them exist in the level?
I think it was the "no mips" etc... my screenshot was taken after I changed it following your suggestion... its working perfectly now! ๐ Thank you sooo much...
Now I just need to work out why the HUD doesn't appear when I run the game after a build rather than in the editor... sigh...
the texture resolution was 1024x1024. I created that in photoshop and brought all the individual images in. Unfortunately they were not all 128x128 so some fiddling on my part and I'm not using the entire area for that either, but its not really a huge focus on performance at this point ๐
I'm not actually using the HUD setting on the GameMode, its being added as a widget via the player controller. I have the player controller notifiy the GM that the widgets are initialised (they are all hidden to start with)... the GM then does its thing and broadcasts that the game has started... the player controller then receives that message and unhides the required widgets... the HUD in this case...
working fine in the editor... no show in a separate build... have to assume its something to do with the execution order being different...
sometimes adding a 0,1 sec delay can help with stuff like that. Like wait 0,1 seconds and initialize. ^_^
Yeah, I have done that in the past... it just feel so icky! That was why I started using the event dispatchers to notify other objects when they were kinda alive and ready... downside is the order really matters... I dont like either approach really..
I'll chuck that delay in now and see if it makes any difference on the build, its so frustrating to get to the end of a little project like this and then find that to be a problem... humpf...
there are some other options, but given the fact that it works in editor but not in the game, I thought it was the game instance/gamemode issue...
I'm not 100% sure how Begin play for example works and when excactly it is called. If the actor is created or if all actors are created and the "loading" is finished....
if you get game mode and cast it to your game mode, you can just see if the cast fails, delay 0,1 sec and try casting again... but that is not elegant either ๐ ๐
I always worry about delay nodes causing weird conflicts with interdependent bps
I do use an GI as well, but its just holding a couple of values at the moment to manage some state for which game modes to enable in the game. There's a "Practice" and a "Play" mode etc... so I turn on/off buttons on the main menu to push users through in the order I want them to go through it.
It seems like a little bit of "dark arts" with the execution order... Unity's documentation on this is fantastic, Unreal's, less so. The usual approach I take is to have every object Print something, then I can see the order... but its time consuming and painful... hehe
but you have your game instance and default game mode in the project settings, right? ^^
Project -> Map & Modes
yep... well, kinda ๐
So, GI yes... default GM no.
The buttons on the main menu send game options to the level to advise as to which GM to use for each game mode etc...
Its kinda weird actually, just tried another build (without the delay yet) and the timer not only doesn't appear, but its not actually doing anything in the background... my 15 seconds practice level for example doesn't end...
gah...
try setting a default game mode.. I think they are in the world settings of the level, but your level might miss the right one...
ah okay...
it doesn't in the editor - they load correctly there.. and setting a default one then takes me down the road of having to over-ride them all later...
using UE4 is very similar to sticking hot pins in my eyes ๐
I always find its what I feel should be the "simplest" thing always ends up being the "hardest" thing...
like setting your game mode and player controller, creating a main menu and then finding your character floating around behind the buttons...
uhm.. how is your character spawned?
are you adding widgets to the viewport or player screen? maybe there is an issue there, because unreal spawns this play in editor pawn or whatever if there is none I suspect...
because maybe you are creating some player controller and possess the wrong one.. idk
or is the pawn prespawned sitting in the level?
This project used the 2D Side Scroller template initially, so there's a PlayStart and the GM has the PlayerCharacter set as the Pawn etc.
Again, all good in the editor... the example with the main menu and the character appearing has been an experience from other projects. Having to create separate GMs for things like a main menu and the game seemed like over kill..
if not, this is probably everything I can do to solve your problem. but... you have a countdown... if that runs the widget works, right?
I am confused ๐
Sorry for confusing...
When the GM receives notification that the UI Widgets have been initialised it then calls GameStart and begins the timer... I suspect that I'm not getting the notification through to say the UI Widgets have been created, which is why then in turn the timer isn't starting....
in the packaged version.. again, in the editor.. all good... so back to execution order I think
okay... and how do you send that notification? something like "get player controller"-> cast to something->notify or via an interface?
Why do I need to click this button twice to create the widget? Shouldn't it all work on the first click?
Via an event dispatcher...
Check to see if the UI has focus... your first click might be focusing the UI, then the second hitting the button. Chuck a Print node after your event, if you only see it appear once, thats probably the issue.
ookay... not sure if remove from parent should be called immediatly (could be a cause, but not sure) ..I think you need to print some stuff in dev mode and see where the problem is excactly x)
This is how it is created
Yeah, doing that now, just added a tonne of Print nodes... sigh... thanks for the suggestions, appreciate the help ๐
Your variable setting is for something other than the widget reference... the widget reference wired up to focus is probably null at that point.
Try the Print node suggestion, see how many times you get the Print message appear..
๐
Mm even fixing that still doesn't fix the double click issue. Let me setup the print nodes
So it doesn't seem to flow to the continue event for some reason on first click even though the bind is being called
does the found account event exist? can you even bind to your own (self) events? never did that ^^
because ur binding the event after you're calling the event?
It probably doesn't make much difference, but I tend to wrap my Binds up with a CreateEvent and then point them to a function. I'm not sure I've ever tried the binds like this - not saying its wrong, just different from my approach.
I normally have two functions from BeginPlay, SetReferences and BindToEvents
problem solved ๐ฎ
I get all that stuff done the beginning.
Instead of a bind I could do a wait for function call and turn account data into a function I suppose.
In the future that event will be pulling data from a database
you are binding the event, you're not calling it to be ran. so first time it runs get account data and then binds the event continue login to 'Found Account'.
so it's only natural that you have to click twice before it actually runs continue login in this case
So, my issue does appear to be related to the event order....
Two screenshots, one after packaging and running as an application in Windows, the other running the game in the editor...
PC = Player Controller
GM = GameMode
Interesting, in the windows build, the GM doesn't even trigger the Construction script... but whats interesting, and annoying, is that the GM is begin run after the PC... which is why my stuffs all broken... curses...
About the gm combative script, it may not print because the printing system already exists in the editor when gm is created. In package the gm is probably created before it can even get a reference to the debug stuff to print.
Thanks, that's handy to know...
I have kinda got around this at the moment by having the GM now call a dispatcher which the PC binds too that says "Hey, I'm awake now"... after which all other business can carry on... it seems to be working but has made a mess of my nodes... lol... hate it when that happens! ๐ I feel that this is "safer" than just arbitrarily dropping in a 0.2 second delay... I feel uncomfortable with that as an approach, despite it seemingly working in all cases...
As to the begin play stuff, you cannot rely on begin play order at game start, gm will call that on all current actors. Usually this is in order for testing because of things loading the same way each time but it is bad practise to rely on begin play order. It's never promised.
Would prefer an overriding "Pre-Warm" setting personally, something you just set in the options that says "Wait for 0.2 seconds" - after which ever thing is guaranteed to be ready to use...
That's one leading cause to long load screens in games. To many timers waiting for other stuff to be ready. I find it better to just make registering events. If two things need to know about each other and need both ready, make both of them try to get each other, one will fail since its created first. The second will succeed. You can make them update each other when the second one is valid. At that point you know they're both valid. Also be careful with begin play if you're doing multi player. It will get called every time that actor becomes relevant and spawns on a client, not just when the server creates it.
hmm... I'd hadn't thought of that, probably because most of the stuff I make is kinda small, so I never really encounter those issues, just EVERY-OTHER-ISSUE ๐
That suggestion about making them let each other know - I don't suppose you have a little bit of BP you could copy/paste as an example for that do you? I think I've got half of that in place now with the dispatchers etc, but there isn't anything really checking to see if it exists and looping around until it does... that kinda loop terrifies me, as if I screw something up it'll just be endlessly going around in circles for eternity... I suspect you have something for that too... any info is appreciated... and thanks for the replies ๐
I don't at the moment. On my phone. I'll be home within the hour though. Timers are a bit dirty, but they can work for that sometimes.
No worries, but if you find a spare moment I'd be grateful. Thanks again for the replies ๐
@keen wedge So in your case, you need stuff to happen relating to GameMode and a PlayerController, but you need it to happen in GameMode first, and then the PlayerController?
The player controller, in this scenario, creates UI widgets, adds them to the viewport, but hides them.... it notifies the game mode that the ui has been initialised... the game mode does some other bits and then reports out (dispatcher) that the game has now started. Upon receiving that, the player controller then unhides the appropriate ui widget. Other items do other things based on that same game started announcement.
Since messaging in here today and going down this road, I have subsequently added another dispatcher and binding, and removed the items that were happening in BeginPlay in the controller, leaving only the binding to this new dispatcher. Upon receiving the "Initialised" message from the game mode, a function is called which then runs through all of the steps that were initially in the BeginPlay within the player controller. Its working, but does mean I have kinda two Binding functions now which is a bit erksome... but I supposed I have to get over that as no one other than me will ever see it.
I have a second game mode also, so will need to add this to the other one too so that they both work in the same manner.
On the GameMode note, why not subclass the native GameMode type you're using, and then reparent both of your game modes to that and then use that for this logic. Then stuff can cast to that instead for this stuff. Alternatively, you could do it in an interface, but that means repeating all of the logic in both classes.
I did consider the interface approach yesterday, I was running into other problems where I needed to effectively call the same function but have it perform different actions. The whole project went from kinda working, to kinda completely screwed and I was so tired I couldn't see a way through it. In the end I duplicating game modes and controllers, specifying a controller for each of the game mode blueprints and had the two different game modes (which I wanted anyway).
They are both using a base class, which is when I'm running the Initialised dispatcher from, so at least something is shared. I find trying to do anything with inheritance, delegates or interfaces really challenging via Blueprint. I don't know C++, only dabbled a few times before... come from a C# background - much preferred being able to actually "read" my code instead of all these nodes and stuff... but there we go... grumble over...
Because I'm up against it time wise for this project, I think I'll have to just duplicate this current approach which appears to be working, at least for now. This is part of a research project into accessibility devices and the Unreal project was only supposed to be a small part of that really... lol.. getting bogged a lot in it now, what with tilemaps having flickery lines, execution order woes and so on... all I want is this little dinosaur to run and jump around these little platforms... always feel I'm asking for the moon a stick! ๐
Haha. I'm so backwards. I can write C++ easily, but I dislike reading it. Most of my functions are just blueprint functions rewritten into C++ for better performance.
hehe, sounds like if we swapped out half of each of our brains we'd make a whole! ๐
What's really annoying about this problem is having now resolved it for the packaged version, running it in the editor now longer shows the UI or the timer... ffs... round I go...
I shouldn't be this hard...
Hello everyone, I'm having an issue where my mouse event stopped working (after making a bunch of minor changes) and I'm not sure what's wrong... oddly enough, if I add my blueprint to another level (like the Content Examples levels), everything works as intended. In addition, my TraceLineByChannel node also stopped registering hits, even though actors are well within the InteractionDistance. Does anyone have any idea what could be the issue?
Edit: something more seems to be happening when I add it to another level, because it still isn't registering any hits, yet somehow it's still working as intended.... (I've added a fluid sim blueprint so that when I click the mouse it causes ripples, and the level I mentioned earlier is the BlueprintRenderToTarget content example map)
I made sure to use the same Game Mode for each level
@keen wedge For your earlier Beginplay issue with multiple actors needing to be valid and ready to call stuff in order.
With multiple actors, it's fairly easy to turn that check into an array of objects and create a small checking function on the array. Not the most performant, but it's a linchpin function that only needs ran rarely.
Thanks for the above, kinda similar to what I have, but in that bottom screenshot you mentioned about now checking whether the player controller is valid. Where is that check though? All I see is a function being called, which it may not etc.. am I missing something?
The cast does that. Casting will attempt to cast the object input to a different pointer type. If either the object is not that type, or the object itself is invalid to begin with, the cast fails.
Ah, ok, so thats the dead end then - but isn't that what I kinda have now, e.g. the dead end, so what makes it try again? Not sure about the "Stuff to call on Each" bit in the player controller etc?
Oh I see... the PC calls the same function that the GM calls... so it could be called twice, or maybe just once, DoOnce thing locks some of it down etc..
What happens in logical order is that one beginplay runs. Lets say the GameModes's runs first. If the controller is already valid at this point, it will pass the do once and do the logic needed. If the controller is not valid, it won't pass the cast so won't run the do once or the logic after. Then comes the controller at a later time. The controller calls the same function. If it's already been ran the DoOnce stops it from running twice. If the Controller was invalid on the game mode's run, this will run it again now that the controller is valid. One way or the other as long as you're using the correct classes for the casts, the logic will get run at some point once both actors are valid.
Yeah, thanks, I get it now... ta for the explanation though.
I'm sure this would work, but the one bit which still feels "icky" is that I "know" its going to fail, which means having it run through the code is effectively creating a delay, so that the second time it runs through, it works. Being that we are just creating a delay, the Delay node with the 0.2 default (which worked earlier annoyingly!) would seem easier to read. But I am LOATHED to do that...
This stuff always leaves me feeling like I am massively not understanding something because, again, it shouldn't be this difficult should it? In your projects, do you have to consider and apply this kind of approach each time?
Personally, if I was doing this, I would have just made a custom event in the GameMode. Then made the Controller's Beginplay do it's own UI stuff and then call the GameMode to do it's stuff. GameMode will always be ready and alive before a Controller even if the GameMode's Beginplay is ran after the controller's. GameMode creates the controllers.
Even with the custom event in the GameMode though, you'd still have the reliance on knowing when the PCs stuff was done? In this case, I need to make a UI widget visible when the game mode is ready... so the GM needs to know the UI widgets are are ready before it can say "show one" etc..
It all runs on the same execution line in order. So for instance..
Anyone here know how I can capture what actors are overlapping a box in the editor inside a construction script? The function I made works correctly at runtime but fails when called in the editor on construct.
I think one thing I've been trying to do was use the event dispatchers instead of making those direct calls as you have at the end of the first screenshot. Probably trying to make stuff event driven but I'm assuming getting it wrong along the way... I was trying to keep each object only really concerned with itself and not much else, something that seems almost impossible in blueprint... again, I probably lack the experience with Unreal to do it properly. ๐ฆ
I'm fairly certain this is not possible as collisions are not simulated in the editor. Eg. You can place two objects on top of one another that would normally collide.
This is overlap not collision
It definitely does "something" but it's really wildly unpredictable
Some actors seem to return overlaps and others just whiff
It's very easy to do in blueprint, but it requires some really abstract work. In your case where you're trying to do some very specific stuff in order, it's more difficult to stay abstract.
Strangely in a super simple test case I can get an overlap in the editor but the overlap doesn't "align" to the volume VS the object it's like the transforms are borked. But in game, works perfectly
This is a "massive" ask, but I don't suppose I could ping you a zip of the project and you could let me know where my approach is perhaps not so great? The project isn't particularly bit, and its documented. I'd be keen to hear your thoughts. Again, massive ask and I fully appreciate you may not have the time so not a problem if not.
What are you using in the constructions script to get the overlapping actors?
I realized I accidentally shortened the line trace distance, and easily solved that issue, however the lack of mouse click registering is still causing issues... execution never reaches here (and it used to before):
I'm trying to generate multiple tiles with the tile generator UE4 showcased on a livestream, but I can only get it to generate two different types of tiles, if i try three or more, it breaks. Any suggestions?
I don't know how C# handles stuff, but at least in C++, you can't really do anything without some sort of reference. Class inheritance is extremely important for this reason. EventDispatchers need a casted pointer to bind from or call from. Interfaces still need a basic object type, etc. It just comes down to how you want stuff to communicate. An Event Dispatcher is nothing more than a list of references to tell that something happened when it's called.
But yeah, I could glance through it.
Anything to procrastinate finishing this inventory.
@dawn gazelle
Thank you so much, what's the best way to share it? Not sure if I can attach it here? I'll also take out these last couple of changes to try to make it work properly when it runs on its own, I'm just going back and forth, either working on its own or in the editor... never both... sigh..
Not sure. What engine version is it on?
That works.
okey dokey... will do that now... I would remove the Start Content too but as I based this from the 2D side scroller template there might be some references in there and I dont want to break it further at the moment... apologies if the download is a chunky one..
I play ARK. Large file sizes don't really surprise me much. ๐
I've stripped out the folders that can be rebuilt when you open the project (saved, intermediate, builds etc etc), down to 625Mb, uploading now...
Interesting, ok, so yeah on my end that overlap components node does work while in editor. Learn something new every day.
What's probably happening is that the actors you're trying to overlap with aren't using the collision profiles that you're looking for or do not generate overlaps with the connectionvolume's profile?
I was able to get consistent overlaps on some pawns I had placed around that for sure have the right profile.
@unkempt quarry How are you trying more? It looks like your branch there should possibly be a Switch On Enum or Int.
Though I am on 4.26 -_-;;
I tried multiple branches
@dawn gazelle I don't believe it's collision profile related, as I said I get overlaps at runtime as expected. And I get strange overlaps in editor, IE: They overlap but don't appear to respect the bounds of the object OR the box, it seems to have something to do with using the box collider... it's like it's extent is completely ignored in the editor
@dawn gazelle If I set it to default extents it seems to work as expected in the editor, going to try replacing it with a static mesh cube instead
Switch on int works fine, thank you @maiden wadi
Yes alright, I'm experiencing the same now after mucking with the scale of the collider.
@dawn gazelle It's like the collider box isn't initialized yet somehow... I wonder if I set the extents in the construction script if it would work...
@dawn gazelle Yep totally works if you hard set the extents in the construction script
Can someone help me out ๐
My character rotates with with mouse, and I'm trying to make it so the when the character is rotating, an idle rotation animation plays, but when the character stops rotating, it switches back to the standard idle animation. Any ideas?
So i believe here what may be happening is that it's only using the default objects in the editor. It doesn't take into account what you may have set within the editor.
I had a similar problem yesterday where I was trying to make a text renderer with some data that is added in the editor on a component - it wouldn't return any values. When I set the values on the component in the blueprint, it would return the values set.
@dawn gazelle That makes sense, I suspect the construction script is getting called ahead of those actor properties being set.
On every player is working but guy which died have overlapping every child
@dawn gazelle Thanks so much dude! Appreciate your help walking through it! ๐ฆ
Glad to. And I learned something new too ๐
you could play a montage that loops when it detects you are rotating, and simply stop the montage once your are done, you can call this on the animbp.
Pinged you a PM as have limted bandwidth on the site. Not chasing, but conscious I suddenly switched form chatting here to the PM etc... I've only started using Discord again in the last few days so I'm trying to find my way around it etc ๐
Yeah, started it. Should be done in 17-65 minutes. Haha, jumpy upload.
@dull tree Rather than making the server get all player controllers to loop over them to do this in each one with a client RPC, why not just make an RPC in GameState? Make the server multicast to all clients the latest kill feed and have the client's version of the Gamestate call the update in the local UI. Then it's one actor handling the replication for all and it should be consistent.
You also should not be letting the client dictate the kill feed with a Server RPC. Server should be the one determining death with it's own variables. So it should handle RPCing the kill feed itself rather than a client updating it.
hmmm, that may assist me in cancelling my hosting then! lol...it uploaded at a shoddy 1.7Mb p/s... ooof... just assumed that was my end and that the download would be better..
It's jumping around between 65-320 KB/s
WAH! I take it your not in the North Pole, sitting on an ice sculpture of a chair using some kind of satelite phone for your data?! ๐
Wow... and I pay good money for this hosting service too... hmmm... will re-think that too then... WinHosts... ๐ฆ
I could chuck it on Google Drive or something... although, I dont typically share stuff on that so not 100% sure how to..
How can I achieve this in the AnimBP? As far as detecting if I'm rotating?
anyone know why this cook is failing
Well, North pole isn't too far I suppose. In Finland. Should affect latency, but shouldn't really touch download speed much I wouldn't think even if the host is in California.
How can I reshuffle these based on the order of their display name there?
hehe, oh wow...
/waves to Finland. ๐
I'll see if I can work out the Google Drive thing quickly, probably be a lot easier/faster... I dont want to waste your time...
I'm in no rush, it's all good.
I'm using runtime audio importer to playback wav files - they are exported in order but due to the transcoding, they don't all transcode in the same order (like if you started transcoding 1 first and it was long, transcoding #2 would finish and it would fire this bind event that adds it to that SoundWav Array
Not sure where to post that but im cooking bps soo
when you rotate with your mouse, that event you could use to indicate to the animbp you are rotating using a variable for example, the animbp can check if the rotation montage is already playing, and if its not play it
I guess I'm having trouble finding out which event is calling my rotation with my mouse, trying to print string on each event input and it doesn't seem to be working
@summer bolt This is your actual error. Something is using a null reference pertaining to the HelicopterBP. Usual fixes seem to be doing a full content browswer FixUpRedirectors, and also going through each blueprint that may use this asset or class and recompiling them or switching the value to something else, compiling and then back and compiling again.
UATHelper: Cooking (Windows): UE4Editor-Cmd: [2021.02.25-20.36.14:452][ 0]LogWindows:Error: Fatal error: [File:D:\Build\++UE4+Release-4.13+Compile\Sync\Engine\Source\Runtime\Engine\Private\BlueprintGeneratedClass.cpp] [Line: 150]
UATHelper: Cooking (Windows): UE4Editor-Cmd: [2021.02.25-20.36.14:453][ 0]LogWindows:Error: UBlueprintGeneratedClass::GetAuthoritativeClass: ClassGeneratedBy is null. class '/Engine/Transient.TRASHCLASS_HelicopterBP_95'
Ty
If its any better....
https://drive.google.com/file/d/1cb1jPmzpjHhcEoCx0yzZApScCLtZAPta/view?usp=sharing
@maiden wadi When i try click on the bp i crash?
it should be something like Turn, or TurnAtRate, then you can set a variable there like YawInput or something
Then in animbp, you could use a blend state if yawinput != 0 and speed close to 0, or play anim montage
@summer bolt Were you doing anything in the Construction Script?
Dont think so
Odd. Dunno then. If the Fix up doesn't work, your only real choice is source control. If you're lucky you have a recent save of the class in the ProjectDirectory\Saved\Backup folder. You can copy it into your ProjectDirectory\Content folder, whereever the corrupted one is.
k
Can i hop in a call and show you what my setup looks like? It's a little complex at the moment
yeah that worked ty
recommended best practice to quickly ~~reshuffling ~~ placing these in order based on the number these?
sorry, I dont do calls. but you can check this tutorial here, someone posted on the forums. ๐
https://forums.unrealengine.com/community/community-content-tools-and-tutorials/61514-aimoffset-and-turn-in-place-animation-replication?89892-AimOffset-and-Turn-in-Place-Animation-Replication=
This is the place to show, share, and link to your stuff!
Sorry, I meant put in order
I solved my issue by adding the following nodes at the BeginPlay event in my bp, but I've never had to do that before to get buttons working... given this solution, does anyone have an idea as to what changed?
I don't think there's an "easy" way within Blueprint... I've looked for some things like this myself in the past. A quick search just now pointed me to this;
https://www.unrealengine.com/marketplace/en-US/product/low-entry-extended-standard-library
Its free and might be of use to you... if those paths/names are accessible (GetDisplayName?) then you might be able to re-order that way. Might be problematic depending on the name when you have things like 1, 11, 2 etc...
I have that....let me see if there is something there...thanks I appreciate it
No worries, I've not used it so can't be of much help there, but on the store there page shows a load of the functions it provides out of the box are there are quite a few for sorting arrays.. no idea how performant it is either..
So I've a SK mesh and added a child mask SK mesh. In const. script, Added master pose component. Unfortunately the mask won't sync.
it should looks like that?
Hi all - ultra noob question here:
@dull tree Not quite. I assume you're trying to make a typical shooter kill reel for when a player is killed?
@grizzled marsh Put this into a function and return if it's true. If the function finishes and the traces and the sphere thing and none hit anything it'll return false. If any trace hits something, it can return true and break the function there, stopping you from potentially doing many unnecessary line traces in the process.
@dull tree So, if a player has died on the server. The server just needs to get it's own game state and call this Multicast RPC with the correct inputs. Now the logic will be on each client. So now you just need to get the location of your kill reel widget, and call an update to the kill reel with the names.
get own game state u mean cast to gamestate yeah?
@maiden wadi any luck with the download? I've just tried implementing the "Stuff to Call On Each" suggestion you had above, but the result is the same, actually, not quite the same, now I dont get the widgets appearing or the timer starting in the editor or a standalone package... lol... ๐ซ
I am following a guide on making a login for ue4 using VaRest. When I get to this part (youtube on right) I can't find this function. All I can find is what you see on the left, however even if I wanted to use that I am not sure what to target. Anyone know either what I should use here instead or what to target for the slightly different json request that I see?
I dont know anything about the stuff your doing, but the blue function node on the left image isn't connected to anything... so if the error regarding target is related to the node with the red warning on it, that's probably why... its the same as having nothing connected to it...
Yeah I know that lol.
Gonna try this for now, see if that works
Whats the date on your tutorial?
@keen wedge Been looking through it a bit. I like it. But I admit you have a very roundabout way of doing some things. For instance the controller movement. Normally I'd recommend putting any sort of character controls in the character itself, but it's a non issue in simpler projects, just that if you ever had different types of characters, you'd need their controls to differ. But the control rotation part. You can get rid of tick and do the rotating all in the axis event. This for instance allows you to get rid of an extra function call on tick, and remove a couple helper functions and keep the same functionality.
Alas that was inherited from the 2D Side Scroller template... ironically it was on the Character initially, but I was under the impression that the "controller" was the object that was supposed to "control" the character etc? (dont mean that cheekily), but I thought that was intended to take the inputs and then feed the character? I wasn't liking the Tick stuff... but when I took it out I noted that the animations changed, from either not ending properly, or not facing the right direction, was easier to just leave it in.
I'll take a look-see at the above (thanks) and see about implementing it, but its really this other issue that is causing me the biggest problem at the moment.
I applied your approach a second time and worked through it again - I have it working now, both in the editor AND as a standalone package, - BUT - the order of the "Stuff Player Controller Needs To Do" and "Stuff Game Mode Needs to Do" in your example/screenshot matters... if I do the controller first... it doesnt work at all... the controller has to be last...
One other note is the references everywhere. This isn't so bad in some cases, but a lot of the references you're saving are very easy to get and are not performant heavy to get either. GameInstance, GameMode, GameState, PlayerController, PlayerPawn/Character, all of these are very quick calls and can be used pretty much everywhere in either client side only code or single player. Saving them also creates more effort for you, since you need to follow along and update them when they're not valid anymore if say you kill off a character, destroy it and spawn a new one. GetPlayerCharacter works already, but an old saved reference needs updated. I'm a huge fan of less upkeep in coding. And this note is highly personal preference, but for those easy to get instances like that, I wouldn't personally bother ever saving references.
Thanks interesting to know, thanks. I'd assumed that by grabbing the reference to stashing it I wouldn't need to keep making calls to get it... and for my own sanity it meant just dragging across one variable node instead of having to have two everytime and casting it etc... I was under the impression that the Cast was the expensive part and that was to be limited/avoided where-ever possible.
@maiden wadi
get own game state u mean cast to gamestate yeah?
That's not what casting is
You are not doing that from a server instance of whatever actor all that blueprint is on.
@dull tree start from the beginning, what exactly do you want to have happen when a player character is killed? do you want everybody to see the kill feed or just the victim or whatever?
everyone
Do you already have some event that happens when a character is killed on the server?
@dull tree it's pretty weird to have the function that shows the kill feed be on the character but whatever. Do this when a character dies ON THE SERVER.
- Get all player-possessed characters.
- Run on owning client the Show Kill Feed event.
That's it.
That's a bad design tho, show kill feed should be on GameState probably.
i had that on gamestate but it doesnt work and i followed some tutorials and now i am here
It works, you just aren't doing it right.
With the game state approach, you would just get the game state, and then multicast show kill feed.
On the player character, yes. And you should check is authority before it if you don't have one already when doing the On Killed stuff
It can be earlier like in your damage handling
But you need some way to know whether you are on the server instance of the character or not
i got this on event any damage
K so if you know that anything after that is only running on the server, then you're good. Just get Gamestate and cast it to your custom Gamestate and call multicast Show Kill Feed.
got this on gamestate
Just plugged in that suggestion for removing the Tick call... thanks for that, works a treat. ๐
Your M_ShowKillFeed event is a multicast event (Executes On All == Multicast) .
Multicast means you're sending it to every player already. You don't need to get all actors of class, and loop through them and send another replicated event (the C Show Kill Feed).
You want to feed the Killer and Death values to your widget.
I am trying to randomise the rotation of the tiles to make it less grid like but I have ended up making islands instead, this is probably really wrong but any suggestions?
@unkempt quarry what do you mean randomized rotation of tiles? don't you only have like four orientations that make sense? Or are you meeting randomizing the rotation of the things inside of a tile
So just C show kill feed on gamestate and Player Ref yes?
i mean plug player ref to target
Any idea what Im doing wrong here. I've got a material with some parameters, one of which is a texture. I do a SceneCapture2D and try to plum it into the Material, which then renders into a widget, but from what I can see either the widget isnt using the material, or the parameter isnt getting applied.
You don't need any of that. You need to implement the stuff that shows the actual widget on the local player in that event. Literally just multicast event show kill feed and then show the widget on the local players viewport
right?
@dull tree no, take all the logic that shows the widget and put it in place of that function that you are calling on the player actor. The player actor doesn't need to do anything besides notify the game state that it died
ooooo ok
This for a mini map? When I made one of these I needed to use a RenderTarget in the process.
@cursive girder is your scene capture 2D writing to a render Target
@dull tree take all of your UI off of the player character.
there's like three ways to do what you're trying to do and you're taking bits and pieces of all three and mashing them together. It's a total cluster lol
3 is better then 1 ๐
i am lost ๐ฆ
0.3 + 0.3 + 0.3 = 0.9 ๐
You way is a little different to mine. I had a camera positioned above the FirstPersonCharacter. I had the TextureTarget set to MiniMapRenderTarger (a RenderTarget I had created). Then I right-clicked on the MiniMapRenderTarget in the Content Browser and chose CreateMaterial. The Material was then used in the UI widget.
Sorry, I wasn't specific. Randomise between 90, 180 and 270degrees
@keen wedge Wouldnt that be the equivalent of a topdown camera?
Yeah... I was just experimenting... but I figured the RenderTarget bit was maybe what you needed?
The other issue I found was that it rendered lots of things I realised I didn't really want. Shadows and stuff... when things moved in the world they moved on the map...
yeah, mine is a scene capture for that reason
You can exclude stuff
and I can do fog of war once I got this working.
Wish I'd done that... but I was experimenting/learning etc... what I learnt was my approach was crap ๐
but like I said I cant seem to get the texture into my material ๐
Was trying to create something similar to Fortnite etc..
or I cant get the material onto my widget.
The manual way is the right-click "Create Material" thing... can you do that from nodes?
Chances are fortnite are doing something similar to mine
(yeah, think so... they have the writing and stuff all over it, more like an image with a cursor on top perhaps than what I did... still, I learnt.. ๐ )
Isnt my Create Dynamic Material Instance doing what you suggest?
Could be... getting out of my depth now... sorry...
I note you're getting the MapTextureParameterName but then not feeding that in, instead have a text reference? Maybe not related?
I disconnected it and hardcoded it
I was trying to write this thing as a plugin, so it was a parameter on the widget
Ah... is it worth testing the creation of the material manually from the RenderTarget and setting it manually to see if that works first?
@keen wedge Blob of text alert. Avoiding casting is kind of a misconstrued issue in unreal. Casting itself costs nothing. It's just changing a pointer type from one to another and then checking if it's valid. The valid check takes a bit, but it's extremely cheap. It takes hundreds of thousands of them in a single instant to make a blip. It's also cheaper than using an invalid pointer since that will be 12.7X slower in bp and will crash if done in C++. The real serious cost of casting is encapsulation. When you cast to something, this means that object needs to be loaded when the object casting to it is loaded. This means that for small games, you can cast to everything and you won't notice anything. But much larger games, you'll end up with the whole game in memory at one point. The reason this happens is because Unreal loads up a default version of each necessary actor that something might need and stores it in memory in case something needs it like spawning a new actor, or other stuff. So if you have Object A that gets loaded, and it casts to Object B anywhere in it's code, not just things being executed but any sort of hard pointers be they casts, or variables, etc, Object B will get loaded. If Object B casts to or has a hard pointer of Object C, then when Object A gets loaded, Object B and C get loaded. This starts a chain reaction that doesn't stop until everything necessary to reach is in memory before Object A is actually loaded up. So if you have a character on map 1, and a boss on map2, and you have an ability in character that casts to that boss, that boss gets loaded even on map 1, even though it's not used until map 2. In small projects, this doesn't matter. In large projects, this can quickly get out of control without proper use of class inheritance to cast to lower level emptier classes and interfaces, and use of SoftObjectPointers.
so manually add the scene capture, create the texture and plug that into my minimap?
and turn off the blueprint stuff for now to check it works?
I was thinking mainly from the texture creation point if you can, and then plug that directly into the UI... could perhaps leave the scene capture stuff in... was just a thought... trying to break it down/simplify it a bit etc... might help point to the issue..
Thanks for this @maiden wadi , I could really do with a massive learning class on all this stuff... only started fiddling with Unreal about a year and a half a go. Had a Unity background before, for a few years, but again kinda hobbyist...
Where exactly does one garner all this info from, because generally, the UE4 documentation is somewhat lacking in my experience....
I found the cause! ๐ฉ
if (MiniMapVolume != NULL && MiniMapVolume->MapTexture != NULL) {
// Set up a MapTexture, and connect the update function to it, then tell it to update.
My code always pulls the texture out of my minimap bounding volume
next problem. Its expecting a UMaterial* and I've currently got a RenderTarget texture. How to map from one to the other....
Congrats on finding the problem! Progress at least...
That "Create Material" thing I was on about I think is that next part isn't it? I didn't really understand the stuff you had about the Create Dynamic Material Instance, again, out of my league a bit there...
Does the output RenderTarget texture not have a "CreateMaterial" function or anything like that? Or is there a standard "Create Material" function that you can then push the texture into? (sorry if this is what you already have..)
It has a create material, but apparently that material doesnt fit onto a UMaterial*
What "type" does it create?
This is the fun of mixing c++ and BP I guess
hmmm.... I've never really understood all the letter prefixes Unreal uses in front of the API stuff... UProperties and all the rest... anyway to convert it?
Trying to figure that out now
Ha!
Oh that is awesome and sucks at the same time
Dont suppose this is of any use? Has some stuff about UMaterials...
https://isaratech.com/ue4-programmatically-create-a-new-material-and-inner-nodes/
Its not a umaterial, what its doing -
its taking my comments and adding them as helper hovers
I commented out the Umaterial, and it spotted it as a helper message ๐
Still got the same problem though....
Convert my rendertargt to a UTexture2D...
@keen wedge I dunno. Honestly I've learned a lot here in this Discord and from a lot of personal testing projects. I've only been messing with Unreal for just over a year now. I tried Unity and Cryengine and nothing really clicked. Unreal just makes sense to me by comparison. ๐คทโโ๏ธ But the docs aren't bad, but they're old and outdated. There's still a lot of relevant info. The Docs and Livestreams can be nice sometimes, but even they can teach bad practice funny enough. They're kind of like college level stuff from what I've seen of college students in here. It's dumbed down and over simplified to the point that it's not really world usable and only meant for helping understanding. Like dumping all of your game logic into your level blueprint because you don't want to bother teaching your students about object oriented programming. My biggest suggestion is watch the discord often. Glance over conversations and follow them if it's something you sort of understand. A few big names to follow when they're helping people is Jambax, UKaos, Zlo, Stranger and eXi. They're usually pretty informative, even more so if you end up in Multiplayer stuff.
Well, Im done for the night. Its progress at least, thanks for being a sounding board Rob ๐
Many thanks @maiden wadi , ironically I am currently studying game development at uni, which is where my Unreal "experience" is coming from... its not being taught in an OO way thats for certain, that was the background I had previous in software development and I'm struggling to find ways to do that with BP... its just not "clear" to me with all the nodes... I'd rather just see code... but as mentioned earlier, have little to no C++ experience... maybe that should be one of my next focuses...
My comment regarding the docs I suppose was in comparison to Unity's. One of the things I always appreciated was that there were typically usage examples. I don't tend to find that with UE4's documentation... often those little examples were a great starting point to move forward from. Ironically I just went searching for a "bad example" and wasn't able to find one... lol... ironic how its only when I need the bloody help I can't find it! ๐
Ah, you're welcome, sorry I'm not a lot of help... glad you've made some progress at least... its been a night of frustrations all round! ๐
Anyone out there know much about VaRest? Just have a few questions
If you're doing a dedicated server, Execute On All executes on the server as well, and the server does not get a HUD to add widgets to. You can do a "Is Dedicated Server" branch test at the start of the multicasts and only proceed on the false so that the server doesn't run it.
I've tried to rotate the tiles relatively but i've ended up rotating all the grass tiles relative to the world, send help
Hey guys, I'm trying to make audio settings where you can change the volume of all kinds of sounds, I'm having a problem with having SetSoundMixClassOverride change the volume of the affected sounds when its changed, the volume changes work when the game is restarted
This works, for when the game restarts, but not when it is applied
Does anyone see anything obviously wrong with this? I cannot for the life of me get logging in to work in UE4. Works fine in a web portal.
Hello, is it possible to move spline points in real time from Point A to B? and if so, how would I calculate the tangents to make a curve between them?
Join us for an afternoon of math... for artists! Bill Kladis and Wyeth Johnson, senior VFX artists at Epic, and David Hill, our Principal Mathematician, will walk us through examples such as Derivatives, Cross Product, Vector Transforms, Sobel Edge and calculating gradients around distance fields.
ANNOUNCEMENT
https://forums.unrealengine.com/un...
erm... is the Level effectively the Root Actor from the engine perspective>?
no
the world is a UObject, that is the level, LevelActor is just an additional actor the level makes, for doing level specific stuff.
Ah ok, thank you very much
I have it working, but it's kinda jittering it's endpoint
if I were to move my blueprint the endpoint stutters its position, so I wonder if there is a better way to do it
UI Widget Central HUD
drag out the target pin and see what you can attach it to
promote it to a variable and then set the variable
I assume the widget target would be whatever thing you're using to draw it on screen
So the target has to be an object of the class of your UI Widget Central HUD as that's where the function exists. I believe the trouble is with the implementation of how you're trying to use these features.
I'm not familiar with the painting thing myself, otherwise I'd direct you better :/
Hello everyone! I've been inspired by Valheim and want to try messing with procedural terrain generation in Unreal. Does anyone know any good resources for that? I've looked at how to do it with a material, but that makes me wonder how I could read, for example, the biome at a certain location via Blueprint for asset placement and such.
C++ components inherited in BP cant be attached to a component. Is it possible to reparent the Character class mesh to a Scene Component?
Or do I have to make my own character class
Or do I have to just ignore the Character class mesh component and add more in the child?
@north oriole You cant do any of that
You could make some pawn that isn't a character but does a lot of the same things... that'd be tough.
the problem is that most movement components assume the root primitive needs to be swept during moves, as opposed to another set of components.
there are other reasons why you have to use that mesh component.
in short, trying to hack around Character to do things a weird way is likely to be painful
my garbage guess would be its prewritten code with many variables into nodes, maybe thats why you can create your own nodes in c++?
the pinned messages in this very discord channel
Thanks
Additionally you may wish to search "wtf UE4 [NodeName]" into youtube search. quick overview of most nodes. Eg "wtf UE4 retriggerable delay".
Okay but then how do you create multiple meshes that connect to each other but all keep the same relative transform without making them all a child of a scene component
They can with SetupAttachment()
hello everyone, i'm pretty new at learning unreal but making progress so please excuse any questions that should be obvious. is there a tutorial or someone that can explain if there is a way to cast the string put into an editable text box onto a pawn/actor on a different level?
Hey i have a problem, my character goes under the map when i try to hang on a wall
this thing called widgets
guys add controller pitch input node function is rotate every thing inside bpclass?
check what the wall location prints, my guess is its 0,0,0
yeah
Hello! I am using this node to simulate physics on my secondary mesh "Cables" attached to my principal mesh with a parent socket. However when I use get bone name 1 "Cables" deatach from my principal mesh. And if I use index 0 physics doesn't work at all. Any solution?
I'm struggling to valid check my bool. It needs to return true if my soil has been watered, but if there is no tile there; it needs to return false. Instead it's returning Null; since there's nothing there.
I've tried doing an isvalid check both before & after my cast, and it's not giving me much success.
So i have widget to scale up my character except it messes up the camrea when i do it so how can i do that without messing up the camera
I dunno how to do that lol
I want to "moveComponentTo" of my camera1 to my camera2
and i try everything and can't get the exact same position and rotation because its hard to work with relative loc and rot
what have i to put in relative loc and relative rot of the function
?
the camera boom is the spring arm of the first camera
i want to move the second camera( camera event) to the first camera (followCamera)
how to do that
Ahh
Well the camera is meant to be above my head a bit and back
Like the default one
When I scale up I'm starting into my characters ass
Do you think you can help
Is there a way to set an input ReleasedKey event, so that it is still listening for that ReleaseKey event, even after the input is lost?
I have an application where I am using a 2nd screen (Spectator screen) to score the VR Player. It is setup to immediately return input back to the VR player, but when it takes it, any logic tied to the Press/hold & Release, is interrupted -
I tried setting up some logic to prevent the event tied to the ReleaseKey button (when it gets unintentionally triggered when the BP loses input for a split second) but the problem is, when input is restored back to that same BP, the ReleaseKey will never fire, because the system has recorded that it already has, even if it really hasn't.
If I could initiate an event from that spectator screen TO that blueprint that basically said, "Okay, flag this button as pressed now" so the system would start listening again for that OnRelease, then I think I could make this work.
When you use the node SpawnAIFromClass, do variables of that class marked "Expose on Spawn" appear as an input pin? Or is that only for when doing a regular SpawnActor
Any workarround for doing something like this but for Cube textures?
@jaunty stirrup I'm uncertain if that node uses Relative of the component being input or relative as in actor relative space, but I'm going to assume that it's relative to the component's hierarchy... so. If that's the case, you need to inverse transform the world location of the camera you want to move to, into the relative space of the moving camera's attached parent. For example, this following image should work if that assumption is correct.
uh ok
@maiden wadi Thanks a lot a try this
you have the spring arm root at the midpoint of the skeletal mesh. When you are scaling the mesh, I'm assuming you aren't moving the camera back. You should probably change the root (pivot point) of the spring arm, and also when you scale the mesh you should probably scale the spring arm length as well @summer bolt
Hi, guys, how would i play my custom animation from a function inside of State Machine?
gotcha
i am making leaderboard on click so when u press TAB it creates LeaderBoard
it works great but when i add childs it dropsfrom 120 fps to 4
with att add child node it works smoothly
any idea why?
@dull tree Does the WCHPlayerSlotWidget have any OnConstruct logic in it? It sounds like either an event running when it gets added to screen, or some crazy weird issue with the slate being drawn to screen.
Does it stay at 4 FPS for a while? Like over a minute, or is it a quick drop before returning to high FPS?
4 fps just when leaderboard is visible
after i release TAB (remove from parent Leaderbaord) it goes back to normal fps
I have custom animations in my Weapon class, presented as Animation Montage. How can i use it in Animation Blueprint to blend it all with state machine? Like in Dark Souls. I just can't use Animation Montage in Animation blueprint
@dull tree I would check out some of the graphics used maybe. Disable any textures being used if there are any. One other check might be to leave the AddChildToBox node connected, and disconnect the stuff running in the WCHPlayerSlotWidget Construct. If that still stops the FPS drop, just connect one at a time until it happens again. Otherwise you're in profiling land.
its CPU thing
How can i spawn Static mesh. Using add component require to pass an actor instance
i think
Well, start by removing the added Widget's Construct event. If that fixes it, just add one node back at a time to see if it comes back. SetText nodes really shouldn't cause that kind of behavior though, so if it's that, I'd be shocked.
Bindings?
yep
Ah, yeah. Probably only want to do that once on the Construct.
Could you please help?
I just need to know, is it even possible
or is it even right
Should i move deeper in this or go with Play Montage
is there a way to autoload soft object references if something tries to access them?
I still dont get it would a vc be possible
@spark steppe What do you mean by autoload?
well my problem is actually probably my "code"
i'm trying to compare them to an instanced object, which i cast to a soft object reference
so i guess the soft object from the datatable is none, while my object points on the actual thing
i hoped the softobject reference to an object would be unique, too
but it isn't apparently
Could anyone else vc me through this issue
@spark steppe AFAIK there's two ways to use SoftObject references. Either LoadAssetBlocking, which will stop execution until the asset is loaded and then continue, or AsyncLoadAsset which will basically bind an event to run when the asset is done loading, but also let the original execution run through. UImage does this rather nicely with some functions like SetBrushFromSoftTexture. You pass in a SoftReference to a UTexture2D and it does it's own little function binding and calls the herd pointer SetBrushFromTexture with the returned hard pointer. Alternatively you could go the other route and just use the default SetTextureFromBrush with a Softobject UTexture2D by just blockloading it, but that would cause hitches. I also don't think these are used for actual instanced objects. Unreal always loads an object into memory that serves as the default object, and that's what this loads up. The soft reference is just a string basically to where that object resides in game files so that it can be loaded if it's not. You don't normally use them on like actors or components.
thank you authaer
Im sorry to repost questions again and again, but i really searched half of web, but didn't find an answer.
I have a character. This character has skeletal mesh with Animation Blueprint
I have a Weapon class. It contains 3 variables for custom animation montages
I need to play animations from weapon to character animation blueprint.
Here is my state machine with Attack state
And something like this i need
Please
So, i am trying to fix my ai. my AI move from left to right, and on the right side get stuck on the corner of the wall when sweep enable when disabling sweep and adding collision and making sure it blocking everything except it self it does not detect hitting the wall
https://youtube.com/playlist?list=PLfQ3pODBwOcaV1TdnqNWLTJ4wiUzEvXis @hidden flume try videos 16-19 of this playlist. Hope it helps! He also does state machines and montages, so check it out
Is anyone familiar with the Unreal Web Server? I'd be willing to pay for some help at this point (I know there's a jobs board but this is more of a paying for your time with help/screenshare)
Thank you for suggestion!
I'm trying to make an animation montage only affect the legs but it's all wonky and doesn't play correctly. The Blend Poses 0 for the upper body works perfectly, but Blend Poses 1 is messed up, they are done in the same way. Anyone know why it's not working?
How can I turn a skeletal mesh into a destructible in run time?
Seems like you can't call function libraries from macro libraries parented to Object:
https://answers.unrealengine.com/questions/326679/cant-call-function-librarys-function-in-macro-libr.html
asked Nov 02 '15 at 10:46 AM
I can't believe this still isn't solved
(โฏยฐโกยฐ๏ผโฏ๏ธต โปโโป
anyone know how I can attach something in relative world space?
is there a good tutorial to use blueprint for 2d topdown?
@maiden wadi Thanks a lot it works , even i dont understand how inversing a matrix can convert the referential
Unreal for 2d?
yea I am making a 2d game, using unreal stick figure thing, someone is making and I want to learn it, stickfigure 2d
https://cdn.discordapp.com/attachments/564422730288463872/814944373749710948/unknown.png
https://cdn.discordapp.com/attachments/564422730288463872/814944418548547645/unknown.png
Can anyone help me understand where this blueprint causes lag, as I scale up the X and Y above 20 the game lags, the higher the worse
Second image is further right
Hmm, is there a way to make timeline keys dynamic? As in change their values based on a variable?
@dull gale I don't think so. At best you can do some math/logic on the output, and change the playback rate of the timeline as it's running. But I think the curve tracks you make inside of them are fixed.
I found an alternative for my specific case, making a timeline from 0-1 over the time I want and use the 0-1 as the alpha value for a lerp
yeah I do that a lot
safe to say my first test was not successful lmao
How do I limit addLocalOffset so that the object stays within a certain area?
probably getRelativeLocation + (directionVector * lengthOfYourAddLocalOffset) -> clamp vector size -> setRelativeLocation
yea I am making a 2d game, using unreal stick figure thing, someone is making and I want to learn it, stickfigure 2d
I'm back!
@unkempt quarry I'm not sure why it's slow. 20 multiplied by 20 is 400, so one would expect such a construction script to be not very fast when it's creating potentially thousands of instances one at a time. Maybe a way to speed that up is by using the node, "Add Instances". That node takes an array of transforms and creates all the instances at once.
To feed the beast, you can collapse a lot of your logic down to a custom function with four transform-array outputs. Then your construction script just looks like a custom function node, and then the four arrays of transforms on it going into four Add Instances nodes. This would cut down on the number of times your logic is calling an add-instance function by a lot; I'm guessing that's the slow part, but I'm really just stabbing in the dark.
Found out what was making it go on an acid trip, I was using "get FOV" directly from the camera.. that was actively having its FOV being changed, good job me
Alright, I'll try and give that a try, thank you
Apparently I did something similar in my project... Create an array of transforms and then "add instances". (I use the "min" node to cap the number of instances to 10,000 so that my editor doesn't crash lol.)
Is that in the function?
nah I didn't go the function route... I used a scratch variable. If I needed four arrays of transforms I'd probably go the function route to not clutter up the variables list too much.
How would I rotate something based on its local position? I trying to get a sword to to rotate as its swung.
Ah okay, I've made the function but it has broken everything lol
When I compile it only uses 3 instances out of the 5 and generates them in the same place
For the array of transforms, i don't think it'll work because I only had one in the first place coming from the map size
I'm trying to set up some parameters for the actor's child object in the game during the BeginPlay event. But the pictured setup apparently doesn't work (neither the debug print node gets fired, nor the string value is changed). Am I'm doing something wrong here?
yeah, but at the end you're routing it via "Switch on Int" 0-4 to four different buckets... You can collect those transforms into four five arrays. Instead of going into five Add Instance nodes, they go into five possible Add Array (of transforms) nodes.
And then on your Function Return node, have five arrays of transforms on it
with your five transform array local variables feeding that
(in a custom function you can create "local variables" that only exist in that function and don't clutter up your main variables list)
oh, i've kept the switch outside the function
Put it in the custom function, cuz the function's job will be to provide five transform arrays
and then you feed five transform arrays directly into five Add Instances nodes
Will that only generate one type of instance?
Here's a mockup. You should endeavor to create this... It ain't pretty, but this is what I mean by one function creating 5 transform arrays, feeding 5 Add Instances nodes
... with the logic preparing those 5 arrays wholly contained inside of the function @unkempt quarry
@vapid ibex Do some normal debugging... Try putting a breakpoint (right click, add breakpoint) on that "Cast To" node and see if the execution is flowing the way you think it is
Ah, I get that now. Just stuck on splitting the transform array in the function
I want to rotate the right arm bone of my character in the direction of the camera for aiming via Animgraph and the transform bone node:
Anyone that can help me with someting simple? Have a basic enemy that i want to walk to a point, when it spawns i just want the point to be set as the active point ๐ This is kinda basic but im just haveing a brain fart, thought i might post this here insteed of AI cause its not ai specific ๐
wait, how did you get "Add Instances" with the array, I can only get "Add Instance" with a single variable
There's a plural one. It exists...
am I being dumb?
@unkempt quarry huh. Are you on the current version of Unreal Engine?
No... 4.24.3
that seems newish...
Are you asking how to calculate this aim rotation? or where to apply these nodes?
I'll update then lol
how would one go about putting in some code to prevent the player from falling due to the level streaming level not being loaded yet when game starts? ive been stuck on this for like days now, just cant figure it out.
@unkempt quarry fwiw here's another mockup illustrating five local array variables being made and then fed into a custom function's Return Node for output
ahhh, i feel stupid haha thanks dude, I'll let you know when i run into problems after updating
@unkempt quarry Good luck. Feel free to ask the channel for further help... I gotta run in a few minutes. The node def. exists though, but IDK when it was added or why you don't see it... https://docs.unrealengine.com/en-US/BlueprintAPI/Components/InstancedStaticMesh/AddInstances/index.html
Add Instances
Thanks again @tight schooner
I haven't messed around with level streaming personally but isn't there a "latent" node related to level streaming that has an output exec pin for when streaming is finished?
maybe you can figure out some logic based on that
@tight schooner ive came close, just cant figure it out.. it's kinda demoralizing lol
ive thought of many ways to do it, just cant figure out how to actually do it
if the player spawn is under the first loaded tile, everything is cool, if the playerstart is not under the initial loading tile, thats the problem, ue4 spawns the player in b4 the tile actually loads. i have like 16 tiles, and 10+ playerstarts.
i suck at bp's also.. alot of learning yet to do. like i have the fix in my head.. just cant figure out how to do it in bp's
easiest way i can think of is to disable the gravity of the player, untill all tiles are loaded. when it is, enable gravity again, remove the loading screen.. ive tried many ways to attempt this, but always a no go.
Instead of having the player automatically spawn, maybe figure out some way to delay that until streaming is complete. Usually UE4 spawns everything defined in "maps & modes" in Project Settings but it's also possible to do it explicitly through game logic in a manager class (e.g. Game Mode)
You have a manager BP that checks for some condition (level streaming) and then spawns a pawn and makes a PlayerController "possess" that pawn
I haven't done that myself so I only know it in theory
Or have each pawn spawn with a safety collision box underneath, and removes that box once streaming is finished
(and enables movement I guess)
If I call DestroyActor on actor within a collision volume, will that trigger OnEndOverlap event for that volume?
How can i teleport an object in the center of an object?
Define center
Uh
I mean center of what? Bounding box? Mass?
I would just set up your actors such that the local pivot point is where you want center to be.
@tight schooner that has somehow caused more lag and still generates them inside each other (lags in the editor but not while playing)
Fixed the location problem, but when I go over 600+ tiles it starts to lag while playing
Someone know why switch on movementMode enum's None pin is not working?
yea, if the actor has a collision volume and ur in it then die in it then that will endoverlap
anyone know if BPs are still encrypted in 4.26?
i heard there were plans to go ASCii, but havent heard anything since
Is this really necessary? <.<
Hey everyone, quick question. Is there a way for me to make one button (an actor that I made), to do mutliple different things? Almost like instancing it. For example, I want to have one button in a level spawn a cube at the buttons location, then I want a second button (using the same blueprint) to spawn a second cube at that buttons location
The reason for this is I don't want to have a different button blueprint for every single use of a button
That sounds like you'd just need to place the same blueprint in the level, so long as you designed the blueprint to spawn a cube at its location, then any copy of that button you drag into the level would do the same - trigger the button, spawn a cube at that button.
If you're thinking in terms of "I want this particular button to open this particular door", then what you can do is expose a variable on your button that takes in a reference to your "door" object that you can set. Then when you have the door and the button placed in the level, you can make the button reference the door. In the code, you would make it so when you push the button, you trigger a function on the referenced door (the reference being fed in from when you placed it in the level and set its reference) to open said door. This would allow you to have as many buttons and doors as you like in the level, each button opening a specific door you've specified in the editor.
Similarly, if you wanted many buttons, each spawning different things at the buttons location, then you can have an exposed static mesh variable that the button then reads when it is spawning so it spawns the appropriate object. And this can be done all using the same blueprint.
If I use seed in my parent BP and apply SK meshes randomly. Then create some children BP, would every child gets an unique mesh everytime?
No need to cast again. Unless you want to reference a child of floating body
Hello I want to have a loading screen between two maps, so I made an animation of an image that fades in, and when the map is loaded It calls an event that should play an animation to fade out, but it seems that my widget gets deleted when the new level opens. Can you help me ?
Store the widget reference within Game Instance.
Thank you, I'll try that!
I don't think I did it correctly...
Widget
New map
Can you explain better ?
Does any of you use the "Action RPG Inventory System" from the MarketPlace ?
Any idea why some montages won't play using upperbody slot?
Hey people! I have a character with physical animations (making them feel more fluid). Problem is, I've discovered it's framerate dependent so on lower framerates the character becomes a puddle on the floor ๐ Anyone know a way to prevent that? :)
Quickly tried enabling substepping but did not seem to work.
Maybe animators might now, will cross post there!
Yes, I use that - takes a bit to get used to it, but works well
Speaking of inventory - is there some magic switch I can use to turn a static mesh so that it ragdolls? e.g. spawn a clothing item, would rather see it flop on the ground rather than stand in mid air rigid
well no, you need a skeletal mesh for this
Thanks - I thought there may have been a shortcut. Set Simulate Physics works ok, but it looks like I need to set it up as cloth for it to flop properly
hello guys. Why i need to cast for make the call of my interface? I have make a interface for not cast anytime, but without them don't work. Any suggest?
I made a BP_Spawn actor that just spawns a TPP template character if i put it in the air the character stays in the air and doesn't fall
but if i put the character manually in the air it falls on the ground
any ideas why this happens?
Am I correct in thinking I should have my own HUD class, and on BeginPlay I should add my HUD_UI widget which holds all my smaller UI widgets to the viewport? I skipped the HUD class before but it feels like I should be using it..?
HUD classes a nice place to put it but it's not a requirement.
what the best way of setting up an actor to move left or right on the x axis. i am not using an nav meshes as it a space shooter
i try using sweep to detect collision but pawn would get stuck in the corner of the walls
and would only be like 50% successfull moving back to the left
is scene component editor only? and if it is, is there any other empty component for keeping transform data
no, you can use it to store transform
well, scene component is not working in packaged game, just like arrow component. thats why i asked if its editor only
Iโm moving from Unity to Unreal.
For those of you who know both:
In UE, whatโs the closest equivalent to a scriptable object from Unity?
If I wanted to create a data container for - say - an inventory item that would have a reference to a textured mesh model, an icon, a function perhaps and other data values ... what would I use?
In Unity, Iโd create a scriptable object that wouldnโt get instantiated but stay in the project as data that I could reference from the scene.
Is there an equivalent in blueprints?
Hello everyone! I am working on camera setup in my game and need help.
So there are main character and mounts(horses) that player can ride in the game. And I want to implement switching from 3rd person to 1st person and vice versa. So I need camera that will always follow character even after player controller's possession to horse. And also this camera should always receive pitch and yaw input from mouse.
Disabling bAutoManageActiveCameraTarget in PlayerController didn't solve the problem because player camera can't receive input after unpossession anyway. Also I tried to use custom PlayerCameraManager, but with these I can't use SpringArm.
So how I can implement camera with SpringArm, that will always follow specific pawn and receive input? Thanks in advance and sorry for my English
Any idea why character movement acts as if it's glued to the floor even when going high speed over bumps ?
Would like to take flight when going over small bumps like blue line, but it acts as if it's a vacuum cleaner and sucking the floor.
Would also like to avoid physics if possible, want to feel as arcade as possible just not glued to the floor
@nova hinge I can't speak from a Unity standpoint. I tried reading up on the ScriptableObject. It's a bit confusing to me, possibly the reason I never could get into Unity. From what I understand from what you're looking for and the way it's phrased, that sounds like a Datatable? At least that's the usual thing you use to store a lot of data like that. Some people use UDataAsset as well. It could also be what you're looking for since you mentioned Functions, Datatable is basically a CSV file where you can populate the row of data into a struct to use.
@stark trout Scene Component is not editor only. It's the basic ActorComponent that can have a transform.
Fixed it. It was my bad, apparently all my scene components and arrow components had "is editor only" ticked. Unticking that solved my problem
Great! Thanks for the leads. I'll look into both of those.
FWIW: The "ScriptableObject" is a bit strange. It's essentially a class that doesn't get instantiated or attached to a gameobject, so it can maintain data in a platonic way.
It's great for things like bullets, where each copy of the data can be a different type of bullet, or enemy, where each enemy has different stats.
I'll look into both, but I'll start with UDataAsset and see where I get to.
@tranquil dome I don't believe that the default character movement can handle that. I'm not finding any settings for it at least. One thing you might attempt, is a small tick function. It'd need a lot of checks and such for it. But I think you could manage it by checking and cacheing the floor and velocity values, and doing some vector math on that to determine how and when to launch the character to simulate that behavior.
yeah, playing with slope angle helps a bit, but if i lower it too much, i can't go up the slope anymore, thanks for the advice @maiden wadi
Is anyone here particularly skilled with sidescrolling or isometric views?
Does "Does Save Game Exist" work in final builds? I am having an issue where after switching from development to shipping builds that node seems to always go true even if there is no save file.
Never had a problem with it in shipping builds. You're certain you checked the shipping build's save location and not the project's save location?
When deleting the save files I mean.
Yes, I fully delete all files in the build destination before packaging a new build
Not sure then. What engine version?
4.25.4
@quasi frost Hmm. That's my bad. I forgot that savegames in shipping aren't saved to the game files. They're saved to Appdata. If you open up a folder browser and go to %appdata%, go up one folder to the actual AppData folder, then to Local, find your project name's folder. In there should be a Saved file, in that is a SaveGames folder with the actual saves.
Ahh I see. So the node does work I just already have a save file haha. Glad it is something simple
Hi, I'm having some trouble with my project in Unreal but I'm not sure if it has to do with blueprints, may I ask here or in another channel?
@meager marsh The Default #ue4-general channel is good for generalized questions. If it generally has anything to do with Blueprints, you can post it in here though. At worst you'll get referred to another channel.
Ok, I'm doing a space game, and I want to have a flying movement for my character, so that it can move and rotate in the three axis. I have set the view pitch min to 0 and the maximum to 359 (just like in the view pitch yaw), so that it goes all the way around, but when the character is facing either 90 or - 90 degrees in the pitch, everything gets crazy. Hope you can understand it with the picture, I have a video as well, I'll upload it if needed. Any help would be appreciated, I'm almost new to the Unreal Engine.
I have a function BP set up like this - is it normal behaviour that the Exec pin on the return node always continues on regardless of whether the Boolean is True/False?
I assumed this might work as a sort of gate and the flow would stop at the branch but whenever I slot this function into another BP it seems to carry on through this function regardless of whether the Branch is true or false
Whoa whoa whoa that is gross. You do not want to do that at all. A function has to reach the return somehow
What it is probably doing is it is probably not taking the true path from that branch, but since you don't have a return anywhere else, it just does the default return. A function has to return
You can think of it like there is a blank return node plugged in to every other execution path as well.
That is, if it works like that. The only other option is to crash I guess?
@meager marsh You don't want your view pitch min to be 0. Pitch goes from -90 to 90. Both Roll and Yaw go from -180 to 180. So pitch only has 180 degrees of movement and Roll and Yaw have 360 degrees of movement.
You'd effectively want your return node to return a boolean that you can check against after this function is run. On the true branch there, the returning boolean should be true. On the completed pin add another return node and set the boolean return to false.
Isn't there any way of making the camera rotate over that range?
Yeah as is, that function will only ever return the exact same thing every time you run it, no matter what you give it
Thankfully in blueprint, all unused paths will just return with default values. Still good practice to specify the returns, but it won't do anything bad if you don't.
The function doesn't return anything though.
@meager marsh I'm uncertain. I've never tried true 3d spacial flight. The thing is that most stuff is based on rotators. So... You're facing straight. If you look forward, pitch is at 0. Yaw is at 0, Roll is at 0. If you look directly up from there, Pitch is now 90, Yaw and Roll still 0. If you look "up" one more degree as if you're bending over backwards. Then pitch changes to 89 instead of 91, and Roll and Yaw will get inverted from 0 to 180. So rotators can define that behavior easily. But the problem is the movement components. What happens if you don't set the minmax view stuff in the camera manager?
is there some way to linetrace against the character mesh instead of physics bodies?
i've enable ok it responds now after setting per poly collision to true on the mesh asset + character, however i dont want it to be enabled all the time, and there seems no way to disable it on runtime?!trace complex in the linetrace setting, but it wont respond to the mesh
@maiden wadi When it is facing in 90 or -90, the character will stop moving and you have to move the camera around in the yaw until it finds a position where you can move it, to face "further" the 90/-90. The problem is that this is not smooth, and you can't make a looping or anything like that. Also, when the character rotates the camera doesn't, so when you are facing in any angle the camera moves the same way as if the character was in 0 (ex: in 0, in the pitch the camera goes from his head to his feet, but in 90 goes from the chest to his back, and something similar happens with the yaw). All of this is very annoying, as there is supposed to be no direction, and the camera should just follow the character. There is a game called Adr1ft which has something similar to what I want and it was also made using the Unreal Engine 4.
Hello guys, I need a little advice. This code is to display game over text, however I want it to only appear if the game over boolean is true. Any ideas? ๐
Hey i cant get my widget too correctly call on the array (Im currently learning arrays)
Im not sure if its something wrong with my add fuctionality
Ive been on this for a day and not too sure
Is it possible to use a blueprint interface in c++?
@quick lark Unfortunately nothing blueprint can be used in C++. It's a one way street.
you can use both tho comfortably right and translate bp to c++? not really translating but know what the node means in c++ and using it there
What this error is telling you is that you're attempting to access an array index that does not exist.
Array indexes start at 0. When you add your first item to an array, it can be accessed at index 0. The next item you add would be accessible at index 1.
In your current set up, you are attempting to get an object from your "Demo Array" at index 4. Unless you've added 5 items to that array, you'll get errors like you are seeing.
No my array has more than that
I think the main issue is that The variable for DemoArray isnt connected too the actual Array
I think im trying too pull from the structure instead and dont know how too reroute it
Where are you populating Demo Array. Because your game logic is under the impression that it only has one entry, not at least five.
Its pre imported
Not sure what you mean by that?
Before you laugh. I have a friend who specialises in drawring female anatomy and he asked me too make him a dating sim.
I've a parent BP with random SK meshes and materials in its event beginplay using Random Stream (seed). Then created some children BP, when I spawn these children would the random stream gives each child unique sk mesh and materials or they all will get the same one?
That is a datatable. Not an array. You have the array named DemoArray. It was the second picture you posted. Where is that being set?
Oh fuck right i completely forgot the data table got turned into an array
Got this here
I assume its just pulling only 1 row
Should i use a loop too add all rows
I got some issue with climbing/hanging on the wall ... when the character jumps to the to wall to hang on it it just teleports him on the same location every single time. This started to happen when I attached Capsule Component to "MoveComponentTo" tab can someone help me please ?
@hushed pewter You should get the datatable's Names array, and for loop over that with the GetDataTableRow.
Hi! I'm currently making an RTS Survival type game and I've just implemented a basic inventory system, but I have a problem that I'm trying to get some help about. When I collect an item it goes to a "general" inventory instead of the unit's inventory who picked/harvested it.
I want to make it so every unit has an individual inventory but I don't know a way to "split it" and make it individual.
I can drop the bps here if that helps.
Thanks in advance
@fleet stump I don't think you can do that with a root component. The capsule's position in relative space is updated when it's moved. This isn't exactly true for a different component in the hierarchy, it's relative space is changed when it's moved. But when you move a root component like capsule, once it's moved, it's back at 0,0,0, because it is the root. If that makes sense?
oh ... so what can I do to fix that ?
Got no idea how this all goes together
I havent used oops before either
OR atleast, not these kind
(Insert dance gif here)
It worked
Thanks authaer
how would I change spring arm length in a pawn from the player controller?
@fleet stump Pretty much make your own timeline or tick function for it somehow. Most things that move root components are actor componennts added to the actor, like the Character Movement Component.
Any idea how I can get the name of the child ("Cube") of the ChildActorComponent ("ChildActor")?
When I try it with the node "GetChildComponent" with ChildIndex 0 it returns me the default root and not the "Cube"
ChildActorComponentName.DefaultRoot gets returned
https://gyazo.com/07416485da6fb6d28ab655ff558c0ce4 Hi Guys. My problem is when i shot from right corners, my Bullet ( Witch comes out of my Gun ) collides. Can anyone tell me how i could fix this. At this point the bullet should not collide with the wall and hit the END of the Trace aka where the Crosshair is.
@astral fiber Can't get the same results. Doing exactly what you did in the second picture prints the correct component.
Do you how to get random stream to work on instances?
@maiden wadi Thank you for checking it
does anyone know if its possible to add a scene capture component to the camera, like actually inside the camera and not addes as a child compnent?
is there a way to set an input priority?
I've got a sidescroller. My character can move left and right with A and D. I'd like to set it so if I'm holding D, then hold A afterwards, A will take priority over D
Or vice versa
@drowsy mauve It's hard to say how you would want to handle that. If it was me, I'd make some key functions in my player controller. Iterate over all of the axis mappings that use that axis name. Then find which one has the shortest down time that is also pressed. Use that key's scale for the AxisValue.
Then it won't matter later if you have more keys, or rebind keys, or anything like that.
@maiden wadi When you tried to get the ChildComponent of the ChildActorComponent did you give the ActorComponent a class?
I tested it without giving it a class, then it works, but when I give it a class it wont
Mhm.. with some classes it works, with others it doesnt
@maiden wadi I think I solved it, when the ChildActorComponent class has no components attached to it (like static Meshes for example) then it works with childIndex 0. When the Blueprint Actor you wanna use as child Actor has Components under its RootComponent then you get it with ChildIndex 1.
How can i check if variable is the same for specified time?
By default your ConstructionScript makes a Call to the parent ConstructionScript.
When doesn't it?
I allways thought when the ConstructionScript node has no connection to another node?
But I just had the case, that I had other nodes inside the ConstructionScript method, but not connected to it, and it didnt call the parent ConstructionScript.
@dusky harness You can't really. Not without constant checking, which is also prone to failure if something sets it and then sets it back in the same frame before your check comes along. The best way to handle something like that is probably to have something like a struct for the property. Put your original property in the struct along with an extra one that is a float. Then increment that float on tick or where ever, and then you can make a function that both sets that float to 0.0 and changes your property. And you use that where you would normally Set the original property.
Hey guys, I'm trying to set an animation blueprint at runtime (and have it start playing). When I use the top SetAnimInstanceClass node it works but when create a AnimationBlueprint variable that can be set from the inspector and try set it that way it doesn't work. Is there something I'm missing here?
It seems to run but no animation plays
what is animationblueprint reference?
seems a bit strange to use a object reference then get the class
but it should work, as it should just return the uclass just fine.
I did try with AnimblueprintClass variable also (that's the other node) but still didnt work ๐
yup
remove the Animation Blueprint variable
and set the class to BP_RPMAnimation
then connect the class node back up (Anim Blueprint Class)
I think there's a node that calls the parent construction script. If it's not hooked up it won't call it.
@marble tusk Yes, but it does this by default. It seems when your construction script method does not contain any node, then it calls the parent construction script automatically. But when you have a node in it, even if it is not connected to the Construction Script "entrance" node, it doesnt call the parent any more and you have to call it manually as you said.
But shouldnt this behaviour be changed, so it only doesnt get called when it is connected to some other node?
does not work like that
you need to delete the construction script from the child
then it will auto call the parent
@worthy frost what do you mean with delete?
As far as I know you cannot delete a Construction Script, it will always be listed on the left side
then you need to call parent
else your child will override the parents construction script, and it will never call the parent.
no different to c++, where you have to call Super:: in your overrides to call the parent function
delete is greyed out
Yes, but if it is empty, then it will call it automatically
no
yes
where does it say that?
sec let me test, maybe construction node is special cased
but it doesn't happen with normal BP nodes
well this is what happens when you never use construction node ๐
Thanks, so I just wanted to know on what it decides when to call the parent and when not. Based on my testing it seems to stop that behaviour when there is a node in the construction script
yeah
But I couldnt find anything in the docs
but normal functions, maybe that is the same... maybe the bp compiler detects if any pin is connected to the exec
and just does not call that scripts version, then automatically tries the parent
Jeah at the beginning I thought it checks if it is connected to something, but I had a class where it does not connect to anything and the parent doesnt get called. I think this is because there is an unconnected node in the construction script
Ah I think I get it now. I have to set the class to be of type BP_RPMAnimation. Is it not possible to store it as a generic "AnimationBlueprint" type so it will work with other Animation blueprints and be set in inspector?
@astral fiber i can confirm the same behaviour does not happen with normal functions
had this in parent,
this in child, and the print never got called, till i added the call parent node
@velvet nymph what do you mean?
@worthy frost ok, so it seems this behaviour is only inside the construction script. Thanks for testing
I guess I just add the call manually to very BP Class now
@worthy frost yes makes sense
@velvet nymph did you see my post above ?
Don't child blueprints automatically have that parent node? If anything I'd think the expected behavior would be to not call the parent script if the child script is completely empty without the parent node. But that's just me ยฏ_(ใ)_/ยฏ
but sometimes you want to override or disable a parents feature
in a child
we do that in c++ sometimes
Yeah, what I'm saying would make that easier. Requiring the 'parent: construction script' to be called in order for the parent script to run
Instead of also doing it when the child's construction script is completely empty
The standard for other object oriented languages is that child classes act just like a base class by default unless you override methods, so unreal does that too
The idea is that you specialize the base object. โThis cat is an animal except x / but also y
hi i wanted to know if anyone had any idea how i could change my character's mesh through a triggerbox :p (I try to make a playable level where you can change your character) thank you in advance if anyone has the answer to my problem ๐
@stoic nebula make a new blueprint, add a box collider component. On the box collider component in the hierarchy, right click and add an on overlap event. Plug that event up so you get the overlapped actor and cast it to a character. If the cast succeeds, get the character mesh component and set the skeletal mesh to whatever you want to change it to.
ok i will go try thanks a lot ๐
does anyone have any resource for fluid mechanics? I am imagining using several tiny spheres with physics on...
Hi, I'd like to ask a question about how the material in this screenshot is created - it appears to be a simple cube with some different params defined based on vertex data, but I can't find where the vertices dictate where is the wall region, glowing region, the bevel.. is there some blueprint I'm not yet finding? Looking for the one that defines the edge region (glows and bevels)
btw that is the nDisplay template
@true salmon can you screenshot the material?
this one?
yeah can you zoom in onto the top left of it?
the texture is a grid right?
yea I see those colors being lerped, but I can't find where the boundaries are defined - for the bevels and the glowing part
i think its the texture sample
not gonna lie, the spaghetti makes it hard to understand
but it looks like it lerps between coords using a pattern
I think you're right, but how do you check if the texture is a 'grid' - apologies, I'm fairly new to UE4 materials
click on it and check the texture on the left details panel
Looks like itโs using the vertex colours to make the glow
Can you paint red or green onto the vert colours?
Yea I must be looking at a different view that doesn't have that information - all I see is that there is a "Vertex Color" node that feeds into a "Multiply" node that affects all the parametized colors - no idea where this vertex color is coming from. But it does make total sense that it is being sampled on a grid - and looks great too
Man I'm good at bugging out UE, apparently
So I have this health bar, the percent value is bound to a function that gets the player's current health/max health and takes that value
This should work. It does not.
Instead, as soon as the player's health drops to 90 (so 0.9), the bar goes to empty and stays there until the player dies.
I've tried remaking the binding twice, both from scratch. Nada. If the player's health isn't 1 (100), the bar displays as if the player is at 0 health.
quite sure its because the convertion/casting node is rounding down the float, try fully using integers
having 0.5 health and not dying ๐๏ธ
Anyone know what Get Base Aim Rotation does?
I read the docs, but I don't understand how it differs from FwdVector
Hi nat, dont know if you got your problem solved but the way i achieced is that i had a bp interface function set and takes as the damage as input and then i just feed in the values in my main chars bp. From there i call the interface function in my umg bp and subtract it from the health (which is 100 at its max) and then i use map clamped node to get it confined btwn 0 and 1.
As somone said casting may cause issues but i dont know about it 100 percent.
Hope that helps!
ones a vector ones a rotation thats one difference
Ahh true!
Is there a way to see a static meshes bounds details inside of the static mesh viewer panel?
I'm making a thing where you pick up flowers. I will have lots of flowers with slightly different functionality. So I made a ChildBlueprintClass.
I have an Array of "FlowerParent" that I use to store what I can pick up. I call "Pick up flower event" on the flower.
But, in this array I also add "FlowerChildClass". Seems to work so far (it gets added)
But now I want to cast to the parent logic, "Pick up flower", the event fails.
Is there any node I could do before I cast here? Get parent something something? Also I am I making sense?
EDIT, NEVERMIND OVERWROTE THE EVENT I WAS TRYING TO FIRE WORKS FINE ๐
how can I get an object's rotation relative to a direction?
Hi guys. Cant attach 2 timers on 1 function. Someone saw that before? Dont know how to work around :/
RE: Why not just use a float for health?
I figured using an int for health would make the math easier, I guess was my logic for it
Can someone give me a Hint on how to Deal with it ? :)
Is there any particular reason as to why my widget blueprint wouldn't show up in the HUD class list of my game mode?
The only way I'm able to get my widget blueprint to show up (or the 'HUD', which I don't unerstand why it deserves its own name) is to create it from my character's BeginPlay. But it makes no sense to do it like that since the hud is game mode specific.
@small trench HUD is not a Widget. HUD is an Actor class that is spawned for the local player controller.
HUD is an older class. It has functions for drawing simple stuff like text or lines on screen. It used to be used for simpler games. Widgets on the other hand are a newer UI thing. You can create and display widgets from anywhere, although it's common practice to do so from either the PlayerController or HUD. I like HUD for storing widgets personally as it's meant for UI anyway.
Hey guys! I asked a question in level design to be a good boi about randomly generated rooms, but I regret it I shouldve asked it here, it's dead air over there. Can someone check it out or should I ask the same question here? I just don't want to break the rules.
I see - but my UIs are game mode specific, so logically I would check what game mode is currently 'active' and draw the widget based on that? Is there no better way?
@trim matrix Out of curiosity, where did you read that you can't stream the same level twice? I've never messed with level streaming yet, but I'd be curious to know. I would have assumed it would have just copied an instance of the level in for each time you streamed it.
@small trench Do you have different widgets based on the game mode, or do you want the same widgets to look different based on the game mode?
Diff widgets based on game modes
If I had to manage that, I'd probably do the same as I already do and handle spawning and storing widgets in the HUD class, and then subclass my HUD and split the logic there, then select the different huds for each game mode.
@maiden wadi Well I always search on forums before throwing a question here, not to bother you guys all the time, and some users said it there. Also tried it manually, just dragging multiple in the Persistent Level and it just doesn't allow it
@trim matrix Odd. I suppose that makes sense. So you could alter multiple levels and have it reflect in their defaults. Out of curiosity though, why not make each room an actor?
Yeah that was my fallback plan. I was afraid to use child actors as my interactible furniture inside the "floor plan" actor. I wanted to keep them as standalone actors just to be sure
You could just spawn an actor of the room type and it could run it's own construction logic to procedurally generate itself and set up randomized stuff on the components that it could add to itself. You could use spawn locations for different layouts and such.
But I wanted to avoid spawning at construction and randomness as I wanted to see and easily rearrange stuff
Even though it would be a cool feature to randomly rearrange furniture, I wanted to have nicely manually setup rooms
Thanks for the help though! I'll try my luck with actors, just wanted to make sure I can keep level streaming out of the pictureร
If your furniture stays in the one room, you could just use components for those. But otherwise yeah. You'd have to make some scene components for placement and spawn the furniture at beginplay.
Thank you!
Hello, I followed Ryan Laley's grid placement video and I got it to work as you can see in the picture, however, the machine (Brown Capsule) you see in the picture is snapping just fine to the center of a one by one block. However, as of right now I got it working so that when you move the camera it snaps every 2m but it isnt centered in a 2x2 area as you see in the picture.
@queen urchin yeah setting a new timer on an event/function resets any prior timer running on it
Is there a better way of getting the player's speed that isn't based on the player's input?
Hmm. I might need something custom them.
What are you having trouble with?
So, for example...
If the player is moving through the air at 500mph, but not holding any movement keys, that float will result in 0.
Are you using a movement component?
That's odd. Velocity shouldn't zero out like that. I can test really quick. You're using CMC, with flying mode, or?
Not flying mode...
No. I know it's centered because placing it with a 1x1 grid system works fine. It's trying to get it centered in a 2x2 area moving by 2m increments.
@prisma stag In your picture on the right. Are those four smaller blocks placed together or one single 2x2 block?
Those are 4 smaller blocks.
Then you need some logic to detect that there are four smaller blocks there, and if so, place the object in the center of those, rather than at the center of one block.
Its not that I want it to be placed in the center of 4 blocks if they are there, its just that I want the machine to be placed in the center of a 2x2 area.
I'm not sure I'm following then. If your 2x2 area is 4 1x1 blocks, then you need to detect if the player is trying to place it at the center of 4 1x1 blocks and if so place it between those 1x1 blocks.
Hopefully this helps, the problem with placing the block in the center if the 4 blocks are there is that the machine may not always be placed on blocks. The blocks were just used to show a 1x1 area. So in here, you can see the 2x2 made with the 4 1m blocks, and when I pick up the machine it snaps to a certain block, then moves in 2m increments as Ive set, but I would like it to snap to center.
Ah. All you should need to do is offset the machine's grid snap location by half of a normal grid size.
That's what I was thinking however, if I offset the actor once placed, the actor would be in a different spot compared to where the "hologram" was showing it would be placed.
How are you differentiating the grid size in the hologram? You should be able to use the same place in logic to also define the offset.
I get the location which is where the hologram is set to, then use "Vector Snapped to Grid". I might be able to define an offset after that. Maybe.
hello
it s normal that when i do this in runtime, the sound is play directly
(my audio component is autoActivate=False)
@errant path Looking at the CPP, it looks like it only calls play on that sound if it was already playing.
ha ok
so maybe if i force stop before that will be good
yes perfect
it must read rhe source more othen ๐
Haha. I've made it a pretty big habit since I started learning CPP.
yes it s good habit ^^
Hi! one question, i have an actor with a skeletal mesh and a static mesh. I want to check on construct if the skeletal mesh is empty, if it's not empty, remove the static mesh.
how do i check if skeletal mesh is set?
Do an is valid check
it always return valid
i guess that it's because they do have a skeletal mesh, but it's empty
Is there a way to use a render target to render the game scene, display on UMG, and allow you to click on it and translate that click to a line trace in the scene capture?
If you're checking on the component, yea, that'd come back valid, you want to check the skeletal mesh set on the component.
you can get the position of the mouse on click, and override the mouse click event to something else so you check when that happens
right click and convert to validated get, makes things easier
Thats what I'm thinking, but I havent dove into how I can get the click location from the Render Target Texture to a location on the 2d scene capture. I'm guessing there will be a lot of math involved
I'll use my game as an example. https://sbnewsom.itch.io/feducia The scene is rendered only on the left side, but for the game jam, all I did was just shift the camera. But it'll still render the whole screen. I want to consolidate the camera to a specific area so I can optimize the rendering and have more control over the visuals. Basically instead of shifting the camera, I want the camera to be properly displayed in a specific area on screen.
Also having control over hte render target would allow me to reduce the resolution and get the aesthetic i've wanted.
But its a point and click, so i'm unsure if I'll lose that ability
i'm not that advanced into unreal, sorry : (
what about oclussion culling? maybe that can help with your problem
I'll look into it. No problem. I'm just happy to vocalize my problem and have someone listen. I mostly just discuss it in my head. Thanks though. ๐
Is anyone here especially experienced in sidescrolling or isometric views?
Opening a copy 4.20 project in 4.23 made me lose my timeline float tracks even though they still have the outputs , is this normal
Shouldn't happen, it normally doesn't even touch the assets when you convert
Oh i remade the timeline floats and the engine deleted them again , it might be a bug in 4.23.1
Nvm fixed
Make a hollow box.
ive been following a tutorial about widgets and am not sure why this isnt updating?
Well, for starts, that IsValid will never return IsValid. So that Set TextVar will never run.
No idea other than that. Can't see any other execution that you're doing.
Not really sure what you're doing there. I see two different execution lines. It's really bad practice to get variables from other execution lines. If you want to use variables in multiple places, you should save it as a variable and get it in the place you need it. But start simpler, and disconnect the ToText from the SetTextVar, and input something manually like "Hello World" or whatever. If that changes your widget, then you have a problem with the way you're getting the text out of your array of structs.
Also. Don't drag those long blue lines down like that. That's what I mean by getting variables from other execution lines. You're already setting that created widget into a variable. Use the variable to set the text.
Guys can I freeze Mesh socket rotation ?
Why does this not work to remove any other instance of the widget before spawning a new one?
Ah nvm just had to uncheck top level only
@hushed pewter I'd place some prints on UpdateText. See if it's actually getting called in your execution. Where are you originally calling that from?
This is in the PlayerController?
What was it? Cause looking over your execution, that should have changed if the binding was running.
The thing i was running is a scene controller
I had too have a custom event come from my actualy player controller
anyone know of a way to get this list in a blueprint so I can possible make a dropdown in a widget with them?
Can't really get reference the map objects I don't think. What I would do is make a struct called "level container" or something that holds any variables you may want to reference about the level, then create a table based on that struct so you can input your valid map names into the row names of the table (yes, you'll have to do it manually).
Then when you need the map names, you can do a "Get Data Table Row Names" to get the appropriate level names from your table, and if you need to get data about that particular map, you can add it to your table, and get its data with "Get Data Table Row".
oooh honestly i like that even though its manual it will allow me to create custom names and maybe other info about the level in the struct. thanks for the idea
@minor lynx Also worth noting that for ease, you can now open levels via SoftObject Pointers. Which means you can use those in your struct instead of strings. Easy dropdown selection vs potential typos.
yeah thats what made me think i could potentially get a list to use. you can "Open Level (by object reference)"
Yeah. Unfortunately that's also done via the content browser stuff. You wouldn't likely see that sort of thing made for a game anyhow. Developers tend to hide testing levels and whatnot, and you wouldn't want them showing up.
Hey everyone. Have a slight problem with my UI not reacting to mouse clicks. Screenshots following
Creating UI in FirstPersonHUD
initializing UI in the widget
@iron bobcat You should probably move the SetInputModeForUI to the event construct too, since you're already getting the controller there. You can IsValid the controller instead of casting if you don't want that note. But none of that will help with the mouse issue. Do you have buttons in the widget that aren't clickable, or?
Hmm. That's odd. You're certain that nothing else could be on top of them in the hierarchy? A random panel or something over them that is hit testable?
I have a remove all Widgets node in front of the branch, but I can comment out everything else and try that. Second
I mean more in the widget itself. There's nothing accidentally overlapping on them?
Yes
That's why I'm at a loss. I'm not the most experienced when it comes to UI, but simple stuff like this I can usually manage
Even a default checkbox is unclickable?
This is the full UI code
Yes. I added a standard button with a print string node just to test that
I'm not sure you want to be creating widgets on tick?
EventReceiveDrawHUD is called on tick. Once per frame. So, you might be just creating a new widget over top of the one that has actually registered the mouse over or click, but you wouldn't see it.
Well, you definitely wouldn't see it. Cause it would get removed, and then another one would go over it.
I agree, that it's not ideal and I'd like to shift to a better solution soon. I need the audio and door widgets to be drawn on tick.
Wouldn't the "remove all widgets" node counteract the stacking problem?
fun fact you cant set the type of a variable in a struct to world soft object lol
this is in a struct drop down
weird honestly you cant do it anywhere but it sets the right type if you right click and create new variable
removed the link to tick for testing purposes. Same problem
Where is that function being called from?
I don't know why the capsule is not following the character. I already enabled root motion but it doesn't work
Isolated the entire thing, so there's no chance, that it's influenced by my "On tick" band aid solution
Also thx for helping out ^^
First Person Character BP
Hmm. Having trouble replicating this. Could you by chance create a new UserWidget with just a default textbox, and copy the event construct stuff into it. And change the CreateWidget to that? See if it still happens. Cause logically I can't see why it should behave like this.
Will do. Give me a sec
New Widget. Completely empty except for this button
The only code in there
doesn't even show up ๐ค
If I print out a string, it prints it though
Which part of the character is it supposed to be following?
That's odd.. Editor restart at any point?
I wonder if it's still there. Or if for some reason the event construct was called and then it was removed. Does Event Destruct run at all in that widget?
I've seen that happen - a widget is set up a specific way, and just doesn't want to work and all the logic is sound... Reset the editor... BAM, works perfectly.
There is no event destruct set up in the new widget
Just restarted. Still there unfortunately
Try running a print in Event Destruct. See if it prints.
Going to assume, something completely different in my code is interfering somehow. I just can't imagine, what that would be
Well, if EventDestruct runs, then something is removing it from screen, like a RemoveAllWidgets call.
There is a remove all widgets call, but it goes off before the construct
There's absolutely no where else that you've used a RemoveAllWidgets call?
Pelvis
No. They're all disconnected
Did you try attaching it to a socket?
I'm at a loss then. I've never experienced that behavior personally. But EventDestruct definitely should only run when it's removed from screen. I don't know anything that removes widgets from screen besides manually removing them from parent, remove all widgets, or opening a new level.
Hm...... thank you for spending so much time on this. Will let you know, when I eventually find that elusive mistake
In my game, I want to spawn two different types of enemy at two different locations, but I don't know how to do so. Here's the blueprint I have for spawning the enemies (it's found in the Level Blueprint), what would I add/do for the second type of enemy?
Possibly just a random int in range and switch on it?
Just make sure to set the max range to the # of different options -1
ooh that could work
but what about my want for "enemy A" on spawn A, and enemy B at spawn B?
For something like that you could create an actor that manages the spawning.
@iron lodge New function.
I want to make it so that if the player touches either of the enemy types, they will take the appropriate damage. However, I can't make it so that the player detects both types of enemy. is there any way to make it so that the "Event Hit" works with both types?
I'm making a pop-up that appears after pressing a button in a widget. The pop-up is a widget blueprint. I don't want to put any buttons in this pop up, but I want it to consume the player's input, and then disappear. Currently, the focus stays on the button that opens the pop-up, causing additional ones to open
is there a way to set keyboard focus to nothing?
Not sure off the top of my head but maybe you could just check if the popup has been opened and just not open additional ones until it closes?
that would solve part of the problem, but it also seems that the button consumes my input, and I need it to be consumed by the player instead, and then sent to the pop up. I have the sending part working fine for anything except "enter" which pushes the button again.
Connect your event hit to the top cast, and then connect the cast failed to the bottom cast. Should work so long as the EnemyCharacter is not a child of ListenerCharacter
soooo. . . like this?
Yep
IT WORKED! I added a delay so that a light brush wouldn't insta-kill the player, and it works perfectly. thanks a million!
I think my second question is more what I was after:
When working with UI, is there a way to set keyboard focus to nothing?
Are you trying to make a key binding system?
lol... that obvious, huh?
I'm like 90% done, and this is the last actual hiccup.
it's working with everything but my "confirm" buttons
hey is anyone here good at blueprint?
Hi, is there a way to change the selected background color for a textbox in UMG or C++? The multi-line textbox has this but I couldn't find it in the textbox
@slow zealot the color of a blueprint box?
I mean this
@slow zealot uhhhhh have you tried looking in visual settings?