#blueprint
1 messages ยท Page 318 of 1
when should this trigger ? is this your movement ?
it says actor deselected
so does it fire when you click on something else ?
put a print string of works, or hello tight at the beginning of that event
so you can see when it fires
No, the function doesn't work at all from the start, it works when I have "Draw Spline" turned off, and the character only moves along the cells in the grid I created.
as far as that event goes i would check when it fires off, and also check the branch if it's false or not
debugging usually helps
but i don't even see where you fire off this event so i don't know when it should be running
either way some print strings will help you see if it firing
this way you can see if it's the event not firing, or the branch going to false if it is running
the branch checks if the component has tag gridToMove which i'm guessing is how you setup your grid only click to work
as far as no on the print strings, i mean it does show whats going on but do whatever you like
maybe you can use debug as well see what is and isn't running
Thanks, I'll try.
if the event isn't firing you do one thing, if the branch isn't working you do another
it's just standard debugging
i prefer print string, but some people use the actual debugger and trace where things go
debugging is essential, its not so often the problem is obvious
hello for everyone
can i get some help regarding vfx?
when i dash i want to spawn a niagara system like a trail ,but i didnt succeed with this setup(i know the nodes are disconected)
why even when I set here any trace channel this trace is detecting literally everything on map?
should not it trace only picked one?
did you default destructible to block ?
if you want it to work on just one thing, default it to ignore, then set it to block on the thing your trying to hit
did it not spawn at all ? did you check 0,0,0 ?
i think the main issues is i cant understand how to set the Dash End Location
so i launch the character then set its end location ,but he already made the dash so first point cannot be identified or something
idk
i think of an idea maybe have a component that draws permanent a trail after player movement
but enable it when he makes a dash and disable when he does not
maybe justt guess the end
if your hardcoding the dash
then you can pretty much say its x or y length
just a bit of trial and error
possibly use velocity and direction of character
after you dash, you may be able to check velocity and calculate something using that
Maybe this could help? Have a predefined end distance, plug the start and end into this to get the desired launch velocity.
this would help with dash or with vfx?
hi, im trying to make a lazer tag minigame, i have this setup just using the weapon component but the line trace has an offset it dosnt ever shoot from the gun and i wasnt sure how to go about fixing that, ik its prolly something stupid but ๐ญ
๐ why did it crop the video
Both. You can pre calcuate the start and end which can be used by the VFX and the velocity you use for the launch.
Where you multiply the forward vector, you need to add this to the starting location to get the end location.
like this?
yea
it still seems slightly offset
because your not shooting from the gun, your shooting from the center of the camera
your whole gun is offset, is this the template ?
yea
right so if you notice the gun is offset, what are you doing with the trace is this supposed to be the shot ?
i tried using it from the gun and it started tracing behind the player
what are you shooting ? thats not a projectile ?
its setting scale of a cube, im not shooting anything
Were you hoping that the laser would be travelling to the hit location from the trace?
yes
Starting a trace off center is tricky as it results in a few problems. Tracing forward will never hit where the center of the screen as distance starts to be a factor.
You kinda have to do 2 traces. An initial trace from the center (what you currently have) to get the end location of the 2nd trace. The second trace can start from the end of the gun to the hit location of the first trace.
You can then add some additional things like rotating the gun to face the initial hit location as well.
Here's an image to indicate part of the problem if you're not manipulating the end point of your laser or rotating your gun so it aims at the target location from the camera.
Another issue is if you just change the end point of the laser, it'll look strange as the beam won't look like it's coming straight out of the gun.
The red line is the camera trace, the green line is the laser ๐
would of been nice if the gun in the template pointed at the center of the screen lol
It does at some point.
so, next step is another trace?
oh right, that makes sense it's just far out
Yea, something like this.
It's fine. Popular games have gotten away with shooting literally from the middle of the screen before.
how do i get the barrel location, where am i setting that at?
i have a scene component added to it, would getting the location of that work? or am i wrong lol
You'd get that yourself, put you could place a socket on the mesh and get the socket location.
like this?
whats the goal ? you want to shoot at the point straight from the camera ?
yea
your not shooting a projectile tho ? you have some sort of block your scaling ?
so you want that to hit the center ?
yes
what did you do just add the block to the gun ?
yea with a pivot point on one of the faces, and then when u shoot it scales it on the y based on how the line traces distance to wall
only other issue i see w doing it this way is the line trace can hit walls far away, but the mesh wont scale that long so sometimes youll shoot and it wont show the lazer bc of that
your weapon is placed in your firstpersoncharacter ?
so you don't have to pick it up ?
yea
ok so one good thing if you want to do that second trace i think thats right what they were mentioning
as far as i think you did it right you just used this lazer thing for the start right ?
yea
but usually you have to add start to end then plug that into end
but if it works then thats good
but what do you want to happen the gun to turn ? or just the shot
you can use the lookat rotation from the lazer to the end of the first trace
then rotate it
thats working now, but the issue of the trace hitting walls too far away and the mesh not scaling, but i feel like if the trace isnt long, the lazer wont shoot as far, giving the player kinda a shittier radius to have to be rly close to others to get them
bc like, the line trace is hitting this back wall, but the player isnt close enough for the lazer cube to scale with it so it just stays hidden
where is that line comming from ? lol
i c so your lazer thing only works so well
thats odd, your saying if it goes to far then it doesn't scale ?
or it just does nothing ?
somethings definately off with your trace for one thing
but i'm not sure thats a great way to make a lazer
was the only way i could fin online ๐ญ ๐
i would shoot from the center, get the endpoint, rotate the lazer, push it out halfway forward
because your size is going to be actually half
it scales both ways
its only scaling the one way tho
no its a cube
i would rotate with lookat if you want it to hit center
shoot your first thats find, then take the endpoint and rotate your lazer to the lookat
another thing i would do
just make the lazer a huge length
and make it visible/hidden
so it doesn't require you do to a distance trace
might not work with collisions after a wall
but i think your block hit is the first one anyway
that second trace
use that for the collision
but you need to shoot from the lazer position to the end point
thats what i would do
that would be your hit of target
and the lazer would just keep going for however size
so this?, and i made the lazer hude already, now im confused w lookat
ok so now you have a straight trace from the camera to center correct ?
what bp is this in ?
weapon component
so you see the location from the break hit result ?
i believe its find lookat rotation
or something lookat
it takes a start and a finish
this is what its doing rn, i just added the delay and re set visibility to hidden again
well for one thing the line trace doesn't look like its hitting center but i could be just seeing it off
but the lazer still not showing up every time also ?
the trace is centered more than it was
yes
with the lookat, the start is the position of the lazer and the end is the location from the hit result
and then you can rotate the lazer using that
it should point to the center
thats weird you just made it big, maybe make it taller, you may be just too thin i thought it was a plane
or the delay is just too fast
and it's shutting off
you may want a retrigger delay if i remember correctly
so it only happens when your done shooting
you can fix the scale thing so it only goes to say a wall and not through once you figure out why it keeps disappearing
once you get it working so the lazer shows the scaling shouldn't be an issue, but you should use a second trace for the scaling and the actual hit of your target
this would make it seem like the lazer is shooting from the gun, into the center
i made it bigger again and still not every hit makes it visible
maybe the delay is to short
try a retrigger delay so it keeps resetting untill you let go
this way the laser shows up untill you let go
but just as a test a longer delay might help
honestly i think the enhanced input action as completed as well if you click the down arrow ?
a retriggerable delay of .05 worked
no, when i did that it snapped the rotation to behind the player
i think relative
try absolute
it seeming to look ok without rotation slightly but lemme see rq
how do i get absolute location?
set world rotation
its still doing it
i think its fine without i dont plan on the players gun moving more of being attatched to the hud
well your trace and lazer are off
so what you hit with the trace isn't what you hit the lazer
so i would atleast do another trace that is where the lazer go
i would also set the scale again
since you got it fixed and you can now see it
yea and stage targets that will either be stationary or moving
my thinking was a custom trace or collision channel of "shootable" and set the enemies or objects to have it that way the gun knows if the player gets points or not? i feel like im prolly wrong ๐
i also wanted to add a sprite of the impact point, to the impact point to further sell the visual of it actually shooting the lazer not just making it visible
mines not doing that
yes you can do that where the hits on that custom channel are only the enemies
Did you check the distance in case you did not hit a target?
i also don't know why your scale only goes forward usually it goes both ways but i'm still learning things every day
i put the center at the barrel
Na works even that way with the "SM_Cube" from the third person level.
ya must be a way to make it work you change the pivot or something ?
that might make it react different i'm not sure
I've just tried it with that cube scale thingy... works fine. You just have to make sure you do something in case you don't get a hit (like aiming towards the sky) you need some min disctance or it would scale to 0.
i copied the blueprint u made and its still rotating it to the side ๐ญ
are y ou using a custom mesh ?
can you show an image of it where it goes ? just don't turn the visibility off, and fire and hit the wall so i can see what it looks like, that is very strange as you can clearly see the way i did it works
no im using a cube from the modeling tab the i moved the pivot on
so i should move the pivot to the x?
however you can make x forward
the red arrow should be forward, it could be pointing in the right direction but your forward is off to the side
looks like your forward now is probably y
and that would make it do that
basically you scaled the y
scale the x instead
right thats almost correct but then it would be backwards
when you click on the translate objects, the red arrow should be pointing out
lazer and hit point are two different locations from the look of it
somethings weird about your trace line
hi, im very new to unreal and have got a weird bug is anyone free to help
show the code for the trace
usually people just jump right in with the question, definately get help a lot quicker
theres something weird about your screen also
idk whats the issue they should be a straight line from the camera to whats in front
but your lazer looks correct imo
basically the player brings a key to a lock and it sends a message to the door bp to trigger an opening animation event
the string after the message prints, but not the one after the event is called
i tried debugging and nothing was flagged. bp names in alt text of image
the interact event is another bpi that handles player interactions with objects
im not sure what ive done wrong bc i did basically the same thing twice elsewhere
it happens everytime i have debug turned on with the camera set to 4:3
is hello printing in event interact ?
yes
try it different if you can i think your getting a distorted view of what is going on
and door working is or isn't printing ?
now its visibly working
well it looks like you call the even from the ref, but for some reason its not triggering are you sure it's the correct event ?
but its randomly shooting behind the player
second image
its got the bp_door actor ref or whatever its called
like mentioned you got to do something if you don't hit anything
right, but is it set correctly ?
wdym?
you have a door ref variable, when do you set the ref inside of it ?
think about if you shoot at the sky, try to shoot at sky you will see it happens, because there is no hit location, you didn't actually hit anything
does making the variable type the bp_door not set it as referencing that blueprint automatically?
sorry if thats ignorant
no it does not, it's just the type of the variable, you have to actually put a valid reference of a door into the variable
how do i do that?
if i want it to always be visible like how if u were to shoot a actual lazer tag gun in the sky you could still see the lazer, how would i do that if it dosnt hit a wall or target
you would just use a certain distance as the end point
if you don't get a blocking hit, then you can just use the endpoint as the hit location
i think atleast
from the break hit result, theres blocking hit
that will tell if you hit something or not
you want to open just this one door, or the idea is to have multiple doors ?
on false you want to do find lookat rotation but use the end point of the trace as the target
and do the same thing rotate
multiple doors
wait no, i mean
this bp only opens one door at a time
Use the same value as you used for your trace length (if you use a bigger value you might drill through a wall just a bit behind your max trace length).
like this?
what i do for doors is a collision box on the actor, when i collide check for the key
hey, did anyone ever ran into an issue of a single widget being stuck around after seamless travel?
wdym
i would go back to the scale way you were using, this way if you hit a wall it won't go through and you can see it on the other side, slight issue
i understand, but what i am trying to do is allow the player to drop the key elsewhere (in the lock) and have the door animation play (which is a wall falling)
is this event in the door bp ?
yes
yiou can use self
yes
you would need a way to link the two bp
yes
probably i would think a variable
yes that is what I have done
then you may have to get all, loop through, find the one
find the one with the variable that matches
there is just one door at the moment
right but if you have multiple doors and multiple locks
if each lock and door has a lockid variable
when you put a key in a lock
check the lockid and find the door that matches
adding the scaling once again adds the issue of the trace will hit a wall but the mesh wont scale to it till im closer
If you hit something the distance for your laser is fine. If not (like if you shoot into the sky) the distance might be infinite so you can, in theory, use a big value. Lets say 1000000. I would still use the trace length value to avoid your laser gets to big in case you don't shoot to the sky but make a trace for 5000 that does not hit the wall at 6000.
im shooting a wall im like not that far from and the trace is hitting but the lazer dosnt
i get it, but my bp_door and my bp_lock aren't interacting
i'm saying how you can get them to interact
show your current code
the trace is hitting, but not scaling the mesh
weve gone in a circle
i mean i would just work on the scaling when you can, use the solid one for now in the meantime
I thought you've fixed the issue already?
it was fixed till i added the scaling back
what does the scale code look like ?
only scale x, keep y and z at 1
even if their scale isnt one to start?
well set it to whatever it is at start
it is
oh i c
Why are you not using the passed over key bool in Interact?
Also, why do you have a whole interface that only doors use?
interesting
you got that fast delay again
move the retrigger delay to the other delay spot and get rid of the regular delay
Hello, how can I simply blend 3 blend spaces and a state machine in anim graph?
How does Lock know which Door it cares about? Show where you set Door Ref.
where do you set visibility to true ?
- i was trying that earlier but it was not working, this was the only fix that did work (second image is key bp)
- this is literally my first time using bpi. i know this isn't the most efficient way
i asked how to do that earlier
they don't know how to set the ref, i was trying to get at where is the door
Do it however you want, in your case you'd probably set it manually on the instance in the level, you'd go in Lock and set its DoorRef to a Door in the level
You only need 1 interface here though, Interact. If you start seeing interfaces with CLASS SPECIFIC functionality in them, that's a big smell
door is selected. lock is the pot with the sphere collider and the torches
my deadline is tomorrow and i was trying to do this with cast to only earlier lmao
show the value of DoorRef in the outliner in the level
why do you need a cast?
you know it's a door, just call the door function on it
show the lock's variables
make DoorRef public and instance editable
edit it in the instance in the level to point to the door in the level
this might be obvious to you but i am entirely new to this -_-
and i realied my mistake anyway
ya you can just hard code the door
make a variable on the lock pick
the door ref
and just hardcode the doors
no what he got will work, just need to tell the lock which door it cares about
i was thinking have a matching lockid, but hard setting them might be a better bet
I can't find it in the level outliner
Is there 1 door and 1 lock in your level right now?
search
i've got the door and lock mesh
what is distancetowall ?
the distance from the line trace
show where you set it
perfect
thank you
ill test now
it worked LMAO
ok thanks
sorry for being a stupid idiot
it's a common thing i have seen people do it
Just remember 2 things.
- All tutorials are shit until proven otherwise.
- The computer will do exactly what you tell it to, no more, no less.
You were telling the lock to talk to the door it cares about, but hadn't told it what door it cares about.
That's like asking an unmarried person to ask their spouse a question.
i've seen several times in here people do the same thing, they pick a variable type and assume the type makes it that thing
My biggest bugbear is the interfaces
idk where they're coming from but I've seen some goofy ass interfaces lately lol
this is what i have rn, the trace is working fine, the scaling isnt, and then once it fails to scale if u try to shoot in the sky it dosnt do anything even tho it was working before that
that prolly sounded stupid, just trying to describe ๐ญ
the second comment was bc i was testing w the scale how it was also
well it makes sense that it scales down, you shoot to the sky and you don't scale it back up
but idk why it just isn't scaling kind of strange
would how it was before trying to add the scaling back rly be bad?
bc thats all thats worked ๐ญ
i mean if you don't need the scaling thats fine, but your lazer will go through walls
right
then thats fine bc im planning rn for it to be mostly single player
the player cant see
that
at certain angles you can
the lazer goes away so quick tho i dont think itl be too noticable, as long as like collision wise its fine then i think its ok
ya if you do a line trace from the lazer to the end point of the other trace
thats your actual shot
is the impact point of the linetrace is where the player has shot? or do i need another trace
well consider the fact that the first trace is straight from camera, you want a trace that follows where the actual lazer goes ?
this is why like mentioned early you should do a second trace
this will give you a hit for the actual lazer
i mean yea it is still slightly offset i didnt notice
but i wanted the player to use the center of the camera for aiming
like the crosshair in minecraft
You're using some FineLookatRotation anyway. So should be fine?
so your saying the line trace isn't centered ?
you have only one camera on the player ?
line trace is centered i think but the lazer is slightly off, i think it may be ok but this shit is throwing it off
yea
how could i add a sprite to the hit point so i can see it without the debug shit in the way?
plus just bc i think that would help visually
draw debug point, just make it big
thats my issue, using draw debug is making that shit on the side of the screen and moving the view to the side so i cant tell for sure if its set up right
What kinda homebrew GPU do you have?
Homebrew GPU. ๐
nvidia 1650
it should be close to center
idk what that stuff is on the side but i would turn it off
gpu artifacting looks like
thats the draw debug.. thats litteraly the only thing i have on, and it goes away when it off
never comes up any other time
create a mesh like a cube in an actor, spawn the actor at the hit point
yeah just move the actor or mesh component around on tick after the trace
get that stuff off there take a good shot at the wall
looking at it that way i can see its lined up
the draw debug has always done that when ive used it, ive never seen it any other time tho, so idk
ty
you may also want to rotate the gun a bit
A question about curve tables:
- How can re-import a curve table set to cubic interpolatino? If I re-import it just switch to linear;
- Is there a way to auto interpolate missing values imported from cvs (and not just considering them as 0).
Thanks!
Can someone answer a question about Bp scripting using the first person and third person templates?
I've made a basic inventory system, which I have added (I think lol) to both first and third person character templates and am now working on a podium that you place inventory item on (see pic) to unlock a door. Obviously I'm a beginner cause I have not one clue how to connect both of these player instances to the same logic. I've got a thought that says ok, you have to help the logic know or choose which player character either this or that, but I don't know the node to help me do this. Then another thought says, maybe you have to make a second instance of this for each character?? That seems pretty inefficient though. HELP please!
Even help phrasing my question better would be a step in the right direction, I could ask any 'ol large language model to help me poke at this. I now enough to be dangerous and fairly ignorant.
wait do you have 2 character classes in your project?
I've been taking a coursera UE professional class and the instructor bounces between first and third person characters in the lessons. Some of the BP lessons he's worked on one then switched to the other. But it doesn't make sense that I'd need to recreate the wheel.
Is this not how games code things like switching between character viewpoint? Totally open to suggestions and best practice ideas.
what bp is this event on ?
"how to connect both of these player instances to the same logic" <-- what is a player instance ?
is this in the same unreal project? You shouldn't need separate classes if all you want to do is switch from third to first person afaik
so your sockets are not working ?
are using attach node or trying to manually do it ?
This BP is for a podium, that the player puts an item from their inventory on, which in turn unlocks a door. Does that answer your question?
I have several static mesh actors then I put several of this in a parent actor, I want to dynamically change the material slots on these meshes from the parent but can't seem to access their materials.
Hi OnlyJoe
I'm a little embarrassed that I don't completely understand, what you're saying is that I shouldn't need to duplicate this for first and third? That I should be able to switch? If so, how do I ask this BP to choose first or third? I "think" there needs to be something in-between but don't know what...
i think you can just have two characters and switch between them
one 3rd witha full mesh, one first with just arms
HI engage,
I haven't used an attach node but I could look up what that does if it would help me to get there....would that help switch?
Appreciate that help here.
that was for someone else they deleted the message
why have 2? just stick the camera to his head and add a zoom with the mouse wheel.
right then you can just zoom in and out of 1st 3rd
My bad. I figured it out before you said anything So I deleted my message
yeah, you won't have strafing out the box but that's more of an animBP issue
"to both first and third person character templates " <-- so your talking two different projects ? or i'm confused about that
I have done this in the third person template, but then my interaction trace seems to go AWOL and all the nice print string I have and widgets go away. I'm new and more of an artist than a dev.
@lofty rapids the instructor had us put both the first and third person character templates into our homework project. I kinda assumed this was ok?
why are there no names on your nodes 
i'm not understanding the switching between projects thing ? is there something specific wrong with each one ? take it one at a time
"working on a podium" <-- in the first or third person template and your saying you added the same inventory code ?
starting your trace from the capsule should be fine in either perspective, but a print after the first true branch and debug that, worry about the interface after
I was mostly trying to get the same things working from lessons in each character template. It seems like I would be able to make one piece of code that either could inherit or use but I might be going down the wrong route.
just remember you're firing straight from the half height of the capsule forward
it should work for either, you might also be hitting something else before it gets to the target, log it
Maybe make some functions in a blueprint function library
something you can carry over to the other project
so your looking for a way to determine which one and run code accordingly ?
just use a boolean and a branch, isFirst or something
it's all good, no need to feel embarrassed. For most setups I've seen where you go between first and third person, it stays in one class and just switches which active camera is being used.
also iirc you can set the mesh on the camera change between the first and third person to avoid clipping issues, probably best to do this with a flip flop.
What reason has your instructor given around this? More context would probably make it easier to determine if you need 2 separate classes because it might be beneficial in your project depending on what you're going to be doing with it
Take GTA V for example. Michael, Franklin and Trevor would all be separate classes, but they would all inherit first/third person camera switching from a parent class. The first and third person don't need to be their own classes typically.
In this podium part of the lesson the teacher uses the first person player but switched to the third person when adding a camera to switch between the first and third but sadly my trace on the third person doesn't seems to work, so I'm been throwing wetTP at my first person template (with working trace) at the wall hoping I can get inventory and interactions working the same in both.
Thanks for all your help! @slender dagger my instructor gave no indication why he used one template or anther for these lessons. Maybe just expeditious, or hoped we'd experiment? It is not a live class, just an online one but slightly more organized than Youtube, but less than an actualy degree program. Sending my kids to college, can't afford to go get a master's degree. ๐
so basically your switching between the projects, but right now what your saying is that in the third person template you trace isn't working ?
show the code that does the trace
and whats not working about it ?
Hey girliepops - why would the Asset Manager crash the editor when I try to assign a directory to the manager?
is this just a step by step tutorial thing to get something specific or have they indicated that they want you to do your own things as well?
what are the look at actor reference variables? They aren't being set in your function. Are they supposed to be the actor you trace against or the characters?
It is one of those follow along tutorials but the homework assignments are geared towards applying them to your own ideas. I plan to take a basic comp sci class as I am realizing I have some fundamental weakness in grokking. I can do the art lessons easily, but this BP scripting section is harder.
fair enough.
I've just done a quick mockup of what I think might be the problem section
just try something like this inside your function where all the set actor stuff is and see what happens
obvs you'll have to sub in the actor variable and the look at event
replacing this part of the code
What would happen if the false is left unset? Does that matter?
Ha! Yes trace is now firing from bellybutton. This is why devs are almost like gawds.
well if the line trace is false then I'm assuming that you don't want anything to happen, same goes for if it doesn't implement the interface.
How your code works in the screenshot is if an actor is hit, then it sets the actor to look to null,
else it sets the actor to null.
then checks if the actor the line trace hit implements the interface.
If true, set actor to look to null, and call the interface,
else set the actor to look to null.
If you're ever setting references or anything that doesn't have a dropdown or slot you can type in, you have to plug something in otherwise you're just setting it to nothing so it won't call anything when you try to reference it.
Thank you again for explanation! I had to read that twice and copied it down to read it again tomorrow ๐
does it work when you plug the hit actor into your actor to look node?
Does any one know if box overlap for actors follows parent ( actor ) rotation (Theres no rotation pin available)
This is working but trace is shooting out of bellybutton or lower ๐
Doesn't look like I can relocate the arrow where the trace originates in the viewport or delete the one in the template.
you can get rid of these blue bits. As for the capsule part, if you reference the arrow instead of the capsule component, that should work
when you get the capsule location you can split the vector and add / subtract from the Z to move it. Also there's no reason you can't start the trace from the skeletal mesh (socket) or just make a new scene component and start it from there. then you can move the component where ever you want the trace to start
yeah this is also an option
unless you're adding local component rotation then yes, uncheck 'hidden in game' if you want to see what it's doing
@ornate trail thanks for the reply. Im running this on tick and don't see an option to uncheck
think i got it though im print stringing each actor overlapped and it seems to be working
it's a box collider? Also you might have to attach component to component to follow movement
im trying to create a spell indicator theres only a decal component i was trying to match decal and collision
oh you said box overlap so thought it was collider box
huh, I never used that node, that's pretty expensive to run on tick
it seems to be working so i should have maybe checked better first
So at the very beginning switch the capsule to the arrow? Ewwww no can do! Error error
@ornate trail Your first suggestion goes a little over my head. As to the second idea, to clarify are you suggesting that I use the new arrow?
Here's my results
BTW I really appreciate the help.
make a scene component, not arrow
What woiuld you recommend instead? its only to get overlaps whilst targetting so is for tick of whilst target is active
just enable / disable collision on a box collider when targeting
what does the error say?
On first arrow, Character.ArrowComponent is not blueprint visible (BlueprintReadOnly or BlueprintReadWrite). Please fix mark up or cease accessing as this will be made an error in a future release. Get ArrowComponent
On second get runtime errors
is this for the arrow you added or the default one?
don't use arrows for location at runtime, that's not what theyr'e for
the arrow you see from manny is just for orientation, it has nothing to do with capsule half height
Yes unhappy engine. I am learning a ton here, I think.
this comment would look something like this (top is changing Z, bottom is using socket, but you have to create a socket in the skeletal mesh editor, which isn't that hard tbh)
it's just i had seen a lyra video that only had a decal component and it then traced on tick for overlap actors so being the beginner I am I thought it was the way to go.
Once placed the actor is deleted so is solely used for visual feedback to show targets so was unsure. Out of curiosity going forwards is there anywhere I can view or lookup for future reference what nodes are less expensive?
@ornate trail Thank you for your replies i will update the indicator actors (Its a lot less in the event graph!)
smth like that, personally I prefer sockets
Do you mind explaining how? I'm game or could rtfm, look up "how to add socket to skeletal mesh". EDIT ok figured out how to add socket, good idea to add to head?
@slender dagger if you're near Seattle, I owe you a coffee or a beer, your choice!
yeah I was typing out what to do but it looks like you've figured it out. Where to create it is up to you, tbh it depends on what you're doing with it
Just looking at simple objects to pickup into inventory like keys, and then using them on doors/buttons, or playing on poduims to them open doors.
I can't imagine I'll be near anywhere near seattle anytime soon. UK here lol, but I appreciate the offer.
I mean it won't change any functionality. I was more meaning like if you plan to create something that the player can see (like a beam or something that follows the trace path) then you'd need the socket to be in a specific place
The homework has the trace visible, when it hits an items with inherited interface it prints a verb/noun direction for the player. So it only needs to be located in a logical place where it will hit things the third person character is "looking" at?
The trace works perfectly in FP, maybe I ought to stick with it? I tried to add a skeletal mesh to the FP template but it didn't work as nicely as when I added an additional head camera to the third person. Again throwing wet TP at wall. I'm sure once I've done this a dozen times it'll make sense - I hope.
Hey thank you all for taking some time to help me trouble shoot.
I'll stick with my first person template for now but you've given me some fun ideas to work with and I'll be trying to troubleshoot my third person more tomorrow.
Accessed none is my dread man. I understand why it happens but I really struggle to understand how to fix them. I've watched dozens of videos but it just never clicks what exactly I need to do. Although I'm getting slightly better, but they are hell for me. My hearts sinks when I inevitably get them.
Can't delete because it's defined in the C++ base class
Where do you want to trace from?
If you understood why it happens then you would understand how to fix them. It happens because whatever reference you are using is empty when you are trying to use it, and therefore it's not a valid reference, and cannot be accessed.
The way to fix them is to ensure the reference you are trying to use is populated with a valid reference before attempting to access them. If the reference isn't valid, then it shouldn't be accessed.
The first image below is an example of how one could potentially cause an Accessed None error. This line trace may not hit any actor, and then its "Hit Actor" value in the hit result would be "None", thereby invalid, but I'm immediately trying to call a Set Actor Location on that reference and could then cause an Accessed None error. Because the reference could be invalid, you should make sure the reference is valid first before accessing it. In the second image, I put an IsValid check in there to prevent the node afterwards from accessing the invalid reference, now I should only ever reach the Set Actor Location node when the reference is valid. No more Accessed None error should ever appear from this little bit of code.
Thanks for the comment. Although I understand this and could fix this no problem, using a get valid node is not always the answer, especially when doing things like destroying the character and respawing in. It takes quite alot of set up especially if you have more things going on like inventory systems, components on the player ect. They all need to be set. I get what you are saying. It happens when you try to get a refrence to somthing that dosent exist. Believe me when I say I have heard that about a billion times so I do understand it, and I use is valid nodes like there is no tomorrow. But sometimes an is valid node is simply not enough. Especially if you have multiple blueprints, components ect. I have issues with setting refrences ect. I can't quite explain but its just something I really find hard to do, if there is alot of ui stuff and components ect.
Yeah, I getcha... It can be tough when jumping between different classes and even multiple instances of classes. :/
Its probably me just being slow or having learning problems or somthing. Its weird because I would say I'm starting to maybe evolve from a complete noob. I have been learning about architecture, learning about oop patterns, using interfaces and dispatchers more, avoiding circular dependency, writing cleaner code with functions and function libraries and macros and stuff. But when it comes to referencing blueprints (not direct refrences) my brain just shuts down. Its strange man, I should understand it in theory. I don't know man.
Hey it takes time to really absorb these abstract concepts into the ol noggin
Is the issue that some parts of your system are initialized, you expect that they all are, but suddenly one wasnโt initialized?
I think so, the problem i get are mainly between the hud after the player has been destroyed.
It seems really basic but setting up all them variable to establish the link to the new actor. I think maybe my struggle is node placement, however logically I think I do it right.
I think once someone actually shows me one day it will click. Maybe lol
If you're doing stuff like the first image as an example, then it could definitely be part of the problem. You're making an assumption that the reference will always be valid after the construction of the widget here, and if you happen to destroy the player's pawn and then end up calling SomeEvent, then your reference will be invalid and your widget would be none-the-wiser and you'll get your error.
The second image shows a function that gets the reference for you whenever you need it and the third image shows an example of how you could leverage that function. So long as the player is possessing a BP_BasePotato, the reference would be valid, but I still like to put an isvalid check in there to ensure that it is valid.
I need some help the left is the screen capture the right is a high ress screen shot the problem is that highress screen shots are editor only. As you can see the screen capture is dark and does not look good at all compared to the high ress
I really don't think this is the appropriate way to take screenshots.
https://forums.unrealengine.com/t/how-to-take-a-screenshot-including-ui-only-using-blueprint/538031/2
I was told by author they are editor only Said that he checked c++
I know take highress screen shot does not work for sure... Tied for hours
I'll try the automated
Just tested does not work
in build
Well, for sure the scene capture component isn't meant for taking screenshots - it doesn't have the capability of properly capturing the UI since it's a camera that exists in the world space which wouldn't include the UI, and look at the roundabout way you have to go to try and do it like that.
I just tested using the console command "shot showui" in a packaged game and it worked, saving the file to <ProjectName>\Saved\Screenshots\Windows
@visual crest ^
console command dont work in shipping right that what I read online.
It was a shipping build packaged game
ok
There are settings that can disable console commands I believe.
Ok it works but its not effected by post process
Pretty sure it is... This was in standalone game mode (it takes forever for my laptop to package) but this is with the character in a post process volume with chromatic aberration cranked up. No change to code.
im so stupid i cannot figure out how to simply access a variable that is set in another blueprint
Just tested it it did not save a screen shot
Could someone help me?
Usually you use a reference to an instance of a blueprint and drag off from it to "get" the named variable from it.
Sorry could you explain a bit more
Is there a way, I can reference the Trace Target from the for loop when WaitGameplayTagAdd triggers?
Currently I'm having the issue, that StartBoneTrace always gets passed in the last array element, which kind of make sense.
I was thinking of creating a function to avoid that, but I can't call WaitGameplayTagAdd from a function.
Any idea what I can do in that case?
That's because you can't add latent actions inside a function (anything with a delay basically), so any node that has this little icon can't go in a function
You could use an event instead
Still stuck? If so can you give me a bit more info on what you're trying to do so I can give a better example of how you'll want to get a reference?
Now i have it setup like this, but it sill does not work ๐ฆ
Even though I'm passing it by value, I even tried copying the struct ๐ฆ
Ah yeah, that won't work. You might need a different logic to handle this case. Basically what you are trying to do is adding a tag then calling Start Bone Trace before going to the next element in the array?
I'm adding the bone trace for a given tag, that maps to a bone name.
So if a tag A is added i want to trace for a bone_xy
But i don't get why it won't work, especially since I'm passing it by value
And why do you need to add it with that latent function? Can't you just get the gameplay tags container and add it directly?
No the latent function checks if the tag is added
That's because in this scenario, the event will be called many times instantly and so the value "Trace Target" will get updated and cached every time it's called, but since there is a latent action, the "Start Bone Traces" will probably be called after the event has triggered on the whole array, thus only working on the last index of the array
Do you have direct access to the gameplay tag container that you need to check/modify in that actor?
Yes but then I have to check for each tag again :/
Well, you can just use the functions provided by the tag container
That way you can process everything inside a function and don't have to bother with latent actions
but i can't g et a reference to the tag, i have to check the whole array
Don't you have it there?
Yes but because of the latent function i can't reference it by start bone traces ๐
That's why I am suggesting you to use the functions I've shown above
Those aren't latent
You just need to have acces to the gameplay tags container variable
The latent function listens if the and when the tag is added to the actor
it does not add the tag
Hmmm
In this case you can do things a bit differently, you can have a map with that "Async Task" and the "Trace Target" structure, you add an element to the map on the first output execution pin of the Wait Gameplay Tag Add, and on Added you just "find" in the map the Async Task and use the Trace Target from there
Assuming the Async Task object is still valid and is the correct one on the "Added" pin
does set game paused fully pause all input? I want the game to pause behind my ui but if I then want to close my ui it doesnt register pressing the key again to unpause it
But won't i have the same issue when passing the task to the start bone traces, because of the latent function?
You can select which inputs are allowed to be triggered during pause, it's a setting inside the Input Action if you are using Enhanced Inputs
No, not if the "Async Task" remain the same
But it's the same right it#s also just in the loop
Not necessarily since it's on that latent function, it should be outputting the same Async Task object on both output pins if it's done right
Same issue sadly
In this case you might need to rethink a bit the logic there. Maybe you can consider adding an event that is called by anyone adding those relevant tags, and you execute directly the "Start Bones Traces" function when that event is triggered
If you need to do that action specifically when someone else add the tag, that would be the best way of doing it in my opinion
yea sadly i probably have to rework this, it's just really annoying
It's always better to work with explicit events rather than latent actions
I'm using it in a anim notify, to know when the window starts for tracing e.g. the right hand punch
this won't change
Maybe I have to write a custom anim notify state, that will send two gameplay events on start and end and also rework the thing to listen for those events instead of the tags.
It's more overhead though which i don't like but ... :/
Or maybe extend the latent tag added function from the gameplay abilities
but that pass by value is not working with the event really bugs me
It works, but not with latent actions since the value will have changed :p
It makes no sense to me, how does the value I pass to an event change, when i pass it by value.
This should be it's own scope.
But BP is probably different, I would understand if they change the memory directly ok, but not even copying the struct or passing it by value works.
Because the value is cached on the event every time you trigger it, so when you go to read that value, it will be set to the value that was last set at the time of checking it
So it breaks with latent actions
I dislike that really dislike choice of BP's ๐
But thanks for helping!
But I still can't believe it, there must be a way, this has to be something more common and not that you have to desing around that to avoid it ๐
I mean, usually designing stuff to rely around latent actions is not a good idea
Direct events/dispatchers is the way to go
Not sure about that one, for a GameplayAbility that will start a trace of the right hand, dependent on a animation it started, as far as I know this is the way to go.
But maybe correct me if I'm wrong here.
I especially reworked it that way, so that the GA has control over that and take away control over it from the animation.
I don't know your specific setup so I can't say for sure but anything that can be expressed with a latent action can be with an event, it's just a matter of how you design things
The latent action is checking checking for something to happen in loop, the event will tell you when this something happens

Yes but this something, is happening in an animation.
So it would e a anim notify (state) that handles the action.
but it's a "punch" gameplay ability
so then the ability just starts a montage and the montage handles everythign else
which is not ideal for many reasons
so we kind of need to have the notify alert the GA about that happening
Well, anim notifies can trigger events, not sure where the issue is
which is a latent function in one way or another
That the GA has authority over it, manages the attack, manages the damage, manages the GE applied and everything else.
did you work with GAS?
yea ๐
But from a pure code logic, I don't get it why you wouldn't be able to use an event
๐
I had a setup before, where the NotifyState did the line trace, did apply the gameplay effect.
But then you have this all in your animation, you have thoren up the ability into so many pieces it's hard to manage, that's just beside all the other things that you have available in your GA.
and then you want to add logic, have to check other things, and it gets worse and worse
What doesn't make sense to me is that you can't uniquely identify those "async tasks"
It should be the whole point of it
It is the same issue as with the oder variable, if you reference the task from the latent call, it's just the last variable/last added task from the loop
it's not an argument to the latent call
That's bad design right there :p
you can tell that to epic games ๐
but for me the bad design is, that a variable passed by value changes ๐
that's even worse tbh
That makes sense though in this context
how does it make sense if I pass a variable as value to an event, why should it ever change
Because the event is unique, it's not creating a new "instance" of it every time you call it like it does with a function
see that's bad design to me ๐
also a function does not ever have a "instance"
I still can't believe it, I still think that there is something wrong, maybe it's somehow a reference ๐
Hello! I was wondering if anyone more maths oriented than me can help me figure this out, I have a system where players can pick up an object and inspect it, rotating it with WASD.
my problem is that using add world rotation obviously rotates that object relative to the world, add local rotation or relative rotation rotate the object relative to itself, which means that if the object is 90 degrees on the Yaw it Rolls from the player's perspective.
Does anyone know the maths needed to make it roll on the Yaw relative to the camera perspective?
if you want it to rotate relative to the camera, set the world rotation to the camera, then rotate it ?
Good news, finally got my Dash to Sprint function working thanks to a little bit of help. Though I do have to optimize the Dash funcition + wonder if this could be any more optimized generally?: https://blueprintue.com/blueprint/bec2xiy-/#claim
theres also bin like pastecord where you can post text only
that sites for blueprints
Is blueprintUE not good?
it's good for blueprints but just regular text probably pastecord is better
Ah, doing blueprints first. I'll handle pastecord later.
well the link you posted just has text, thats why i mentioned it
it's not any nodes on it
They're around here if it helps?
Its a doubleInput instnace that tells them if the Dash key has been triggered twice, only then the character dashes.
As seen here:
within the duration ?
interesting thats cool
so your dash you have to hit it double
neat feature
what does get dash direction look like, are you just using the way the characters pointed ?
Yes.
i mean all your doing is launch character, i don't think theres much to make more efficient ?
It might be better long term to just make a custom 'Input Trigger' for enhanced inputs.
Well, I meant condense all four IA_Dash directions into a single IA_Dash.
they are all doing the exact same thing it looks like
ive remade the lazer from yesterday to use a particle instead and it has been less clunky but ive noticed an issue, im not sure how to fix, if i try to shoot something that hasnt been marked with the trace channel of lazer target, it snaps to the floor, or if i have shot one that is set to a target, it will stay snapped to the last hit location until i shoot another location that has the trace channel
you don't have anything comming of the false of a block hit result
Like how would a custom Input Trigger work for this?
oh shit ๐ญ i didnt even notice ๐
Thought to optimize it into a singular IA_Dash for optimizaiton purposes.
you could, because imo they are doing the same thing none is different this can more then likely be just one dash that use
because you get the direction aftward
Huh
Input Triggers controls what state in input action is in. So take the tap one for example, this check that the button has been pressed and changes the state to ongoing. If released within the specified period changes to Triggered, activating the input action. If the time elapses without the release sets its state to none.
How would you turn this into a custom Input Trigger, if I may ask?
i c yes put it in one, you want to be able to dash with multiple keys ?
it looks like they are all doing the exact same thing
try it out, you'll probably see it works the same
Yes. So instead of having to tag each dash key separately, I could just rely on the IA_Move to trigger my IA_Dash if its triggered in a certain way, if that helps.
can't you assign multiple under one ?
like IA_DASH can be multiple keys
?
if i remember correctly
i think you could just have the dash and set all the keys for it
hey when in a actor class, if i jsut want a "location holder" compoenent or whatever is what would be best preformance wise or dosent matter ?
i have 3x spawning points in an actor and i wanna visually show them
i normally use arrows
but there might be some less costly ones ?
a picture says more then 1000 words...
like this,
just use scene components. USceneComponent is a UActorComponent is a UObject. Don't think you can have anything smaller that can have a location.
or if its on your skeletal mesh you could just have sockets and get those
sceneCapture componenet is the only ones i can find :/
not scene capture, its just scene in blueprints
these guys
but if you're downing something like projectiles sockets are usually the way to go
Something like this would sort of work but you'll probably need to make it in C++ as the 'Update State' is only triggered/called while the key is pressed making it difficult to keep track of how long its been since the key was last pressed.
I believe 'bShouldAlwaysTick' is required to make it check continuously but this can't be set in BP. (from what I can find)
how it is in the ICM. (Ignore period as its not used in what I showed above)
For my IA_Dash then.
When you create a top-down preset, the character movement is created using the left mouse button. How do I remove the camera movement that is also added there?
so you want the character to move, but the camera to stay in place ?
yes
I didn't find where the camera is used when the left mouse button is pressed.
so the camera is in your character
and that thing just follows the player based on where it is
i would delete that camera, put a stationary one in the level
then use view target node to set the camera view
I removed that camera and put mine in, but it still moves.
right because it's in the character, you need to put it outside the character in the level
I couldn't find where exactly in the blueprint it is used.
it's not used, the camera just follows the player because its on the actor
remove it from the player
like this ?
I have my own camera there.
ok so now in the player bp
on begin play
use set view target
this works with one camera
if you want more you'll need to make som sort of manager or something that switches them
and that should be it, it should work like i have in the video
if you want to do any movement of the camera you'll have to do it manually now
I deleted all the cameras, created my own, added my own motion functions, but my camera moves when I click the left mouse button.
you created your own camera ?
is it outside of the player ?
show where you put the camera
show the player components, probably a camera in there
because no code is doing that in blueprints, it's just that a camera on the player will follow the player
it won't follow it if it's outside
you have two player pawns
3
i can only say it so many times
you need a CameraActor
outside of the pawn
and then use set view target like i showed you
if you look in the bp player you'll probably see a camera
you don't want it in there
you said you deleted it, but it says player pawn in the outliner
the movement is and clicking is seperate from the camera following
the camera following is a built in feature when you attach it to your character
it's relative to the player
so as you move, so does it
I created my camera through player pawn, there I gave it a movement function
well i can only help if you can go along with me here, i told ya how i got it to work and how it works
^
I will do as you said now.
^
are you going to have more then one player on the map like that ?
meaning are you going to have #multiplayer ?
No, I'm making a game with mechanics similar to Xcom.
i would just use one player
so that when you use begin play it's like the beginning of the game
on the player
instead of running for every player that you have
ok if you do like this the camera you can easily move around, but you may want to create a camera actor for good controls
you should be able to do forward,backward,left,right while keeping it withing a certain range it's a little difficult but can be done
Pretty much yea. It seemed like an interesting side project so I setup a c++ base class that allows me to start a timer in the trigger. So the multi tap input trigger I've setup works flawlessly (as far as I can tell) and can work with any input action.
So this allows all the movement keys to output the relevant XY axis value when double tapped. If you're partial to a little C++ feel free to message me and I can share the setup.
i would personally use a camera actor that is like the player, and just have the player not possessed but possess the camera actor with nothing in it but a camera
this way you get player movement with the camera you can move it around
thats what i did here
i used floatin pawn and wasd for the camera movements
stuck it on a z
theres multiple ways to do things
I will try.
it should work with little change, but i would take it one step at a time
the way i first mentioned is good, but leaves out a few things that are built in to something like floating pawn
or even a character with just no character in it if you want it to walk a floor or something
and you would possess the "camera actor"
How do I make the camera move by moving the mouse cursor to the edge of the screen?
you need to get mouse position when you move the mouse
then you say if your x and y are within a range
so if your mouse position . x < 50 you are on the left side
if your mouse position . y < 50 you are on the top
and get the viewport size to get the right and bottom
but as far as 50 thats just a number you can use whatever you want
basically 50 is padding that you can set to anything
then when that branch is true that you within the range then move the camera
you will probably want to do this on tick
even a variable like location that you just check on tick and change on mousemove
this is just one check, but you would do all four and save a variable as state of which side you are on or not at all
or you could just in place of the print string do the actual moving
it might be smoother on tick instead of the mouse xy event
you just check one if its false check the other, you'll have to work out if it's in the corners or not as well
this will allow you to move in four directions
if you want a full 360 then thats different, this requires more maths and calculations
hopefully that makes sense
My spear goes brrr when throwing while walking backwards (S) or right (D)
im getting the forward vector from the socket on the tip of the spear.
its possible because physics is on, it's hitting some part of the character ?
this is first person view, so maybe bumping into an arm or something
when its held it has collision and physics disabled, I enable it on montage notify when its thrown, but I'll take a look at this
print the thing it hits on its event hit
gotta turn on simulation generates hit events
i guarantee it's hitting the character mesh
If this is single player and you don't really care about any of the players stuff hitting themselves, you can do it through collision, just have a collision channel for the player's mesh and use the other for the enemies.
Basically on throw, it blocks all it usually does except playerchar. You can then have it block playerchar as well a bit later (or never)
Then in C++ there's options to disable collisions between specific pairs. Or you can hack it with a constraint that does nothing except disable collision.
Hi, I seem to be having a problem with my function over here
it doesn't decrease my health, even tho Its getting called on runtime (ive put breakpoints on it), it executes โ
here's how it works on the insides ๐
Why is the bear attacking character 0 and not TheCharacterItIsAttacking?
you got a psionic bear, but he can only attack the first player's character
Where do you set Health Amount? I see it as an input on Set Health, and then you use it to set Health Level.
If this is a promoted variable in the function, you may still need to set the variable using the function input before trying to access it.
I just experimented with this by making a boolean input and setting it to true on the input. But in my function the variable is defaulted to false. And when I access it I get false.
Maybe you have Health Amount set to something somewhere, and because you didn't stitch the function call parameter to the actual parameter, setting Health Level to Health Amount doesn't change anything.
--
Also, might I suggest using a names like "Health Current" and "Health New" vs "Health Level" and "Health Amount" which sound ambiguously like the same thing?
Btw I made it work
there were some functions not connected on the other side
It was a problem inside of my widget, now I fixed the widget functions/connections but still have a problem with this
I even made an interface just now
I have a blood splatter image inside of my widget that I wanna be enabling only when the player gets hit
my blood splatter image sits in here and by default is set to opacity of alpha: 0
this event gets hit, whether inferface or regular event it still doesnt work even tho it executes
so I have a feeling it might be because of this widget, should I make another widget that is created by event begin play of my game on character & just made it visible or invisible depending on my needs?
or destroy & recreate it every time i get hit?
that doesn't sound very optimized to destroy and create widgets
and Im always so discouraged from creating new widgets this is why I made it all nested inside of one widget
Your interface sets "Blood" to be visible, plays an animation and immediately sets the "Blood" to hidden again. This would all happen within a single frame so your "Blood" would just remain hidden.
If you're wanting to wait for the animation to finish before hiding it again, then you may want to use the "Play Animation with Finished Event" which then allows you to do something when the animation is finished.
In terms of the logic you have going on here, it's better to try and make your widgets listen for events (using event dispatchers) rather than having your game code calling into the widgets to perform some action - when you are constructing the widget you may need to give it some data or a reference to something that it needs to know about, and that should be about it for the game logic interacting with the widget directly - everything else the widget may need to present should be handled internally to the widget but based on values from references to objects that the widget needs to care about. So if this widget just needs to know about the "Stats_System" component you have on your controlled pawn, then on construct of the widget you can get the owning player pawn, get a component by class (Stats_System) and bind to any event dispatchers you set up in it. If you want to ensure you rebind after the pawn is destroyed, then on construct you can get the owning player and bind to "On Possessed Pawn Changed" and use that delegate to re-get the Stats_System component and rebind your dispatchers as needed. (See attached images as an example of how to do this)
It's also not a requirement to use Interfaces, especially if you're getting a direct reference to the widget class anyway - it's just creating additional work for you and making it harder to track your code for no benefit. The use case for interfaces is when you have a variety of classes that don't share a common parent class but need some kind of shared function call that they can then implement as they need. An interface call with the name "Show Blood Splatter" seems very much like a single use thing that would only ever be implemented in one class.
First image calls "Rebind" manually to set it up based on the current "Owning Player Pawn" and then binds to the "Owning Player's" OnPossessedPawnChanged dispatcher to call Rebind whenever the possessed pawn of the owning player changes.
The second image shows the contents of "Rebind" where it first attempts to unbind from the previous pawn's "Stat_System" component if the pawn and the component it finds is valid, and then it binds to the new pawn's Stat_System, again if both are valid.
Can someone point out what's wrong with my anim notify? It used to work but ever since it just stopped and I don't know why. I've remade the notify twice with no luck, it just doesnt fire at all, but ive had no issues with the notifies for steps or even melee attacks, it's only the jump that doesnt work...
Hey
Do anyone know what maybe causing that delay while opening the door...
I think it's something to do with the way I am retrieving the location? Because if I'm standing away from the door or facing it there's a longer delay
I checked the collisions and the grab component is set up right and have attached screenshos... I'm fairly new to unreal so please let me know if I'm doing something wrong
is there an AI that can generate a blueprint based on high level text request?
its actually hitting itself o.o
or a copy of it
But it is fixed by ignoring collision response to my character so I just need to figure out how to enable it back
okay got it working, thank you!
There's a plugin. I think.
various but i dont know if u guys tested if they actually work.
Someone able to just double check for me this gives the correct result? If the affinity value is null/void or less then 1 (indicating that the object is resistant), it checks if an affinity was actually present, if it was present, it returns true, and selects the lowest attack grade (0). If an affinity wasn't present (null/void value), or the value was greater equal 1, then it should give the attack the random chance to be a critical, influenced by the chance modifier (the higher the modifier, the greater the chance)
Does anyone know why interaces are more performant than casting? I would have thought anything that wanted to communicate between two actors would have to call those actors into memory
when you cast the UClass meta data / class object has to get loaded into memory. With an interface it only checks the classes interface array at the UClass level. ie was this class declared as this type of interface
Is there something that stops the engine from being able to do that with casting or is there an independent use case for casting that requires it to load the meta dataa?
Actually I think I can answer that question. I guess you can call functions from that object and stuff directly in the object you're casting from if you're casting which you can't do with interfacing
right since you're casting to a class if it succeeds you know the functions / members you want are there. in most cases this is fine but say you need to do this many times a frame you could just have an interface with a virtual function then define the actual function in your class. This would be faster since it doesn't need to look at the entire class each time but you won't notice a difference unless say you have a bunch of actors doing it several times a second
Sweet, thanks NeuroSpice ๐
Interfaces aren't faster than casting. There's actually a slight overhead. (Tiny but still there) Interfaces do a cast in the background.
They're not. There's some memory considerations but with good class hierarchy and using function only base classes, this becomes a mute point.
Interfaces are for when you have two classes that don't share a common parent but need to use/implement the same set of functions.
interface doesn't replace casting, common misconception
Also useful if you don't necessarily know who is needing to receive the message
ie. I use an interface with my combat system because I know that there will be a damaged actor when this is triggered, but I don't know which one. So I send the message out through an interface, and the correct actor picks it up
Sort of. Outside of a plugin, you should know, if you don't then you might need to look at how your handling things. Uncertainty is the breeder of bugs.
I know it will be a value in a range. So basically weapon overlaps object. If it is part of X list then it can proceed and send the weapon data & attack notif to the hit actor
also, in the same way, I'm not interested in anything that doesn't fall into the category. So it can send messages all it likes to an actor that isn't interested in it, because I would through it away anyway, so
. Maybe I didn't explain it well...
Is there a design pattern or something similar I can research that would help me understand this principle?
"Interfaces do a cast in the background."
also remember, at the end of the day, if it works, it works. Your code won't always be perfect, nor does it need to be
this is not to say be lazy, just don't beat yourself up too much about making it perfect
Fair, that is a lesson I need to drill, but in this case I'm mostly just trying to satisfy my curiosity for understanding what's happening under the hood better (if I can) ๐
huh, guess there is more differences in BP interfaces and c++ than I thought. Basically just use interface to decouple like everyone says, just learned that if a class is already loaded unreal actually uses that to check casts so it seems it's really not an issue ๐คทโโ๏ธ
and that's a good attitude tbh, understanding is so powerful, it allows you to make things work where they might otherwise not. The current edu systems are far too focused on just giving your raw info, and not teaching how to think & understand so you can implement yourself
which is why I'm not concerned about casting to other components on my player character, or anywhere that they should be in use. They're already there, so 
not "all" casting is bad
Yea, object oriented programming, hierarchy and composition.
Thank you!
Do any one know that how to create custom category option for all custom categories created for variables in actor like we already have General, Actor, LOD, Misc, etc...
Please Help
Does unreal not have a way of firing an event when a selection of a combo box is highlighted?
I want to have a description of each option the user can choose before selecting it.
I wish I knew, it would be very helpful
there should be an "on hovered" event for UI elements
There is not one for combo box.
in the parent widget that implements each one there should be. I don't personally have much knowledge on combo boxes, I always used vertical boxes with buttons. Also #umg is where this belongs
Not possible using BP only. You have to do something in C++ and from my understanding it's not a simple thing.
will we need to write some custom c++ for doing so or just to change the some thing inside uproperty
Its something to do with the 'DetailCustomizations' class.
Is there a way to make a GAS Blueprint revert itself back to 'Is Data Only'?
If there is nothing in the blueprint graph it should do that for you iirc
engine restart might be needed (?)
Restart your engine, or right click the class in the content browser after closing it and reload it. If it doesn't open as data only, you've added something outside of the parent class's fields that won't allow it to be data only.
Ahh
How is it his and mine data-only blueprint layouts are different?:
different bp ?
This isn't a GE
Yea, my honest mistake.
Hello, sorry if this is the wrong place to ask this. Does anyone happen to know how to make something shatter after a condition is meet? For example getting a block of ice to shatter after the player lights all the torches.
Where do I find SetMovementByProfile and BreakSMovementProfile?
Most likely a custom struct.
it looks like setmovementbyprofile is a custom function, wdym find ? are you trying to run this code or copy it ?
Copy it, see how it works piece by piece.
My friend's showing me how he does his I think his GA_Sprint or GA_Run function.
well the purple i believe is a function
and the break like mentioned is probably from a custom struct
How do I make both of those?
so you can make a function by clicking this button...
idk much about structs
but you'll need to create one i think, and usually it's recommended to do that in c++
but just as a test you can do in bp, but i have heard bad things about bp struct in here
you can also make a blueprint function library, and these functions are accessible from anywhere in bp
Ah, right.
this is where you can create a structure
in the content drawer
right click
then go through the menu to see the structure
Ok
the things on the function node are inputs
so once you create the structure
set an input to that structure
then in the function you can break it
Gotcha.
Its basically letting you choose different settings
so you can have many profiles and different settings
Ohh, that one.
i would probably put in the character
the function
because you can easily get the movement component
or you can do bfl, but you'll need to get the character or pass it in as an input
ok
Guys how can I spawn a widget in the pawn and then remove it later?
I can't think of a way to do it
like, make widget, alright, and how do I set a location to it?
With it being for VR I'll assume it's a widget in world space. You'll need a widget component to be able to display a widget in the world. In terms of settings its location, you would set the world location of the widget component the same way you would any component.
And just in case you're not familiar with widget components, they pretty much render a widget to a material and then displays it on a plane. You can create a widget and then set the component to use it.
well, it kinda is and kinda isnt
I was trying to bypass the defaule widget menu because it stopped working for me after I made other widgets in game, and setup widget interaction in VRPawn
Didn't understand how to call it so I am trying to fix the default one
Hello,
does anyone have any idea why my Projectile component doesn't move when I activate it, I have simulating physics off, and my aim to activate it once I want to throw an element. I have a pickup system.
Sorry if nodes are messy.
Widgets in world work perfectly, the one that spawns on your hand does not
( will record and send video in a bit)
And is there a way to change direction/velocity dynamically
And I also recorded a second issue which I can't solve for some reason(made a smooth turn thing, and it just rotates the entire pawn along some axis)
MoveX is absolutely the same but get right vector
When I load a level with the 'Open Level' node, the Camera in the level stops working for some reason.
When I load the same level manually in the editor PIE, it works as intended, but when loaded via BP, the camera output returns a black screen.
Why might this be happening? How can I fix it?
If I press F1 in the game viewport, it shows the wireframe of the scene which is correct
But it does not show the rendered scene, instead its a black screen
Hi, does anyone know what is wrong in my function? is it possible that I am using the wrong add node?
you are trying to add an Object to an Actor array
Remove the ForEach Loop, recreate it, connect the "All Interaction Points" first, then connect the array elements.
Alternatively, disconnect the array and the array elements, connect the array first ๐
Thank yout, it works ๐ ๐
The reason why - when you connect either the array or the array elements pin it sets the wildcard pins on the node to that particular type. The order in which you connect to wildcard pins can matter as it sets the type and in some cases the engine doesn't appropriately assign exactly what you may actually need. It's always best to connect the array first before the array elements as that way you know you'll be looping through the correct type of object.
i have tried to make a pause menu that shows when the player presses pause, then if pressed again resumes the game, but when i press the input again, it dosnt "reset" for lack of better wording. it just stays on the screen, ik im prolly not going ab it the best way lol ๐ญ
this is all in my player bp
and when you press show pause menu the second time does the widget go away ? your saying it doesn't right so when you set visible isn't working ?
does the game unpause ?
Did you make sure to set your input action to trigger while paused?
no it dosnt go away it stays on the screen
put a print string before the node that sets it invisible, do you see the string print ?
basically a print string comming off of b in the flip flop
see if that flip flop is working right
its not
so make a bool thats set pause, and then maybe a branch put here? im confused
Nothing wrong with your code here, works just fine on my end with a mostly blank widget. Do you have any input handling on your widget?
no
does the same thing
idk why that flip fop isn't working though
but i've seen weirder things
OHH
I know why....
I'ts a flipflop in a function
Flipflops can only retain their state outside of functions.
Multiple calls will have the flipflop reset itself.
i c, so boolean should fix that np
Mine worked cuz I just had it hooked up directly on the input action.
the bool is working n that makes sense ty
its working like this, but. i have to press my input twice for it to work
default the boolean to true, or use is game paused like mentioned above
i have my data table for all my units.
Each units uses a specific mesh that has specific properties such as color and scale that differ a bit.
So i need another data table to set up all the meshes.
How do i reference these meshes with properties data table, in my other units data table?
Sounds more like your first data table needs an array with a structure that contains the details about each mesh rather than another table.
an array with a structure inside the unit?
i dont understand it
you have a data table with all your units, the name of unit, hp, attack, defense
You have a data table that contains your units. That data table would have data about the unit. That data should include the mesh data.
yeah but wouldnt it make more sense if there was a different data table for the mesh data
because lets say you have 50 units and they only use cube or sphere
then you are setting the same data for all entries manually, with color and scale, that is always the same basically (changing only if it is sphere or cube)
the unit in the datatable should have something like -> what mesh you are using?
and the other data table would define the meshes
right