#blueprint
402296 messages ยท Page 848 of 403
Use a FIND with your map. You can do GetClass of the weapon like you're doing, and feed that into the find. The output will be the value (or ammo class you've defined for the weapon class)
like this?
or this
second one
so i can now spawn the ragdoll npc, but it collides with my character, causing it to move upwards very fast
so, literally the right idea, wrong direction
Use the character's forward vector as the basis for your offset
I believe that's because you're missing quite a bit of code from this function.
Adding an item to your inventory and getting it to stack up means you need to first see if you can find a stack already in your inventory.
If the stack is there, add the quantity you're picking up to the quantity that already exists in the slot that has your item.
If it's not found, then you have to add it to the first empty slot.
well I know that. The idea is to learn what I can about inventories.
This are the steps i needed to check on my inventory when adding an item, the logic behind is going to change and you also may need to change the steps depending on your setup. But it's good for a basic idea
I know, I all ready have all of those in functions. Something went wrong when I change my inventory around back to slot based. I was having too mean issues. Any way. I'm starting to put some if it together to see if I can get some of this crap to work.
can anyone tell me, is this the right way to find a stack.
Didnt see the overflow down on the right
Looks fine
Pro tip: you can exit a loop early by calling Return() in the loop body
it seems to be passing info ok.
if it finds a stack, It add to stack
Also
Consider what data you need on the outside
Do you care about stack amount ? Or just how many is left to be stacked
Yes, sorry about that. More images coming up
These two ways of doing the function will work identically , just with less wires
It looks a bit weird
to recursively add to slot
yet return the remaining amount ?
recursive methods are confusing like that i suppose
hard to read, easy to loop , many pitfalls
I just checked my notes and some samples. This is the right way to do this.
I guess there's nothing wrong then x)
is there another way to check for stacked items
nothing wrong and it doesn't work ??? so figure that 1 out, ???
this is just too pinned for me to under stand what's it doing
i don't think the find stack is working all so. i need to find another way
So I tried using the "was recently rendered" node to detect if an actor was on screen (^blueprint for that^). but its ticking true when i'm not looking at it, as if its still being rendered. doesnt tick false until i get far enough away. Is there a setting i need to fix somewhere?
what are you trying to do?
I'm making an interaction system thats based on the object being on screen. I need it to tick false when not looking at it as it should.
This should work, but its still rendering when not on screen for some reason. I might need to install UE4 to make sure that UE5P1 isn't the issue.
Pretty sure it doesnt work as you think it works ๐
That's possible, saw a YT video of it and I tested a simple was actor rendered with tick and that didn't work like it did in the video.
I suppose you dont do c++ code either
how do i get a door to move when I click a button in a widget? (been trying to figure this out for like an hour....)
could be a #umg question but i figure it's more to do with blueprints.
Nope, not yet. lookin like i might have to learn soon
this should work
If you wanna dare yourself out into c++ , this would be somewhat the equivalent code
//.h file
// the Horizontal and Vertical Offsets are there for tolerance from screen edge, but can be skipped if you dont need it / care for it.
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Perception")
static bool IsLocationInViewport(const APlayerController* PlayerController, const FVector Center, const FVector Target, const float HorizontalOffset, const float VerticalOffset, FVector& DebugLocation);
//.cpp file
bool MyActor::IsLocationInViewport(const APlayerController* PlayerController, const FVector Center, const FVector Target, const float HorizontalOffset, const float VerticalOffset, FVector& DebugLocation)
{
FVector2D ScreenLocation;
int32 SizeX;
int32 SizeY;
FRotator tempRot = FRotationMatrix::MakeFromX(Target - Center).Rotator();
float fA = FMath::GetMappedRangeValueClamped(FVector2D(0, 180), FVector2D(5, VerticalOffset), tempRot.Yaw);;
FVector TestLocation = (Target + (tempRot.Vector() * HorizontalOffset)) - FVector(0.0, 0.0, fA);
UGameplayStatics::ProjectWorldToScreen(PlayerController, TestLocation, ScreenLocation, false);
PlayerController->GetViewportSize(SizeX, SizeY);
DebugLocation = TestLocation;
return ScreenLocation.X > 0 && ScreenLocation.Y > 0 && ScreenLocation.X < SizeX&& ScreenLocation.Y < SizeY;
}
Sigh... Time to watch some C++ videos... I'll save this in a txt in the meantime. Thank you!
Is there a way to debug material functions?
like see what math its doing as its running?
bp version works fine, just not as performant i guess
I've got a material function that is supposed to do Line of Sight using PostProcessing, the mask for it looks good, but the world never gets masked.
No worries. gl
Am I allowed to ask:
Why you save the index to a tmp variable? why not return it directly?
how dare you
but yes you could actually do that
returns are treated as implicit breaks
I'm getting there. I made some changes. Still doesn't work like it should. See what is doing
anyone have an idea why the numbers are all messed up
looks like you are rendering more than 1 text in the same spot
I fount 1 spot that did. I removed that 1
1? those are all doubled up
yes. i know. there has to be more some where
Hmm, It still does it even after I remove the 1 set of pins. I don't get it
Ok, that looks better.
'The stack size is wrong. It should be 5 for logs
Now I just have to fix the end less loop error
anyone have an idea why ??
This is in some kind of a loop. and I have no idea
It's whatever may be calling this function that is probably in a loop.
Hello, this is currently what happens when you use the mouse left click. Just a series of branches that check certain things to determine what is happening and what to do about it.
Is there by any change an easy way to reorganize this? So if one of the main branches are true, it will just execute what is in that branch?
yes if you're using #cpp. as far as I can see your branches all deal with different outcomes, so no, you can't really reorganize it without modifying logic
Gotcha okay. Thanks anyway.
Repost
no u
What did you do prior to that happening?
Changed a few of the collision values.
I have two pre-set collision channels
And looks like it'
is not liking em
It's UE5, so it's to be expected.
Ok probably a dumb question, but if I want to use a slider to change the view distance instead of buttons to do that how would i do that
As in, in your game?
Get the camera component and set the Field of View using a float variable that you set through the slider.
Yea like i was watching a Matt Aspland video and he created an options menu and the view distance was like near, medium, far, etc. But i want to do it with a slider instead of a button like he was doing
Yeah, cool there's slider widget you can use.
Or you could create your own if you're feeling adventurous
You familiar with how the UI stuff works?
I plan to in the near future set that up
Well that's how I'd approach it.
But i just want to use the slider to change the view distance but I'm not sure how to use it in the blueprint to set new intervals by the step up
Generally menus are handled via a Controllers HUD.
HUD is where you handle stuff like option controls, such as your widget.
See this is where I'm at, like i have the screen resolution thing set, and I'm trying to execute console commands to change the view distances. as you can see on the bottom
That's certainly a way to do it. Though I'd strongly recommend digging into how HUD widgets work, and how you can use them to alter things like view distance via a slider.
You can have buttons for toggling resolution etc.
question how would i go by doing like a notes page, I have a huge journal that has editable text and I want it to save to HDD.
Whats the correct way to have a child blueprint for an actor thats identical and inherits any new functions added to the parent class but also i can edit independently?
or is the best way to create the child blueprint and call all the parent functions?
by that i mean the child pawn will have all the functions prewritten and working when I make it but also i can add new ones that don't affect the parent and add things to the parent that then get added to the child
A child actor can easily call functions of its parent, but I've never tried using a child actor that inherits from its parent. Sounds like something that would cause a loop.
I have a magazine component that contains an array of Bullets. The bullet object is of PrimaryDataAsset and currently only contains a Damage float variable.
I would like to, on the magazine, fill the PDA Bullet array with PDA objects on the Event Begin node.
I'm not sure how to create a new PDA object to add it to the array I have
I feel like I might be using PDAs wrong
i thought all children inherited from parents
He was talking about creating a child class and adding functions to it.
If you create child classes by right clicking on the blueprint, you can call function of its parent.
This way any nrwllew function you add to the new child class can have slightly different uses.
yeah let me just specify my issue
Oh that's you nvm
i have a class that has all the functions and stuff that i want all my units to have but I want to create a bunch of subclasses that function the same generally but also have their own special stuff
ie like "chess piece" and then program their movement and stuff for "knight" and "bishop"
thats a simplistic example
but i want all previous functions and stuff that were created in "chess piece" to also apply to "knight" and "bishop"
but when i have a child class i have to manually call every parent function i want to be activated?
For all intents and purposes the Child is just a copy that you can then extend functionality. If your Parent can do it, so too can the Child. If your Parent doesn't have logic programmed, the Child won't either.
okay. Basically i have a bunch of onclicked and stuff happening to the parent but when i created the child class it doesn't have that stuff built in
no problem i guess
then something's wrong ๐
But it does? You just don't see it in the Event Graph I take it.
nah the onclicked doesn't work
Did you move the Child into your level or are you still using the Parent?
moved child into level
It should behave, once created initially, exactly as the Parent until changed.
Did you change anything at all in the Child?
all i did was "create child blueprint" > move into level > click on him
Is it possible to change the direction of a Arrow Component? Or how any component like Pawn Sensing Spawns?
Then in your Character Controller make sure you have the right logic
oh
See I have my AI Positioned how I need them to be though it's not the default rotation and so something like Pawn Sensing spawn's this way and I don't see a way to rotate it
well i have the linetrace set to make sure its of class "parent" with an == but is there a way to do that but check if its a child of that?
Snake you can rotate the arrow in the actor's blueprint.
It doesn't select or show any details in the details panel
There is a 'Class is child of' node
thank you
Snakey it's in the viewport, select the arrow component on the left hand side.
Can you move it out of your capsule component, rotate it, and then re-attach?
I didn't include the part that it is inherited
You can rotate your mesh instead to match with the arrow
It doesn't fit my perspective though
You should be able to move it like any other component but if not you can either move the mesh or set a rotation for arrow component on begin play. Though I don't like that.
I could transfer everything in it from a Character to a Pawn BP Class
It's inherited from the Character base class. I don't think you can move them?
In the Pawn class it doesn't contain one.
Then rotate your whole actor to fit the perspective
I have my own Movement System and everything so I'll just move it over to a pawn
Should be able to make the arrow a child of the character instead.
Still confused about this
Snakey are you making a sidescroller?
Though no Movement Component exists for a Pawn Class except for Floating
You can runtime change the arrow direction on input.
Add it to your player controller directional inputs.
Hi. I am trying to update a Niagra variable but it has no effect. Sorry, my experience atm is limited. This is in my blueprint
While this is in the Niagra-System
I am trying to update User.Color parameter
Try only 'Color' instead of 'User.Color' ?
Didn't work. It still has the same Color as the initial Color.
What is the FX System Component? Shouldn't it be a Niagara component?
https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/4/0/440db36fae1b98e56a4ce64ec3c480f83740d484.png
Just switched all to pawn and everything is working if not better
Though now for my AI I'm still wondering on how to turn the direction of the sensing component
I figured it out. Thanks for helping. Color Parameter was being used only in InitializeParticle and not on ParticleUpdate. Thus it was having no effect even though it was changed. Calling ReInitialize after setting the parameter solved the problem.
Guys, I have such a question. Who made inventory with unique slots? For example, I have slots that will be sharpened only for weapons, and here's the question. Is it better for me to make a separate array for them in the inventory, or do I somehow fix the indexes only for them in the main array where all the items are stored?
pls, do me a favor, and get auto size comments, from the marketplace, pls i beg
its free
fuck you kid
Was there a question to that screenshot, or just random share?
he's just proud of his commenting 
you don't comment your work? spaghettis lines everywhere?
Keeping it clean, and self explaining code dont need commenting ๐คช
Or atleast very little
I feel like you get to a point in blueprints where all code feels self explained
Yeah visual languages tend to have less need for commenting compared to regular code
But it requires some good naming conventions
Imo anyways
Also wrapping every small piece of unctionality into its own function, and avoiding a function doing several functions in one big mess is a good start
Guys, what is the size map for?
Yes
The one with the different colored tiles?
Size map for bluepribt, maps and other
Yes
With memory and disk size
Its to show you the asset size, and why its that size
So it'll tell you if a class that should be really small has gotten really big because of depenencies and hard references
Hi team, i need your help on something.. i'm trying to procedurally transform staticMesh to be scatter inside a sphere..
i started by adding actorOfClass to get all the object to scatter, but i'm sutck with the rest.. what would you suggest?
Hello, i have a question. Why my ai controller is first printing that max walk speed is normal 600 then its printing that is 0 pls help
my ai controller bp
ok nvm it was printing me an alpha from timeline, but it still doesn't move
the run function
yea but i wan't it smooth
If you're running with that setup
No it wont be
Now you're triggering ai moveto on tick
Which is not a good idea at all
but move to location is returning failed
You cant/shouldnt call it on tick anyway
the whole thing is on begin play
But timeline is tick driven
i know, i will change it soon, i just now need to know why my move to location is returning failed
dest is not 0
Is thete a navmesh on this spline?
Is the location reachable?
I bet not
Using moveto like this is horrible
At best you can moveto each spline point, assuming they are all reachable
they are and i disabled pathfinding and it works but its not in loop
Huh?
yea idk how it works, with path finding this was always failed but when i disabled it, its normal and its printing me that it reached the goal
So there is no path to target
According to pathfinding
You should work more towards refining your interpolation i think.. or moving to each spline segment, and ditching the timeline
omg now it does work but it work only go to first spline point and not going to second
Ofc
That logic you must make
OnPathPointReached -> remove current pathpoint and see if there are more left -> set next pathpoint as new location -> MoveTo location
bro, im watching youtube tutorials on how to make player move and you are telling me chineesee things
Scattered?
When you want to follow a path you usually store the path in some container (array, map)
Your logic must slowly move through this list of locations,
From start to end
ok nvm im so dumb and i have 0 iq, i didn't plug in "set duration"
Time stamp: https://youtu.be/pG7KFaCwvJw?t=1405
Hi, I'm fallowing Reid on his tarkov like inventory system. I got stuck on a create event that is different from what is shown on his video. this might be because I'm using 4.25.4 and he is using 4.25.2. Can I get any recommendation on how to get around this?
Support the channel through donations. Crypto accepted!
PayPal: https://paypal.me/reidschannel?locale.x=en_US
Patreon: https://www.patreon.com/reidschannel
Bitcoin: 1JFwWHr4X6uAeoZadukzqKjzFBj3Qjy7Sk
Ethereum: 0x2B2Bc108F1Cc0fF899959dEF3226637787d8C3dE
Dogecoin: DNQ33YnhpWoTBokBNVkZP5ub8KTLkpyjpv
Join our community discord!
Discord: https://dis...
Compile
yeah i need to procedurally moves positions of tiny bricks inside a sphere..
in houdini i would make the sphere a volume, and then use a pointFromVolume, and then packAndCopy bricks to the points..
Do you know how to do such a thing in unreal?
Something like, Get Random Point In a Sphere, and set that as the position of a brick
yes!
^ ding ding !
Here's a way to get a random point in Sphere
https://forums.unrealengine.com/t/how-to-spawn-randomly-in-sphere/419047
awesome! thank you!
now what about spawn in a cube? would that me much more complex?
You would need to define a centre position of the cube, Let's say 'c' and the size 's'
Then you can get a point simply using
(Random(c-s, c+s), Random(c-s, c+s), Random(c-s, c+s))
This is psuedo code that should work imo
If you need help translating into BPs you can ask
definitly need your help to translate that
shall i use expression or can i do that using nodes only?
also for the sphere one, i did like this
Actually, Unreal already seems to have a handy node
https://docs.unrealengine.com/4.27/en-US/BlueprintAPI/Math/Random/RandomPointinBoundingBox/
Random Point in Bounding Box
That should work
Did you test it
Wait
what i don't get is how should i connect the positions to all the actors i want to transform?
setActorLocation does not seems to work
Instead of a For Loop, use a ForEach loop
It gives you the current array element to work with
Try it
What does it look like? Did anything move
nothing moves.. all the actors are at the origins
Try adding a Print String in the loop
Does it print?
So no actors were found
You mean the Cylinders?
Those are Static Mesh Components
You can just create an array in the BP and drag all the cylinders there
ok!
Try the 'Make Array' node
i did but i can't plug it in the forLoop
*forEachLoop
ok created a new one and worked
but then i can't use a "setActorLocation"
i need to use another node isnt it?
Try SetRelativeRotation SetRelativeLocation
Since the components are a child of the actor
hmmm can't plug anything in...
My bad, I meant SetRelativeLocation
My brain is not working properly ๐
How can I generate a path(spline) based on Navmesh data, at runtime?
How can I generate a path(spline) from a point to b point, based on Navmesh data, at runtime?
Hello. With widget i can control an actor on X,Y,Z. Is there any way to make a different coordinate system for moving with defining the center and 2 axises of the new coordinate system?
Guys, how can I replace these pasta? I need to be able to install my own model for some classes, and some took a model from the data table. And I also want to set the weapon value for the item type only for PickUpWeapon, and for others, respectively, so that the item type is Item by default
I would need to see more of your code....
Here's a free plug in that makes graphs easier to read with screenshot.
hello, i have a problem when i add a widget to the viewport players can see each other's widgets
for example the crosshair gets added twice
i tried isLocallyControlled but it doesn't work
So when it's added to viewport. It adds to all clients and server?
yes
Can I see your bp for adding to viewport?
Above is a classic case of why HUD should manage all UI and not networkable classes.
I've noticed a weird behavior :o
I'm not sure wether it's my fault, UE5's fault or neither ones fault.
So...
I made a system that loads and saves savegames.
I tested it and everything is working fine.
Then I proceeded with creating Volume Options and started with the Master-Volume. Created it made it load up on start and all that works good
Then continued with music and... It didn't pop up... The Array were only 1 entry long.
So I tried changing things and it seems that Unreal saves an array per array and not per index :o (which is fine)
This leads to me having to delete the savegame everytime I wanna add a slider else it won't find it.
Can I "fix" that somehow?
that's on beginPlay
i should mention that's a parent class
What is this BP and what is running it?
it has child BP's and the children BP's are which players control
TankBase>Tank1,Tank2 etc...
Sounds like there might be a server rpc calling functions of clients or something...
@maiden wadi is right things like this should controlled by a hud....
But you could also just make sure to be using the correct controller or even use a even for client only.
hmm do you think it's this
its like an ovveride for the default spawn in the game mode
i get all player controllers in the game mode BP and spawn the actor then posses the spawned actor
This is a UI issue. This issue has nothing to go with gameplay code. Gameplay code should be able to drop you into 500,000 tanks within two seconds and your UI code should still only display one crosshair. You have to separate your user interface design from your gameplay.
When the local player enters a new pawn for controlling it, HUD should be notified by an event. That event can check if the crosshair should be shown from that HUD's PlayerController's ControlledPawn's type. If you move into a new pawn and crosshair is already there, ignore it, no need to remove or add it again. If it's not on screen, add it. If there is no current pawn, remove the crosshair.
Realistically this would be better as a delegate from C++ in client's SetPawn, that the crosshair widget could bind to and do it's own thing with, but babysteps.
I have an 3D widget, if im Scroll it its Gosting af, is there any FIX for it?, and i have Motion blur disabled
ok i got it thanks ill try that i think i know what to do but i have another issue with the PC
This is the logic where i spawn the players, how i can override the PC to a custom class that i made?
i have TankController BP i want to use that instead of the default PC
NVM thanks for your help i think i found the solution
Hi, i am still struggling with my cupboard BP but with your help it's getting better. I can now open my drawer then open the cupborad doors and close them, then close the drawer and open it again. But once I ve done this, I cannot open the doors anymore. Any idea why ?
Also, I'd like to be able to open either the doors or the cupboard independently (not in sequence, that's why I pu a flipflop instead of a sequence), both being controlled by different trigger boxes (one for the drawer, the other for the doors)
ok, now I have both working. I can open the drawer, close it , open the doors, close them but it feels like I cannot really control them separately and my trigger boxes seems to be be considered as one ???
If I use a sequence instead of a flipflop after my event pickup, both opens at the same time obviously
Guys, how can I optimize this code? This code is written in construction script. I want data to be taken from the data table in some classes, and in some I would like to choose static mesh myself
Why are you looking to optimize it? Does it perform poorly?
It's just that this is not yet the final list of items that I will need, and when I add it, I will have to constantly supplement this code. And I would like to set it up so that when you add a new item, you don't have to suffer
Something where you can add things "after the fact" is often achieved via polymorphism, so perhaps making use of that here would be helpful as well
And even more so, in some classes I need to make it so that I can choose my static mesh, icon, etc. in them.
Eg. you have a base class used for all your items, and some function on the item will be able to return the values used here, so you can simply call that function directly instead of having to use a manual mapping
Using Blueprint, I would like to take my weapon magazine and define data (damage, type enum) for each bullet that is loaded into it. How would I create such a data structure in Blueprint?
Is there a control like flipflop or sequence but with a or as a condition ? Like use A OR B
You could use a struct for this and then the magazine's contents is defined as an array of these structs
@hybrid hare use a Branch node and an Or node in its condition
@earnest tangle like this ?
Yeah
then I use it before my flipflop ? or instead ?
Well it depends on how you want it to work
the branch will go into the True output if the condition is true, otherwise it will go into False
I want to be able to open the drawer and the doors independently
they use different triggger boxes
either open A or Either open B whatever the state of A or B
then be able to close them the same way
So if the player interacts with the trigger for the door it would open the door and so on?
exactly. So far i can only either open both at the same time or get lost in a loop and open close / to open close the next item
Right - so you could use a branch have the condition for it set up to compare whether trigger box that was used equals the drawers trigger box
Then if it's true, you open/close drawers, and if false, doors
ok, so I have to put my triggers somewhere else ?
I'm getting lost. I have a really pretty basic beginner knowledge of BP
Without knowing exactly how everything is set up it's a bit hard to say, but you could for example store the trigger which is being used into a variable, and then use that in your Branch
If i get a Ref of an Array lets say Index 3, and can i get this Struct Ref, to " Set members ", and is it working? , looks like its not Settin the Var in my Array with this Method
If you make sure all your variables are refs it should work, but it can get a bit fiddly.. one of the reasons why I moved my complicated struct handling to C++ where the distinction with refs and values is easier to work with
I am convinced You cannot set a value in an array inside a struct (in BP)
I have to set the entire array everytime I want to do this
@earnest tangle, ok thanks, I'll try to understand and do what you wrote
@sharp rapids if you use Get (a ref) instead of Get, and then modify the value say using Set Struct Members, it should update in the array
But depending on where the array came from, the array itself might be a copy of your original array
I'll try that ๐
Mhh im using the Original One, from the Savegame, and looked 10x times its all get a Ref not a Copy
@earnest tangle sorry for being dumb, but how do I store the trigger into a variable ?
No Set members, should work with an Ref, but looks like its not working atm on Preview 1
@hybrid hare if you have a begin overlap or such on the triggers, you can have a variable like "WasDrawersTrigger" with type boolean, and you just set it to true in the drawers overlap, and set it to false in the doors overlap, or something along those lines
double checked, but not working, i try an workaround
Yeah it was kind of a pain to ensure nothing was getting copied at any point with arrays and structs
It's so easy to accidentally do it, eg. if you just set the array as parameter into some function and didn't set up the function to have a reference for the parameter
I directly Work with the Savegame Array, so No Copy, thats the strange thing, and 100% all get a ref not a Copy
Hey guys, I'm trying to write a BP that can take mic input, use Google STT, GPT3 and Replica to respond to said mic input. The video I'm watching seems to be a version or two behind, and I'm having trouble with getting the player speech and getting a response. Here's the full code from the video: https://blueprintue.com/blueprint/qr8pj06x/
How would I write that player speech code in 4.27? I see the AudioCapture variable and I'm confused as to how to get it without ArthursAudioBPs.
Are you trying to do something like,
The Player looks at the drawer and presses a button to open the drawer, then presses it again to close it.
Like that?
@earnest tangle ok thankx
Ok @earnest tangle With SET Array Elem works flawlessy, i avoid now this get a ref and try to set members
Yeah set array elem would probably help if the refs get messed up :)
Just hard to find out whats my Mistake, and whats bugged/ Mistake by Engine
@slow pewter Yeah this is why it's a lot easier in C++ because you can see it very clearly what's a ref and what isn't :D
you see it on the Nodes too on the Output, also u can literally see whats copy and a ref, but looks its bugged anyway
A raycast would have been a better option imo
Triggers are fine too, but they're not as accurate
I would be easier and already done with 2 BP but I want to have it working in one
The drawer and the door are two different actors right?
As Zomg said, you can have booleans indicating whether the player is in the drawer trigger or door trigger
Booleans 'IsDoor' and 'IsDrawer'
Then here, just after the Begin Overlap on the Door trigger, Set the 'IsDoor' to True
And on End Overlap, Set it to false
Do the same for the Drawer
Hey there, I have a small blueprints issue
I was working with maps to make a weapon inventory and for pickups I went to use the add node to overwrite the value of a slot, in order to give it the child actor of the picked up weapon
The fact is that it does not work, the actor is added to the map but for some reason when I get the parent component to set the visibility and attach it, it says "access none trying to read property" and it does nothing, here are some screenshots from First Person Character and the pickup
After Event Pickup, If 'IsDrawer' is true, go to the drawer section
If 'IsDoor' is true, go to the door section
I remember having a similar issue a while ago (probably different though) and having solved it but I can't figure this out, probably I am rusty on Blueprints, haven't touched them in weeks cause I've been focusing on writing
I could simply change the value of the "can be equipped" boolean but then the player would be stuck with the same set of weapons, which I can't afford since the game is gonna be set in different eras so it requires different weapons set, also, it would kill moddability
@sharp rapids ok thanks, I'm trying to digest all of this, my poor head's already aching !
for add to stack. I just out of ideas why this doesn't seem to work as it should. the BP and pins are passing the right info. I made some changes. That still doesn't seem to work. It seems to be stuck on a max stack size of 2. It the max stack size for Logs is 5. Doesn't matter. Still uses 2.
and the numbers are still screwed up and I can't figure out what's doing it.
how can I find where exactly this error occurs? I have quite many blueprints but this error message doesn't really help
you must specify the class of the widget
where you have the CreateWidget is calling a null class
Click that thingy under the purple pin and select your widget
I know why it happens I just cant find the blueprint with this error. I deleted some unused stuff in the project and now this appears
I know x) how do I find the blueprint?
Have you saved? if you didn't I would suggest you to close the engine without saving and opening it back
It's a panic move but it works
I dont want to recover deleted stuff although I still can. I just need to find this BP. Is there any way?
Probably if you double click but I don't think it will work
of course I double clicked it, it doesn't work
It usually should give you a reference
As I suspected
Then you must check your blueprints by yourself sadly, you can't get back to the blueprint if it doesn't specify which blueprint
First place I would look is obviously the HUD
eh. okay
Anyway, can someone help me with the issue I had before? Can't seem to solve it :/
Well it doesnt find it in the map
The bool is there for a reason :p
So adding either doesnt happen, or its overwriting some singular slot
You got some index coversion going on
Id verify that
oh ok, thanks
Should I use some other node then? Or fall back to modifying the boolean value?
Id use the bool to react in case what we searched for was not found ,
About your index i got no clue what you're doing in the collapsed node
I am simply getting the value of a integer
The integer specifies which key the gun should go in, the slot of the weapon
And it specifies it to the add node
This sounds like call from C++. I'm not sure you can even reach where this is called from the blueprint CreateWidget.
Oh, discord forgot to scroll again. ๐ฆ
But yeah. Not sure if you solved that already, but Blueprint CreateWidget immediately returns if there's no class selected. So I'm semi sure that this is something you've passed to C++ and ran a CreateWidget<>() from there without checking the class.
i solved it already. it indeed was in c++
i did but i can't connect the array element in the target :ยง
@sharp rapids oh sorry you said "SetRelativeLocation"
but then what do i do?
ok nevermind got it working!
How did yesterdays lesson go? ๐
hi @gentle urchin ! pretty well thank you
even tho i'm not done yet
which timezone are you on?
what should I use between the event pickup and the branches to play event pickup when overlapping drawer OR when overlapping trigger_door so only the overlapped trigger plays ?
Guys, how can I make it so that only the desired row can be selected in the Data Table Row variable? (in the PickUpKey class, for example, I can't select data with rifle weapon values, I only need the key string) I have an idea just to create a variable and compare it with Row Name. But in my opinion, this is a bit of a crutch code.
Cet :)
Not sure you can do that with FNames. I know GameplayTags support this.
If it's that concerning, you could just make separate Datatables. If you need to use all of the rows in one place, make a composite table out of them all.
Thank you)
A sequence node?
Decide which one has priority. Whichever you choose, connect its false to the input of the other.
I also tried that and ended with only one r working
I'm not sure what you're expecting then. If you don't want both to fire, then that means one has to have priority over the other and if one is true, the other will not fire.
Anyone know if there's a way to make it so static meshes stay visible even when you are inside of them?
for some reason they disappear once the camera goes inside of it right
like they stop being rendered
My question its a bitty silly but am a bit confused . If i want to access another BP which is parent is just an Actor , i can access it if i use get actor of class ? And by reference ?
Well, to make an analogy to real life, i want to be be able to open my drawer, open my doors, keep them both opened, close one or another
Maybe I should go for a BP only for my doors then ?
get actor of class get's the first actor of that class in the world, and it returns it's reference. So I don't think that's what you're after
ItsMoxie how i can access it then , if i dont have any reference via overlap etc?
Then you may want to move the logic for opening them into the objects themselves. Your input event should trigger the interface on the object you're wanting to interact with.
when you overlap something it gives you a reference to the actor that was overlapped. Other Actor is the actor you overlapped
An analogy in real life would be, you don't check if you can open the drawer when you're trying to open a door.
@fiery swallow yes i know, but lets say i want to access a BP from a widget lets say . How i can access a BP ?
Pass reference to your widgets when creating them, or, set variables on the player controller or character that your widgets can read.
Your widgets can then use GetOwningPlayer or GetOwningPlayerPawn, cast to your appropriate type and get the variables.
@dawn gazelle ty buddy !
ok, thanx. I finally made one blueprint for the drawer and one blueprint for the doors. Far less complicated for my poor noob brain cells
only thing to deal wth is now the speed at which the drawer opens
Hi I was wondering if anyone could help me, i'm trying to use the SetRenderCustomDepth on a HISM component but only want it on one instance is it possible to do that?
how can i get the input key name
i mean
when u look at item
i wanna text in widget
press E to intract
how i get the E from input
Worst case just use two hisms and swap between them ๐
what would cause a limit of only 2 items to 1 inventory slot
and I see 20 slots. It only see's the 1st slot. doesn't see any other slots. ???
Faulty code
in what way, to give me an idea one what to look for
ok, I'll have to start from scratch. Thanks
I removed the 1 issue I was having with the number of items in each slot. How ever it seems like the issue is still there. it seems to mess the number up after item 4
anyone have an idea where to look
and can't figure out why I can't get the icon to show. Here's the binding for it
It is possible on User Widget to add static mesh ( to show the static mesh as an image? )
thanks
France ๐ซ๐ท ?
๐ณ๐ด
quick question, i did create a new project, and once i hit "play" in the default Level, still got this BP compilation error... any ideas?
well if you've removed something that used to be there
that will reflect too
This doesnt look like a new default ue4 project
very odd then...
i just created a new one...
unistalling and re-installing ahah
Which template did you use then ?
film template
Hey, how do I get this variable type?
yeah
make your own if it's available?
doubt it is though
its promote to varable from a open level by reference node.
yeah sounds sketch
open level by name does not work on after loading my save file.
so I need this type in my savefile container but I cant find it.
it's not exposed to BP
ah it's UE5. I expect everything there to be broken. try the UE5 section
well yeah, because i'm re-installing ue4.. but i get the error with ue4..
but do you think installing both version could cause trouble in one or the other?
No, i run several versions and have never had any problem about it whatsoever ๐
never seen that interface with 4
my issue is its not opening the map after loading my save file even in a cooked build, what do I need to do?
google search suggests to have all maps in the root folder, is it that?
I don't know what you're trying to do but UWorld isn't exposed to BP for a reason
if you have a path for the level you can try that if you're trying to load it in
I think the fact that you can "promote it to a variable" is just a hack, which is why it doesn't work either
Google also suggests that you interface every function in your game and store savegame data in GameInstance. ๐คทโโ๏ธ
Is there a way to slow don the drawer opening using this ? Action on curve is useless.... and the drawer keeps spurting out of the cupboard to it's Y vector location
So I've run into another issue I cant solve. The code only works if the root of the mesh is on screen, instead of any part of the mesh. I'm trying to make a vision based interaction system.
If you want any edges to count aswell,
you can simply add a value to the meshes
an "offset"
wouldnt be dead on accurate, but thats pretty hard to do in general
Not entirely sure why you need it so accurate tho
like.. im reading "vision based interaction"
but are you covering an edge case just for the sake of covering an edge case ?
Well i tried this for my doors and they only work if i'm looking at the root of the mesh. so i have to walk up, look at the bottom corner, then press E
I was hoping to avoid that cause depending how close the player is they still might not be looking at it. guess i'll just put it on the handle and say fuck em if they cant figure that out. thanks for the advice.
Handle makes a lot of sense
you can definetly add some more to it, but it easily gets very heavy for little reason
a collision volume in front of the mesh plus a dot check for general direction could probably result in much of the same
just re-installed ue4 and fixed the BP compiling issue
Sweet
my collision issue still escapes me.. got the same setup in a different bp, and it works just fine..
got both simple and complex collision on the mesh
Figured it out.. disabled collision in an inappropriate place
Naughty.
Indeed it was ๐
Is there a way to slow down the drawer opening using this ? Action on curve is useless.... and the drawer keeps spurting out of the cupboard to it's Y vector location. I tried set rate with no luck as well.
erh
Output from the Timeline is your Alpha value normally
Not a float converted to a vector
So there's an "open" position (vector), and a closed one
Or closed + Open offset, however you wanna name it
currently trying to make a weapon in my game work like the spread gun in contra. Having trouble getting the projectiles to spawn in the cone like it would as pictured
im making a sidescroller but in 3d, as in models, etc.
guys, i'm trying to reproduce the wedge PBR feature of Houdini.. do you know if such a BP already exists in unreal?
ok, I see. i have to redo this part to find another way to get the positions then.
GetForwardVector - SprayWidth/2 + BulletID*SprayWidth/Bullets @barren relic
In terms of slowing down a timeline you can by using that Set Play Rate before calling the play.
Play rate of 1 means it'll play back 1:1. So if you have a 1 second timeline, it'll play back in 1 second.
If you have a play rate of 0.5, then it would play back in 2 seconds.
If you have a play rate of 2, then it would play back in 0.5 seconds.
spray width is the variable in this?
I missed a step, I'm sure of it
Thanks Datura for those explanations
Is it possible to have "Add call to parent function" with Input events?
thank you I will try that now
This is purely from the "forward",
you'd want to use the guns Aim direction as the origin location
ive been using random cone lol
is there a way to get the location of points along a cable? i just want to move an actor along a cable, as you would on a spline
There must exist something for it
Not like you can with other events. You can override the parent's binding.
A different way would be to have the earliest parent call an event when that input is triggered/released that you can then override and make parent calls in any children.
Not your everyday bread. Requires c++
You can get length and segments from it but the rest is not avaliable
Also, id suggest using a spline instead
it works @gentle urchin, Thank you I appreciate it a lot
Ah thanks, that clears things up ๐
i would use a spline, but i want to be able to get it to look like a physics cable, and be able to put the end, width, length, etc. in on construct
Cables should mostly be for looks. Like Particle Systems and such. Recommend avoiding them for literal gameplay code.
It's usually on the right hand side when you have the function selected.
oh! got it! thank you!
Also you can drag and drop connections on both the function start and ReturnNode to add inputs and outputs.
Semi useful. Annoying to have to rename them ReturnValue for the first one every single function, but can be quicker than looking up classes or types in the selection list.
do you know how to get Exec and Wildcard ?
i can't get them in my function input/output
Those are only for macros.
I followed a tutorial of sorts to calculate speed variations based on slope angle. But the tutorial didn't show me how I'd tie the values into the movement variables. Can anyone tell me how I'd incorporate these values into movement?
finally changed my drawer BP to get the drawer location and now it works just fine. Thanks again
How do you change variables in a child actor component?
what do you mean
like, if i have a door object parented to a bigger blueprint and i want to change the variables on it
it's a child actor component class
From the cast you can then access the variables of the child actor.
thank you
Hello, is it possible to have delegates with payloads from blueprint? I know Dynamic delegates can't accept payloads, but maybe there is a workaround.
Do you mean like having an event dispatcher that passes along an object?
so fixed it, it was a engine bug that took 3 hours to figure out, it just refused to save that name variable, so I made a new one in the savegame container saved it to that and it fing worked.
Not exactly. In this setup, the Delegate is declared with one parameter. In my case, the delegate can be declared with one parameter, but the function the delegate calls can have X number of parameters. The X - 1 parameters are then passed along as payload data.
DECLARE_DELEGATE(FDelegate)
FDelegate Deleg;
void FuncWithParams(float A, float B);
Deleg.BindUFunction(this, "FuncWithParams", 0.5, 2.8);
This is valid C++ code, for instance. Even though FuncWithParams has 2 parameters, and the delegate is not declared with any parameters, we can still bind the two because I passed along 0.5 and 2.8 as payload data.
The equivalent in BP would be if your event accepted no parameters, but I could pass along the Payload object anyways and it would always be equal to whatever value I set it to when I created the delegate.
I don't think so on payloads
This is one of the reasons why I tend to always include more stuff in my delegates than is strictly necessary because it just makes dealing with it in BP's much easier :P
one workaround of sorts is to just wrap it in a BP uobject which has no other purpose besides handling the event... then you can stick your payload data into variables in that uobject
but it's not really great imo, but maybe for some usecases it might not be too bad
Hey there, I'm uncertain if this is a complicated question or not as well as I'm not sure if this should be asked in either graphics, animation or audio but I'll attempt to ask. I'm attempting to make a camera move along with the spline and then move to the next blueprints after completing it's spline end just like an animation. There's not many tutorials for this and I'm uncertain of how to make a camera move along with a spine will a trigger ending so does anybody know a way for this?
You can SetActorLocation yourself
anyone know how to calculate a positive and negative value 0-180 via dot product? I can only get positive values
You can't. At least not with a single dot-product. It can only tell you forward/backwards.
You need to either do a second dot-product with a vector to the left or right of your forward vector (if one is readily available).
Or you need to use a cross product to determine the left/right-ness.
would you happen to have an example? im having a hard time wrapping my head around this lol
Not really, sorry. I can't really explain it well in this format. A google search for "360 angle between two vectors" comes up with tons of results.
I'm making a firearm and I'm currently looking at making the logic for a fire rate cooldown.
I can accomplish this with the tried and true DateTime variable but I'm asking if there are any Unreal Engine quirks that accomplish this in a cleaner, more efficient manner
Sorry, the functionality being that when the function is called it fires off and then goes in a cooldown where it can't be fire again until the timer has expired
Timer, timeline, delay
Take your pick
Hi! does anyone know if there's a way to know if one collision box ALL overlapping with another collision box?
Meaning, Object A is ALL within Object B
I'm trying to figure out how to have the camera boom always point in the forward direction of the character without having to disable. " Use Pawn Control Rotation". Anyone have an idea how to do that?
I guess no one present knows
For some reason my AI suddenly stopped working
I was working on something completely different that should have zero impact on AI, yet when I press play, the AI won't follow the player anymore
@runic parrot You could use the bounds of the two collisions to determine if one has enveloped the other
Thanks to @onyx dock for helping me out
Does anyone know what kinda math "Use Pawn Control Rotation" is doing for the camera boom component on a character to adjust itself to the correct orientation. And is there a way to do some math to compensate for that and force it in another rotation?
How am I able to add to relative rotation to my camera when use pawn control rotation is enabled? It seems to override all changes to rotation
@chilly fulcrum lol im here for the same reason
lol yep just saw that
im going to search the channel to see if theres previous responses
Everything I try to force rotation either makes it go crazy or doesnt do anything
I cant find anything that does anything at all
This is in CameraComponent.cpp
if (bUsePawnControlRotation)
{
const APawn* OwningPawn = Cast<APawn>(GetOwner());
const AController* OwningController = OwningPawn ? OwningPawn->GetController() : nullptr;
if (OwningController && OwningController->IsLocalPlayerController())
{
const FRotator PawnViewRotation = OwningPawn->GetViewRotation();
if (!PawnViewRotation.Equals(GetComponentRotation()))
{
SetWorldRotation(PawnViewRotation);
}
}
}
This one is in SpringArmComponent.cpp
if (bUsePawnControlRotation)
{
if (APawn* OwningPawn = Cast<APawn>(GetOwner()))
{
const FRotator PawnViewRotation = OwningPawn->GetViewRotation();
if (DesiredRot != PawnViewRotation)
{
DesiredRot = PawnViewRotation;
}
}
}
seems like it, I've seen all that as nodes in BPs before
you just have to interpret it correctly
Would there be a particular reason why you would want to do something in BP that is already able to be done without it?
I just dont have experience with cpp. So idk how to implement this
oh im sorry you are just providing the code
of what its already doing
right?
Yes
haha ok sorry
Hello all quick question, I am trying to figure this out but what is the different between Editor utility blueprint and Editor utility widget?
I have and idea but it is deeply theoretical and it might be overkill if you're only looking to do Boxes....
So when you have a static mesh, and you use complex collision, you can set the collision to Double-Sided Geometry, which is like giving it a shell, making it hollow.
Now imagine you have 2 Overlap cubes of the same size. CubeA is "filled" like default overlap. CubeB is the shell.
If BOTH overlaps begin, but NONE end, that means you are only partially intersecting the cube.
If the overlap for CubeB ends, but the overlap for CubeA has NOT ended, that means you are fully enclosed.
To be clear, you would need 2 different Overlap cubes (one of which is really a static mesh), PLUS your actual Collision Object.
That's the theory anyway. I've just tested to make sure that Double-Sided static mesh can use overlap and it can.
Hi everyone, hopefully a quick question. Say that i would like MOBA style spell casting, is it necessary at all to axis map QWER or could i just use input events in the player controller?
it's best practice to action map it
would I make a new axis mapping for each key?
yes
thank you
would help if uses want to change their keybindings
right right
along with support for controllers, etc
Here's a visual that hopefully makes more sense
hello guys
how can i call an actor to another actor without using cast
just like how we call player by getting "Getplayerchatacter" node
is there any way to call actor
@chilly fulcrum GetTargetRotation in the CameraBoom holds all of its inherited rotation values. Just now figured this out. Hope it helps.
I dont have a boom for the cam though
Springarm?
nope
oh
I mean I can add one if that fixes it I guess
Is it for a character in a third person project?
first person
oh yeah that wont help you
I barely know how to follow a tutorial so this may not be useful. But does it have to be one specific collision box? Maybe have it where 2 collision boxes (one on each side) or maybe 3 if you need a middle attachment. Then have both/all three require verification that they are all in contact with the same "overlapped" collision?
Just to be sure, is it the best way to use a 2D Render Target to switch ingame to a 3D map like in the new Doom games?
anyone got a simple fix for a binded variable that is supposed to be draining a progress bar but only jumps from filled to unfilled?
in widgets
The bars go from 0-1 ... so 0,5 is half
You could spawn a black box with 3d map elements in it, to save on performance.
Canvas Render Target is hogging on performance, it can cost you a lot of frame time for even simple elements / scene capture 2D
Oh boy. Okay. I'm trying to make a check for slope angle, and whether the direction the player is going, is going up hill or down hill. The current way I'm setting it up is going to spiral out of control, so I'm going to ask if there's a better way to do this.
slope pending is the current location hit of the location the player is standing. slope last, is the previous frame. Since the player doesn't move on the Y axis. it's irrelevant.
this for example gives the same result but using sonic style movement. if you're on the ground you're holding left, and if you're on the ceiling, you're holding right
So I've setup a Level Camera to create a little transition using Set View Target With Blend. It should simply just move between the two but instead it sorta rotates and is really buggy
I don't exactly understand what you're trying to do
But If you want to compare two vector positions, you can do it in a 'compact' way by subtracting the 'Last' position from the 'Pending' position. And from the resulting vector, If X is negative, then you're moving left and vice versa. If Z is positive, you're moving up.
Can you elaborate what are you trying to do? Relative to what, do you want to calculate the slope?
I've thought about it a little more. I realized X is worthless. I'm trying to find if player is going up or down. so only Z is needed. so I can get rid of the X stuff altogether
basically. I'm trying to add speed to player if they're going downhill. or slowing them down if going up. Needed a downhill check before I could do that part
I over thought it
Wouldn't physics do that automatically for you?
that is if, you have physics applied on your character
that only works if you're under max speed and getting up to reach max speed. If you're already going max speed, and you want to add more. got to increase max speed. so it has to change dynamically depending on terrain
I pretty much want a effect of on BeginPlay the camera will transition from a random place (will add later) to your character
What's like the best way to implement headbobbing/camera shake to an FPS camera?
one that would give me a really smooth result
Anyway know why it is trying to rotate?
@sharp rapidsI do believe this is the most simple version of what i was originally trying to do
Toggle visibilty not working on a timer for me
the code is running, it's just not becoming invisible
Because you toggle two times on the same frame
and it becomes visible again
yeah sequence is same frame
Don't think I get it but it works so imma head to bed
You mean a pawn with the map and a camera to posses to look at the map?
Basically that, yes.
Performance wise, it's actually less demanding as you don't need to go through Canvas Render Target.
does anyone know can i access a variable (component in my case) from an instance of a class inside of the class itself?
for example this ObjectMesh that i added in the object?
No. Because it's not part of the base class.
get child components?
..and then cast it to that component? wow i never thought you can do that. thanks!
yep it does work, thanks again ๐
๐
Guys... this is embarassing to ask... I am still stuck on the problem of yesterday
Briefly, I have a map of integers to actor object references as a weapon roster, and I need to overwrite the value of a object reference in a given index when the player pickups a weapon, and it works ine until here, the weapon gets added and the engine finds it in the map
The problem comes in setting its visibility and attaching it to the GripPoint, I use a node called Get Parent Component, and the value it outputs is not valid for the weapon that gets added
I mean, it works fine for all the weapons that are already in the map, but not for the weapon that gets added later, so it just stays on the ground, always visible, firing from that position, here are some screenshots of the code
I asked the same thing yesterday and got an answer but it ended up confusing me even more and I felt awkward asking again, also it seems like the guy who answered thought the weapon wasn't added correctly, while it is added correctly, it just fails getting the parent component and I have no idea how to solve that, I tried many different things but none worked
Are your weapons separate Actors?
All child actors of a master weapon
I'm guessing it doesn't work because Actors don't have a Parent Component
Oh... then why does it work with all the other weapons except this one?
Maybe it's because the other weapons are already put on the character when the game starts?
hmm, I don't know
Can you try 'Set Actor hidden in Game' instead of 'Set Visibility'?
I'll try and see if it works... I'll message the result back
It works
Now it succesfully changes the visibility, but I still need to attach it to the GripPoint
Nvm solved it
Thanks a lot for the help, I would have never figured that hidden in game thing on my own
Hey, Any One know how to fix this?
I have added collision shapes to the front part of the forklift in my physic asset but since then it just falles of as soon as I start to play. I have added a Constraint to the body but it does unfortunatly not work.
why did you add physics in the first place?
also "i've added a constraint" is a bit vague
have you added angular limits and a soft constraint? also which physics engine is used? (and btw. theres #legacy-physics )
If I do not add any boxes to it in the physic actor, it does not have any collision and this is what it needs to collide with the world and other physic actors.
Well I just rightclicked on it Constraint -> Body
so it's a skeletal mesh and you just want collision?
exactly
then select the physics bodies, on the top of the details panel you can set them to kinematic
that means they are only affected by animation, not by gravity and such (the constraint between the bodies can then also be removed)
Works, thank you!
well step back
does not fully work
it still does pass trough other objects
that's probably related to the collision settings of your actor
get sure to have it block on the correct channels
anyways, for the forklift i would go with a static mesh anyways, i don't see any benefit of having a skeletal mesh
It's a drivable vehicle
yea, but you can separate the wheels and fork and animate them even as static meshs
this again creates the big issue that it's passing trough objects. I can now still drive trough a static wall with the fork until it hit's the collision of the vehicle body.
select the body in the physics asset and check if collision response is enabled
and if it's set to simple as complex
ok, can you show the collision settings of your actor, too?
the wall?
no, the forklift actor
The body in the physic asset as the exact same setting
not the physics asset
the actor blueprint
the one you actually place in the level
it's just the default cube with no changes
idk what the defaults are ๐
yes it does block the vehicle and does work for the main body but just not the fork.
Same issue if I replace the fork with static meshes with collision. for dirving the meshes are ignored
in the editor viewport, there's that small show button on top, check collision there
does it show the collision box for the fork?
yes, it's in green, the rest of the forklift collision is in purple
hm. no idea honestly what else you could check
i would go through all the physics/collision settings in the fork lift actor, your physics asset should be good
If I the box to default and not kinematic, it wobbles around but collides with the world
ok, that's interesting...
If I just could find a way to stop wobble. I tought the constraint where to prevent this
short afk, back in 10 min
https://forums.unrealengine.com/t/no-collisions-when-bone-set-to-kinematic/294258/4 funny enough this is also about a fork lift ๐
honestly i would just make it a static mesh. that makes it way easier to deal with all of that imho
but i've not worked with vehicles yet, maybe it's more convenient to go with Skeletal Mesh for them ๐คท
I actually tried static mesh before but is also just passes trough static objects
If I wanted to replicate the rotation would I need to set these in a variable instead?
Hi, so Child Actor Templates can be used to set child actor variables from within the parent's blueprint. But is there any way to do so per instance from the editor itself, on the parent blueprint instance?
not without some weird proxy variables. it's recommended not to use child actor components
they are not very well performing and might turn out buggy
you can spawn actors and attach them instead
But what's the alternative? Create a million child blueprint classes :/ ?
Or attach at construction/begin play time and then have duplicate variables between parent and child actors to propagate?
@keen hedge
That wouldn't be visible from the editor though, unless it happens in the construction script of the parent, right?
no but equally child actor components aren't visible either
you'll have to have proxy variables all the same
or just consider another workflow
Thanks! Do you have any suggestions maybe?
For a parent->child like interaction with actors, where I would ideally like to control both from the editor itself rather than blueprints
hi everyone! any idea how to get all staticMeshComponent from a BP? (there is no meshComponent from GetAllActorClass)
GetComponentsByClass?
GetComponentByClass returns an array of all components of certain class
I'd need context
but it give mes an error...
Replace the GetAllActorsOfClass node by a GetComponentsByClass node
ok! trying
@odd ember Let's say a stand of items, where the item stand is the parent and the item is the child. The stand blueprint initializes the item and sets its position and rotation on the stand. The item can then be interacted with differently, depending on the item type (that's why the item is an actor, rather than a static mesh component on the stand). If you have ideas, you can PM me so that we don't spam the channel here. Thanks!
like this?
Seems right. I assume it's not giving you any errors anymore?
Np
guys, do you know how to edit the range of an array? let's say i want to remove the first array of a value
I don't do PMs, but basically if you can make a custom component then maybe that's the way to go. otherwise you'd have to find a way to expose parameters on actors
the other way to do it is to handle all the actor instances as BP children in the context browser, and fix the parameter values there
did you seach for "remove"
I'm using multisphere (also tried capsule, same reuslt) trace node to get different hit results for each bone that hit on an enemy character. When the enemy is in range of a sphere originated at trace start location with given radius, I get as many bones as it's hitting. When I get further from the start point but staying inside the trace, I only get a single hit result with closest bone. Shouldn't I get the same result whatever my distance is to the start point?
Guys, such a question. What is the way to make it so that I can hold some objects in my hand, and some not? Here is the architecture of the items, but I still donโt understand how best to implement this selection logic. Create a Wearable variable of type bool in ItemBase, or what?
yes, or create a child of ItemBase which is ItemBaseEquipable
which also introduces the methods for equip/unequip
How can I check that the item I want to wear is equip? Without cast
Yes
Either a bool on the itemparent
or use an interface, which is less ideal in this case
just put a bool on the parent
Can someone tell me why the true part of the boolean is not working? this is in my actor class from character.
Good morning everybody. Is it possible to have something like EditCondition in blueprints for certain variables to only display depending on the value of an enum?
What is your aim in here? Wouldn't both of the cases set the ADSCamera to the same position since at the end they're both connected to the SetWorldLocation node?
@graceful forum ignore the code for now, I was just trying to see if the "if true" node is being triggered which it isnt, but basically when the player slides the camera remains in the same position when scoping in, so I will rotate the camera when he is sliding
ok will try!
Then it should be either your case is false or cast is not valid. Did you try to use the debugger?
or your bool is just not working as intended
@graceful forum I did, the node never returns true but the cast is valid
I assume there is some rule when casting that i forgot that is causing this issue
Are you sure you're setting your variable to true somewhere?
@graceful forum yes and i tested it out
it also turns false at the end
of the action, but i tested both ways
Is this a multiplayer project?
I will turn it into one, but as of now no
if u want I can share my screen if that makes it easier
Sure, is it possible to use the voice channels in here for that
Nevermind we can't stream there
I ask again, does anybody know a function structure to move a camera with a spline? I figured to use a timeline already but how must it connect?
you can use SetViewTargetWithBlend and pick different points and transforms
It's a bit more complicated than that. The camera must move with the spline is my asking.
otherwise I believe you'll need to use some camera rigs like rhino or what have you, that might be part of the cinematic camera suite
I'm not sure I understand, rhino?
There's a JRPG blueprint that has an example of what I'm trying to achieve though I don't want loops. I at least think this is what I'm looking for.
These are the examples of what I kind of want to achieve though the functions are not right. I know I could redo it but how?
any spline will have to have loop throughs
Could timelines like move on after camera reaches the end of their splines?
any1 know what this error is?
reposting is generally frowned upon. but in either case the #multiplayer channel is where you can get answers for the most part
well if you iterate over them with an array then yeah you could loop the same timeline over
if that's what you're asking
No, I mean after the camera has reached it's end of the spline, it moves on to the next structure.
sure, same principle
you just use an array of spline components instead of spline points
I think it would be easier to do this with relative sequence
I'm not entirely sure if that will be what I want for a turn based JRPG in the Persona 5 Style.
If you played the game, I'm certain you'd know what I mean. This isn't going to get any easier...
And I do the similar thing based on FF7 Remake's limit breaks or magic cast
There is a blueprint made by Trevor Betts on Youtube that has an extremely good example of what I'm looking for. It may be able to solve most of my questions. Though it seems the maker doesn't have any connection for it. Sigh since I can't seem to find good guidance and too many are saying "sequencer" I guess I'll have to try though I'm very uncertain if it's the correct type to use.
Main Menu: 0:00
Battle 1: 0:33
In-Game Menu: 3:54
Battle 2: 5:39
The purpose of this video is to demonstrate the third major version of a turn-based RPG battle system I made in UE4 (via Blueprint), as well as a completely new menu system to support it. Most assets (characters, animations, textures, sounds, particle effects, etc) were either pro...
What about a custom camera manager
That'd probably be the best class for this
Personally i'd try and disconnect it from 'splines etc and do it mathematically, procedural like
I don't quite know how to sort that out if that's the case.
Can someone tell me why the true part of the boolean is not working? this is in my actor class from character.
(reuploading to see if anyone knows the fix)
Defining start and end points and a method for moving between them according to desired options
Id imagine some random camera angle/style picking
@spark steppe nope, bool was confirmed true
in the same method?
issue is when it is referenced on a different blueprint, it doesnt work
wanna vc and see?
np
i only have 1 player ref
so its not that either, unless there is a rule that i forgot when referencing to certain classes
Watching ff7 itd mostly just a singulsr focus point and no animations, isnt it?
have you placed a print string node between the cast and the branch which prints the value of the bool?
A branch goes where its told to
If it doesnt go true its because of the critera is false
show where you set the bool to true
ben i did and it shows the string
that's in the player character blueprint?
What event calls this
And when in relation to your issue
Print strings is the way to go
it'll be easier to talk instead of typing, but its when i click 2 keys I slide and it is set to true
Its when i reference the bool in a different blueprint it isn't being recognized. only the false branch works
wdym is read when? do u mean in the first pic i sent?
Yupp
thats in my actors bp, im trying to have the camera be adjusted when sliding is set to true
and its on beginplay
oO