#blueprint
1 messages ยท Page 24 of 1
the booleans need to be as the index
values as the options
I suggest dividing it
instead of this approach tho
as others have suggested
do exactly this maybe
It's rotator math. It gives me nightmares lol.
I'm going to assume the spring arm is set to use the control rotation. While your character/horse doesn't. You need to get the horses forward vector, get x vector and then see if the control rotation exceeds this +- your bounds. If so, snap to the closest bound.
but i can only put one bool into index
that's what I mean
I hate thinking about this
it always messes with my brain\
anything related with translating math into space
vectors and rotations give me the ick
but it begins with the start already how tf do i get camera
where do you get camera from
maybe it's time for some basic unreal engine tutorials
Hello!
Does anyone know where I can find some information about animation blueprint templates?
Searcing on youtube but surprised theres not a single video that covers this. I have an asset on the market that is based on a animation blueprint template and trying to figure how to implement my own state machines around it.
Would love to learn more about it.
Its what i had on my code for somehting i use
you have a lot of questions, about a lot of very basic things
and i have a basic question noone can answer me
Everybody can answer it, nobody is willing to spoon feed the entire code to you
there must be a easy fix where i dont have to rewrite the whole code just because there is no white node for the add function
the answer to your question still stands, you use a select node, with the boolean as the index and then set the variable
it's called a set
get the variable, add to it, call set
its no variable tho its the x and sometimes the y part of a vector
it's the same principle
right click split
make vector is not needed, u can also just split on the set
Which is less worse than the other? Variable linking straight to bp_character or casting?
neither
can i avoid both? not really right?
you can avoid both with an interface
but question is, why worry
if it's loaded into memory anyways most likely
mm yeah. i guess a vehicle & a character having a link is unavoidable
I mean, they don't need to reference eachother
they can use an interface
but it's overcomplication if you know it's always going to be a character using it
i'm using an interface but still some casting
at that point why use an interface if you cast in the end
it's a choose one situation
spare yourself the hassle of setting up an interface if you plan to cast anyways
but if i don't cast it wouln't always be loaded tho. that's the only plus
bs, it will be loaded anyways 99% of the time
like what, is ur car gonna get interacted with without any character present on the map?
why is epic not casting constantly then?
hard references can be bad
it depends on the use case
but a car that only a player can interact with
it's most likely fine to cast
plus they cast constantly
so idk where that comes from
and hard references are never bad if you use proper base classes. the most you're loading is kilobytes
at that point who cares
hard refs are bad when those hard refs have dependencies on assets
because then they get loaded
example of a bad hard reference, an entire datatable of images
so i'll just set my character to my bp_character in the interface and call it a day? so i don't have to constantly add cast nodes
so you load idk, 3 gigs into memory at once, because before that the images were not loaded
why
interfaces are only ever for class agnostic behaviour
you know your character will be loaded, and will always be a character
so just cast to it
you're actually making things worse with an interface
I mean, maybe he has an interact system based on an interface
plus having a hard ref in an interface defeats the whole purpose of the interface
so he just sends the message to the actor in view
and the actor handles the logic
I think that is probably what he means
generalize the interface as just sending self as an actor in the message and cast in the actual car is my opinion in this case
ye my interaction is in the interface
okay thanks
its working now, thanks man
I have a sphere trace setup during a notify state in an animation montage to deal damage.
How do I prevent this damage from being dealt multiple times if it connects?
either do once, or keep track of all the things already hit and check against the array
depends what you meant with the question
What can I clarify?
what multiple times means
do u mean only the first hit should be affected
or each enemy once
Only the first hit.
let me clarify, only the first enemy hit being dealt damage and nothing else
or each enemy only taking damage once
It is a melee attack, I want it to deal damage on the first hit and not again during the notify state. It will only ever deal damage to the player, so just on the very first hit, no need to look at multiple enemies.
you can do that with a do once
and each time the player attacks u execute the reset
in a notify state I don't think u even need to reset
but unsure on that
How would you use the "do once" in the notify state, as it is still hitting multiple times even with a "do once".
a simple boolean would work too
that sounds impossible
I tried this but in a notify state I can't set variables.
So it checks the boolean (lets call it damageDealt) before dealing damage, if damageDealt is false it Applies Damage then sets damageDealt to true, preventing further damage. How do you set it back to false once the animation is finished?
fair, you can just handle it on the character instead
I have it like that with AGR
just calls these events and I can handle it on the character instead of inside the notify state
that way I can have variables
example
Man, that lost me. I'll have to look into what those are.
Thanks for the help though.
I mean
you create your own events
and just call them from the notify state
on received notify begin, you'd get your character and call "begin attack" or similar
which resets all variables
Hello helping heroes, I have some levels, and I store the record completion times in a struct. I have much more levels, is this the best way to do it? or is there a easier way because I have much more levels?
on tick you'd check for hits, once a hit occurs you again call an event on the character that you made
like "On hit" or so
which then sets variables, deals damage bla bla
so that event would have the do once / boolean
use a map variable
confusing in this context
but just like a "Mapname" to Time map
something like this
that would allow you to easily work with it
Hey anyone know how to copy events or rather call a reference to them in a different event graph?
I need to use event tick twice for the same blueprint. (I know there is a sequence node I want to known if theirs other ways of doing it also though)
sequence or just call other events
think about it
you double the event
who gets to go first?
how is that determined?
bla bla bla
why bother when you can just make separate events on your own
Fair nuff yeah I was trying to see if there is another way to arrange that at least without using the sequence node ๐
But yeah that makes sense it probably would cause an error now that I am thinking about it, tru tru
Got it sorted. I used the basic montage notify and a tick loop within the class itself rather than within the notify state.
Thanks for the help!
rehashing this question
what does it do instead
launches me in the same direction as the other side (back into the wall) despite being the negative right vector * -1 * 1500
it's probably not -1 that you're after
but that is an area I am always unsure with
imo -1 should do it
Instead of negate vector just multiply by a negative number.
i used negate vector
that didnt work either
it should just be multiplication times -1
if unsure, just draw debug arrows
that way you can verify
flip it, then choose that as the start point
then add like 500 to it
and use that as the end
and you will see how the vector goes
I see it
he never adds anything
just multiplies
it has no right to work
@granite summit
how do i get all components of a static mesh?
flip and then add an amount
don't multiply
https://forums.unrealengine.com/t/how-do-i-launch-a-character-in-a-direction-relative-to-them/429505
So if the wall is on the left side you would launch in the right vector direction. (Right direction * strength) if the wall is on the right then it would be right vector * -strength. If this doesn't work it's most likely the branches you use to determine the left or right side.
wanted to organize Manager BPs that are instantiated in custom GameMode class, instead of putting that code directly in the Event Graph of the GameMode.
But these Manager BPs i have currently as inheriting from UObject. I previously had them inheriting from AActor but they need no transforms etc it seems overkill.
so i switched to UObject. But how do I "spawn" these UObject inherited BPs in the GameMode? i only see SpawnActor
yeah, patty is right
I think there's a get children node that works on actors.
Construct object.
is there a way to print a tab in a print to string node? ๐ค \t doesn't work ๐ค
As far as I know print string is single line only.
just use print text
you can even format it
print string is quick and dirty, text is nice
I didn't even know print text was a thing lol. Learn something new every day.
text can do tabs? ๐
we take those
text has the "format text" node too, waaaay better than append
ok
Hey guys, noob here
why can`t I split the event tick to feed both branches?
Hold "S" and click on graph for a Sequence
Why not just use input events though...
probably because searching for them is a pain in the ass
thank you!
it worked
Input events, not keyboard events
actually this is another question
if they're learning the basics
maybe just starting out like that is fine lol
since enhanced input is sooo user friendly especially for new people :)
It is, that's why they gave you sample templates with it set up :P
in Unity, (old input system) we have GetKeyDown and GetKey that can be used to read inputs
In Unreal I am trying to understand how it works.
First I noticed that we have an Enable Input that can be called and why do I need it when I can read directly as I have done above?
hmm cool... why?
Well checking on tick has the downside of checking on tick, rather than the input system which is platform agnostic input messages.
Enable input is also a cheap workaround when you should be receiving input in the player controller and routing it where it needs to go
An added bonus with enhanced input is checking if a key was pressed, held, released, modified, etc. Is done for you. And you get the bonus that you can remap your controls in settings
And that's basically free accessibility
a downside is modifier keys
since with enhanced input, they removed easy access to those
but that's more about the previous input system we had
oh hold on, there is a lot of new terms here.
enhanced input is a new kind of system that Unreal is providing to solve inputs?
Yes
yeah, it's introduced since 5.0 or so
okay
It's the unreal engine 5 successor to the legacy input system that was in the project settinfs
okay, now I have a lot of questions
reading input directly inside an Actor class is a bad practice? inputs should always be read inside the Player Controller?
no
it's not bad practice
I mean, reading inputs directly inside a character class
for example movement, you would do that in the character
UI stuff, you might move to the player controller and so on
Input should be handled in the player controller or character yes, having random world actors handle input is bad practice
hmm seems like reading inputs inside the Player Controller and sending them to the character is a good organized way of solving
now the other question is
no it is not
oh
just read them directly in the character
instead of going a roundabout way
the character needs to be possessed to read inputs
which unreal handles for you automatically anyways in the gamemode
perfect, this is the point I was heading into
in case of a multiplayer game
when I read the inputs inside the character, how do I bind the player inputs to the character?
possess it
interesting
in my case
I spawn the characters
take the player array and make them possess the characters
out of the box, it will automatically find a playerspawn and spawn the selected character in the gamemode and possess it
a list of characters full of capabilities that can be possessed by Players and AI
you pick one available and possess, binding a player to a character
yes
perfect
you can have it be possessed by ai by default
the moment you possess it with a player it kicks the ai out
if tha Player Controller is not reading input but the Character, what kind of code do we put inside the Player Controller?
the player controller always reads inputs
as long as they're enabled
you can have both the character and the player controller receive inputs at the same time
that way you can have movement in the character and UI in the controller for example
got it
if I want to open a chest in my game for example, instead of reading input "E" in the blueprint or C++, I do program it inside the Character to project a ray, get the object, check if is an Interacteble Interface or something and then call the interaction. I suppose
yes
and now about this nem enhanced input, what it enabled that is better than the normal input ?
well, in reality, you get press, hold and release out of the box
in all honesty, it is a controversial system
since it is simply not ready, somewhat poorly written as well
but it's what we got now
the other one is deprecated
it's not really nice to work with
does one of the default sample projects include level switching?
like with sublevels and a preferred architecture for what should control what and in what way for the Blueprints
i see lots of tutorials on level switching but they seem to just address it in isolation and not in a more complex context.
im mostly concerned about proper design architecture and not the ins and outs of the connections per se
Is there anyway to covert a Vector to a Int or Float or Byte ??
im trying to use a branch statment that says if this objects scale = 0 then deactive this niagra system
im kinda new to blueprints so not the best
split it and check if any of the values are 0
right click on the vector pin to split
there is a screenshot right here
matrix?
mb wrong thing
I'm a bit flabbergasted
try to copy paste that get node
that doesn't give you the option
it's probably because it is connected to things
yeah, that was it
weird it doesn't give u a greyed out option when it is still connected
swear it does that
yeah is strange
yup
as long as that scale value actually gets updated
and reaches 0
this will work
you might want to check for <= 0 instead
if it keeps going into the negatives and might skip 0
it wont go neg
#sequencer message
BP could be related with this anyone could help??
Got it, for anybody in the future, this is how to rotate around 2 relative components, in my case control rotation and the camera rotation in relation to that (the blue nodes are quaternions)
ripped straight out of the playercameramanager limitviewrotations and scenecomponent add relative rotation, if anybody needs source reference
since this is control rotation for me, and it goes 0-360, if you use something that goes from -180 to 180 use a clamp axis node beforehand to convert it to 0-360
Anyone know why a player character spawns in random directions when it's spawn transform is set to the player start?
I believe control rotation of the controller possessing it can impact the orientation.
Currently I have it setting the rotation of the controller which spawns first to the rotation of the player start, then I orient the pawn rotation to it on it's spawn.
Hey guys, so, I'm making a dialog system, and I want that when you start the conversation, your camera slowly rotates facing the npc character, but I have no idea what function I should use to do that, I'm using the default first person character from the template and the npc blueprint should move the player's camera or player itself to rotate it in the right way
I tried a lot of stuff, nothing worked properly
Pretty sure you can do this by adding a camera to your NPC and position it where you want the camera to be when the player is talking to them. When you start the conversation you can use the "Set View Target with Blend" node which can automatically transition the camera for you from your current view target camera (The one on your character). When finished, you set the view target back to your character using the same node.
@verbal igloo
Alternatively, I believe you could define a location/rotation on the NPC via a SceneComponent as where you want your camera to be, and you'd also need to define the camera location similarly on your character. When you start the conversaion, you'd need to finterpto your camera location/rotation to the NPC's scene component world location/rotation and back again to your character when finished.
I have a thing in my character BP that changes the camera boom's length when a button is triggered. Now I want to animate it such that the camera moves smoothly from one boom length to another. How can I do this? Should it be in the ABP or in the BP itself?
Use whatever event to set a "Target Boom Length" variable.
Event Tick > Finterpto your "Current Boom Length" to the "Target Boom Length"
I feel like I'm missing something...
You need to keep a separate variable for the target arm length that's not associated to the Camera Boom. This is the one you change on the input event.
The "Current" value of the FinterpTo needs to be the current value of the camera boom's target arm length.
The "Target" needs to be the variable that you created.
You would then Set the Target Arm Length of the Camera Boom to the return value from the FinterpTo
why can he do that but i cant
Game mode is not of type character
The variable points multi exist within your bo character class but you are trying to plugin game mode as the target
You get a ref of your bp runner character
how do i do that? im new on this sorry
Like this? The transition still isn't smooth, it looks the same as without the FInterpTo (Boom Length here is the target length, 300)
Set Boom Length on the inputs.
"Current" on the FinterpTo needs to be reading "Target Arm Length" from the Camera boom.
On Event tick Set Target Arm Length on the Camera Boom to the return value of the FinterpTo
If you're doing the same as this other person, you would've created a "Points Multi" variable in the Game Mode. If you did that, you would need to drag off from the "As BP Runner Game Mode" pin on the cast node and then type "Points Multi" and it should give you the correct connection.
the variable i have created is in bp_runnercharacter, and is an integer, is that the same?
ima create one of those in the gamemode anyway but
well i just tried that but it didnt work
ohhh, ok now I got it! I also missed the interp speed, it was way too high. Thanks a lot :)
yeah but I can't rotate just the camera for some reason, probably because it's attached to the player, and the camera needs to rotate and focus on the npc slowly
not just attach to it
anyone knows how can I rotate the camera in a cinematic way using lerp?
do I have to deattach it from the player?
i think everything looks fine but when i run and stop the the character is stuck at a run pose
The StopDistance looks fishy
Is that a relative location or world? Cause if World, then you are just getting the distance from 0,0,0 to that point. You'd need to subtract your character location from it first
idk how this node calculates it it's from locomotion animation library plugin
let me see if i can peak c++ for that node
FVector UAnimCharacterMovementLibrary::PredictGroundMovementStopLocation(const FVector& Velocity,
bool bUseSeparateBrakingFriction, float BrakingFriction, float GroundFriction, float BrakingFrictionFactor, float BrakingDecelerationWalking)
{
FVector PredictedStopLocation = FVector::ZeroVector;
float ActualBrakingFriction = (bUseSeparateBrakingFriction ? BrakingFriction : GroundFriction);
const float FrictionFactor = FMath::Max(0.f, BrakingFrictionFactor);
ActualBrakingFriction = FMath::Max(0.f, ActualBrakingFriction * FrictionFactor);
float BrakingDeceleration = FMath::Max(0.f, BrakingDecelerationWalking);
const FVector Velocity2D = Velocity * FVector(1.f, 1.f, 0.f);
FVector VelocityDir2D;
float Speed2D;
Velocity2D.ToDirectionAndLength(VelocityDir2D, Speed2D);
const float Divisor = ActualBrakingFriction * Speed2D + BrakingDeceleration;
if (Divisor > 0.f)
{
const float TimeToStop = Speed2D / Divisor;
PredictedStopLocation = Velocity2D * TimeToStop + 0.5f * ((-ActualBrakingFriction) * Velocity2D - BrakingDeceleration * VelocityDir2D) * TimeToStop * TimeToStop;
}
return PredictedStopLocation;
}
yea
i'm only getting the length
atm the animation is not playing
it's just stuck on previous anim pose
i think it's something to with the animation but if i can log messages from anim states
how do i check if the return value is null in bp?
Good morning guys, I am creating this function to grab items pressing E and also adding a PhysicConstraint in the capsule component. My item has simulate physic activate and with a mass of 30kg it fly away when I press E, any ideas what could be wrong with the physics please ?
30 kg donut 
How can I get the max screen resolution of a player?
#blueprint message
There technically is no max.
There is a node for getting supported full screen resolutions.
so I have an actor and trying to trigger a linetracebychannel on the actor in the anim state noftfiy but its not working. However when I put the code in the character it works.... the code meaning the line tracebychannel code
is the the wrong way to cast an actor
on the animnotify?
I mean max screen resolution for the player's PC. Not possible?
If you're running windowed, you can set the resolution larger than any single monitor resolution.
Full screen is different in that it will need to run on a single monitor.
So you can get the full screen supported resolutions, and loop through them to find the largest of the available resolutions.
haha if I do normal weight it fly away sooooo hard (characrer is very little :p)
Ive got these cube actors that just move side to side. When i drag them in, press play, it works. But if i spawn them. They stand idley still, despite the fact print string says its going through the move forward code fine.
Is your project networked? if so, you need to read up on how replication works, make sure the actor is set to replicate
Its not a multiplayer game
When do you guys use Sets over Arrays? For me, I find the only useful thing about sets is the uniqueness of elements, but then you can just force arrays to be unique with 'addunique' node
Then you need to provide a lot more information on how you've set your cubes to move. 'Print String says its going through the code' isn't enough to validate your code is good enough / working as intended
Best practice when asking questions which can be complicated is to print-snip a snippet of the code that's relevant to your question
It says it goes through this fine, but it just doesnt move.
I generally only use sets when I need to use the set functions to compare against other sets, like Union, Difference, Intersection. Basically converting arrays to sets then doing the comparisons.
@hushed topaz
It works fine when you press play, but if you spawn one in midgame they just dont move.
That's a good shout actually, didnt know they had that functionality
Not sure, Ive only used movement input for player controlled actors.
If you are spawning one you need to check what controller is possessing it. Not sure if you need to get into AI and add a simple Behaviour Tree for 'MoveTo' tasks.
Adding movement input only routes to the controller class (maybe playercontroller) and asks it to tell the CMC (Character Movement Component) to move it
Depending on your use case, you may be better off forcing actor movement
But shouldnt it spawn with the same controller as if i were to drag one into the scene then press play?
I tried ticking force before, didnt change anythin
There is a setting on pawns:
Yep! That was it. I remembered doing something like that similar years ago but couldnt remember what it was called. Thanks!
No. Very likely you are possessing it with your default playercontroller class. Check the setting Datura snipped.
Hi all! Total beginner. I'm trying to mess with blueprints and just trying to understand stuff. Why is it that I can use Event ActorBeginCursorOver from an Actor blueprint, but not an ActorComponent blueprint? Am I misunderstanding the purpose of ActorComponent? I essentially just want to make an ActorComponent that I can add to any actor to have that specific behavior (in this case, I just want to print a debug string on hover). If I'm misunderstanding, what should I be using to achieve a similar behavior? Thanks!
Because an Actor Component isn't the same thing as an Actor. What you can do is get the owner of the component (which will be an actor) and bind to the ActorBeginCurosrOver event dispatcher, and then you'll be able to access when the actor is moused over from within your component.
build the static lighting
main menu => build => build lighting only
the preview text is to inform you that the light may not represent the final result
It'd look something like this - which if the actor has this component, will print the actor's name as it appears in the outliner when the mouse gets hovered over the actor.
Thank you! That worked! I had to fumble around with the event binding (had no idea what it was) but it still wouldn't work. Your screenshot helped (Had to start from Event Begin Play). Thanks so much! That opens up a lot for me to continue with ๐
how do i see the current speed of my character? i want to see if my walk/run toggle thing is working properly
If you are using character movement component. Get the comp->get velocity
hi, I'm using a add controller yaw imput associated to a button allowing a utrun by 45 degrees angles but i's like the rotation to be slower
Is it better to go with singlelintraceby channel for sword collosion or just use collision spheres ?
What can I use to slow down rotation / yaw ?
change the rotation rate in the character movement component
or interpolate to your target manually
@spark steppe ok, i'll try. The first solution would work with this ?
Can you hide unused pins ?
SHould unit vector ever give me this return? I was under the impression that unit vector means a value of 1 always? something I'm not understanding here
lenght is 1, shouldn't this be -0.5,0.5,0 though?
It is a vector 1 unit away from 0,0, or a point on a circle
yours is on a 45ยฐ, so it would look like this
the red arrow is up .707 and over .707
is there a "reverse sequence" node in blueprints? to avoid this kind of thing?
something that takes a bunch of execs as input, outputs a single exec
thats it
what would i set as the object for this blueprint? ive tried googline like blueprint communication but cant find anything of use
the first photo is the collectible, the second one is the like target goal blueprint
this happening when i set brush from texture
You need to have an object of ScoreCompletion somewhere to parse an object and attempt to cast to it, what is ScoreCompletion though? tally? gameoverscore?
If it's a PlayerScore you could store it in your PlayerState, then get player state->get ScoreCompletion, and if it's ScoreCompletion you won't need to do a cast, just do a IsValid?
your PlayerState will need a cast to your custom PlayerState though
scorecompletion is a blueprint which will, at the minute, make a health bar appear when the totalscore variable hits 5 but when i actually get it to show, itll show an indicator that all the collectibles in the level are collected
right, it's a 3 ๐ candy crush tester ?
you'll have to attach it to an actor/object, since it's a Score thing, you should probably put it on PlayerState if you want it to store and be used in different levels
if it's completely temporary and has no purpose after you click [Next]/[Main Menu] you could just make one on your Character, and call it locally
anything Not 0 == true
ive just put it into the collectible and called it, and it works
why your lines so nice 
also, what would i need to do to make a ui element appear on screen on play? one that doesnt let the player move or anything
make a hud that covers the screen +5% or so, with a button to collapse it when you want them to go, but change the Input to GameMode
Electric nodes plugin
drat
Try Select
ive got a basic menu, i just dont know what to from the actual blueprint side of stuff
Hello, if I create a c++ UObject class and add that as a c++ blueprint variable to an actor. Why can't I edit the properties?
UENUM()
enum class NpcFriendlyType : uint8
{
Visitor UMETA(DisplayName = "Visitor"),
DeskClerk UMETA(DisplayName = "DeskClerk"),
Nurse UMETA(DisplayName = "Nurse"),
Doctor UMETA(DisplayName = "Doctor"),
};
UCLASS(BlueprintType)
class HOSPITAL_API UNpcFriendlyStatus : public UObject
{
GENERATED_BODY()
public:
UNpcFriendlyStatus();
UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
NpcFriendlyType NpcType = NpcFriendlyType::Visitor;
NpcType here is visible but I can't edit it in the editor. (it's grayed out)
throw this after you add to viewport
and make sure you have something that's covering the entire screen behind your buttons that is set to visible, it can be 100% transparent or high transparent so players can see behind it but know it's obscuring their screen to block inputs
border/image
if you search for visi, and visibillity is not set to visible, you won't block click/mouse inputs
get player controller
sorry for asking a lot of questions
still very very new to blue[pritns and unreal lol
UENUM(BlueprintType) and change UPROPERTY(VIsibleAnywhere) to UPROPERTY(EditAnywhere)
i got it lol, needed to get player state
are you doing UI in PlayerState instead of PlayerController ?
you're doing it in GameMode ?
It's unconventional
you can do it anywhere if you want to call all the right places to force connections
wheres the best place to do it
but PlayerController is the place it's usually done
or most ideal
since it's the Input hub
There is a HUD class you can use from the PlayerController, but that's when you make your own HUD object and PlayerController objects
ok
i usually let HUD to handle all UI
since it acts as a hub to manage all the viewport elements
that's what I've been doing since 5.2, using HUD class
ThirdPerson template uses Character lol
not exactly what I wnated.. just like a node to merge a bunch of Execs
Hi guys, I am using a BP called Good Sky that I really like it. I am trying to be able to change its properties through BP, is there any action that makes this function? the only one I found is add child actor and I don't really know how to use/dont think it could be used for this purpose.
That's basically just a reroute node or conneting all the pins into one exec.
to keep things simple ๐
I see yes, it works I know. I was just wondering if there was a proper node
how would i make a cursor be visible?
input mode UI
since you don't want them clicking on the game
I think it disables key/controller inputs iirc
oh, show cursor sorry
PlayerController->bShouldShowCursor
^
Ok
so ive made the variable, set the default value to true and it doesnt show, do i need to reference it anywhere?
thats showmousecursor or shouldshowcursor, thats where i got confused
sorted now tho, thanks
i cant find the event for when the button is clicked, like, i searched click, clicked, press, pressed, etc, nothing shows that would be of use
in your Widget, touch the button, all it's events are there for you to add what you want
Widget buttons won't show those events unless the button is marked as a variable up at the top right for some reason.
ah ok
button should default variable though
Doesn't do it in mine for some reason (5.2.1) seen others struggling to find the events too and that was the cause.
weird
Yeah earlier versions I know it always had them there.
why does this blueprint function library always go trough the return node, although i have a branch inside?
even if its true it returns
ok so i tried doing a thing, tried removing a widget, ive got the blueprint in mainmenu_widget but it doesnt remove the button and the title
On the outside of a function , the return Exec will always fire
but i dont wanna use a function inside, i want to call this on every actor
Functions don't just stand around waiting forever. Once there is nothing left to execute, they're done.
w/e widget has the things you want to hide, you have to store it not just add it to the viewport, so you can call it later to go away/show, if you have the [continue] button in the widget, make the root of it a variable too, so you can grab it to Set Visibility(Collapsed)
you can Drag the a line from to red Return Value pin to the purple Return Node text
that will add a bool pin on the outside of your function that you can Branch off of
Hey. Don't know where to ask this but what alternative can i use for use controller rotation? If i use it root motion won't rotate my character properly
if your animation is using root motion and it breaks your capsule you might have an #animation problem you need resolved
Well i've been scratching my head for 8 hours to figure out why my root motion only moves the translation. Now i released control rotation yaw and it rotates properly too. So animation should be all good
So now i have to change my controls to rotate the character with the camera, something instead of controller rotation
it wasn't if i was using controller rotation. it was only moving character translation
im confused lol
Hello guys, in this quick and simple tutorial we are going to learn how to make a simple pause menu in Unreal Engine 5
โช๏ธCheck out awesome Unreal Engine courses: https://bit.ly/GorkaGamesWingfoxCombat
Options Menu Tutorial: https://www.youtube.com/watch?v=jkX1A0K5Og8&t=1105s
Main Menu Tutorial: https://www.youtube.com/watch?v=zWI-36fIoDQ&t=2s
...
i want both the title and button to go away and fuck off, would remove widget not do that?
the root motion yes. but now i'm losing the control for the character to follow camera rotation, when not playing animation
you have to enable bCanfuckoff
Why do these look like 90s web buttons? ๐ฆ
I didn't make it
It's more rhetorical!
Thanks for the help! ๐
Figured it out. Just had to use a bool before & after montage
bUseContRot = false and bUseContRot = true before and after?
yes
just sounds like your anima BP is wrong
in which way?
you should haven't to turn useContRota on/off, just cause of an animation
but #animation would be able to diagnose your issue better
Hi guys, I am developing right now with small team game which is based of world of warcraft arena gameplay. Problem is I can't set collision from unique ability to hit ONLY the target I am selecting
Do you have any idea how can I do it cause there will be few enemies and few allies in game and I don't want to allow to intercept abilities sent in one enemy by another(talking about projectiles)?
the power always goes through, i don't think you can "stop" it
in general with programming functions usually return something in every path, even if it's undefined
How can I make an editable textbox trigger a boolean if a certain word is input?
use ===
Compare the word
Change collision so it overlaps. Set target actor as a property within the projectile and when an overlap occurs, check if Other Actor == Target Actor, and then you can destroy and apply the damage to the target.
Can you give me some documentation about this one?
hey there, I'm completely stuck getting the default character to move. The character takes input (at least it prints the correct values) and I can move the camera but the character won't move at all. Would anyone be able to quickly hop into a voice channel with me to help me out?
Is this alright so far? I don't know what to put for the B option in the ===. I only started yesterday
probably make literal, and check against the text you want to match
as far as the cast goes, you'll have to figure out how to get the rifle, maybe with a variable you saved a reference
is your camera in the character ?
yeah it's all part of one actor
when you move, how do you do that ?
I just restarted the engine and now am getting error's from the animation blueprint ๐ฌ
I use the add movement input function
or node i guess
you set your character as default pawn in override ?
because floating around the camera is the default
in the game mode you mean? I see the character and it rotates as desired
Thanks
and your movement inputs are firing ?
yeah
hmm, if it's set to default pawn class in the override it should be working
but you could also show the movement code to see if someone sees a problem
I copied the movement from the default third person bp
well if your movement isn't working, it's probably not possessed
or your inputs are f'd but you said they are firing
Guys I have this interaction blueprint code in my TopDownController which basically allows me to invoke interact on interactable objects. One such object is a door and it just changes rotation on it to mimic opening and closing it. For some reason it doesn't work, when I run up to it and stand in its box collision and click e, nothing happens. Any ideas?
can anyone suggest me any channel for blueprints
did you copy the part on begin play where it add context ?
I'm so confused. How can I change the variable of a different blueprint?
yeah it's weird, maybe my actor is fucked... After restarting the engine the character mesh is empty in the details panel
oh no, what version ?
5.3
is your details panel empty ?
there's no onbeginplay in the third person character bp ๐ค
yeah
i'm pretty sure there is, where it adds the mapping context
i'll quickly redo the actor maybe it fixes stuff
if you didn't add this part, it won't work
you need to select the mapping context to use for enhanced input
but you said the inputs are firing, so i'm guessing it's in there
Get a reference to the instance u r trying to change
without the context tho ๐
How can I do that again
did you just use action mapping ?
It looks like everything is correct what I did but it just doesn't work, the door implements the interface and everything but when it makes the check if door implements the interface it doesn't trigger :/
By getting ref, there are many ways to do it, how you get it, depends on case basis.
Eg when overlapping, or passing down ref to an actor etc etc.
Watch blueprint live communication pinned in this channel if you struggle with referencing
if by that you mean just getting the input events that i set up in the project input settings then yes
ya, not enhanced input, so you don't need the context
I try to print overlapped element, but it shows nothing
alright thanks ๐ Now I have a bunch of other stuff to figure out but I'll try to resolve that on my own first
Then it overlap nothing. Check your collision channel and setting
To begin with I don't see any collision for the actor
Add collision component like a box or w.e
Your ability projectile don't seems to have any collision
ability root have collision
Well I don't know that
If u don't get overlap event it doesn't collife
Type show collision in pie
And check if there is an actual collision for the projectile
Hi is there any one could help me about online replication on my project? i am having a problem with spawning a inventory actor out of the inventory in client it spawns but i doesnt show up on server but in server it works well i couldnt figure it out for like 6 hours :/
What? Sorry I haven't understood this one. I am new to ue5(working for two weeks)
Show the collision for your projectile
Visually
Most of the spawn should be done on server side , don't multicast
yeah but it doesnt work when i make it in only server also
U only spawn on client for things that u want only the client to see. Eg cosmetic or ui sound
I am idiot, now it shows everything
It was unchecked XD
Well I'm not saying that's Ur entire problem but your spawning already a red flag
then where should i spawn it like maybe player controller?
Works now?
Yeah
Where you call it doesn't matter functionality wise. But when it comes to rpc, you can only invoke rpc from objects you owned. Eg player controller or player pawn. #multiplayer for more direction
Why does this not work in topdowncontroller but works in topdowncharacter class?
A controller doesn't "Overlap" Anything
because the target is self on get overlapping actors
plug Get Player Character in the Target of Get Overlapped actors
In the end I made it something like this
Ah thanks guys! Another question, this piece of code belongs more in the controller class and not character class right?
Cause I have already event on hit and applying damage to character
If you want this code to be independent from the character the player is controlling, sure.
hi, I would like to create tables, what is the best way?
Data or Dinning ?
My events in my animation play 4 times everytime the occur - i tried both Play Sound and a custom notify that simply prints a string, and both seem to play 4 times.
What could cause this? Can it my my animation blueprint somehow, or the locomotion? When i preview the animation, it seems fine and does not seem to fire multiple times.
the notify is firing four times ?
so the animation is running four times ?
or you have four triggers
?
it's always good to post some code as well, probably where it fires 4 times, and how you call it
So i was trying to implement Play Sound for the footstep during the walk animation, right now I only have one notify in that animation clip - and that specific notify seems to fire 4 times
I'll send a screenshot, give me a second
This is how my notify is setup
Could have either been in a loop, or you have four copies of the blueprint doing that
Show us the blueprint where it calls the animation.
The walk animation is part of a blend space, inside the walk state.
Here is the blend space for walk
Is it possible that the transition towards the Walk state is somehow called multiple times so there are multiple instances of that state running each frame?
I think I've found the issue.. I am using the same ABP for different parts of the characters body, so no wonder this behaviour occurs. Thanks.
Yep so itโs the multiple copies of the blueprint
Yeah, makes total sense in hindsight. ๐
Pass it on, we all learn from mistakes. It happened to me before, thatโs how I know. ๐
Yeah very true. Switched over from Unity to Unreal amidst all the chaos that happened in September, so these things tend to happen quite a bit atm
Yo folks! Im struggling a little bit with camera blending and possessing different pawns. For example I have 2 pawns: A and B. I want to blend from A to B, wait 2 secs, and come back to B (A->B->A). As you can see on the video, the second blend is not smooth (camera "jumps" at the end). Do you know how can I fix that? I prepared the most basic setup to repro this issue. I was playing around with "Lock outgoing" but it doesn't help at all.
Is your input still moving the pawns? try Unpossess>ViewBlend>Delay1>ViewBlend>Delay2>Possess
I am trying to make a pickup system with BP Interfaces but i don't know why it doesn't work. The first image is the linetracing function that i made in the character bp and the second image was made in my PickUp Base BP. Someone knows what i missed?
Unpossess completely brokes blending from A->B. I added "StopMovementImmedately" and "DisapleInput" when overlapping but it doesnt work as well. Still have jump on the end,
hmm, what if you unhook after 2nd Set View Blend ?
is the branch going to false ? are you getting a blocking hit ?
What do you mean by unhook? If you mean blend without possesion, it works
the white Exec lines
I did it and jump is not noticeable at all now. So basically "jump" is connected directly with repossesion A pawn
If i press F (my keybind) there should a message pop up (Successful) but it doesn't
the first thing i would check is the line trace, make sure your getting a blocking hit
and you can even draw debug to check where it's going
so the first interact function isn't firing the line trace ? when do you try to run it ?
you can see it in the second image
right after i press F it should fire
so put a print string on that triggered
and a print string comming out o interact ?
can I generate random integers within specified range using strings as a seed? Needs to be deterministic
I'm trying Random Stream but it only accepts Integer seed
You can use that to convert your string to an int then create your stream from the int.
But my strings are composed of letters, will this work?
Eh.. That doesn't seem to do much of anything actually lol
I need to somehow hash it, deterministically
Well, there's a plugin called Low Entry Extended Standard Library that gives you a few a node that'll let you convert the string to bytes. Those bytes could then be converted to an int32 which you can use to create your stream.
Otherwise, you'd have to to work with the string and manually convert each character to a value
Actually I'm not too sure about that either... They all seem to want a specific encoding scheme
This one should do it I believe... It's encoding the string into UTF-8 by its description.
Well, the bytes are just an intermediate state. It gives you an array of bytes which can be converted to an integer value.
"Up to the first 4 bytes in the array will be used for the conversion."
not reliable then, I should probably loop over them
Which is fine as int32 = 4 bytes.
So if you hash it, you can guarantee at least 4 bytes will be generated which can then be used to create the stream. So you'd still end up with 4.2 billion starting points for your stream.
How do i spawn on one by one (on loop) and on timer from here? ๐ฆ
you want them to spawn one after another, but not all at once, at a spaced out time ?
one guess would be to put a delay based on the index * WaitAmount
probably not the best, i'm still new to unreal might be better solutions
A little bit confused by this error message that pops up when using an interface event in the child of a parent that has the interface implemented:
Cannot override 'BPI_ContextualActions_C::Harvest' at Event Harvest which was declared in a parent with a different signature
It seems to happen when I add an input variable to the interface event
Ah I see. After adding the specific event to the parent blueprint, the error disappears. I am not entirely sure why (which scared me slightly), but for now I can continue on
You can only add variables to interface nodes when you are in the interface itself
If you add variables in the implemented side , you're going to have a bad time.
Oh yea for sure. I should have been more clear and say that I added the variable in the interface itself, not on the implementation side ๐
so I have a question
gotcha
so I reparented my first person character bp by mistake and undoing broke a lot
one that I can't figure out is it made the entire thing invisible in editor does anyone know how to fix that?
it's invisible for me too because I can't see your screen
truee lemme snap a pic
Yea you are going to have to reparent it to something else, and then parent it back to the base parent whatever it was
I checked, after parenting it back to something else, you have to reparent it to the "Character" class. That will fix it
This has been an issue since like UE4.8 from what I can remember ๐
No worries ๐
didn't seem to work unfortunately
I can get the model to show up in game but the movement is busted
Yea you are going to have to reset your movement variables to whatever they were before. That stuff doesn't save when it breaks like this
Yea it sucks. Generally speaking this is the reason why we try to avoid CRTL+Z too many times in a row, or when going back to a previous parent ๐
well I know for the future now! Thanks again
weird question , im trying to load a random level by name , and then removing that level name from the index to avoid repetition , so when testing with print string only , everything works fine , but once i use the node "load level by name " , the remove index doesnt work , any fix or work around ?
Dunno how you're doing it, but you could try running a check until the level is loaded, then remove the index on true
Otherwise maybe something like
Make an array for all the levels (Dunno if you can remove index from things like enums)
Shuffle array
Get index 0
-> set a text variable with it
Then remove the index, load level based on text variable
Anything after the "Load Level By Name" node can be thought to not happen.
The array itself would need to be contained on the Game Instance, and you'd have to promote the name to a variable and then remove it from the array, then use the variable to open the level.
ill send u a pic
im removing the index before the level is loaded this way nothing is after the load level node , yet remove index still doesnt work for some reason
What happens when you use Remove Item instead of Remove index?
when are you calling the initial event ? what kind of bp is this ?
Are you re- initinalize random level array the array before checking to see if Index got removed?
It might be removed , then you reset array
Unless you save the BG levels list somewhere...
loading a level resets a lot of stuff
everything but Game instance i think
nothing ig
call it in event begin play
so it's probably loading the level, re running that event, and creating the array over again
ignore the event on top , but at the bottom im trying to remove an index to avoid the level being loaded again
you can create an array in the game instance
which you can alter and it will persist across levels
so i should implement whats in the pic , in the game instance ?
makes sense , ill give it a try , thank u
well just the array part
make the array in the instance
and call it / change it whenever you want
aight , ill see how it goes
custom event
can someone explain in comprehensive term what is 'exclusive time' in the profiler
ok i get it sorry
well are you re initializing the array still ? or only when the game instance init ?
im initializing the array in game instance and call it in begin play of the game mode
and establishing it in game instance
array initialization is in a custom event
oh my bad champ , i completely forgot ur obviouse to use event init for the array , its working now , i deeply appreciate it
Anyone run into a problem where you use an interface, the message gets sent successfully yet variables don't change as they should?
The True and False get passed on via the interface successfully but the dang anim graph Get'r doesn't update. Any tips?
I'm using 5.3.1 since yesterday and it's just been a buggy mess ever since
Yes, the anim graph, where it receives the message, prints true and false as needed. It's the GET variable within the anim bp that's not actually updating. It's always false
I tried replacing it, tried a few things. It just seems like the engine is bugged (I've been using Unreal Engine since 4.6) Things are being strange, like groom assets aren't staying in place, I set a variable, compile and save and it forgets it.
And it crashes all the time now too
Well, almost 2 hours later update, I verified the files, restarted and it seemed to have "fixed" it.
how did you make the timer ? maybe set a variable and after the amount of time you can set it back. So if you press it and that variable is set then it can be used.
so dumb question
if I delete the print string, the entire thing only fires once then never again, any idea as to why? lol
@barren dove it's not set to looping, I don't see why it would fire multiple times in general
Or do you mean when triggering the set timer once more?
not how it works, the timer is a delay circuit for me to set rate of fire within
if I delete the print string block, the timer will only fire once and then never again and I Have no idea how it would be effecting anything
one sec
It shouldn't affect it
yet here is it doing exactly that
delete print string, compile, relaunch, machine guns no longer fire after the first shot
How is this all triggered?
I would suggest you breakpoint this stuff without the print string
You also don't have any errors after stopping to play or?
the weapon ready toggle appears to stop working even though its nowhere in the path of that print string
What is rate of fire set to?
900
im triyng to buli am trying to package my project but keep getting this error Failed. Failed to delete staging directory
okay for some reason the "60" in the division / rate of fire is reading as zero, even though its 60, if i replace it with an int that says 60, it works fine shrug
open task manager for windows and end any Unreal Engine processes. Usually this error means the game is still running even though it doesn't appear on screen.
i need help, like im on this for 4 days
i need HEEEELP
I wanna be able to click on something on the screen with my mouse cursor
so i did that raycast
problem: Not working
what are you doing here, multiplying anything by zero is zero
true enough, ive already changed that value thou
Do you see the line trace at all?
NO!
as a dumb suggestion
make a new topdown game tpye and steal the code from their mouseclick to move blueprint
iirc its not very complicated
that wouldnt work i guess
because im trying to click on a world
thats constatly rotating
and i have a child for that world
in a certain country
thats where i wanna click
yeah this is above my pay grade
so the coordinates are always changing for my clicking position
i dont like the Get World Rotation>Get Forward Vec
Try Camera>Get Actor Forward Vec
not sure if same thing
will try sir
try Line trace by chanel, i like that one better
i did that one
the problem was
it was colliding with something else
u see
my pawn is on a capsule
and we are looking throu a window
in space
and we see the world
add pawn to Ignore list
with the line trace by channel it was stopping
anything that you are hitting that you dont want , ignote
OR, dont Start your trace untill outside the window
you know its a lot easier to follow what you're saying when you dont break your thought into 20 lines
and things are passing by outside
ok
Why do a trace at all when you can do Get Hit Result Under Cursor?
and you want to click on trees and cow as they pas by ?
you can imagine that yes
xD
wheres camera ? first person ?
he could theoretically do a trace to the world then grab the nearest actor within a radius to that spot rather than having to snipe out a mesh with his mouse
camera is on my pawn inside the "train"
is basically attached to my pawn
can the camera move ?
nop
ahhh
it may be tracing
but you cant see it , because it is EXACTLY in your vision
can you try tracing , and jump out of game with.... f5? f8 ? one of those
yeah i wouldnt say ur right
but you have to be playing in Viewport
The trace as it is would be tracing from the camera's perspective forward, not from where the mouse is.
Literal float is literaly 0
i can change it, it wont change the outcome
i mean it changed
but
it doesnt pass to the world
watch this
LOOOOL
OK
ALSO
I THINK ITS BACKWARDS
x'D
just watch x'D
just dont be harsh with me, its my 1st unreal project for the university xD
we've been playing around with unity until now
glad to be on unreal finally
so the camera's rotation's forward vector
ehh, im not harsh, iv wasted way more time on simpler things
im not saying ur being harsh, im saying that im still a newb kinda xD
im good with 3d models but bps its my 1st time ^^
up until now it was always c#
and GDScript with Godot
Try Camera>Get Actor Forward Vec
delete Get world Rotation
and location stays correct?
yes
got it
ohhhhh that seems like a nice cheat code
it's not backwards, it's instantly hitting the spaceship and registering the "cube/spaceship" as the hit object
the green line is after the hit
it is backwards, the raycast should be FROM the ship TO the world
the line trace is starting from the spaceship and hitting the spaceship instantly, line traces do not stop
it turns green
(I'm color blind, didn't notice)
You can also tell that it can't be backwards because you aren't referencing the world anywhere. Only the camera.
thats true
yes line traces always draw the entire length, it just shows the red square where you "hit" something and the green is after the place you hit the thing.
but in the world it doesnt hit anything, i have to make so the line trace ignores the "spaceship" right?
yup!
hmmmmm
is there any option for thaat? xD
like a class
or smth
or turn off collision
would that work?
Actor to Ignore Array
yes you can add actors to the ignore array, or you can change the object type collision of the thing you want to hit, and then change the line trace to only hit that object type.
Alright my boys! Will try it!
Hello . I would like to know how to use the โActors Ignoreโ of the line trace. In fact, I want my character can see only my cupboard and ignores many actors โฆ Actually , he sees dynamic world, itโs include the cupboard of course but the halls and the lights too โฆ I explain more precisely , I canโt use the node โBreack it resultโ because light...
would this still work?
sorry guys i still have to search on how to do "simple things"
xD
do you want to hit anything inside the ship ?
ok, just start your trace outside the ship
and i want to click on that object children
cant do, the line trace is coming from the camera on my pawn, if i took em out of the ship we wouldnt see the ship
the same way you calc the End point , do that for start , but literal float is maybe 2000
How can i check if there's a return value in thread safe function?
do a breaking point
-ing
or print it
i can't use print string inside thread safe function
Is Valid
i'll try this
can't use this too
yeah just click F9 in the thread
i did, break on bp should work like vs right?
stoping the game when the line is called
in this case the node
if nothing happened try to do a breaking point in other place
let me try
because theres obviously something wrong before that
thats basically troubleshooting ^^
this is another fun that's in sync with the one above nothing happens here too
and these are only places i can add break points
did u try to "play the game" with the break points turned on?
yea
there's turn on and off fun?
Can i have any type of timer/timeline inside a function without calling custom events/functions from outside of the function?
me?
you said this was thread safe? If the blueprint is code running async/multi thread, then the default breakpoints won't work.
ohh
he is a lot more knowledgebale than i am so he is right xD
I was asking my own question :d
can you tell me how i can add one then?
take a ticket
or check if the the return value has a sequence in it
I liked the other one
so this node doesn't work for you?
(if any at all)

