#blueprint
1 messages ยท Page 99 of 1
Lerp transitions between the values defined in A and B based on the Alpha. As you're not changing the alpha (which is supposed to be a value between 0-1) and always have it at 0.1, you'll always have a value close to the A value.
this is on tick behind a boolean, the alpha in this case just controls the speed of the transition with .1 being fairly smooth. It works correctly when I use it for camera movement, the issue seems to be with the rotators
something like this for example works as intended
Nice!
You're not understanding what Lerp does.
A: 0
B: 100
Alpha: 0.1
Output: 10
A: 0
B: 100
Alpha: 0.5
Output: 50
A: 50
B: 100
Alpha: 0.1
Ouptut: 55
A: 50
B: 100
Alpha: 0.5
Output: 75
You adjust the "Alpha" to transition from one value to the other.
anyway this fixed it, with a lerp rotator and shortest path. Not which ever way the player has the pitch to start with it will always even out for the ability
yes, I understand this but in my use case I'm traveling .1 of the remaining total each tick
Which is the wrong use case for using a lerp as you may not have smooth consistent motion.
You're better off using interpto as then you feed it the current value, and target value, a transition speed, and the amount of time since the last frame.
yeah sure, I might change it later. The transitions are looking buttery smooth right now not going to mess with it. Seen plenty of people online do it this way. You are technically correct tho
actually pretty sure I got this way of doing it from code like me
Anyone got any ideas on the best way to connect these via nodes?
Anyone know if it is possible to make it so that blocking volume blocks visibility trace but not mouse over/click?
What is "these"?
you can set the hit result under cursor to any channel you want, i.e custom object channel. I just did this in cpp but imagine you can set the channels in bp as well
Can anyone explain how this node works? What is the Notify Name?
Idk if i clarified properly. I have a setup that's a little weird I suppose. I have an area surrounded in blocking volumes which are supposed to prevent me from going by blocking a visibility trace. However behind those I have interactables that work on hover and click but those volumes block my ability to hover or click. Which is what I am hoping to figure out
The collision stuff with blocking is necessary because you can only move X units in any direction, so that you end up getting close to the boxes but if you try to go over - the trace blocks that
Should be w.e anim notify is being triggered
So does it begin to play the montage and then once it hits the circled notify, it will call whatever is on the On Notify Begin pin and pass the name Equip of the notify?
W.e the name of the notify that is set for that anim notify.
Iirc it's something that can be overriden. If you haven't override or set it, you might get empty name
Open the anim notify and override the func for notify name
Then name it w.e make sense
How do I open the anim notify?
on click you could utilize one of these with another channel that isn't blocked
I see no anim notify in the content browser
Well where do the equip one is from?
Are u using plugin or something. If you do check their folders
no
I don't even see anim notify as something I can create if I right click in content browser
You can
Keep trying ๐
You can create both anim notify and anim notify state. That's what you used in montages
Sorted it by adding a new trace channel in the project settings and using that for my movement block trace on controller.
You gave me this idea by pointing that node out
is there a way to programmatically create a macro that takes an incoming class, gets all the actors of said class and loops over them as if they were wildcards? The reason for this is that I want to be able to get different properites of different objects without having to code in cast nodes for every single item that could possibly be requested. If there isnt a way that's perfectly fine im just curious more or less
the incoming class could be absolutely anything or would it have some constraints or would it be like a base class? You could use something like gameplay tags to differentiate but the more you can narrow down the requirements seems the easier it would be
the incoming class would have to be an Actor Class
Im really just trying to avoid the cast node, but somehow return an object that I can use as a target for anything if that makes sense. theoretically the reference would be resolved and then passed into other things
Why do you want to avoid casting
the cast node is a good node
well casting is fine, thats not an issue, but specifically casting to things is what id like to avoid
making it flexible
can you add interfaces to any actor?
yes
thought that only works for blueprints
you implement it whereever you want
what do you mean "blueprints"
everything you make here is a blueprint
even actors
unless you're in #cpp land
Thats not true, if you use an actor from the Place Actors panel you cant just add an interface
I have a question. So I want the character movement to be a permanent mode. I don't ever want it to change. Like let's say swimming. Is there a way to do this?
I'm having an issue where I set the movement mode, but another component is changing it.
Well you can. If the actor on that place actors panel implemented an interface
you can add any class from the place actors panel
true, but for something like a niagara actor for example
you also aren't making those actors in the default categories either, so casting to do custom functionality wouldn't work either.
If you're looking for bona fide dynamic typing, a la Python, or Javascript, it doesn't exist
What's the most graceful way to programmatically enable and disable collision on a pawn in BP?
set collision enabled
Oh that's a function! Nice!
Why would you need to do this ? i found this in a doc for version 4
pretty sure that is redundant
and doing the same thing
Actually maybe worse than redundant, how does Cast handle it if you pass in None?
I've always assumed that's an error.
Yeah, I've definitely seen invalid references get through it before magically
no clue how
Saw one in an AnimBP the other day
is valid makes sure it's not about to go boom too
nasty :(
yes I suppose the Pending Delete test of IsValid might be worth that extra node
How do I change the signature of the event referenced in CreateEvent?
Or, failing that, how do I set a timer for SOMETHING that has parameters I can set
you don't
quite simple
But I kinda have to
the timer delegate expects 0 params, and that's what it gets
Or at least, the alternatives are gross hacks
count time in a tick event then
yeah, like that
counting time in a tick event isn't a gross hack
It is for this.
if anything what a timer does to account for low fps is a gross hack
but I digress
you don't have an option
possibly something in UE5Coro
or a delay
If you build your timer in C++ you can add parameters.
I'd also call that a gross hack tbh
how do you make collision boxes that interact with the floor? or a table in this case? I've got #1-20 set up with boxes. Looking to roll the dice and leave a 2 second delay before calculating the final result so that the physics has time for it to not be moving before giving a result. Maybe I've been staring at it too long because im at a loss as of the moment.
How come? Timers in C++ are built to take parameters. Or are you saying using a timer for this particular purpose is a gross hack?
need to be able to add variables to it to add +1 +2 or -1 -2 to rolls aswell
This is how i do it
Yo i need the unreal equivlent of an empty in unity.
Taking a BP project and rolling one timer in C++ just because I wish they had params is the gross hack.
just make an actor then
i need the vector 3 location, i want it on my character model ?
Ah yes, if everything else is in BP then it might be inconvenient just to have the one thing in C++.
if you add a vector variable, you can tick a boxto give it a 3d widget
alternatively, a scene component
if you mean on the mesh itself, you want a socket
Actor Class has Transform on it by default. Just create a Blueprint that derrives from the Actor Class.
so in unity when you wanted something done at a custom location you created an empty game object.
if i just use the mesh location i am not able to control easily (or i dont think) where the "bullet" will stat its path to the target .
an empty game object wouldnt have any extra stuff attached to it so you could just add a script and bam you can spawn stuff from that location.
that scene component seems like what i need though thanks.
appreciate the help btw
@twin perch you also can use something called Socket, its like a bone but you can create it inside the engine, just go to the skeleton and you can add it from there
you can attach actors to it, and you can also use GetSocketLocation to get that socket location
cheers, ill look into that thanks! i got stuff working for now how i want it which is cool, i used the scene component.
Its always better to do it the unreal way, it makes stuff a lot easier and faster
Another question - I have a Master game instance which has some global variables. Am I understanding this correctly when I think that this instance is loaded when the game starts, so casting to it as many times as I want from anywhere in the game any time won't be impactful in terms of memory? It will only be loaded once and then referenced in memory?
Or does it make some weird multiple mem copies on each cast which are unique
Objects you cast to stay loaded at least until the next garbage collection
Okay, so in this case GI is persistent for the entire life of the game until the exe is closed as far as I understand.. So it should be fine to cast to it from multiple sources then
So if itโs frequent enough you prly wonโt have to load it too often. And the GI might actually stay loaded the whole time, not sure
Cool beans. Thanks for this
Does anyone know why this Editor Function won't force the assets to need saving? The function runs fine, everything in the same channel updates as expected, but none of the actors are marked as unsaved even though their properties have changed. I have to go to each and every light and manually move it up and down or otherwise change the actor to force a save.
It's also not limited to just this function, I have the same behavior on loads of editor functions like this
Figured it out. You need to call TransactObject on the actor before making changes.
Hello! I'm trying to make a UI functionality that would allow me to move widgets (cards) with drag and drop within the container and change their order.
For example: move the yellow card to the top (image), and make the green ones "fall down" so they are still next to each other.
Do you have any idea how to even start with it? ๐
I don't know anything about widgets, but I'm pretty sure arrays automatically shift everything down when something is removed. So it might work if you remove the yellow card from an array of all the cards and append the card to the end of the array.
Anyways, I have a question. I have a for loop, and I want each iteration to perform on a different frame. So basically I want to split up a for loop into multiple frames. How would I do that?
you'd not use a for loop
you can wait a frame with a 0 second delay node
but that's really bad practice
with blueprints you're really limited on that front, what you probably need is to perform tasks async and pooling
this should be a good reference
you can still do this while keeping the widget in its container and just focusing on rearranging the elements in it
Hello, I have a quick question, I'm trying to make some checkpoints for a small racing game I'm creating, but whenever I spawn back at a checkpoint the car is just rotated to the checkpoint's default rotation from when I first place it in the world. I was wondering how to get the rotation of the checkpoint after I have rotated it. I tried "get actor rotation" and "get world rotation" and they didn't work.
Show code
Hi, Anyone know how to Collide an Object with Camera Viewport Edge ?
I was playing TMNT and saw that enemy actually Collide with Camera Edge... I just wonder how to do it?
Please help me with the process and figuring out the answer
Eh, itโs not as easy as it may seem, it involves some math. Thereโs some tutorials out there for side scrolling you can use to apply the logic
The BP_Skoda is the car
here's a tip: your camera FOV is the horizontal angle of the view frustum
If the camera is moving it can move some blocking volumes on the side of screen as well
Debug to make sure the spawn rotation is passing the values you want, and also double check that the car mesh itself is not already rotated in BP_Skoda
oh, but i'm using Othor camera view... there is no FOV in it
ah, that should be even easier then
this will be no issues, because it is a feature in the gameplay
look at the bottom-most post
i Just dont know which nodes to use, to detect the viewport edge for object to collide
someone did your work for you
I know it's cpp and this is the blueprint channel but all you need to do is copy and paste
or copy it to blueprints, it's fairly simple
Hi, thanks for suggesting that I debug, I completely forgot I could do that. It turns out I literally just didn't have the "Set spawn rotation" connected to the rest of the blueprints. Thank you for the help :)
Thanks a lot ๐ appreciate ur help
I am prototyping my flippers for a pinball game and I have it set up as:
How do I smooth out the roatation? Thank you in advance.
interpolate!
you'll need to that every frame for the duration of the rotation to make it smooth though
So timeline?
luckily input events trigger every frame
the ones from the enhanced input system, that is
so that's a nice and clean way to go about it
I haven't had any luck working an interpolate node in. How do I incorporate it?
ah but then you'll probably have to still rely on the timeline to put the flipper back into its original position
blueprints are quite limiting when it comes to doing something every frame
they're super self explanatory and the tooltips are concise
use one of the rinterp nodes if you use tick and deltatime
for timeline use lerp of type rotator maybe
though I'd probably just use a regular lerp float for the axis you need
just a regular subtraction
really? wtf lol
Looks weird to be sub
I mean you can just hover over it
I trust you obvs
๐
ah this is online screenie
Trying to check if player is rotating. Trying to figure out how to add turning animation
different engine version and uh I have some design changes going on but this is quite certainly it
ty
actually
I was trying to figure out what unreal does in this case
it refuses to compile
should've expected that
but nothing else is light green?
lo @carmine palm nevermind I know what it is
dot product
thats what I thought
I'm just baffled by the design choice lol
I can't even remember it looking like that
it was my first instinct too
but I was like "there's no way the dot product node would just be a line"
it's literally a process of multiplication and addition
I changed all the cubes to square colliders thinking that would fix it, but I think I'm gonna need some expertise here Started from the bottom now we here xD
dude please tell me you're not trying to determine the value of the dices using collision boxes attached to each face
they already have numbers on them lol I attached collision boxes to the static mesh of the dice on each face and am trying to assign the number opposing it. I've got a bool to decide whether or not its rolling followed by a delay for 1 second before trying to print it on the screen but i'm not having any luck with getting the boxes to detect the surface it falls onto
^ followed by plans to set up a clickable button to roll the dice. transform it to a new location to drop down a dice tower
so you are
that is a really bad approach
you can do something similarly janky but still miles better by having a scene component on each face and just checking if one of them is facing up
you can can iterate through an array, get the scene components forward vector and compare it to 0 0 1 with an error margin of your choosing
fair enough. Still learning lol. Whats this with a scene component? what would the array look like? how do we get a forward vector of a specific object? I'm sorry im like brand new to trying to get these kinda things to work
a scene component is just a bare minimum component that practically has nothing except a transform
which is all we need it for
the array would just contain them all
also there's definitely some elegant mathematical solution to this
I can only think of one for a six sided die though
might be super complicated but now I'm curious
the thing about doing it this way was the fact i can see visibly that it rolls fine. What is bad about using collision boxes?
Anyone know why this isnt checking which item if an Instance of the physics cube is already slotted and if so it cant slot another one?
all of these are running overlap checks every frame (and sphere collisions are cheaper)
additionally I just feel it's more prone to bugs
yea, set to an event tick i guess it would have to check every frame. i'll replace with spheres.. the thing is the fact that it isnt even spitting out a number behind the scenes
it's checking every frame either way, on physics tick, not on event tick
presumably you are just missing some simple parameter
like making sure the table generates overlap events
actually hit events
i thought that would be it but i've been playing with that for the last 2 hours ish
since that's what you are using
it wont let me connect the variable
which variable
box collision to the event hit
^ the numbers represent; left - number on the face. right - the number on the opposite side. they are Box collision cubes
ah no this is an event called by the actor
you want the hit or overlap event from the components
you can easily get them by right clicking on the component > add event
this?
yes
an event is something you subscribe to to receive an exec and payload when its called
there's no input or two way communication
so how does it know which face to call on when it comes to it touching stuff? since theres 20 faces
(stuff being the surface of the table)
I hate to even suggest this because this is another expensive operation and we need to perform it on all of the colliders
first of all, as long as you have any component per face you need to have them in an array, working with all of them as seperate references is a pain
best if you sort them in so the index matches the face value -1
Tried this and it does spin it and spin it back, although it doesn't always land where it started. Hmmm...
๐ค
the only way you can do this with collisions
Lerp (Rotator) maybe?
is if you either have an event for every single collision (really bad)
or if you run a for loop on an array of them and get overlapping actors to check for the table
(still really bad but at least not spaghetti)
this entire approach is cursed though
theres gotta be a better method ๐จ to this madness!
don't use two timelines, just reverse
also probably not from start
How does one reverse?
The reverse playhead?
OK, but the update and finished outputs can't go to both set world actors. That's why I was using 2 timelines.
I don't get why you'd want them to
or what you need the finished output for
as is you are playing both timelines at once trying to rotate the same actor if you release too fast
Hi guys
it sounds simple, I can't figure this out.
I have a texture object variable to set my texture, then a second variable for the normal. Since they share the same name + '_n' at the end I thought I could just append it but I can't convert a string into a texture object of course. Any ideas? ๐๐ผ
Expensive in what regard? This should be dirt cheap
Well
20 comps transform updates but
Beside that its meh
the transform updates are irrelevant
So the flipper will go back to its orginal postion.
they are just attached and inherit their transform
So wheres the expense in your estimation?
running a for loop to get overlapping actors from 20 box collisions
It wont even show on the profiler
Its likely one of the only things happening in this game of dice
if it's the sole and only thing in your game yes you can probably get away with this, but it will be a decently measurable framedrop
https://sketchfab.com/3d-models/d20-dice-w20-wurfel-3d-model-free-3b44541db43e4e979efec290ec706cbc <- This is the Dice Asset if you guys wanna try it yourself xD I've been korfuffled for the last 7-9 hrs
-NOT authorized for AI dataset training-
NEW VERSION : https://skfb.ly/ow8oO
Remake of my infamous D20 Dice model, featuring both cleaner& higher res geometry and textures, all FREE for commercial purposes !
Geometry made by me in Blender 2.83
PBR maps from: https://www.cgbookcase.com/textures
Letter font from: https://www.1001fonts.com/searc...
I wont believe it untill some profiling shows me it
Theres no way (uneless you're alreadh running on a toaster) that this hurts fps in any noticeable way imo
Hey guys i made a blueprint interface with a function called GetHeroPawn, implemented in the player pawn and it just returns a reference to self. Then i made a function library with a function called GetHeroPawn (again) that calls the interface function on the player pawn. Seems i can get the player pawn class from anywhere now without casting, is this reliable? is this cursed? is this overengineering?
no it probably won't in a dice game, it's just extremely inefficient and expensive code
We wont agree on this
Why? I would just cast to the player
Yea but i mean, if this works, why would you cast?
Because u use interface to interact between different types
look how cute it looks
If u just getting the player pawn then cast away
there's no way you can justify running one of the most expensive blueprint nodes 20 times and having 20 movable collisions just to check the face value of a single dice
I mean getting it working is the most important thing
but we can acknowledge this sucks
@round grotto interface is not replacement for cast
Avoid tutorial that say otherwise
I just wanna know if it can break and lead to bugs
I got faith in no impact at all, to put it that way
But yes, there would be faster methods
interface does casting in background
What casting does it do?
you could so much with that millisecond ๐
Why would you create a function library?
Precaching rotations in a tiny tmap was also suggested
But its harder
I'm just joking around now, I would love to profile
Ye but it's not about the cast but more like the hard ref it create for bp.
Many tutorial says avoid cast and use interface instead and it claimed many victims
think it would be better to try to run a cast to the table from the center of the dice? is there a way to mark each face so it'll calculate which face is on top and labeling it the number it needs to be?
but man it's 5am
You're right thats not needed
Yes, Dev should use interface in certain cases, not to avoid casting
Cases like You have a pickable item, and that can be Health, Ammo.
Instead of checking the pickable item type and calling the Pickup() method interface should be used
you'd still need the math to find the rotations, well unless you do it manually which is quite feasible
Don't create interfaces just to run away from casting, this is wrong
read this
Could you expand on this?
Lets say you created a pickup system
And you have pickable objects
For example Ammo And Health that can be found on ground and player picks them up
interfaces are there to make things class agnostic
I know how interfaces work on the surfaces, why are they worse than casting tho?
casting to a simple base class is pretty safe
small memory footprint
things that are loaded in anyways
Probably you would check if that actor is ammo or health by casting it, if cast failed that means its not ammo, or health, or maybe checking the Actor tag to see if its ammo or health and then cast it and call the method
Instead you can use interfaces
Pickable actors will implement that interface and the interface will have Pickup() method
Just check the tag on that Pickable Actor, is the tag "Pickable"? if its then call the interface method Pickup()
But are you saying i shouldn't use interfaces to transmit references around?
Because this is not the usage of interfaces
Show me how are you calling that interface
It's not about worse or not. Different tool different purpose
well, there's times that it makes sense to do it
You created an interface just to return the self actor, and created a function library that calls the interface
Like why..
dude
ye the function library is unnecessary
The interface is unnecessary
what are you doing?
You can do a function library that's fine
Get player pawn already returns the pawn, why are you calling get hero pawn interface that returns the pawn on the pawn itself, when you already have reference to the pawn you want
Keep in mind this is my objective, i want a single pure node that returns my specific player pawn
to cast to the type? lol 
You don't understand, get player pawn returns Pawn, it doesnt return my pawn class
Cast away
They are already on the hero pawn, they can call the methods they want directly
Ur player is always loaded anyway
He is doing it in function library I think and want method he can call anywhere
Ok so better to make a function library that does the casting? Again, i want the single pure node for ease of use here
The end goal is to have a pure node
Like get player character
But his own instead generic one
exactly
the interface is unnecessary really, might as well just cast to the class since it's already getting loaded by the return
why is it getting loaded by the return?
by making it an output you're loading the class into memory if it wasn't already
they mean its returned by GetPlayerPawn you can cast it
Makes little sense with interface in this scenario
Oh so it gets loaded even if its null?
Bp limitation
Had no idea, makes sense then
Casting to a cpp class of your character would of been next to free. Won't get it loaded to the memory
Im sure theres more stuff to stuff in the bpfl anyways
But in your case your character is always loaded anyway so doesn't matter.
ya it's a good thing to know, also having dependencies everywhere is bad, but in a library it's fine I guess
I mean i plan to use this for pawn, player controller, game mode etc. Arent those dependencies worth having around?
you just don't want to have stuff loaded into memory when you don't need to
classes that will always be around are cool
Cast to base class when possible
stuff with a small footprint like actor components, interfaces, simple base classes without expensive texture and mesh dependencies
I wish I was encouraged earlier
8 years of bp only proj
same, same
I have some TERRIBLE old projects laying around
Better late than never
there was a time I didn't understand child classes xD
I'm actually happy i'm working on a bp project so i get to chill
I'm chilling with some cpp scripts. They saved my project
Automating renaming thousands of material allowed me to move on
Also now I have a decent loading screen
My bp only project took 1.5 mins to load.
A spaghetti monster and hard ref everywhere
I still have like 50 BP enums and structs
New proj load in instant
Ooof
life at the limit
I'm Done with bp structs they made me redo hours of works
No prob with enum soo far but they said it's cursed
somehow, still nothing happened so far, and I'd just trust version control to get shit back in order
but I'm working on converting them
They are silent killer tho. Everything seems fine till I want to package
ah that's the worst
when I had my last gamejam I packaged every hour out of paranoia
I just live with it and use 0 bp struct in new proj
same but I enjoy refactoring work to be honest
always looking to clean up and improve something
it's a longterm passion project so I have always the fact I'll still be working with this in 5 years on my mind
Share progress when you like
it's getting there ๐
hopefully in the coming months I have a bit of a vertical slice
doing it all myself even including sfx and music, literally just working on this game all day every day haha
Tremendous amount of work
I enjoy it so much, it never gets old
doing everything gives you the variety needed to not burnout
Yeah that makes sense
It's so easy to just have 1 file in your project with a bunch of structs and enums in it that you might as well just do that.
Mine's 8 years old, off and on
Iโm interestedโฆ how do you work on it all day every day and still make a living / pay your bills?
Sugar daddy
well, I'll only be able to keep going like this for another 1,5 years, I need to get some funding before that or I'll be forced to dedicate a serious portion of my time to freelancing
man I wish
Great you are able to follow your passion though.
Any touch in my app keeps bringing up the console. Any idea why this is happening?
Yup. It takes no effort actually. I should have done that
When my character capsule collides enemy capsule it bounces or shakes a little. how to fix that? I've tried to change collision preset but it didn't helped.
Founded solution: I needed a custom collision preset and set Pawn to Overlap
hi i want little help with this i want a thing like 4 enimes of the same blueprint placed in a level waiting and two attacking if the first two died the others can attack can someone plz help me
since when visual scripting in UE existes ? Since creation ?
Hi guys, how can i do this im UE4? i'm trying with physical animation nodes, but once i move the enemy head , then doesn't back to animation position.
read online "Blueprints were first introduced in Unreal Engine 4"
ty
how can i use the set control rotation node without rotating the camera just the mesh ??
based on some stuff i found on the web it looks like the base for it has been working for awhile
mh
the oldest video that i found of UE thats uses BP seems to be 2015
prob not the oldest
How is your camera attached to the mesh and what settings do you have for it?
yea how
Quite simply, it doesn't.
Youve got something else going on there.
I have a object class reference that I want to turn into a skeletal mesh object reference. How could I do that?
Hoping someone can help me with something. I'm trying to rotate a billboard sprite according to a 3d vector projected onto a 2d plane (camera forward as normal). It seems to work OK if you look directly at the position of the vector until the camera points away from where the vector is, at which point the rotation of the vector isn't consistent. When the camera moves past the vector and looks away from it, the issue becomes more apparent as it starts rotating in the wrong direction with the same inconsistency.
I'm probably not being particularly clear, but here's the blueprint and some clips of the issue.
@trail echo what result do you want?
I'd say delete all that trig and do it with vector and rotation nodes without breaking them apart
If the goal is that the dude always faces camera and just spins in a circle I'd do it by combining the camera-dude rotation with a rotation that rolls over time, assuming that behaves. First make sure just adding roll forever behaves well.
I should probably clarify, the intention is to put all the trig into a material later because there are going to be a lot of these things later on attached to bone sockets. As such I can't really use the rotation functions to figure this out, needs to be math.
Ideally, if we were to project the X vector of the green cuboid onto the screen and then figure out it's angle, that's the angle I want the android logo to be at. As it stands, it only works that way if you look directly towards it.
Tick:
Roll += RollSpeed x DeltaTime
RollRot = MakeRot(Roll, 0, 0)
LookRot= FindLookAtRotation
Zero out all but yaw if you want
DudeRot = CombineRotators(LookRot, RollRot)
What's the final end result supposed to look like?
@dense mica idk if you care enough, but I moved the convo out of AI.. I have basically made the dialogue system using a single component bp, a single interface, and some clever thinking, and not only does it work as before, it's not as complex as I thought it will end up, and it also can have cycles!
The end result should be that the debug X axis always lines up with the cuboid as it appears on the screen. The debug pertains to the rotation of the sprite if it wasn't clear. See below:
Are sprite and debug both wrong?
Yes, the debug is for the sprite.
What should the end visual result be, just a sprite orbiting a 3d point?
plz help
I want the orientation of the sprite to match that of the object its attached to, in this case the cuboid. I use a material parameter to rotate the billboard.
Just put them in the level to handle the first part. For the 2nd, what have you tried so far?
Can you already make the dudes attack?
I'm trying to apply an impulse to an object when shot, but I can't find a way to get the hit direction from the line trace. Any tips?
please ignore the node mess
probably the impact normal ?
honestly i'm guessing, but i would guess that has the direction you need
I tried this, but it just keeps giving me 0,0,1 as print output :\
Anyone?
I spawn 30 Ai players but they get stuck with each other and don't move...
Any solution. I spawn every ai without colliding and stuck in each other
Wouldn't you have to cast to the object and then extract the skeletal mesh as a component?
Try setting them as dynamic obsticle, other than that I have no idea
In this case I only have this class I need to work with
i got a relly wierd problem, the input wont work at all, when i press it it shuld play a soaund but it doesnt, it works fine when i do event begin play, if try to use any other input it also does not work (the custom input i have there works in other actors too), i have this actor in my character, anyone knows what is going on here?
Oh shit, we have the same pfps
i just wanted to say that
Than I don't think you can convert it to a skeletal mesh object :\
If it was a object reference, how would it be?
Are you sure you have input enabled on that actor?
it still needs to become a skeletal mesh object reference
what ye mean?
Thanks
Like this, except the flashlight would be your mesh instead
like, is the actor set up to reckognize player keyboard/mouse?
if it's a pawn, the player has to posses it first, if just an actor, then you need to enable inout in it using "enable input" node
is that what ye mean?
cus if so ye i got it
Try making the player posses the pawn. If not, you can always use an interface or something to send input from player to your thing
Not sure what kind of actor you are using and for what purpose, so it's kinda hard to tell what the best solution would be
Yes he is right
im using jsut the normal actor
Then enable input should have worked, hmm...
Not sure how to help you with that
You should use posses node too
Doesn't posses only work on pawns?
Hi everyone! I want to borrow some brain power... I also asked in Material too but here might be the better place.
My procedure follows:
- I have a building object that consists of multiple static meshes with different Materials that does not share master material.
- Let's say I made a function called "MF_AddRust" to just blend 2 materials in there.
- I add the material function at the end of the material of a mesh.
- I repeat 3 to the all the object in the scene (Imagine the scene is a lot bigger than this)
Question:
How can I avoid adding material function over and over again for each meshes?
Do I have to write python or Blueprint Editor Utility?
I appreciate any of your help!
hey ok so the input now works but now if i press it the same inut i got in another actor doesnt work
i tried alot and still and i can make them attack but i dont have access to start attack node only the on attack started and on ended
Maybe your inputs consume each other? Try setting the priority of the most important one to 999
where do i change it?
in the class settings on the left of the BP in the editor
got it there was something called consume input and i chnged it and t works now, thnaks for the help
Why are 0 second delay nodes a bad practice?
is anyone able to help me with getting the resolution text to change to the resolution that the game is on?
Should just be able to hook both of these up and it should work.
will try that now, thank you
it just isn't intended behaviour and possibly unreliable, I found out there is a way to properly wait a frame in blueprints though
it works! such a simple fix ๐ thank you again!
use an array
Solved this. Unlikely anyone else will benefit from the answer but just in case, the solution doesn't take into account the FOV of the camera. Getting the vector between the camera and the target works well enough. @faint pasture, appreciate the help nonetheless.
while you're at it maybe use it to populate a combo box so people can choose resolution from a drop down menu
Shouldnt cross post + totally unrelated to bp
Wouldn't you then use Event.Tick instead of a for-loop? You should be able to achieve a similar result, but the benefit would be that it's asynchronous (non-blocking) and will happen every tick (you can control the tick duration in the BP class defaults I believe). The downise (if you can call it that) is that you have to manage indices yourself (like incrementing the index and checking the limit condition), and maybe some variable scope nuances, but those are minor IMO
Or custom forloop macro
I prefer custom as it can be re-used
You can also easily define how many elements to process per frame
Well my for loop is connected to Event Tick, so it would be easier for me to just edit my existing loop
I don't understand - you have a loop connected to even tick but then you want each iteration of the loop to be on a different tick/frame? How does that work?
I'm not really looping on every tick, I'm performing a check on every tick, and if the check is true then I loop
Switch on int ๐คฃ
I'm curious what you are referring to by "pooling" in this case?
I just accidentally misused the term it seems
Ah, okay, that sounds closer to what I was thinking of then. So essentially your challenge right now is to figure out if the event tick is coinciding with a new frame? (since they're not necessarily the same thing)
No I got that solved, I'm using a Do Once node
Everythings good you guys can stop worrying about me
LOL we just care.
are you sure this needs to be done every single frame though? if you are considering distributing the task over several frames that sounds like you should be using a timer
I heard 0.01 timer is soo bad that tick is prefered
๐
There is overhead with timer that if u need something done in 0.01 u might as well use tick
It can have unintended consequences
well yea timer will execute multiple times per tick if its rate exceeds your framerate
^
๐
Point of clarification: is 'tick" really always your framerate? I thought they were two differnt things unless you're in an AnimBP
I don't worry about 30 times per second or less timers though
Tick runs every frame and it comes with delta time. Basically the time between current frame and last frame
"Actors and components are ticked once per frame, unless a minimum ticking interval is specified" - I think there's a nuance. I mean, you have to make an effort to over-ride it, but you can...
arguably a good thing in most usecases too, assures your logic will stay consistent
can someone plz helpppp ๐ฆ
Back to trying to figure out the dice roll. I'm all ears if anyone has any suggestions
maybe keep a number that says how many enemies dead
have the first two attacking when it's zero
and the second attack when it's 2
More info?
Didnt colliders work?
its only one blueprint and i dont have access to start attack node only on attack started and on finished
Really dumb quesiton and apologies for not having studied your original thread too much - is my understanding correct that you are using physics to simulate a die roll and trying to capture the RNG value from the results of the roll when the die comes to rest?
you could have a counter for how many enemies are currently attacking
I used to use a custom tick interval instead of a timer for components that do nothing else, but other devs didn't like that haha
You could also on rest do a trace from straight uo to straight down
If that's the case, my obvious question would be - have you considered the reverse? Predetermining the RNG result and then simulating the roll to achieve that result? Meh as I type this that's probably MOAR work, but just a thought
Hit face index
No ๐ญ
valid suggestion, caching physics simulations is quite doable so you could make a big table and pick from that
i'm saying one way would be to keep a number of how many dead, so that you can attack. wdymyou have no access to start attack ? well you need to start attack somehow
I can see why - if the norm is to leave the tick interval at 0 (1 / frame) then most devs might be surprised at non-standard values unless you documented it clearly.
Maybe each side can have forward vector. Then do a dot product with the up vector. See which one is closest
Trying to work it out I am interested
Just check for blocking?
No worries, I'm trying to use a physics roll on a d20 to simulate a real dice roll on a table. I'll need a single dice roll then a dice roll for 2 dice at once. I want the motion of a physical roll but then on the backend calculating the result of the number shown.
Yep
that was also my suggestion, but I can't think of a better way than using scene components
What if there is something on the top ๐ฑ
ok i will try this if i could plus i dont have access to start attack because its combat system out of the box so i dont have control over alot of nodes
Ill make it in <15 min at pc
I wonder how it's implemented in Roll20...
But I suppose it could work
If that was a risk, custom trace it
Many ways ๐ฆฆ
I used collider boxes In hopes that with a collider for each face with a delay before it calculates after it stops rolling. But I'm genuinely lost on what the blueprints would look like hooked up
Delay is almost never a solution
^
oh shit yea face index
Yyy
but that seems tricky
You can probably launch the dice, then start a timer which get deactivate when velocity is 0
U can then do your trace thingy or collision upon timer end
Oh I don't know never touch physich stuff
That would be neat
the issue is the multiple triangles per face and assigning each to the value
You dont hit the triangle
Just loop thru the dice and assign event
You hit the face
Don't do unnecessary work
Imagine 20 of that bind
When u can sort it in a few node
I mean... even doing 20 - OnOverlap
I wish I understood this
It doesn't work as intended but I could be setting it up wrong
And additional asaignment of indexes
The last on overlap is the face down side
Then its just mapping rhe correct index/value to each overlap
No need for a data table
You just gotta figure out whicj face is down, and which face is opposit
Id just do the trace but this would also work
U wouldn't need enum for this
thats hard thats realy hard
It would have to trace just the Z axis right? How do you calibrate it to be at the center of the dice doing a trace straight down and straight up?
Grind the hours. Study the basic
why?
Start = Get actor location + 0,0,100
End = start - 0,0,100
because i dont have access to start attack
Start and end on hit event?
i don't know what to say about stuff that you can't access, you somehow need to know they are dead
i wouldn't be surprised if theres a die event, or death of some sort
Shouldn't it be as simple as getting the highest z to pick the active dice?
and without access to start attack, i mean all you need to do is run it
ok i will keep on destoyed and increass the counter
Wouldn't that be just a bool? Dead?* T or F?
whats after the counter
you need a way to call attack on the enemy so that you can actually attack
Start and end of trace ๐
Sorry maybe i mixed now
you could use a bool on the enemys and loop through to get dead count, but a count of the dead would work also
check the count, if it's == 2, then start attack of the other enemies
and maybe some sort of boolean so you don't keep doing it
thats the hard part i have trigger action node but it work only on charcters not on animes
Manager subscribes to enemies OnDestroyed during some 'begin event'
Hello, I am trying to make a skill tree system and would like to create a connection lines from parent to child. I would like to draw a line from the the middle edge of the node to the child. how would i go about achieveing this. please suggest alternative ways of making this is there is. thank you ๐
You could predraw them on the bg texture
Not as dynamic but would work just fine
You could dynamically draw them on the bg texture/material
This would allow for some cool effects aswell
The background of each slot widgets? could you explain further if you dont mind.
I ment a background for the entire container of talents / skills
ok i find a way on action finished i can set it to idle now how do i restrict two from attacking again after idle
Hey y'all! Currently, I'm trying to make a camera actor turn around using RInterp To and an Input Action so whenever I press the key, the camera actor should turn around, and when I release it, to go back to the original position.
Turning around works, but whenever I release the key, so it goes back to the original position, all it does it jitters half way (values printed on the side) and it stays that way.
Here's the code I'm using: https://blueprintue.com/blueprint/4u0xvy3x/
i really don't know, your using something i've never used before and it's not a built in thing.
I think you can use a boolean and a branch. Set the boolean to whatever you want, and use a branch to check if they can or can't attack. I don't know if it works in your case though.
You got a bg for the entire talent tree right ?
The way I'm handling it is through this, each creature you encounter has a specific skill you can unlock by killing a specific amount to them. when you click on the creature you can see all the skill that has to do with that creature. so in a way yes.
Oh right
This sounds like something youd wanna have dynamic
To avoid creating one texture for every enemy, and a new one for every added creature in the feature
Unless you know you can get away with 2-3 templates, ofc.
The HUD draw feels rather limited so id rather investigate how to get it done through a ui material
If you still wanna use the draw method, the position and offsets depends on the allignment of the canvas slot
Easiest is prob to just allign them center (0.5- 0.5)
here is what im working with
there's a function specifically for drawing lines in UMG
Recently exposed ?
Ill try to investigate, but i dont really care if its drawn by the on paint or if i create a tree connection widget and dynamically attach them to the end of each widget. as long as it works then i can optimise
thats the on paint right?
the draw works just fine ofc
that looks sick and like what im trying to make but i just have no ideal how that is done.
are these preplaced or dynamic?
damn, that is great. are you using a canvas and then dynamically adding in each node groups?
yeah
used an offset for the nodes
Tried to do something similar to the shield hero anime
ahhh, i see
so here all the generated nodes are in a grid, but you then generate the lines after the grid to each of the node position
Sorta yes
but this one looks less of like a grid
First iteration was grid
^That one was free placed
By coordinates
So node 1: x150 y0
Node 2: x250 y50
Incrementing each subsequent nodes by 100 on the X and 50 on the Y?
Grid was mostly to get the offsets right ๐ see my textboxes up in the corner
Whatever value you want
I typed the coords manually
Node 3 could suddenly be x-375 y-20
The only limiting factor is the nodes size/overlap
overlapping with each other or overlapping the lines?
to me that is tricky, maybe because i haven't even gotten there yet
Its just a matter of lining them up
Nothing in code checks for it
So usin pre construct helps with that
The visual verification
you cant draw on pre construct but
Does anybody know how to itterate through an array with a delay. I want to toggle the light intensity on a few lights, that should get activated one after another...
like this... but this is keyframed
Custom foreachloopwait
Copy a default foreachloop
Then remove the sequence, and get the alternative execution from a secondary input
thx i`ll take a look ๐
remove this?
Yes
Create a new input
Execution input
Name it "Next" or something
And connect it to the "Increment loop counter"
this is what I have been able to d, although its straight right now. Generated in a vertical box. ๐ฅฒ
where do i get a secondary input?
you mean just add to the squence?
i did
i did
Then adding a new input, you connect the new input to the "increment loop counter" part
Which loops back to the branch etc
This is what mine looks like
I removed the secondary internal int
I would like to make it dependant on its parent. each skill will have a list of child that can be activated when its unlocked. but i would like to try the canvas panel style.
It can still depend on parent, you just gottq point it to its parent
I had a node index i used to point to 'parents'
Collision boxes work now but only when the player touches the box. What would I have to do to keep that same thing with the table instead of my character?
So draw line was between "node" and "node parent"
Make sure you react to the correct collision channel
The new input should be the same type as the first input
Execution or smthn
Oh nvm, it is
Second input should be a wildcard array
Now you manually trigger "next" for it to move on
Is there a shortcut for replacing a dead node with one that has identical parameters?
Loop body -> do thing -> count?/delay/whatever-> Next
probably just refresh it
nah it's dead. that function no longer exists on that object
I just tried it and refreshing it works
Not if the function doesnt exist
refreshing a function that doesn't exist makes it exist?
disappointing if there is no shortcut. one of those things that's 100x faster in text lol
ah you want to replace it with an entirely different node, not a new function with the same name
And even replacing a variable with a function
Which i sometimes want...
using the first output of a function?
Im the cases i want to, its usually with the returnvalue of the function
multi return tho
Is there a keyboard shortcut that jumps to the end of the list here? Like, obviously I'm looking to get a ref to the input var named "target" but that name also matches a LOT of things so the list is super long, and for some reason it puts local vars at the very end.
But for something like this, it would only favorite THAT one
hold page down
I wish I could star "Variables" as a category
It still respects context so
It works surprisingly well for me
Just drag it from the left panel
As for searching in context, using no spaces tends to work more effectively
I.e. getTarget
Hello, I have an (easy question). Im making an landmine and it should do damage to nearby players when it explodes.
I made this an other time with a volume looking for overlap, but i see other people using (line) traces or just getting the distance to all player actors, and no doubt there are even more ways. They probably all do work, but is there a way that's best and is most often used for these kind of things?
Wait what left panel?
it just activates the first light -.- am i doing something wrong?
well it looks like your array element is an array ?
For 100% sure the macro is the problem
ugh lol
Ah if this is a function then yeah just search with no spaces, itโs faster
switched back to single
Also this is more of a PSA but never ever pipe a pure node right into a loop. The pure node gets re-run for every loop iteration.
ya i actually read that the other day, had to change a bunch of code
The best way is the one that works
Overlap volume is fine
Works?
It's actually a more general problem too. Like look at these two examples and ask yourself, does A == B? I'm pretty sure it does for the second one, but not the first.
Easy to find out
nope :/ just affects the first light
Calling set light several times?
Also wait I meant the other macro, are you 100% sure that this list of lights is actually containing what you expect it to contain?
check your index
can someone plz help
You need #gameplay-ai
Hey guys! So I am creating a climbing mechanic for my game (I used a tutorial and i'm like TOTALLY new to programming) so I was wondering how could I make it so that when you reach the edge of the top of the platform you climb up and over to the top of it?
ok i will ask there
i just took the array out of the macro, doesnt work neither
nope
what do you mean
sorry guys - i am a total BP Rookie ๐ฅฒ
the index comming out of the loop during the loop body
also looks cleaner with increment int instead of assign
where should i put it?
i mean just print string it and see what it says
aaaaa I should probably change this into an MP4 file
The other option is just to give up on the loop macro lol and instead just store the current index as a class variable and do the loop via a looping timer
apparently i still had my code laying around
only thing i can imagine is SetLight being called multiple times
Who's calling "next" in this case
Help would be much appreciated by the way, probably should've said that already 
I always knew macros were evil
broken nodes apparently don't cause compilation failure while in a macro
is the macro used?
functions are compiled as a unit, macros are just a bunch of nodes getting pasted in
hey guys, how would i make my player start with 80% health instead of spawning with the max health?
I was about to write that and thought to myself "now be nice" hahaha
quickly realised how much of an idiot i am lol
i call it in editor, by clicking
This isn't really answering your question (I actually know almost nothing about the character movement component) but how does your trace system know the difference between reaching the top of a flat platform, and reaching the top of a thin wall?
Instead of setting Health to Heatlh, set it to a number like an int or a float.
Remove that first "health" node, and you'll be left with a place to type a number i the Set node
(that is, if you want to hard-code it)
i have a max health variable tho so i just set my normal health to 80 instead of 100 which is the max health
Or you can set it to 80% of the max health. That might be more flexible
you cant use delays in editor ๐
yh i mean for one of my levels i wanted the player to start injured so i can show the healing mechanic straight away but my mind went completely blank lol
I'm guessing the problem here isn't so much that you're not setting health - I'm guessing that the other important parts of your code aren't reading that health value.
yh when i hard coded the heralth like you said it didnt do anything
make health public so you can set it on that instance
good idea
tried messing with all the collision settings and no no avail it only works when it touches the player character. I need to make it spit out the number upon impact of the table
I don't think your code above is actually doing anything. it's setting heatlh to itself. Kinda a noop.
show code
(Tht's no-op, not noob)
you are setting the health to 80, and then you take your health, which is at 80, and set its value to the value of health, which is still 80
I mean, I think it would work regardless even if you got rid of that onBeginPlay bit of code. Because you're hard-coding the default
But go back and test your other levels to make sure you're not setting the health for ALL the levels to 80
AAAAAAAAAAHH
๐ญ @flat coral
I look at that and my brain goess IMMEDIATELY to "REFACTOR REFACTOR"
Can you not loop / iterate through those?
no beacause my health is basically my current health not my max health, so on begin play im setting it to 80% of its max health
yaaay! -.-
nice !
@golden kite I dont know
Lets avoid making it a loop after the work has been done xD
dl'ing the asset now
was gonna setup up the trace method
instead
you are setting health to health
this is just the beginning to the nightmare i'll be getting into after getting the dice to work ๐คฃ
Wait, why colliders? Presumably the sphere is an actor, why not just check which way is up and do some vector math?
the default value is 80
anytime an instance of the character spawns
it will do so with health at 80
@flat coral I have no idea how to do it and am using tutorials from the Tube to figure it all out plus the help of you wonderful folks โค๏ธ
What do you mean by this?
the one thing that is consistent between every programming languages is how evil macros are lol
Or even better to avoid any math, if the faces are different components, do a line trace from the center going straight up and just see which face you hit.
but I love my beautiful c++ macros for cheat commands lol
no evil runtime errors there
the faces aren't different components the dice is one static mesh and I've added colliders to try to make it work
c++ macros? ew
I ain't making a class for every single cheatcommand and I'm not hardcoding
I've been messing with wayfinding via traces a LOT lately, so I'm just thinking, tracing straight forward can tell you when the vertical surface has ended, but it does NOT tell you about the presence of a horizontal surface.
||that's one more reason why macros suck lol||
omg i have no clue i'm like such a newbie to blueprints and coding in general ๐ญ this is for my college course and i have to do some coding as well as design and i'm so bad PFTTT
@magic vault I FEEEEEL THAT minus the college
it could be worse
you could have 5 years of experience and still feel like a noob sometimes
why is the 2nd timeline not calling
My way of thinking is booleans are friends and if i can't find a way to make booleans do everything then i'm DONE FORRRR
Booleons are just a true false statement to my knowledge Bools and branches are friends
Oh in that case fuck it just don't put thin walls in your game lol
I'm going to change the blueprint so that you can only climb on a specific type of platform anyways so it should be fine
but I need to find out how to make the character continue their velocity over the top of the wall atleast + also rn its really floaty and i don't want that either
sadly they all share the same face
or face ID
unless i messed up the import
Hmm
this dice doesnt make to much sense to me
what do you do if it's a split ?
these are both equally up ..
This is an IRL problem, that can actually happen when rolling on an uneven surface. Gotta re-roll it in that case
(Fun fact, the unwritten rule in tabletop games is if you can balance another die on top of it and have it stay, the roll is valid)
What are the collisions like?
I remapped the collision on the dice
not good x)
but the trace method works
for all intents and purposes
how did you do that? O.o
Also just be aware, if you're actually rolling the dice with physics it's very possible that you accidentally create a biased die. Most games that do this are actually just doing RandomInt(1-20) and then faking the dice animation so it lands on the already-selected number.
Cant you just add some roll tower and begone ?
I have a roll tower but idk what would be needed to simulate that
Maybe? But I'd be worried that the physics system has some silent bias in object direction. Just because it's not built for this, it's built to look and feel like real physics, not to be fair like real physics.
adjusting the gravity and mass etc would change the way it rolls no?
you can make a simulation
and test it a million times
to see if there's any bias to worry about
unessesary with 1000 tracelength lol
this is with 100
how does the line trace translate into calculating it as a variable that can be used on the back end?/displaying on the screen
you're a wizard! lol Now i just need to reverse engineer that and apply it to the dice โค๏ธ
i dont understand why my player is glitching out from this
@gentle urchin would you be cool like streaming that and walking me thru how you set that up? I'd like to learn and be able to pass the info along to others trying to do the same. because theoretically it could be applied to dice of all types rather than just a d20?
the numbers are annoying, ill admit
if your trace hits those, its just out of the waters
If you wanted to be even fancier, you could make a new component type that subclasses static mesh component but includes a single new variable, the roll result. So then you trace for a component ref, cast it to your custom component, and just grab the number from the var
Why not just start the trace inside the die and go outwards instead?
hm
that prob works?
hm na
face id is 0
another problem is the letters are rotated differently
so its not straight up doing + X in any diraction
I could try findind a different dice mesh if needed
Personally i'd probably just have plane faced dice,
with numbers set by some material or smth
the int to int is how you set up what face its on?
I'm not sure where the right place is to post this kind of question, but does anyone know of any tutorials in creating BPs for, say, turn-based RPG battles if I were to make each on widgets?
For the time being, anyway.
idk why my blueprint is behaving like this
