#blueprint
1 messages Ā· Page 50 of 1
Oh noooo wait wait i need to try that
hmm alright
With that reply I'm going to say you haven't lol. Open up the montage and change the slot the animation plays on.
OK thanks i dont now why but it changed back to default so that was the issue THANKS MATE!!!! :D!!!!!!!!!!
As cold said, because the task finishes (finish execute) before it explodes the binding gets removed.
..man im stupid š
wait
what do i do then
hold on I tried removing
the finish execute
it still doesnt work
What are you wanting to happen when it explodes?
damage the player
specifically, if the event is claled
as its claled
called*
only when it collides with the player
Wouldn't that be handled in the missile itself and not the AI?
i was debating whether to do it like that or not
wait a minute
ohhhhhhhhhh
there was no reason to do it like that
yeah I will just do it in the missile
yup worke
worked
Is there a way to have child data tables (something along those lines) ? I wanting to have different sets of data tables that use the same structure for its data but want to limit selecting the datatable to only those that use that structure.
Hello, does anyone know why it's impossible to use gameplay static functions in macro libraries? I need to get game instance, but the node isn't appearing, unlike regular macros.
Maybe you're looking for composite tables? The tables you combine into a composite table would be the children
That's just a way of combining multiple tables into one. In essense, i have a datatable var but I only want specific datatables to ever be selectable in it. At the moment any could be selected but if it's not specific types, the logic that uses it wouldn't work.
Functions inside function/macro libraries have no concept of the world. (The same as things from uobjects) Becasuse of this they can't access stuff from it and instead need to be passed the information. If you're using C++ you can set them up to have a concept of world but it's not possible with blueprints only.
You could have your "get game instance" as an input to the static function in your library. Whenever you call it, you just pass it in from the actor using it
Maybe something like this? If I understand correctly. https://stackoverflow.com/questions/59723824/unrealengine4-restricting-datatable-pointer-to-only-use-certain-row-structure
It's a c++ solution though
It sounds like what i'm looking for. I'm working on a BP only project so i might just have to live with it haha.
Oh, all right, I was thinking that it has the context since Self node can be found in the context menu
Self is just a reference to itself. Unfortunately, there isn't a 'GetWorld' node in BP which would allow you to give them context to the world.
The thing is that the GetGameInstance doesn't take UWorld, but UObject, so if self is available in theory the function must be callable
UFUNCTION(BlueprintPure, Category="Game", meta=(WorldContext="WorldContextObject"))
static ENGINE_API class UGameInstance* GetGameInstance(const UObject* WorldContextObject);
The way I see it is uObjects live in their own space so unless they have a direct ref to something else, they cant get it.
I would imagine there's something in Actor that gets the game instance from where it's stored which isn't available in uobjects.
Is there any plugin or setting that allows me to search for stuff in a more comprehensive way, let say, if I want to find Bind Event to On Level Loaded, if I input: "bind level" it should bring back the result?
makes sense what Im asking
a macro library's namespace is the same as whatever the object the library is parented to, if you parented it to a UObject, where it doesnt have a getworld method properly implemented, functions that require a WorldContextObject cannot work in them.
Do the binocular search not find them?
dont know whats that, Im talking about right click on any blueprint for the context menu
Doesn't UObject implement GetWorld() in some way?
class UWorld* UObject::GetWorld() const
{
if (UObject* Outer = GetOuter())
{
return Outer->GetWorld();
}
#if DO_CHECK || WITH_EDITOR
bGetWorldOverridden = false;
#endif
return nullptr;
}
OnLevelLoaded is a delegate in a ULevelInstance, naturally it only available off a level instance
Not like that but if you have an event or function you can right click on it and find references and then on the right hand side of the results is the binocular button which searches all other blueprints for where it's called.
yeah thats not what Im asking
you can also type "bind level" there to find what you want
yes, but during editor, more specifically, blueprint k2 node constructions, the outer is not valid.
You can modify the search terms it uses.
oh, I thought it wasnt possible since I didnt leave a space between them
because when searching for the exact terms you can do "bindevent" and it works, but "bindlevel" doesnt.
got it, thanks.
UExtendedObject()
{
if (UObject* Outer = GetOuter())
{
World = Outer->GetWorld();
}
}
virtual class UWorld* GetWorld() const override { return World; };
UPROPERTY(Transient)
class UWorld* World;
by shifting the world getting function to constructor, it will allow you do use WorldContextObject needed function in thus object.
does anyone know why my progress bar won't update? (ignore the turret)
Is there a way to make a flip flop have an A, B, and C output?
I'm trying to make a flickering light
a Flip Flop Flap?
I've got it so that A is a permanently on, B is a flicker, and C is off
That's a thing?
it is now
I thought in my head, because I'm on the bus, that's a funny name, imagine it was called that
Like prior to asking
I didn't actually think a flip flop flap would be a thing
hehe
What about a 4 way?
As a guess I would say the cast is failing.
i don't even see the bar in the picture
The cast didn't fail
it's the widget on top of the cube
Did you bind percent correctly in the widget?
Flip flop flap flep
A multigate is actually perfect for what I need
Especially the is random thing
My flip flop was literally just swap from a to b but have a delay between the two
whats max health default value ?
both health and maxhealth at 100
It takes an object with a valid GetWorld() function defined. Because it uses said UObject to get the correct world.
done prints ?
where is the function (where the health var located) and where is it being called from?
done all prints nothing was wrong even the numbers themselves are perfectly matched
wdym?
What BP is the 'Health Update' function in? Is it the same BP the function it's being called in?
OH
it's right in the pawn blueprint
for the cube itself
And Yeah
it's the same bp
What causes this to happen? The variables/graphs page has been crossed out, nothing can be selected. Reopening the blueprint works fine, just curious
use breakpoint debugger(F9 on a node)
im trying to make a combo attack but my character stops his combo after first hit why?
I also added notifys
annoying bug for me too
some problem with unreal slate of missing mouse up, aka reopen the bp window
Oh, okay. Encountered this in 5.3? I'm in 5.1
usually happens when there is a hitch when dragging windows
been here since the early ue4 days
What does that do if u don't mind me askin
when an execution is trying to run the node that has the red stop symbol, it would stop before running the node, notifying you
you can use that "breakpoint" to check for variables values, or even step the execution to see where it is going
by using this you can see what node has been executed and what did not
Oh my...
get streaming level always throws an error when I try to access it, whats exactly the package name?
I tried just the level name, the level.umap, the thing that get current level throws, etc
always an error
are you actually using level streaming?
good question, I assumed the level streams by default when you open them?
Level streaming is using sub levels where you load and unload parts of the map as needed.
ah, then no, I was just following the advice of someone here that told me to use that because I was trying to access actors that werent ready despite the level triggering begin
It sounds like your issue is down to load order, something of which level streaming would actually make more complicated. Referencing actors in levels that will be loaded/unloaded dynamically require to use soft references for example.
what exactly is the scenario, if you dont mind repeating
I load a menu level, then load the main, when Im on begin event of main, I search for actors of class and set a variable inside PC.
if I start my game from main, its fine, but when I start from menu, the actor Im looking for doesnt exist yet
Forgive me if this is obvious, quite new to blueprints and coding in general!
What is the syntax for finding out what class the currently controlled character is?
I'm trying to switch characters gta style and having all the code in the character parent class, with four child characters. I have been able to make this code work if I copy and paste all the code separately in the child characters, but I'm unsure if it's possible to do generally in the parent class?
This is what I've got at the moment but not sure it's the way to do it
why do you need to use get all actors of class? What are you getting?
Im getting a reference to an actor UI element that moves along my mouse when on a specific trace channel.
That's not how you go about it
Casting
Donāt use == for that
And where is this UI element? Is it placed in the level or spawned in?
If you want to have different behaviour between Parent and a child class, just have the same input event
so when parent press 1 -> X will happend
when child press 1 -> Y Will happend
For functions or event, you want to get fammiliar with calling super and overriding
yes, but now that you mention it, probably not the best way, maybe I should create the actor on demand
Super in Bp? š
Don't know what it's called š
That's what I was thinking. If it's follows the mouse, have the player character (or another appropriate place) spawn it when needed.
call to parent function
Call to parent ?
yeah
yeh, I will do that.
Ah so I need to cast to the child B (in this example) and reference the self in that way?
but just to learn about it better, if I had to access an actor placed on the level, how would I go about it to know if the actor exists or not?
That's a misunderstanding of inheritance if you are trying to cast between child / parent
Lets say the parent class is called Animal, the child is called Fish
Fish it self is animal
Yeah sorry I prly explained that wrong. I meant if you need to access an event/function from another bp, that is not inherited by the current bp, use cast. Otherwise you can call it directly
It depends what you're trying to do. Sometimes I'll create an actor component that I can place on the game state that specific actors can register with. This then allows other actors to get references to them when needed.
i would probably separate the PC for menu and gameplay for starters
though they will have a base class where they can share functionality
- PC_Base
-
- PC_Game
-
- PC_Menu
same goes to gamemode/gamestates
Ok I see, so I'm thinking if my way is possible? I've got 4 child characters and I want to switch between them (used this video for most of the code, but it's only between two characters https://www.youtube.com/watch?v=4xo6x6mROPA&t=1287s&ab_channel=PyroDev). I have been able to alter the code so this works between all four characters, but all the code is copied and pasted for each child blueprint with the references changed respectively (using 1 to go to charA, 2 to charB etc.). Is it possible to have this general code in the parent blueprint, leaving the code empty in the child blueprints and making it tidier? Would also make it easier to change anything (eg. the speed of the camera). I thought maybe like in my picture above I press 1, check that the currently controlled character is NOT character A, then check to see if it's character B. If it is character B then run the code
Hey guys and welcome to the next Video.
In this Video we work on Gta singleplayer character switch
In the Future I will Recreate all the things you always asked yourself, how did they done this?
If you have any ideas just comment under the video!
Stay Informed on Facebook and Twitter:
you can have 2 player controllers?
different pc for different levels, achieved using different gamemode for different levels
Thereās a much easier way to do this, the check is not required
Make a function in the parent. It can be completely empty. In each child, you override it to do what you want that child to do (if it needs to be different from other children or the parentās functionality)
also as for getting reference, probably can get them on demand instead
At that point you just use Self if absolutely needed
Would that not just be the same as having the code in each of the child blueprints anyway? So I any changes to any variables for eg the camera would have to be done four times?
You can also use events in the parent, then in the child use that event, make a call to parent if needed, and add the extra functionality in the execution path
Not necessarily. You can share behaviours and variables as needed
And override variable defaults in each child
I had no idea you could do that, interesting, I thought the gamemode was unique
So when an inherited function runs it uses the values set in that class, not the parentās
Youāll often see diff GMs for the game itself and the main menu for example. The Game Instance is unique, but the rest is changeable
Ahh I see, thanks very much for your help!
though they always come in a set
so the "world settings" where you set the gamemode that refers to the current level in the viewport?
Yeah
the gamemode has to change for anything else to change
Thereās also defaults in project settings maps and modes
right
I load my save game stuff with MainMenu GameMode
once loaded -> Show Widget
like wise with other level. For Dungeon, I will have generic DungeonGameMode
It's going to handle Scores and EndLevel
dumb question, does anybody know how I would disable my sliding animation while jumping/falling?
Quick question, I'm pretty new to using UE but I'm wondering if there's any way I can connect the Default Pawn to my character reference in order to make my HUD target the character I'm playing as, instead of one set character.
Thereās an isFalling bool you can check on the CMC
It turns true as soon as you jump and back to false when youāve landed
Wdym by āmake the HUD target a character?ā
What are you trying to achieve
I have my Animation blueprint like this, I'm unsure of how I would get it to check for my slide animation though
and this is my char blueprints jump / slide
You wouldnāt. You would just play a falling animation instead, afaik but Iām no #animation expert.
So my HUD shows different variables as progress bars(Health, Stamina, Hunger, and thirst)
Right now that character reference is set to one specific character, so the HUD will only show the stats of that character. I want the HUD to show the variables of whatever character I have selected. I know I could probably just duplicate the HUD for each character but that seems like I'd just be bloating the game unneccesarily.
Well how are you currently getting its variables ?
And what triggers the HUD to show this stuff
This is how I'm getting the variables currently, it was using a cast to my character, then setting the character reference variable to that character using the output on the cast node.
The HUD shows it on Event BeginPlay
Ok all that sounds fine but rather than doing this on begin play maybe you can use the Event OnClicked on the character class to trigger the HUD or at least to populate said variables
This way any instance or child of that character class will pull its own values
Youāll need to communicate the other way around, where you get HUD and cast into it
there is something very handy called GetOwningPlayerPawn in all UUserWidget
š
when you add the widget, have the owning player set correctly
then you can use that
Would HUD class actually have an owning pawn or is it the usual confusing widget for HUD class ? š
In AHUD, you can access controller then the pawn
This is a widget, if it helps
GetController()->GetControlledPawn()
Get controlled pawn
Yeah I getcha now
I was thinking RTS like where you donāt possess one char
ah if in that case then it needs to be specific actor reference
yeah thats how it is at the moment.
should i create a separate HUD(widget) for each character that's added to viewport on selection of said character?
As in, I could duplicate it and change the actor reference? or is there a way to have the game update the actor reference of the one widget depending on what character im playing as?
when you select something, i assume the event is on a controller, you can create/update existing widget to show info about the actor you have selected
the widget reference can also be in the controller too
with the widget reference then you can update the character reference on it
so I have a widget that's a character selection screen using buttons, when a button is clicked, it uses a possess node to use that character, and sets the default pawn class to that character using event on clicked, the HUD displays on beginplay but currently the object reference sticks to one character, whereas I want that to update to whatever character I'm possessing.
ah that explains more
then within the widget
GetOwningPlayer()->Bind on Possessed Pawn Changed
do that on construct, and also call the function with the first pawn it is currently possessing
so do this on the construct of the HUD widget I'm assuming?
Hi guys i have a question, I have a trigger box that activates a text widget, how do I make it deactivate after X seconds?
it says I can't connect the delegate in OnPawnChanged
'Delegate is not compatible with Delegate(by ref)'
sorry for the hassle btw!
Show code
Question: How would I go about finding a substring and deleting it?
For example, the display name of a room I enter is called "LivingRoom.Box" and I'd like to find the ".Box" in the name and delete it so it doesn't show on the HUD
Replace
Awesome, thanks.
So I'm a huge noob but I need some help. I'm trying to be able to attack while moving. So far I have it where I can play 3 animations in combo, but when I attack it makes my character stand stil.. Would anyone know how to set it up so that I can move while attacking? Not exactly sure what to do. I've created an "Attacking" state that connects to my idle/run state, but I don't know how to add transitions or coding to get it to access that state.... If anyone could help that'd be appreciated. The image included is as far as I got. I know I need to apply that to a state and have the state accessed.
try #animation
@tall plinth Why do u have a cached pose called attack?
It should be locomotion -> Slot "Upper Body" then into the Blend Posses 0
let the montage drive the attack animation
Hey everyone! Today we're looking at the Layer Blend Per Bone function inside the Anim Graph. This cool little thing allows us to play animations only on certain parts of the body whilst leaving other parts unchanged. This is extremely useful for separating animations between the top and bottom half of your characters so they can do things while...
I have a volume and I want an action to be performed as long as the player character is inside this volume, currently I see "On Component Begin Overlap" and "on Component End overlap" events but is there an event for something like "While Component is currently overlapping"?
On Overlap, set a Bool to true
On End Overlap, same Bool to False
On tick, If Bool true, then [your code here]
Adding to what ryck0shae said, depending on what you want to happen, a looping timer might be better. Just start the timer on overlap and stop the timer when the overlap ends.
A tutorial I'm following does this for other states and I got it to work while idling/running but I don't know how to set up the attack state that allows me to move and attack T-T I'm a noob.
My blueprints are set up completely different from this and if you're willing I'd like to DM you my blueprints/get further help! DM me if possible!
^ just please dont set your timer to less than your tick rate š
The idle/running is your locomotion state. That's why you shouldn't need a cached attack pose(w.e that is). Let the attack montage handle the attack swing and let the locomotion drive your idle/running.
I only do DM for paid work, sorry
But what ever you need is in that video.
Hey
I'm making a top down couch coop game.
I have a camera actor that is similar to diablo.
How do I make the camera follow the remaining player if the other has died?
What would be the best method to achieve this?
I assume this is something I have to handle in the game instance but Iām not sure how.
I have several levels that my character can run between but when each level opens, the movement inputs donāt persist. I get its because the character is built new each level but Iām curious if thereās a simple and quick solution either with level streaming or not, to allow my movements to persist. I have 50 levels so If the answer is level streaming, how do I make that quickly? I donāt want to spend hours setting everything up again if itās avoidable
So I'm trying to do some portals stuff, but I'm having difficulties to think the math of rotating one portal's camera that renders the view into the other portal, according to the player viewing the current portal (I might've phrased that really weirdly).
I want to rotate the blue portals camera (forward blue vector) to match the rotation that the player's camera (forward black vector) based on the orange portal forward (orange vector).
The black arrow on the blue "portal" represents the desired result. Also, remember that this is also a 3D problem, not 2D
I tried doing the Dot product of Orange.Black and then the ACos of that to get the degrees.
I used said degrees to rotate the Blue vector around the Player.Up vector.
However, this didn't work.
I also tried to think the problem around Quaternions, but I couldn't get my head around it.
Any ideas?
I'd be willing to pay like 15 dollars for a runthrough within the context of my blueprints/the system I'm using if I can accomplish it. I've got a larger system going after following Gorka Games' RPG series tutorial and I'm conflicted on how I should accomplish that.
I'll try to trial and error with the information that video gives but I don't think I'll accomplish what I want because of how my stuff is setup.
It would paint a better picture if you can show how you have it set up. I might look at it tom tho, it's 5 am
Not sure if I would do any diff than how dynamic combat system in market place does it
I'll link it here, one sec.
Locomotion -> upper body slot -> blend by layer
Should I just apply all the attack anim montages to upperbody?
That should work?
then following the setup with layer blend per bone?
I'll try. DM me when you have time if you'd be willing to help me for that amount T-T
Sorry. Broke and dumb and desperate to get this understood/working.
Appreciate the video and responses already.
@tall plinth post your relevant bp, maybe someone else can take a look at it meanwhile. I will check it tom.
Gotcha. Thank you. And I'm not even sure which BP is relevant.... I'll post several.
First issue I run into is I can't even call the upperBodySlot in the anim graph T-T
The anim instance, the play montage and the montage being played.
Anim instance = anim sequence? Play montage = anim montage? and idk what you mean by the montage being played.
Anim instance == anim blueprint
Find the code in your character bp that plays the montage
Then final check is to ensure the montage being played uses the correct slot
I've tried to setup the slot and I can't even call it into the animation blue print. Should I post inside the state machine or??? Sorry sorry sorry I'm noob.
is there any difference between the two?
I feel dumb and I should just get direct help/handholding for this T-T
Where is the blend by layer bone?
I can call that in the abp but I can't call the upperbodyslot
and don't know what i'd plug into it anyways
because I have 3 animations with an attack combo
is that even where i'd do it?
Yeah but u need to cache your locomotion pose
wouldn't i also need to create an attacking state inside the main state machine?
cache when where
Ur state machine is your locomotion (idle or running )
Attack is handled by montage
So while u move around as usual. When you left click, you can swing your sword (while the leg move as usual)
i have that set up in a blueprint separate from all of this and i'm not sure how to call on all of them or what i should do.. hold up i have a little video of it
Do u watch YouTube tutorials?
yep
Not a setup that I will use
other tutorials either leave me clueless or dont have as many features as i want to implement
and even the one i'm following i'm cutting out a lot of stuff
I would delete that "combo" system anyway tbh. Not scaleable
My learning come from dynamic combat system in market place
Have proper use of input buffer
i aim to make a simple adventure rpg so i dont plan on doing too much besides having a melee and a ranged weapon T-T
what do you mean? oh 5.3 or whatever the newer/newest one is
How big is the file?
Can badly optimized blueprint code affect your frame rate?
I don't need intermediate, binaries but if it's 600 mb just the entire folder is fine
doing it now! thank you!
Just in case someone finds this useful here is a small useful blueprint function library node: Toggle Bool
See the code for it (expanding with more over time) here https://github.com/RancorousGames/RancUtilities/blob/ec652ca42a5d390659fa178e604027916c2a68f6/Source/RancUtilities/Private/RancUtilityLibrary.cpp
(will add packaged version in the future)
I can't get it to fire a hit event. Could someone help me figure out what I'm doing wrong?
Bad collision settings is usually the culprit
Make sure both objects are set to block each other
Might also need to enable generate hit events iirc
any ideas why my trigger box is NOT working in a specific place in my map? it was working fine earlier but I must done something that now is not and it only works when I move it to a different place, a bit odd?
Mmm, why isn't my widget being removed?
Nvm, seems to be an instance issue, only A is being run
Hi all, im trying to LoadAsset in an editor utility widget to load my GameMode asset and set a FName on it, for some reason the cast always fails, if I print out the name of the object returned, it is the correct name, but for some reason I can't cast it, any ideas what's wrong?
(the asset path is obtained from right clicking and Copy Reference on the asset)
I tried to have a GameMode field but it seems like for some reason I cannot assign it a value either, Im assuming those are somehow connected and its something to do with the fact im trying to reference a GameMode. I've used LoadAsset successfully in other places with different asset types fine
Maybe youāre looking for #editor-scripting
I got around it by storing the FName in a data asset file, and then I loaded that with LoadAsset and it was fine. Weird behavior
Iāve not seen cast used like that before tho it makes sense ig
how can I access the point of view from a camera that is in a different blueprint? Im trying to make a first person view from a camera that is attached to a socket on the weapon blueprint. But I am calling it from my character blueprint. The casts succeeds, and I also set inactive the current character camera, but I dont know how to "switch" the view to the camera on the weapon?
you can see through difference cameras with set view blend target
set view target with blend
thanks for the reply. Would that work though ? since the target is player controller and not Lyra player controller?
nevermind, I can change the target
the problem is though, that view target with blend expects a new actor object target, where in my case the camera on the rifle is a component
how do you make a script that moves a mesh
if it has a camera, and the client is aware of the camera's existence, view target with blend will work
are you saying that..
the gun is already attached to the pawn you're using?
does anyone know why the healthbar (it's a 3d object) only updates when the value is in between 27-75? (the health & maxhealth at 100, printed the values of the percentage and it is exactly what it should be (ex. 80 = 0.8), the widget is a progress bar)
thanks, it actually worked by just connecting the object, not the camera. But yes, the rifle actor gets attached to the player actor at runtime
seems I have a new issue now. Since the camera is on an actor that is not a pawn, It cant be controlled with pawn rotation.....
I am trying to use the "create event" function to bind a delegate to a function I have in my class but it won't show in the list of functions if I give the one i'm trying to call an input.
I was able to do this in another class but applying the same technique won't work in this one.
In the past i'm pretty sure deleting the node and adding it back in worked but not this time
if I use the create event node to make a custom function, then add the desired input it will give this error
if i try to use the node to find the function with the input it wont show
i've got a deletgate or whatever calling a function with an input in another class and it's working fine, i don't know what i'm doing differently :/
The delegate binding can only bind to an event/function that has the same inputs that are declared on the event dispatcher.
well ok i thought i already did that bahaha tyty i'll make sure to check next time
how do i make pawn sensing not detect on tick
so just make it check every 3 seconds, for better performance too
Turn down the tick rate on the pawn sensing component to 3?
tick interval
i changed it before to 10
didnt do anything
it still detects as soon as you get close to the enemy
Pawn sensing was replaced by the #gameplay-ai perception system.
And it usually doesnāt need optimization, did profiling show that your pawn sensing is whatās slowing down your game? @kind estuary because if not, premature optimization is a bad idea
ah
didnt know that
yeah its premature. but since i dont need it to be detecting always, and i actually need some delay in the detection
i can tell this is checking if it has actors around on tick
or wait maybe not, maybe its just a collision
But it seems "On Begin Overlap" doesn't trigger if the player spawns inside the volume, the player needs to be outside it and enter it for the event to trigger. Any way around that?
OnBeginPlay, get overlapping actors. If there's valid characters inside, do what you would normally do on overlap. You might might need to add a delay until next tick node before it does the check to make sure everything has loaded.
How is your widget setup?
The target would be the actor with the camera in it, in this case the rifle. AFIK the set view target with blend will find the first camera component in the specified actor and set it as the view target.
Rate my wiring
hey guys i made a tile and spawn it correctly and i want to make in this tile a navmesh for ai is it possible to make this?
I rembemer being able to uncook a mesh and open it up in editor, changing it's materials collison etc. However when I try to run the uncook editor utility blueprint it crashes unreal engine.
This all started after I had deleted, added stuff to the content in windows. I suppose causing some desynch. Then i started having corrupt fbx crashes, not being able to see uassets in the engine, tangent errors, smoothing errors, failed imports.
I have tried reinstalling UE several times, different versions, wtf is going on?
after Begin play (Delay Until Next Tick), you can check for Actors overlapping the Component @lost coral
I'd give it a 8/10
You need to make the navmesh dynamic so it'll update when you make changes at runtime.
Looking for some pointers. Have a PickUp BP with a static mesh, dynamic material and 2 description text variables, all of which are instance editable. When player interacts, those variables are passed to the player along with the PickUp BP class and transform via interface, then PickUp BP is destroyed. The static mesh being used by PickUp BP is set to a SM component in front of the player, which is then made visible. Player can examine the mesh. When the player next presses the interact input, that mesh is hidden and the original variables are used on a new spawn instance of PickUp BP, so itās the same , when itās put back down, as the one picked up. Iām casting the newly spawned instance to PickUp BP to access the variables and set them from the ones stored in the player. But thatās not happening. Itās spawning the default PickUp BP mesh and material. When I interact with that new instance , it just disappears. PickUp BP is tagged as āexaminableā and this is checked to differentiate between non-examinable actors. Hope this makes sense. Also to mention that line trace is used for player interaction.
How are the variables being used inside the Pickup bp? Is it using them on begin play to set the mesh and material and stuff?
Originally it was in construction script, but I moved it to BeginPlay to see if that changed anything
If youre changing the variables after the object has been created, then the default variables will be used.
So I canāt grab a reference to the newly spawned PickUp, then cast it and set the variables? It would be easier to not destroy the original since this is just an inspect mechanic, but Iād like to figure it out anyway
Hide it / set visible to false ?
You can set the variables you need to change to be "Expose On Spawn" as true. Then when you create the object, you'll see exposed pins for the variables you want to change. That will let you change the variables before it has been created
Honestly this will be easier, but if it needs to be destroyed for some reason that's probably why
Expose on Spawn - thank you. I probably will @versed sun just hide it as itās simpler. But to satisfy curiosity Iāll try and make this process work first.
Yo guys quick question, im trying to bring root motion into my game but for some reason whenever the animation ends my character kinda tilts like the mesh and stays there, it adds more rotation the more often i play the animation, is there any way to reset the rotation after the animation has finished?
hey guys good morning, I am trying to get three booleans from three different blueprints (sender) and then a trigger box (receiver) on overlap check if these three conditions are meet (with branch?) something occurs. I understand casting is not effective to do this for a variety of reason so I am trying to learn and understand interfaces. I watched so many tutorials on interfaces and while I understand the concept of transfering the information I don't know how to apply to this scenario (3 blueprints with three different booleans send to trigger box). Any ideas please?
Hello.
I am currently struggling to figure out the best way to set up a blue print. (e.g. how to use "cast to" as little as possible)
Does anyone know of any books where I can learn about these designs?
Using cast to as little as possible doesn't mean you're setting up a blueprint right.
Often times it means you're doing convoluted hacks to work arpund a cast, with methods that still incur the potential cost of them, which is the wrong way to set up blueprints
Thanks for the reply.
I'd like to know if there are any other books you'd recommend, because I'd like to learn more about creating a well-designed project, besides "cast to."
Unfortunately unreal moves too quickly for books, so any material you buy would be already outdated
Moving fast is not much of a problem.
We want to know how to design and manage the design and its management in a way that is easy for third parties to understand.
It is a problem, when because of it, no one makes good books :P
There aren't good unreal books
General programming concepts regarding hierarchy I would say. I don't know any as I haven't read any but as a topic, it's a bit more transferable.
Most of unreal design is just being sensible with OOP though.
Try to design modularly, and be data oriented, as opposed to hard coding things. Use casts when you have an established hierarchy, and sensible inheritance chain. Use interfaces for class agnostic behaviour, and use components for plug and play modular behaviour, like a health component etc.
Don't do silly things like including assets in base classes, as then you incur huge memory penalties for casting to unloaded classes
Regarding not casting, it's miss understood. The reason people say to avoid casting is to prevent an asset load chain where just loading one asset forces everything in your project to also be loaded. If the thing your casting to is going to be loaded anyway (such as Pawn/Character and PlayerController) it doesn't make any difference.
Basically, pretty standard stuff for other engines
does anyone know how to fix this?
the wrong direction is a skeleton problem and i can fix this with bp but the way he is leaning more and more after every animation is the main problem
And even when it isn't guaranteed, proper base classes mean you are only loading kilobytes, which is nothing.
That looks like your animation is moving along the wrong axis in the animation. Forward is normally positive X so if your root motion isn't moving along this axis it'll look like what you show in the video.
And another big thing is to not be scared of c++.
You want to be using it for anything you plan to ship, even if it's just for your structs and enums.
yeah i know i just need to rotate the animation for this but the way the enemy is just tilting is wierd
I asked the question in the sense that I would like to have a book where I can learn how to create such appropriate classes.
Are you saying that the only way to do this is to gain experience?
Pretty much, or different online resources can help. Unfortunately having the intuition to know when to use what is only with experience
You'll start to gain a Spidey sense of sorts
You can learn the concept which would only take half hour (if that) but as every situation is different there isn't a one fit rule for all.
Picking up some resources on basic object oriented architecture will help a ton, and learning what things like data driven design are can as well. But after that it's pretty much practice makes perfect
Making something that doesn't work well is the best way to learn as you start to understand why what you did doesn't work well in the situation you made it for.
The function itself does work, but there are times when I sometimes wonder if it is optimal. This is because the blueprints become more complex and harder to see.
A good project for getting a good sense of this is an item/inventory system. That's what really made me understand and appreciate good hierarchy.
I also wonder if we're going too far because we don't know useful nodes like APPLY Damage and BPinterface.
Make sure your breaking your logic down into functions. Especially for logic that is repeated.
Optimal and blueprints are a bit of a misnomer.
If it's not causing you issues in the profiler, and it isn't obviously awkward then it's probably fine, until you may stumble on something that reveals it isn't.
A key thing is to be DRY. Don't repeat yourself
But it's natural to finish implementing X and then realise it exists already. It's part of learning.
definitly this. UE has a lot of hidden features lol.
Yes, for example, when there are several enemy characters to judge, it would be easier to implement using BPinterface than repeatedly casting each and every enemy character to judge. That is the kind of knowledge I want.
You see, that's where learning about general OOP helps. You could just have a base class for your enemy, and cast to that
My honest advice is to tackle basic programming principles in an object oriented language. You'll do yourself some favours in unreal, after that, it's just experience really.
Looking around the pins of the channels have some useful info too.
Like this one has a video pinned about blueprint communication
This, I can't even write C++, whilst I can read bits, the concepts help massively in blueprints. Insert learn C++ comments haha
Hell I was staunchly bp only for ages. Learned about c++ structs in unreal, and kicked myself for not knowing it sooner. Now I rarely touch a BP node, if at all
(for major things)
C# is great, it has interfaces too :D
Encapsulation, polymorphism, inheritance
These have snapped my heart to pieces. ļ¼ļ¼
And they're real interfaces instead of unreals ungodly hack
Unfortunately they're a necessity
They will click one day, and you'll wonder why you ever struggled
(Been there, done that)
What did you guys learn C++ from?
I'd love to know if you can.
I've only touched JavaScript at work.
As bizarre as it sounds, have a dig through minecraft source code. Yes it's java but having a dig through that helped give me a good idea for structuring classes.
My primary knowledge came from bits and pieces online, as well as the cpp reference. After that I jumped headfirst into sfml, only allowing myself to use the documentation as a reference.
Did some work in directx, because of uni, and then had some fun in unreal. A very convoluted path. I tend to reccomend people go to learncpp.cok instead, and pick up a C++ book if you're really interested in it (like for the industry)
Though I would say if you don't want to use it in industry, learn the concepts with a friendly language like c#, and then gain a working knowledge of c++, to use in unreal, when that interests you
Thank you.
I knew I would have to learn C++ eventually if I was going to touch UnrealEngine, so I'll give it a try this time around.
Don't get burned out by it. You'd be surprised how much good knowledge of BP, with just some basic programming concepts can take you
Though it's not as bad as everyone pretends
In unreal at least :P
Hey I am having problem with Launch Character. My player can walk on walls. When walking I use launch character blueprint to jump and negative direction to go back to wall. But there is a problem that if player is standing still and jump somewhy it rotates. I even tried setting rotation and giving it back after launch but it still doesnt work. I am adding video of slowmo
All jumping part looks like this
as long as you learn C++11 or newer you'd be fine
What you need to do it to test LaunchCharacter in a simpler environment. I looked at the source code and it doesn't seem to do anything other than add velocity and set airborne
Try calling LaunchCharacter with a default ThirdPersonCharacter blueprint. If that works fine try to figure out the difference between your char and that default char
I found out that somewhy I get launched not only on x axis (how should be) but Z axis aswell. I think of this small velocity makes player turn into z axis change. Image: Green - start location, Blue - velocity after 0.1 sec launching player, Red - location after landing
isn't there a 'Character faces velocity' checkbox or something ?
in Character class defaults
I unbox it but everything looks the same
bummer
ye :/
I don't get how it launches player into Z axis if I only input X axis velocity
I noticed it changed my normal walking it wont change orientation while on ground. I think it's because while on wall my character is on flying mode
I'm second guessing myself.
I am working on a bed which saves and advances time, and alters player stats.
It calls lots of functions from other classes. And the only way I can think of doing that is casting.
Is there a better way?
I dont think an interface applies here, because i dont need two classes to implement a function in the same way.
And an event dispatcher doesnt make sense as I would need to cast to that class anyway right?
For example. When I interact with the bed, I call a function "AdvanceTime" in the game mode. But I also call "SaveGame" from the GameInstance.
And finally, I update stats on the PlayerCharacter.
Thats 3 casts for a bed
What is it about casts that you're worried about?
Well, people say you should try to avoid them. I am just wondering if I need to avoid them in this instance.
I cast to like 3 other actors from the bed actor.
Doesnt that pull all their functionality into this one class?
how to attach cloth to shoulder of charactter rigs and add simulation on cloth in ue5
You should not avoid cast, in many cases they are not even avoidable
Thats what I was thinking.
Doing cast will produce hard reference, that will load them to memory
That's just the cost of using blueprint
it probably doesn't matter too much in your case. Usually if I avoid casting, it's because I'm trying to limit memory usage. Every time you cast you load what you're casting to into memory, but in your case (the player character, gamemode and gameinstance) it doesn't matter because those things are already loaded into memory anyway
In cpp land it will not load the object to memory
Yeah well if you have hard ref everywhere, you might load the entire game just by loading your character
This is what I needed to hear.
Thanks @brazen pike + @frosty heron
It's not the casting is the problem but the hard ref in bp. If you want to optimise then use soft references
It's kinda mandatory to use soft ref, especially if u have data table
Data table with hard ref = rip
Yeah you really only need to worry about it if you're doing it in the other direction. For instance, if you cast to the bed from your character. That'd cause the bed to be loaded whenever the character is loaded.
That makes a lot of sense.
I ended up needing to use hard refs. Turns out there's a bug in UE4 that can create missing netguid cache entries through seamless travel if you use soft references. Screwed me over since a decision was made to not upgrade to 5
but yeah, look into soft refs
I'm not sure, also i don't seamless travel yet so I hope I don't run to what u got š±
@brazen pike u are doing multiplayer?
yeah it only happened for clients
are you in UE5, if so there's a super easy fix. But if not then source code editing is the only fix (if you HAVE to use soft references, otherwise like me just switch to hards)
then you don't have to worry about it. Go nuts with soft refs
damn that's gotta be awful to work with
The system is done , rest is just adding to data table
I found out its because of gravity. While I am on the wall and launch character in x axis, gravity adds on z axis and there is z velocity what makes player turn. Maybe someone could help to figure out how turn on and off gravity inside blueprints?
or maybe how I can edit movement mode (flying) so this mode wouldn't have gravity?
Duplicated this MetaHuman code to run different dialogue when the Objective Text is something different. Different vars and a different new text for the Objective after the second event run. The one that says Test Text is the second one and the one that is first has the text change to Visit Cemetery. For some reason, they both result in the objective becoming Test Text.
Other image but with the other variables.
You should check this out if your needing a dialogue system.
Welcome to this tutorial on how to create a dialogue system in Unreal Engine 5! In this video, we'll go over the basics of setting up a dialogue system using Unreal Engine's powerful Blueprint visual scripting language.
Whether you're a beginner to Unreal Engine or an experienced developer looking to add dialogue functionality to your projects,...
I already have a good dialogue system, just one issue.
Hey, so I've tried both methods of adding a new row to a data table in an editor utility widget, but I'm getting this warning when trying to run the event. Any help would be very appreciated š
Are you feeding the right struct to the data table?
I feel like I am. It's a custom struct which was made for this DT š¬
As you can see above, the same struct is used for the row structure of the DT
There is only the one struct with this name:
This is the whole thing:
Hmm im not sure, maybe try to pass a value instead of a ref?
After you set member
Get the Struct ref then break it
Yeah, I tried with the "Make S_WorldBookmark" instead of "Set members ..." but it seems to have the same issue regardless of whether it's a ref or value
then make then plug it? I dunnoe
is your struct declared in CPP? if it is, does it derived from FTableRowBase?
that's my last guess
Made in Blueprint
If you're having to copy and paste/duplicate the entire thing, I wouldn't call it a system. Either way, with what you've shown it'll be difficult to say what the cause of the issue is. Most people wont take the time to figure out what the spaghetti does. If it's saying some test text it would be a case it's not being updated so you'll need to work backwards to debug the issue.
Im out of idea then š
After the first event, the objective text should be "Visit Cemetery" but it just becomes "Test Text".
No problem, thanks for trying š
did you try to manually set the DT with the drop down ?
If the Data Table pin is a Copy of your Ref , then it would be saving to a copy ?
LogScript: Warning: The data table type is incompatible with the RowData parameter.
unplug row data , and compile
where is event talk and event talk 2 called?
A BPI.
I don't understand why it's defaulting to a wildcard input on that node in the first place
Surely it should set the input to whatever the valid struct is
even after compile?
It's not just that node either, with a new AddDataTableRow node it does the same thing
Must be a 5.3 bug?
Find that hard to believe though
Might just store this stuff in a DataAsset array variable instead at this point š¤£
That doesn't answer the question.
That still doesn't answer the question. You've already shown the events. I need to know how/where they are being called.
They aren't in the BP any other times.
Nitpicky question, Im setting the location of an actor, and when I see the actor get there it feels like it does it in a "elastic" fashion, meaning, there is 1 frame that it appears half the actor occupies a place that is a bit further away then goes back to the proper location.
Any ideas I could look at to find out whys that
I tried that
Shouldn't be an issue, the output location is still a valid vector so that's all the Set node will care about
Events don't call themselves so I guess I can't help you any further.
I tried using interpolation, and I noticed when I raise the speed past 5k I get the same effect
Are you running this in some kind of multiplayer situation?
They are interfaces and when I try to drag them it since not BP callable.
no, locally, I use a trace channel to get the position, a gridsnap and I run settter on tick
Hmm, why on tick? Is it something that needs to happen every tick? Can you not run it once, or based on each time the line trace fires?
ah, no, my actor is just a static mesh basically.
So there's your issue, your progressing both conversations at the same time.
just a simple empty actor with a cube in it
just moving the white thing accroos the grass
You don't want to be setting your actor's location every tick, try setting it using an event only when you need it to move
in a tiled fashion
that makes sense, using set on tick felt weird, so I should detect when is needed to change positions, and set it once
thats how I had it on my older prototype using another language
Do I need to duplicate the code but replace talk with talk 2?
still not sure what could cause the bouncy effect
Well if you're setting the actors location every tick it's possibly just struggling to do it that quickly or something, so it's rubber-banding back to world 0,0,0 or something like that
To be honest, it probably should be fine, but it's the first thing I'd suggest changing anyway as it's just bad form to use tick for stuff like that
yeh definitely, thanks
If you feel like you need to 'duplicate' large amounts of logic, you need to think of a different way to handle it.
What if you need to add 2 more conversations? What about 10 more? what would you do then?
I mean the code in first person BP.
You could put a bandaid on it and do a check for which dialogue it should be progressing but either way, when you want to add more, it's just going to get messy and very buggy.
Yeah I'm gonna try to do a better solution. All I know is that it can stay in the first character BP.
take a look at the video I shared. It'll put you in the right direction. š It'll make having multiple conversations with different NPC's a breeze.
I have a weird problem: I have a little game where you can program a robot to do stuff. It's all good until you program it into an infinite loop (which obviously crashes the app). How would I go about allowing the player to make the mistake of programming it in such a way but not crash the program & just display a warning in the app instead. I'm using a bunch of recursive calls to list up registered actions for the robot, but the problem is as soon as the engine detects it, it straight up crashes, so (at least in blueprints) I don't get a chance to break out if the counter goes above a certain increment.
for reference:
this would crash because sequence 2 (purple) calls seq 1 and vice-versa
but I want the player to be able to actually allocate those as they are (wrong)
Every action the robot does, it increases a counter, when it reached it's limit it stops and give the player a warning. The counter would be reset after tick.
Just add condition?
SEq 1 -> Condition (Counter can go here) -> Seq 2
Iff condition is not met don't go to Seq 2
it seems to crash before reaching my counters in bps
EG if the counter goes more than the limit
What's ur counter?
U can set it in Project setting
it's what I've tried already @frosty heron. It never reaches the counter, it crashes at function input
You add a branch?
so it's probably a check in the codebase that doesn't even allow it to call the function somehow
show your code
unless all the actions are being done in a single tick it shouldn't trigger the loop detection. You could make it so it only ever performs at most one action per tick.
You could force every function the player can make to be slightly latent (by at least 1 frame, but I'd probs recommend 0.1s), that way they can't write code that'll make an infinite loop, then you can add a counter anyway and check
it's kinda hard to follow along but this function is re-called
& the counter never actually increases, the engine breaks out and lists callstack before ever increasing the counter
š¤ maybe that's not a bad idea actually...
Also, the robot only ever needs to know about it's current action and possibly the next one. It looks like your trying to get all the actions at once.
you probably wouldn't want players to be able to write code that's too powerful anyway. They might get carried away and crash the game by making something extremely complicated that is looped 100000 times in a single frame, so 1 action per frame will stop them
actually no, it's more complicated than that. I need to pre-load all actions, first to last
why?
I know this is probably a silly issue, but I'm trying to implement a projectile into my project and it never calls On Component Hit (StaticMesh). Everything I see about this issue is telling me to check the collision is blocking, and that Simulation Generates Hit Events is set to true under both meshes collision tab.
Could someone please assist me in figuring out what I've missed?
@dark drumsry, just too much to explain. I have a level generator in place too, so it also checks for valid run bla bla...
then I use the same system for actual action to keep the code light etc etc
while preloading , keep an Int Var counting each step, when over 1000, stop loading and error out
does your static mesh in the projectile bp also have all the same settings?
Yes, I belive so. Does this look correct?
Ye it worked, no more doing down (to gravity axis) but now some random glitches happenning maybe have an idea how to fix?
Those delays man
ye, I will make it better now it's for testing š
well not a good test if it's the one responsible to screw things up
but anyway I can't tell
Does it actually have a collision mesh? What is the static mesh, is it a custom model or something made from the starter content
I think it does have a collision mesh. It's a custom model, but I had originally used a regular sphere primitive, but that didn't work either.
how are you moving the projectile, are you using the projectile movement component?
Yep
do you have "sweep collision" enabled under "projectile simulation"?
Should it be disabled?
Im hitting a vehicle with rocket, how do i make a vehicle move into the air as its hit by a rocket
Add impulse doesnt work
Launch doesnt work
just need it to jump into the air
but dont seem that there is such a option with vehicle movement
How can I constrain the movement of an actor in bp? There is the set constraint mode but I don't see a mode that is all planes.
also for set linear limits idk what to put for accessor
@crisp gulch Okay, take your static mesh in the projectile's BP hierarchy, and drag and drop it over the defaultSceneRoot
should fix
apparently hit component doesn't work if there is a default scene root
That works! Thank you! I wonder why default scene root keeps that from working.
yeah, so the projectile movement component will only affect the root component. So you need to make sure whatever the root component is has all the physics set up (like having collision, and simulating hit events). The static mesh was also moving because it is a child of your root component, but wasn't using its physics
I have a error going on im tired of trying to figure out. Can i get some help?
asking so i dont interupt anyone really ^^;
Just post it and if anyone can help they will
Have you tired using Add Radial Force? It was the first thing I could find
Don't ask to ask for help, just ask. š
So i have the resource component inside my BP_PlayerCharacter, but it says it does not inherit it
Pull from the blue pin on your first cast can get the component.
In that situation you don't want to cast to it. You're currently asking the engine "hey, is this BP_PlayerCharacter a ResourceComponent?" but it's not a resource component. You want to get the resource component from the player character instead. The first cast (to your character) gives you access, so now you can drag off the blue pin and search for the component
By constrain the movement, do you mean like keeping the actor from going too far in one direction?
Could you post a screenshot of the error
Have you added a resource component to your player character?
I want to freeze the actor in a specific location
didnt get it to work, but the Set Linear Physics Velocity is super juicy
Click on "Get BP" in this error here, and it;ll take you to the problem
Oh, so like stopping them in place when certain conditions are met? Like, actor has stepped in a bear trap, constrain them from walking for 15 seconds.
Something like that yh
Okay, cool. First things first, could you send a screenshot of the code that moves the actor?
K
You fixed the error?
The actor is moved using the view of the player camera
where is this function, "get BP", where is that running and when
well ill show you but i dont think i called the function yet
It looks like you have a way of ignoring player movement already with the IsGrasped branch.
okay
the white progress bar is the bar that has a bind to the percent
which is the Get BP function
if that variable is true then it moves with the player camera otherwise it just acts like a normal cube
ill get the ref that calls the protrait now
Gotcha, so this is for freezing a cube actor, correct?
Okay, so right click on the "Resource Component" get node here, then click on "Convert to validated Get"
yh
that way, it'll only run the code if it is valid
dont we all just love sortting through unreal engine and their many event graphs
my brother in christ, you made the graphs
nice, that'd pretty be cool working with my dad, but he's more of a web design kinda guy
Why dont you attach?
thats still cool in its own way
How to make such a thing?
the delegate?
When I make a custom one it goes like this
make a custom event right?
Thats builtin gui button onclick
This requires you to be constantly moving the actor to be right in front of the player. It'll be much easier to just attach the actor to the player and stop its movement (which will vary depending on how you're moving it)
It will auto make the Event if you "Assign" instead of "Bind"
Thats DECLARE_DYNAMIC_DELEGATE_OneParam(FSomething, FString, Value);
So something like this is what you want correct?
The object with the dispatcher needs to be a component. Then it'll be at the bottom of the details panel. If you dont have a component, but have a reference, then you need to bind to an event/function
This is what I found worked for that. I created a branch at the begining of the tick with a new bool value I called IsFrozen.
When IsFrozen is true, it sets CustomTimeDilation to 0, which stops any timeline animation (if the object is using any), and then sets SetSimulatePhysics to false on the root object (in this case the cube) to pause any velocity, gravity, or other physics based force that's acting on the cube.
Sorry I still don't get it
I just need to subscribe to my custom DECLARE_DYNAMIC_DELEGATE Im passing as a custom parameter
@brazen pike
I just use .AddDynamic on the cpp side
And don't get how to do it in blueprint
ill brb but im on the right track now thanks lemon and others
I mean how this
hmmm never done it with a cpp delegate, it doesn't work like a BP dispatcher?
Is different from this
And they I've removed it and seems like it still works
this is the fastest way
Oh thanks I didnt see it
I've only seen 'create event'
Hey, is there anything in unreal for stuff like
"Press F to interact" where you can bind the 'F' to actually be an input action? there are ways to just get key names for input actions, but was wondering if there was something more convenient than me having to go through all my prompts and update them through code.
(maybe something w/ rich text block?)
like figure out what key the player has bound to a specific action?
yeah, just replace F with whatever the actual key for the inputaction is
yes , its easy with #enhanced-input-system
yes, i am using that. is there any automatic way for unreal to do text replacement for me?
something like "Press <Interact> to interact" or whatever, and unreal knowing it means the input key
well I just did it manually
this is ue4 without enhanced input system
but I'm sure it's basically the same concept
yea i guess i can just do it manually, just making sure
I made this into a global function, so if you've made it once, call this on construction of any widgets and easy peasy
I imagine it's going to make localisation a nightmare, but I'll burn that bridge when I get to it
will it? F is F in all countries
the keyboard layout is not
oo yeah
it might not be a pain, im just expecting it to be
so I have this wierd thing happening where my actor for some reason can see itself
When I get the sweep Result it seems to be saying it's hit itself and not the actually physics actor thats gone inside of the box
if (OtherActor =! Self) { do_stuff();}
it still seems to see itself
Question; how do I remove a static mesh from the PC? I have pick up the hat to equip it, and while wearing it, it will replenish X-amount of HP, and I want to destroy it when it runs out of HP pool, but can't find the correct nodes.
Is there a way to execute event in blueprint (call MyEvent.Broadcast();)?
If all you need is the hit actor and the hit component, then dont use the sweep result probably
Delegate*
okay so made it work but that sweep result is for some reason seeing itself for some strange reason
Is this the delegate that's exposed to blueprint?
so idea is I grab the component detected and check is simulating physics and if so do a impulse on the component
I would prefer to do it on the actor but I don't think there is anything I can call to get if actor is simulating physics
Have I done this right as I think I have but not sure
Okay, then just pass through the component, rather than the hit result
Unless you need the other info
to be fair this prob won't work cause again the hit result is bugged so it's saying hit normal is 0,0,0 which it won't be
I dont see any
You are in the blueprint that inherits the delegate?
i'm gonna have to do it manually aren't I
I'm looking for such a thing lol
it looks like this
Yeah but I don't need to subscribe on something
I need to call .broadcast() on my delegate
Broadcast is Call in blueprint
Dont see calls here
i've never seen the red square pin as Output!?
You have to have Event Dispatcher
I have in some plugin, just some callback we can use
like HTTP request , etc
i know right, that threw me for a minute
So I want to have a callback back to my cpp code from the GUI widget
i think this expects EventSetup to be called with a valid struct
It's under "default"
this is most likely not supposed to be used there, someone correct me if i'm wrong
You prob have the most wisdom around the people online on this channel atm
Delegate is what you plugged to events
or function
Have you watch some videos about event dispatcher?
never undererstimate the lurkers š
I did, didnt help
im hoping if I lurk in the cpp channel for long enough eventually I'll understand cpp
nope, understanding cpp involves more pain
I basically need to do this thing in blueprint
Why is it so difficult?
In blueprint you just use Call
OnClosed is the delegate
You need to make an event dispatcher in blueprint
the same way u declare delegate in CPP
I dont think you can call using the delegate ref in blueprint. You need a ref to the delegate's class and call it from there
again... it's not supposed to be called from within the setup event
or rather from the parameters struct blob
Yeah Im using it later, moved just for the sake of simplicity
if this is your own cpp class, make a method which takes the parameters and calls the dispatcher
Yeah kinda weird to have it in a struct that you break... does that even work?
Thats what Im trying to avoid
Whats the problem?
That works in cpp
even epic uses that in some places iirc
Just moving some GUI logic into blueprint
I don't know, I do delegates in CPP but not like that
my cpp not good enough to understand how other ppl does stuff
How do you do it?
So I have the same thing
how exactly does one put this 'AICon' on a character/pawn?
is lemon still here?
so i have where we set up the hud, can i pull you aside for some mentoring?
if possible?
AICon just means AAIController. which is a child class of AController, and a sibling of APlayerController. AAIController usually is used by AIs if they control a Pawn/Character.
You can either manually spawn one, and use it to possess a Pawn/Character, or you can check the DefaultSettings of your Pawn/Character. There is a drop-down somewhere that controls in which situations an AIController is automatically spawned.
Usually the options are "not at all", "when spawned (vis SpawnActor)", "when placed into the level", or "both".
probs dont pull me aside. There's many people here who are significantly more knowledgeable than myself. Ask questions here and if I can't help someone else might be able to
okay alright but im gonna feel dumb
lol
in that it is a 7 step to set up the hud. I just need to add a ref to the resource component there?
As an example of someone more knowledgeable, I spend a good chunk of my time (when making multiplayer features) looking at a pdf written by Cedric, the guy who just answered a question
What do you mean
Yeah but when you got someone like me, who can barely understand the doc unless i code with it, i feel dumb a lot lol
WEll going back tp the other question at hand
remember how the resoure component wouldnt access or read? Well, you told me to make sure the resource component was vaild
i guess i still have to find the right ref
because it should be calling it already
urgh
brain steams out through my ears
How can it be invalid? Unless you destroy the comp or the actor
what is the error you are getting
So what's the error again?
ill post relative code and error right noiw
one second
resource comp (what i added that led to the error)
Get BP Function which is bind to the percent within the widget
Multiplayer š«
lol?
The engine does it for you
You are using Get Player Character 0 in Multiplayer?
yeah?
oHHH this is multiplayer?
it's all pinned in #multiplayer
lol yeah sadly
I see
It will give you different result, depending whos calling it
Use Get controller and cast to the right thing
not always true, but generally
This is in a widget however, so get player character will work perfectly
I would say turn the get node into a validated get (for the resource component), since this will run every frame it should work
it'll wait until the component is valid before displaying something
how long does it take for it all to click? I know the basics but not everything thats basic
XD if that makes sense
The jump from single player and multiplayer is quiet a leap imo
yeah lol it is
depends on how complex the game is tho
(complex lol)
if u want to do Turn based stuff, knowing replication and RPC is probably enough
I tried learning it on my own, and wasn't able to get it until I was hired at a studio and was sat down and told how it all works
You are living my dream
I lived in Australia too, there are barely any game studio š
especially in Perth
sorry for the dumb question. What get node do i convert?
yeah I'm located in perth š
For reallll š
In USA there is only one or two states that has game studios
the get node for "resource component" coming out of the player character output pin
I work remote for a tiny studio in new zealand
so woooo living the dream of having nobody in my field I can talk to IRL and because I work from home seeing nobody all day for 5 days of the week wooo š living the dream
now i just have to get the BP to increase loololol
trust me man
its worth it
you could be holding up a sign
instead you code on your butt lol
No errors don't mean everything is fine tho
oh no
you shouldn't be accessing something you hvaen't set
the bp in my code is not increasing
look cold summer
can you help me with this one then let me get a screenie
No ser, I got a deadline my own
I would get the owner of the widget -> Get the character -> Get the component , then just display w/e I need to
the variable isn't increasing, or the widget is not increasing
i just noticed the equipment comp
(hate learning my dads code)
i have a lot to look through
let me get back to you
sorry for being a bother
but thank you for the advice to look for the mana
Btw, the mana isn't going to replicate properly
You're setting it on the client, but not the server, since it's a replicated variable it will be updated only on the client and not the server. Therefore, if it is ever changed on the server, the client's variable will then update to be the same, but it doesn't work the other way around
Any input presses will be on the client
i see
Unless you manually do an RPC to the server and change it afterwards. I can imagine that being a form of client prediction
Hey ya'll, how do I remove a static mesh from the player that was equipped in game?
Get a reference to the static mesh then destroy the component or set the static mesh to none
how can i stop an animontage? i have this montage that i start when i reload but this doesn't stop it
that should stop it, assuming you have an active montage
i have another dumb question for yall
The call update character, how can i add the var BP and Max BP to it
yes, i see the animation play when i reload but it doen't stop when call the stop animontage
Make sure the stop anim montage is called
i have this to switch weapons, and it still switches weapons but while doing the animontage
find the dispatcher in your BP, then click "add input" in details
it'll be below variables
So where is this
@trim matrix Works for me
if it is called from there, it will be there under the "event dispatcher" section
hold on
under this one we got stuff
thanks lemon ill take a look
found it
thank you lemon your awesome
i even looked at the documention for dispatchers before asking, but how come i cant change the vars and the dispatcher is a read only and greyed out
I am using a montage
works btw
You are playing a montage off a skeletal mesh component
Meanwhile thr target is character
Do this instead : Get First Person Arms -> Get Anim Instance -> Stop active montage or something like that
Stop anim Montage probably target the default Mesh Component
@trim matrix
I will guess that Stop Anim montage just stop montage on this specific Mesh component inherited by Character class
any advice how to offset hand/bow position when this animation is playing when on idle it all looks okay
which part of this is #blueprint related š ?
there's an #animation channel if you need
got it
all of this is done in blueprint
thats the best I got idk š
Hey guys i am having an issue that i cant solve when i open inventory its fine but when i press one more time it removes all widgets so i am wondering how can i fix it to remove only inventory widget here is the functionality that opens and closes it
remove from parent
you'll need a ref to said widget ig you already have a ref
How to fix from removing all your widget? Don't call remove all widget to begin with
also just a tip, you don't need to spaghettify the code, you can Get that Widget ref multiple times np
at the point where im looking for all the ways the widget is not connected to the BP stat lololol
hate that part of coding
no errors?
okay!
still dont work
sulk
I'm trying to change cloud material parameter of volumetric cloud component (using simple clouds material from plugin) from blueprint, but it seems to work different than how it works for meshes. I didn't find anything about this being a problem for anyone else though for some reason. So I must be doing something wrong, but I can't figure it out. I only found here on the Discord where someone asked how to do it in C++ that you have to set the material again to the dynamic instance, but that still didn't do anything for me. Now I am clueless.
is there any short cut to select group of nodes connect their execution pin all together instead of one by one?
no, afaik
BP is slower to "code". Have to learn to blind type with one hand
but I don't know much š
I find it strange though that there are no helpers at all with wiring blueprints. It's so annoying. But it would help soo many people. Even just simple stuff like when you select two nodes, it could suggest what pins to connect and you hit space - bam. So easy. Maybe there is a plugin for this?
if there's any advantage to bp is that, it's faster to prototype than writing actual code
Ik
It's frustrating when you pull the node and try to connect it but miss the exection pin to connect a bit then you have to pull it again
I don't know if there's a plugin. I'm searching myself too
doesn't happend much to me. Are you having low fps? or maybe you are cooking spaghetti?
try to use re-route nodes when you can
I'm not a total beginner. But everyone cooks spaghetti when starting out.
Im not saying you are but I keep my nodes close to each other, I don't really miss when connecting nodes
I'm working so fast and my pc is old that it freezes some times. That's when I miss to wire nodes
I'm in UE5.3.2
š
I think the point is that BP prototyping could be faster, even something simple as, if you drop a node close to another node, auto connect the execs. There's definitely potential that's not being used.
You can just grab Grid again for nodes that are too far
Maybe they bring Verse to UE5?
Btw how can i make a shop,for my dude to sell and buy things?))