#blueprint
1 messages Β· Page 58 of 1
i heard its good for when you have very simple stuff
There's first time to everything
i tried doing an object in CPP
it was a mess
it had nothing, had to make a weird tick event
so if it doesnt tick it will be hard because i need to make my gun tick
yeah but like why separating this logic
Afaik you can have tick in object
maybe its im not used it
Not separated, that's the brain
you can but its messy
Not at all but maybe you should also ask other people opinion
That's just what I will do
Actor is an object btw
its cheaper i know
but since i need it to tick
Well I'm not worried about that part
then maybe its better to just go with actor because already has tick
and lots of good stuff
I just don't need to place a brain in the world
ah
i get that
yeah actor if its only logic i doesnt need to be placed
that makes sense
But maybe u can't call tick by default in object
Can't remember if I ever done that
here is what im doing to make an attached actor destroy with the parent
just use the event destroy
and destroy all attached actors
or is attached actor also bugged?
Not something I will do
Bugged or not I have no idea
It's just neater to me to isolate the logic in the item class
Array of structs
Data table is static, you don't store , you just read from it
It can have a list of all the weapon in the game for example
If I want to add giant sword to my inventory, I just get the data table and find giant sword in the DT
Okay so array. makes more sense
what about for inventory ui
What would the "slots" be to hold the item
I have my ui as "buttons"
But wasn't sure how you can actually slot objects into them. (Maybe custom button) unless there is a pre-made thing that lets me do that
Ui just read the number of items my player have
It will create a slot widget for each of my item
Yea mine is dynamic creation but pre-set for certain inventory size.
Your inventory would likely be a component that stores the array of the structures that defines what your inventory contains.
Your UI just needs to represent those contents.
UI is mostly pictures π
U can just pass in info about the item static mesh
Spawn them or draw them to screen as needed
so currently it re-gens it everytime when you press I (the ui)
There's a little bit of logic needed for UI like how to handle drag and drop, and how to generate what you want displayd, but in terms of representing gameplay elements, UI should basically just be reading from those gameplay objects to know what it should display.
Should I be doing it a diff way to store it?
yea was going to ask about drag drop
eventually
So inventory also gets stored on gameplay state?
for save reasons
You wouldn't want it stored in the UI, that's for sure.
Usually inventories can be a component, and if made right, that means you can give a variety of things an inventory, so not only your player, but chests, or enemy corpses, or anything else where you want items to be stored.
Yea inventory is a component π
If you have gameplay element stored in widget , you should wipe it and redo it
Widget should only do tint logic for the purpose to represent the data it reads from other sources
Like rounding is fine
But to store the item or value in widget? Never
no not storing on that
Just pass in your inventory comp to the widget
Widget then can just read w.e it needs to
Im saying, should I store the playr inventory items on playerstate
Depend on the game and design
Single player small showcase game
If character can die or u can switch characters. Then you prob want the inventory in the character
If the inventory need to be saved somehow
Or if you want the items to stay on the corpse, then on the character :p
@frosty heron so im trying your technique. And i cant set the Object (item functionality in the data table)
Then don't do it in character
It needs to be saved for when you play again or after you die so you retain your inventory
oops my bad, thanks
You can't store Object References in a data table as they don't exist at design time. You can do a "Object Class Reference", but that means you're likely duplicating work as you're then having to create item classes on top of defining them in the data table. .... Nevermind I see you have the field labelled as "Object Functionality" which can absolutely make sense to do π
yeah dummy me forgot about it
Make your own structsin c++
@frosty heron
is this how it works @frosty heron
?
Is there a way to "delete from scene" but not delete totally. IE so you don't delete the actual object and its refs?
I will start from inventory component or system
Select item -> use item (logic is here)
Shouldn't even need data table in the item class it self
inventory component or system?
Sure u want to have multiple weapons right?
And switch between them
U need to think of it in high level
yeah but they are defined in the data table?
so i need to get them, right?
That's why u do item system first
Add item to player -> get data table. Feed the name. The output is added to the inventory
Input action use item -> get selected item -> call interacted or used function from the selected item
sorry i dont see the difference
thats what im doing?
item -> get data table -> get stuff -> call function
ahhh
so you mean the mesh and the quantity should be inside the object
not in the data table
The logic of adding the comp and everything else should be inside the object
exactly got it
You can utilise data table when you want to grab an info of a specific item
The weapon object doesn't need to access the data table, it should already know what it is
but nobody commented on my silly nodes:
Like weapon gun, and child would be machine gun, cross bow etc
yeah
got it
I made a weapon class in cpp lol
Component
That I just attach to a base weapon BP and that modifies the look/stats/etc
Anyone have idea why my river is doing this when I place it ?
So I'm trying to get a realistic wind effect on my foliage with wind waves (wind that isn't constant). I want some real life wind burst and some randomness in my time node. How do I do that ?
how do you destroy an object effectively?
im creating this object, and calling a function from the object. Even though i destroy the actor that created the object the function still calls and everything inside the object works forever
The most straightforward method to "destroy" objects is to nullify all references to the object, causing it to be queued for garbage collection.
If it is NECESSARY to immediately "destroy" the object and you are certain that no other references exist, you can invoke the ConditionalBeginDestroy() event. However, this is generally not recommended.
yeah thats what i read. though its weird that we cant force the destroy of a class
for example in my case it just keeps running
so if i have a set timer inside the object
and i have 20 of these objects in my character
then when i destroy my character i have to go inside each object and stop the set timers
else they will keep running even if i destroyed the character that created them
I think the problem is that if you're creating timers, you're effectively binding to an event within the world that then calls back to that object, which means it keeps a reference to that object which would prevent it from being garbage collected even though its outer may have been destroyed.
Also is there any specific reason(s) you want to work with objects? Perhaps an actor component can be of more use, and you can destroy it via DestroyComponent.
This could likely be fixed by binding to the destruction of the outer within the object and when the outer gets destroyed, invalidate the timers, after which the engine should appropriately garbage collect the object.
This will slow down your blueprint performance due to increased friction and length
No this will create momentum therefore making it go faster π©βπ¬
Yea this is valid but you have to consider the magnetic field generated by those circular loops, which may result in not enough energy to power your next blueprint node
I asked about this in sequencer, and previously when asking about this on the unreal forum, I was told that really the only way around this was a blueprint workaround, so I wanted to check and see if anyone has encountered this issue and has worked through it.
I have a level instance being streamed into another level and our previous way of working prior to using level instances and world partition, was to grab a static mesh, drop it into the sequencer, then we could hide the mesh, add transforms to it, and so on. But with level instances, we canβt add adjustments to the meshes inside of the instances because we canβt find references to them within the instances with the sequencer.
Anyone know if this is possible and how it can be accomplished? Or a possible alternative? It is basically a pipeline breaking bug at the moment so we need an alternative option or are looking at various other alternative ways to handle this problem with developing our cinematics.
question - how do I spawn an object with a collision capsule as a child to another object, and have child follow the parent around?
When I try to use Attach Actor to Actor, it seems to just be ignored - I also tried disabling physics and collisions and neither of those worked either
you can try this instead, spawn your actor then attach the component to the parent instead of actor to actor, as long as its attached properly it should follow its parent automatically but its all about what order you execute your events when it comes to this stuff
i have fixed the error successfully, but having another error while making a main menu widget in level 2, my blueprints and animatiuons are spawning in it from level 1, how can i kep levels sepearte?
[11:48 AM]
seperate*
I also have a question for anyone out there who may know, Im working on a project where my character can posses another pawn, like a vehicle! Im wondering what happens to character references when possessing another pawn? Are they automatically unloaded like the old pawn was destroyed or are they held in memory where I only have to load certain references when they re-posses their original character?
trying to find your old error message so i can try to help but cant seem to find them, can you explain a little more about whats happeneing?
are you loading in your sub levels via blueprints or are they always loaded in?
i am working over an endless runner game
like a subway surf type
so i made a second level forr my main menu with animation in the back
but as i play the animation, it starts to load the level 1 spawns befor i even click on start the game
i will send a screen shot
yeah screen shot or video would be best, hard to know what could be causing that as it could just be the order in which your calling your events
i have some blueprint here which is basically just a vehicle following a path, and i dont want it to start following the path or rotating the wheels until ive interacted with the vehicle by pressing E. how would i do that?
ive tried using my inputaction which i made for E to interact, but it doesn't do anything
yeah i took a look, im curious how your spawning the player when you hit play, as the only way that level would load in is if it was loaded in through code somewhere, so if the level loads when you hit play then maybe try unloading it when your in the main menu, theres a window you can open called levels which will show the levels and sub levels in your current open level. if theres a dot beside the level name it means it must be loaded through code, if theres no dot it means its always loaded in (you can change that by right clicking and change streaming method) but im not sure the workflow your using for your levels. Characters, Controllers, Widgets, Game modes, and almost any blueprint can load and unload levels, so its hard to know what could be going wrong without knowing how it was all set up from the start. I usually have my main menu a completely separate level, and when i hit play i just open level by object reference in code
well your updating your wheel rotation on tick so its always going to run as long as the game is in pie. you would need a bool or a gate of somesort to enable and disable the update of your wheel rotation, then instead of calling that timeline to move on begin play, call it through an interface event when the player overlapps a trigger give them the option to interact, if they interact while overlapping the trigger then call the interface event on that vehicle spline blueprint thing you got going on. I would maybe have another interface event to reset that do once so you can also turn it off and use it again
this is how I'd go about a main menu as well. separate folder for "misc" levels such as MainMenu
There are two ways of accomplishing what you want:
- You would want to load your sub-levels via blueprint (when play button is pressed) instead of automatically loading them
- You could separate your main menu level to a different directory than the persistent level and use "Open Level" node on PlayButton clicked event
okayyy
but i did use the open level node
for the play button
not able to fix the issue :
can anyone come over anydesk? i have my thesis tomorrow so any help will be very helpful
i am not the expert with blueprints so debugging is too stressful at the moment
this is what i have for the interface event
which is essentially just a radius for where you can see the E widget, i want the interaction to only work within that radius too
and once that interaction is fired, it will start that entire screenshot of code i showed you before
Hey I'd appreciate some help if anyone has time!
I'm spawning in some BP_rooms with scene components in them which I call Anchor Points. When those rooms have spawned in I spawn in a BP_block on all anchor points, however on one preferably random, anchor point I want to spawn in a BP_Exit instead but I can't figure out how.
I've tried fiddling around with the arrays to remove one from the index and so on but I can't really find a solution, but I have a feeling it's pretty simple. Anyone have any idea as to what I can do here?
Just add arrow components in the room to begin with and place them wherever you want to spawn the stuff
I don't want to place anything. I'm generating everything random. These are the last rooms being generated and I want to block off the openings to the rooms except for one opening where I want to spawn in a specific exit room
π€ maybe once the for loop is completed take the last index, destroy the block and spawn the exit
Yeah tried that but I can't get the anchor point to set the transform of the spawn
Wdym? Just get the original location where it gets spawned
Anchor point -> get world location. Should be the exact same way you spawn in the block
The anchor points are in that array, they're random and I don't know in what position they are before running this.
If I remove say index 1, sure it's removed, but I can't get that specific anchor point again without pulling the whole array so I don't know how to tell the exit room where to spawn.
Show how youβre actually spawning the blocks to begin with. Showing an interface call is useless
Coming right up!
Event graph
Function - Spawn room
Function - Spawn room on anchor points (scene components)
Function - Spawn blocks
And the spawn rooms XTimes is just the spawn room function XTimes
I canβt test rn but on your for loop Iβd do something like get last index , if the latter == current index, grab that object, get its transform, cache it into a var, then destroy the block and spawn the exit there
Hello!
I again try to add a double jump in my 2d platformer π It seemed like I did it, but now it doesn't work. I don't know what I do wrong. Will appreciate any help.
- I started with this guide (https://youtu.be/tVH0VTY-c8o?si=a4am8UdfTNfKBq7S&t=1836). Just in case if timecode doesn't work, the author starts adding jump at ~30:36.
- Next I tried to copy part with jumping and add the second one. But I delete part with break vector and delays. And I add part with check of the second jump.
- Now I have the situation at the pictures. But I can't do the second jump. I'm only jumping some times.
And to be honest I don't know for 100% how should I modify branch conditions. Firstly, I thought to use Boolean And, but it doesn't work because at the first moment I have the second jump variable at 0. And it seems if I use And then it never works
Sorry, I'm very newbie, but I really need any advice π€§
Thank you in advance
When I just add the second jump in jump max count then I get additional height of jumping
Why are you adding a force when you jump instead of using the built in jump function the character movement component comes with? You can set Max Jump Count to 2
Oh I'm sorry, you are using the jump function
Still, have you set Max Jump Count to 2?
Yes. And then I have this:
I mean, I don't have double jump (as opportunity to jump in jump), but I have jump with double height
When debugging blueprints some variables show up at "Unknown". What is the fix for that?
Upd.: I understood that I need to use int JumpCounter and Less or Equal to count my jumps in branches. But nevertheless it still doesn't work
Try taking the jump off the triggered pin and into the started pin, or whatever it's called
On the enhanced input event
For jumping
Also try putting print strings when you single and double jump to see what is going on. You might be doing both at the same time with the pin on triggered
is inCollision ever being set to true ?
Yes
I put a Print even after the Press (before it does the Branch) and still no print
If this is in a random actor you prly need to use EnableInput on begin play
i have weapons that have separate animation blueprints
and i want to guarantee that each blueprint have a functions to control weapons animations
Oh okay yes its an Actor
I will try that
I enabled the input and it still isnt printing @lunar sleet
Wait nvm I didnt do the node correctly
check is it even called
print string immediatly after pressed
When you assign the weapon, you would assign the anim bp too. How does interface fit the picture exactly? but if u have idea already then i guess I just don't see it, feel free to ignore
Yes its working thanks
i don't know what weapon mesh is used from the point where i trigger animation
i just want to call function to trigger something in anim blueprint
I'm trying to make some movement for multiplayer when doing a click on the floor. This works properly if I start as stand alone, but for multiplayer it moves like at 2 fps and it doesn't turn:
I'm guessing this approach is completely wrong, what am I missing?
Hope everybodys Doing Great! π God bless you all! π Jesus loves you all! π Hope everybody has a Great Night/Day! π
are you using character movement component? #multiplayer btw
I just found a video about making the topdown project multiplayer here https://www.youtube.com/watch?v=22oMcygkEGQ, I'll go through that first to see if I can find the answers I'm missing
This little tutorial is to help people who wants to use ue4 Topdown template on multiplayer, as the base template does not have any code allowing this task
Is there a way I can change an actors selection size?
What do you mean by that? Whatβs selection size?
Hello! Is it possible to give a character a weapon at runtime and have the character's skeletal mesh recognize the weapon's sockets?
Or do something like searching child meshes?
Or do I have to make a custom solution
hello, i am making apickup system for my game
https://cdn.discordapp.com/attachments/1162415123969884202/1185452507829379174/image.png?ex=658fa9ae&is=657d34ae&hm=ca8f54567009b45a17c3131865a8639d2f7e587c9a967c77b2b329e6e985763d&
https://cdn.discordapp.com/attachments/1162415123969884202/1185452530348589066/image.png?ex=658fa9b3&is=657d34b3&hm=2c70896e69ad31b0a41df4bf8e6b501e3070a9f37f41876ffea2982fdac50de4&
when you pickup the item, it attches to your hand
when you drop it, it drops
when you pick it back up again, the code behind it runs, the branch prints as true and it all works but DOESNT attach back onto the hand
can anyone help
printing all comes right, the code behind works, the attach comes as true, you can pickup another tiem again but not this item again
I updated my article into something more readable for beginners and removed verbose stuff
I highly encourage people who are paranoid about BP performance to give it a read
You can try and use a do once and a delay at end of the code to try and give more time to the code to function normally
You can also add a button that allows you to pick up the weapon instead of the chr. picking it up automatically
can i get blueprints from other project to current 1
Migrate
ye i found out from a vid
Mind the cross-posting
Hey guys please someone explain me in detail and in easy way , what is difference between get and set the variable in blueprint . If possible give me one example of each please.
I believe them to be incredibly self explanatory. A variable is a piece of data that can change. If you are getting the value, you are reading the current value of the variable, if you are setting the variable, you are changing the value of the variable.
@steel geyseryou may want to take some time to go through this: https://dev.epicgames.com/community/learning/courses/QGD/blueprints-essential-concepts/P7L/unreal-engine-introduction-to-blueprint-essential-concepts
has anyone done a runescape esc level progression system in unreal?
even a simpler version, where certain actions grant XP for certain skills
curious on if anyone has done this and what their method was
im thinking of doing it all in a component
Does anyone have any good tutorials for Hotbar only Inventories? (No bag like slots or lists or anythings, Just a simple hotbar
Ive tried looking but all just have a hotbar + other inventory space heavily integrated into it, my lazy ass cant be bothered wasting time on separating it into good code
I wouldn't go as far as saying its a good video.. but I saw this which looks like just a hotbar as you wanted. Good Luck
Welcome in back to my channel. In this video I will show you how to make a hotbar. The way you can support me is to join the community with SUBSCRIBE button and follow me in the social medias. Thank you for watching!
---About me---
My name is Ilian, an indie game developer. If you are GAMER or INDIE GAME DEVELOPER who want to see how a game is...
@past compass I would probably use GAS for that, where abilities can have Levels.
But that requires c++ of course
At least to some degree
lmfao i was afriad of that
i have the GAS component and it's still been too much for me to really dive into
but i mean
i think i could learn it
i dont know cpp tho
Tbf, I wouldn't bother making something like that with BPs alone either way
Does it need to be Multiplayer?
lol yea
Honestly, I would not tackle this if I were you.
Multiplayer without C++ is def gonna bite you hard
Especially with more complex stuff like what you are trying to do
You need something that represents each skill
Maybe a struct per
But structs have no functions or inheritance in BPs
And UObjects can't be replicated in BPs
would thinking of putting all of the skills in a skill component
Yeah but that is not the problem or
The problem is having a replicated set of data that represents the skill
And in BPs you don't have much options. Actor per Skill is strange. Struct doesn't allow for much
maybe im missing something but wouldn't it mainly be math formulas?
You have multiple skills though
i don't see how that would be anymore difficult in replicating is all
You usually want to represent them individually
let's assume there are 10 skills
If they all have the same layout for data, then use a struct I guess.
and all they do is add to certain mechanics tht already exist or something, i just want a level that will be a chanign varizble that can adapt certaina ctios
nothing super crazy
weapon does 5 damage when level 1 att, but when level 10 att same weapon does 7 damage etc
becuase of a forumla
formula*
Yeah then have a struct with level and some key name (GameplayTag maybe) to identify it and whatever other info they share and make it an array
The math would be in the weapon then though
Which would pull the level from that struct array
well i think it would come from the character (or whereever the level fucntion would be), but i image it effecting the actual base input of the weapon, so if it's base damage is x then a higher level would be a mulitplyer or sorts multiplying x on every action that has that skill set associated with it
I did have a look at it, its not really that great in my opinion, I feel like there is a way better with Structures and Stuff like that, It could work as a basis to go off i guess
i like the struct idea, although i do try to avoid making them, i've heard stories where they "break" projects lol
im already using plenty w no issues but still always wery
As I said.. it didn't seem like a good video to me either.. but that is all I saw on short notice.
Mhm, Thank you for suggesting it tho π
I have a variable in my data table, "IsUnlocked", I changed it during gameplay from false to true but when I checked the widget it is still not updated, Is there any solution?
@prisma snowhow does the widget get to know that the value in the data table has been changed?
There are two widgets: one displays all items in my data table with images, names, etc. In another widget (store widget), players can click on an item (data received from my data table). I then change the 'IsUnlocked' variable from 'false' to 'true.' However, when I navigate to other widgets, I still see the item as locked
I want modify datatable during gameplay just like arrays
This has a good example of triggering updates to UI using Events @prisma snow https://docs.unrealengine.com/5.3/en-US/driving-ui-updates-with-events-in-unreal-engine/
@prisma snowif you have a function within your widget which retrieves the values from the data table and updates the visuals, you may need to specifically invoke it every time you update the data table and want the widget to reflect that
In general it doesn't happen automatically
I modified the variable, as you can see here. When I use the 'Print String' function, it says the variable has been updated. However, two seconds later, when I check again with Print string function to see if the data has changed, it shows that it has not been updated
I searched in google I found this :
You cannot, Data Tables are static, read-only in blueprints
is this right ?
if we can not change datatable during gameplay so it is realy bad thing
so there is no way to update data table during gameplay ? what is the benefit of data table then?
@prisma snowI assumed you were using Dynamic Data Tables. If not, you can think of creating an array of the same struct you use as base element for your data table, populate it at runtime with the content of your static data table, then manipulate it as array.
ok
thanks
Yop, they can.
Mostly happens when modifying them when they are already in use and when they are split instead of break'd
But they don't break the project. It's more like you might have to redo the struct, everywhere.
If you don't have access to c++, then you gotta live with that fear
hi! I am wandering around since a hour and trying to find a way to make generic connectors between widgets, like the ones in the image
any ideas? I tried "draw line", but it's ugly. I want to have something more aesthetic. Do I have to manually place those connectors, or do you guys think there is a better way?
I haven't found any other nodes than "draw line" that may work for this purpose
I'm okay with unreal's default blueprint connectors, but I have no idea how to draw them on screen
the static mesh won't change
Hello dear friends, I'm really very happy to have you here. Otherwise I wouldn't know what to do without any programming knowledge
So long story short:
I'm trying to create a hit detection but the hit detection is underground even though I have everything set up correctly, right?
Hey guys i have question why we use get Actor location instead of get Chracter location to get location of our chracter ? Because our chracter is chracter not actor so why we use get actor location instead of get Chracter location ?
alright, thanks. on my way to there
Seems like it can't find bladestart and blade end in the mesh component. Are you sure the blade is in the mesh? Show how you attach the sword
ok one sec.
its look like that
i made a socket where i put the sword in
hi all, i need help with a rng system for sound here. i have made a RNG system in which a sound is randomly selected to be played every 5 seconds but some times no sound is played and the timer restarts how do i fix this
you won't need blueprint to play a random sound
you need to use the Sound Cue asset
i know you might be talking about cues but i need blue prints to randomize their locations
ah
its self explanatory, you are enablind the input if something happens
then why we attach it to player controller ?
you're defining which player controller you're enabling
how are you choosing a random location right now?
if we use get player controller node so
why we require to it to attach again to player controller in enable input
i mean
why we not attach get player controller to target why we have to it to attach to only player controller ?
when the blueprint is not complete when it will be(after i solve this issue) different sound will be played at differnet location and the sound cue cannot di that
what you would do is get the location of the player, then add it with a random vector clamped to a particular value on each axis, and then use that random vector result to spawn the sound at that location
Any advice on how to control the player's rotation speed as they rotate to look at the mouse? I just took this from the top-down blueprint. It works okay but would be nice to smooth or slow down the rotation speed. This is in the controller BP.
there's "Random Unit Vector" and "Clamp Vector Size"
thaks
Then look at sword don't look at mesh for the location
thanks cold summer i try it out now
You are trying to find blade start in mesh which doesn't have the socket
So it just return 0,0,0 in local space
ok i try it out
Thanks lot mate it works now with using the sword as "mesh"
Hi all! Ive run into a bit of a snag but Im hoping this is a relatively easy query. I have a sun that rotates around an earth (Copernicus would be fuming). I would like to parent the direction of my directional light to always come from the direction of the sun's static mesh. I can easily get the coodrinates of the Static Mesh of the Sun but I am unable to translate them into the directional light. I have a simple BP for my directional light. as you can see in the final screenshot, as the Sun moves the directional light's location also changes however this results in no actual change in the direction of the light source. Any advice would be much appreciated!
wouldn't it be better to use a point light instead and make it follow the location of the Sun?
Unfortunatelyt no, the directional light doesnt get dimmer the further away from the earth, its an infinite distance away so it always projects the same amount of light regardless of the distance. the sun follows an elliptical orbit which means at certain parts of the year the earth is completly dark if using a point light. im pretty sure it should be relatively simple to translate the position of a mesh relative to another mesh into the position of the directional light but i think it requires a mind better then my own! thankyou for the suggestion though
Guys i have another question in this image , why we connect get player controller node to player controller pin in Enable input node, but why below we connect Get Player Controller node to target pin in Disable input . Please what is this target i am confuse in it ...
Anyone help please I'm really struggling and no far seems like not getting ay responses when asking for help and every video I watch literally doing it different ways
I have a PCG thing which is spawning objects within a spline interior however it's not placing the point on the actual surface of the terrain
What's the pivot point of those trees
where would I find that ?
In the tree asset
obvs I won't be using these trees in the end it's to get stuff working and then I'll switch them out
Okay, so it's not a pivot issue, at which point I'll redirect you to #pcg-framework
Is there a way to easily do a text wrap (wrapping to next line) or do I have to set up complicated code with appending strings etc. to achieve this?
I know I can Ctrl + Enter, but if I don't know the text length up front that is not possible.
Have you tried auto wrap text. Change the policy to per character/letter
No, not even sure what you mean, but it sounds like what I need.
Is that a setting for a "Text" element or what are we talking about here?
Guessing it's this?
I'm an idiot for not even checking sorry π
That works perfectly. Thank you.
That's it yea
how can I remove the binding of Q and E to zoom in or out
I wanna still be able to move around but I want to make it so when I press Q it only executes the input action, not zoom, now it does both
it worked fine when just listening to keyboard events, but when adding input action it gets confused π
Is it possible to use two different GameInstance for two different levels?
Check your Project Settings > Input
No
But you can have as many gi as you want
Hmm ok
With subsystem
?
Cpp
Naw no cpp for me
They all exist at from the start of the game till the end. No switching needed
What are you trying to do where you'd want different game instances?
Multiple GI is neat. I need singleton to isolate my systems
I used gi subsytem for loading screen
Like I built one system based on a certain GI and I want to integrate it to another system as a level, which uses another different GI
I prob should have done one for save and load
Zero knowledge in CPP so no go for me
What are the actual systems, what are you actually trying to do?
Step up the game. I'm learning from the bottom
Once you can do things that bp can't u won't regret the journey
For example, I have a Builder system that allows users to place furnitures in the house
Now I am building another system that lets me construct the house
Afterwards I am going to put the two together as different levels
And the two systems are built using different GIs
yeah that shouldn't be in game instance
Is it like you have a build mode where you can customize a house, then later that custom house can be spawned into a game world?
Yes
But as I was building them separately so I used a different GI when I was building the other system
Looks like I have to recode them then
is there a way to set a "widget animation" type var ? because i cant see anything when trying to add it
is setting at runtime the only way ?
Hii, I'm very new here and I hope this is the right place for my question.
I am making Hands for VR and to be able to get collisions I followed the "Hand Actor Collision"-Tutorial by VR Playground, so my skeletal mesh hands are within an actor blueprint and tied to a physics handle (GrabComponentAtLocationWithRotation) and even though I set my Animation Blueprint Class for the skeletal mesh even with a Blueprint at the beginning, I can't Cast to the Blueprint Class to get the ABP. The Skeletal Mesh is Valid, the Animation Instance is Valid, but the Cast to the Animation Blueprint Fails. Everything worked fine, with my previous setup of the VR Hands within the Pawn, but since I need the physical interaction I needed to change it.
Do you have any idea what could be the issue or how to fix it?
Thank you!
Can someone point me in the right direction of a good workflow to follow when creating a hud or dealing with UI in blueprints
ββ> #umg
Hello. How expensive are arrow components? I'm working on a building system that uses snaps. The snap locations I would like to implement with arrow components. So that it is easy to work on as a developer. Question is how expensive are they if players were building big things, knowing that each building block has a couple of arrow components.
In-game the arrows would ofc not be visible and not rendered. Question is, do they still have a cost even when not visible or are they cheap?
any one have a suggestion on how to make a rotator count lerp to 0?
example, if the pitch is 350 when I call my event I want it to add 30 (over a lerp or what ever is appropriate)
were as if my pitch is 100 I want it to subtract 100
right now I get this full rotation that for a moment flips the camera upside down lol
so I was wandering if there is a function I could use
this is what i have
here is a visual example (I tuned of the pitch so it would not trigger seizures)
the first 2 times I turn the corner its fine, but the 3rd time the camera makes full spin right where as it should recognize moving left is better . is there a bult in function I can use or do I have to make one ?
I'd guess they're about as expensive as naked scene components (which are what you should probably be using instead of arrows), which is to say, not free, but not crazy expensive
How does your building system work?
I wanna know, is it impossible to update actors that are near to a actor that is currently being moved transformed by the user in editor using the construction script??
Would either of these code snippets work to modify an array in a struct or do I absolutely need to use a set members node
Im trying to retarget something in ue5.3 for the first time
where did the edit mode button go or how do i get back into the edit mode?
Small (stupid) question. What is the simplest way to determine if a number is a prime number or divisible by 2?
I guess this works?
Hey guys i am stuck with smth and don't know how to make this:I want to display on the screen the arrows the player has in inventory and also him to shoot when he has them and when he has no errors dont shoot
can someone help me with this please? its a university project
Hello, maybe someone can help me to fix a simple decal selection below my player. I tried this setup but mostly when i move the mouse and it rotates or when i move the player, the decal "fades with the floor" so its not perfectly visible. Anyone knows how can I fix it?
This worked just without the normalize node, ty!
Another issue I'm running into is sometimes the ricochet trace gets consistently eaten up by some walls, but not others. I'm not sure what the best way to fix this is
https://streamable.com/bo44iq
Hello all, i was wondering if i could load a data asset, change some thing and then save and overwrite that data asset? I have an in game level editor and i want to store that level data asset file somewhere.
Or should I use something else, since data asset is actually meant for items/weapons/etc
Afaik DAs are read-only. Youβd need a struct (cpp not bp)
Ah not in bp? Thatβs too bad. Perhaps another question: can i save a runtime snapshot of the level as another level?
i might be stupid but i can't figure this out
i added a blueprint as a component to another blueprint
but i cant cast it to be the right class and use the functions?
do i need to add the bp class as a variable or something?
Don't use child actor components
They're confusing for exactly this reason, and broken anyway
what should i use then?
Spawn and attach the blueprints
If this needs to be done like Unity prefabs, install the prefabrication plugin
wdym by spawn and attach?
btw the bp also has a static mesh component which is basically supposed to be part of the overall bp
Spawn the BP, and attach it to whatever it needs attaching to
This might be applicable to you.
#unrealengine #ue5 #unrealenginetutorial
Social Media & MORE:
Twitter: https://twitter.com/polysiens
Reddit: https://www.reddit.com/user/Polysiens
Instagram: https://www.instagram.com/polysiens/
Youtube: https://www.youtube.com/@polysiens
LinkedIn: https://www.linkedin.com/in/petar-ples-08a04356/
Personal Website: https://venturoustudios.com/
...
so like i spawn the bp actor on begin play and place it in the right location in the scene and attach it to the root
and then i store a reference as a variable?
i really don't wanna do the placement programmatically though
there's gotta be a better way
The prefabricator plugin or c++ is your only other option really
What's the C++ approach?
That's my least favorite part of Unreal, the fact that it's not trivial to have an actor which just contains another actor at design time.
what about the get child actor function though?
That will return the actual actor spawned by the component. Child Actor Components really are a big can of worms though.
i feel like that's exactly what i want
but i'm also still pretty new to unreal so don't really understand the distinctions between actor/component
so the Actor is the atom of things in your world. If something exists in the world, it is or is part of an actor
actors are made up of components
pls destroy my coding pattern.
Im making a tank game. You can capture tanks, and these tanks have different guns.
Then you switch between tanks by pressing tab, and switch gun on each tank by scrolling down.
But this is messy when switching because i must replace the other tank.
So i replace the mesh of the tank and its variables for the new tank. And destroy the old tank guns, and spawn the new guns.
But before doing so i store all the data of the old tank and its guns on a struct, so that i can then switch to it.
this was very hard to do... and im sure there is a better way
someone suggested to do this like you would do with inventory, with objects
What do you mean by capturing a tank and switching between them?
do 2 tanks exist at the same time and you just swap which one you're controlling?
like when you go on your first tank. Then some enemy tanks are abandoned, so you go there and capture
so now you have 2 tanks in theory
but only use one at the time so must manage
Are both driving around now or do you have some tank in your back pocket and can swap it with the one you're driving like pokemon
so yeah i just did this and it seems to work fine or is there some issue with using child actor components this way?
no im more like, replacing the mesh, and storing all the data necessary for switching in an array of structs: Tanks_Struct_Arr
The Tanks_Struct_Arr have in it an array of BP_Guns
So a tank is like a gun in a shooter, youre using one at a time and swap it out when you swap to the other one
π§ π₯
exactly
but in a shooter there is a difference
in a shooter you can get away with having the gun on your back
I'd have some struct with the definition of a tank. Given that struct, be able to spawn a tank with whatever data. Call it TankBlueprint or whatever
here i must get rid of the old tank
Make a function that inputs a tank in the world and outputs the struct, and vice versa
okay so thats more or less what i have done
thats exactly what i have
thanks
Is there a way to get the input from the number keys? All in one node?
i was thought i was being a noob
In my vehicle building game I have something similar, I just call it a VehicleRecipe but same idea
You'd do the same for a Diablo clone, you'd have some struct representing an item
No matter what I do, I will always feel like a noob π when I look at other people way of doing things
versus just possessing the other tank and controlling it and then possessing a different one?
great. i also considered doing a "garage". So basically store the cars in a box in the map, just throw the ones you are not using at the moment inside that cube thats below -1000 in the z
the tank has to be able to go away and be stored
Nah just save the to some struct. You presumably want to save the game at some point so you'll have to do that anyway
yeah 100%
Hello why does my cast fail when it touches the triggervolume
You can make it easier on yourself by only ever having the struct be the thing thats changed (and the tank object updated to relfect those changes) so you don't really need to scan a tank, just read its struct and destroy it
But then you'll have to spawn them at runtime with structs etc. That's the approach I'd take though.
Print the value of overlapped actor and other actor
you probably want to check if otheractor is a ball
things get a bit more complicated because the tank has Guns attached to it. So not only you have to respawn the tank when switching to another tank you also have to spawn its guns, with its ammo, and etc...
How can i do that?
ty
play the game and see what's printed
i got this error
You are referencing streamed actor, w/e that is. Don't use level blueprint btw, just make a blueprint with the trigger
for some reason when I click the button with this code its not cycling through my game modes it stops and I have to click back to bring the options
I want it to keep cycling
The only c++ approach I could think of would be reinventing prefabricator tbh.
It's really long overdue just being a core engine feature. I don't get why it's so impossible for them π
You may run into issues down the line. As Adriel said, they're a whole, buggy can of worms. I would honestly look into the prefabricator plugin
define cycling
If I have 3 game modes and I click 1 button it goes to 3 and then stops I need to hit the other button to make it go back
I wanted it to keep on going 1-2-3-1-2-3 if I press the button
Sure, so all you have to do is just implement the behavior
instead of clamp, you want to check. If game Mode ID is > last index, set it to 0
and if Game mode ID is < than 0 set it to Last index
ok cool thanks will try
is there a way to access a target points location that is in my scene?
Wouldn't just fixing child actor components do the trick?
I don't know exactly what's broken about them but even having the extra scene component won't work for my project so I dont bother with them
Well, CAC's are suuuper broke from what I know, and would need an engine fork, whereas a more bare bones remake of prefabricator is way more manageable
Though I'd still just use prefabricator
Not worth the effort to reinvent it imo
ok will keep it in mind
Iβm using the βfind actors in selection rectangleβ node and since I have a big collision sphere on it the selection size is really big
In the case of an inventory system, does it make sense to create a pool of widgets (slots)?
that I use a specific number of these widgets all the time, instead of creating them again, when opening e.g. chests, etc.
Probably not, but I suppose it depends on how many widgets you need and how frequently you're having to create them.
I would imagine you would need to adjust the components bounds. On any primitive component, there is a variable called βbounds scaleβ. If you click on the collision component you should find it in the details. This bounds scale however, is also the same mechanism in which the renderer uses to decide which objects count as being on screen and should be rendered. Be wary if your changing the bounds scale of a static mesh componet or something visual. Donβt make it too small or you will experience flickering.
@meager ingot
Hey I'm getting this error with my audio capture. It seems like it's writing to some sort of buffer and making me run out of memory: LogAudioCaptureCore: Warning: Attempt to write past end of buffer in OpenDefaultStream [5226496]
Any ideas?
Try #audio maybe
hey guys im trying to attach an actor at a notify of an Anim Montage of my player character.
Is it possible ? where do i get the notify ?
where do i tell when to attach ?
Hey i have a simple question but it drives me crazy. Can someone explain to me why i can't use the BP_ThirdPersonBP as the Reference OBJECT when casting to it when it inherits from a Character and Pawn? Get Character works, Get Pawn works, but Get BP_Thirdperson does not work. Whats the class im looking for?
Get Player Character and Get Player Pawn are static functions provided by the engine that return a reference to the Pawn that the player controller is currently possessing. You can use these gets and then cast to BP_ThirdPersonBP. If you already have a reference that is BP_ThirdPersonBP there wouldn't be a need to cast at all.
ACharacter* UGameplayStatics::GetPlayerCharacter(const UObject* WorldContextObject, int32 PlayerIndex)
{
APlayerController* PC = GetPlayerController(WorldContextObject, PlayerIndex);
return PC ? Cast<ACharacter>(PC->GetPawn()) : nullptr;
}
APawn* UGameplayStatics::GetPlayerPawn(const UObject* WorldContextObject, int32 PlayerIndex)
{
APlayerController* PC = GetPlayerController(WorldContextObject, PlayerIndex);
return PC ? PC->GetPawnOrSpectator() : nullptr;
}
Fair enough, but as i understand the ThirdPersonCharacter is a more advanced Character right? So why do i need to use its parent class as a reference and can't use it itself?
I'm not sure I follow. These are functions that provide a reference as a Character or Pawn reference.
If you wanted a static function called "Get Third Person Character" you'd have to create that static function in C++ and do similar code as above in the GetPlayerCharacter function and cast instead to your own custom character class.
So in short its not implemented that a new Class created by the user can be called directly so we have to use the parent classes because they are hardcoded call functions?
Or to say different, i want to change the FOV in the FirstPersonCamera Component inside FirstPersonCharacter. That FirstPersonCamera Component is i guess ONLY inside of that FPC blueprint and not in the parent classes. So how am i pulling out the variables out of a parent class that does not even have have those variables?
Because in my mind they are only in the Latest Child version, and im like "It works, but its weird that it works because when i think logically i would need to target the last child which even has that component and variables to be able to change them"
There is no automatic "get x" functions created when you create a class. The "gets" that exist are there as convenience to access the common classes one needs.
You could make your own static function in a blueprint function library as well...
Can you show some code as to how you're doing this?
I mean it works, its just hard to understand for me how.
What i don't understand is how he pulls variables out of parent classes that don't have those variables in first places but only the child classes
It wouldn't. I can guarantee you that if you go to your BP_FirstPersonCharacter blueprint it'll have either a variable or a component on it that is named that.
If it's not within BP_FirstPersonCharacter, it'd be in a parent class.
Probably should read about inheritance and polymorphism
Is there a way i can see the insides of a parent class?
I came here because i did not understand the concept of inheritance, thats why i ask. Its where im at currently
Top right of blueprints gives you a link to the parent class.
God thank you ... i was missing this, thats why i struggled so hard to find out the parent class
hi, making a shapeship and using a pawn, i am using movement input as the moving system and using "FloatingPawnMovement". When i touch the ground I don't stop and just keep flying through ground
any help, my root is my ship
collision is default :)
The ground is not dynamic for it does not move
I think that's the Pawn
But either way, might be a faulty collision setup overall. The Pawn should probably not be World Dynamic either
It is the pawn, but his collision is set to BlockAllDynamic not BlockAll
Landscape is world static iirc
That too
thank you
that works
i dont use collisions much :D thank you for your help
Collision is a tricky bish π
mhm ya, you guys are legends
i made a new pawn with different logic now but i know for next time π«‘
Guys i have question in this image , first why we connect " Get player controller" node to "player controller pin" in Enable input node, but second in "Disable input node"why below we connect" Get Player Controller" node to Target pin " we can also connect it to again "player controller pin" in " Disable input node" . Please explain someone what is this "Target pin" i am confuse in it ...π
See #rules on cross-posting
how to get actual speed of character movement component? there is getvelocity node but acceleration it shows doesnt react to obstacles
it doesnt change whether i walk into wall or not
Might be that the Velocity is just the one it wants to apply
If in doubt, you could save the last location, subtract it from the current location and divide it by delta time
Ah, alright
The target pin is the BP you want to receive input from the player controller you connect. This means the input events will fire in the BP when input is enabled.
im using spring arm as pawn control for mouse view (camera is attached to it), im trying to clamp its pitch but cant figure out how, there is a getSocketRotation node that shows exact rotation i need but no setter so i cant clamp it how i usually do it. clamping camera's angle makes weird result. how can i clamp spring arm's rotation?
or maybe i can clamp pawn control rotation itself? i cant seem to find corresponding nodes
btw camera is attached to a slring arm
ok
Hi!
I'm making a turn based combat, and I do store all actors in an array.
Thing is that when I destroy an actor, I have no clue how to check that array index's actor has been destroyed, I'm trying with "Is Valid?" but seems to ignore it.
Is there any way to check if an array has a destroyed actor?
Thank you!
there is a node to set control rotation
no way
If you r destroying the ref it will be a null ptr. At this point before you even destroy the actor. Remove the to be destroyed actor from the array
U need to feed a player controller to disable the input of the pc. It's not doing anything atm
Hello! I am trying to make a simple inventory system. However, I am experiencing a problem when my characters idle animation does not always change dependent on the item. Does anyone know what the problem might be? Thanks in advance
This is in my character bp
this is in my anim bp
your do once never reset's when the cast fails
idk, eventually that wasn't problem because the switch on the class name would catch that already
was just the first thing i noticed
why is there even a do once node?
no, didnt work
So that the player does not spam the pick up button and get many items, I want to make the player do a picking up animathio later
does the idle anim only not update when they switch the item?
as you never update the held item in the animBP when the player swaps the item?! (at least none of the posted screenshots indicates that)
Also when they pick it up
I am calling the "On item change" event when the player switches the item too
ok, that wasn't part of the screenshots. but then idk
its a good practice if im adding tons of new animations on same skeletal mesh to use multiple animation blueprints and animation layers and also thread safe?
Also, why is the cast failing?
Cast failing when the cast is failed. The player character is not bp player character
You also don't want to get class like this for anim instance. There is no reason to
Simply get the owner of the anim instance and cast it to w.e the owner is
It is bp player character, since othe blueprints casting the same way do not fail
Computer don't lie
And anyway my advice still stand
Don't use get like that. No reason and bad practice
Get the owner pawn instead and cast to w.e it is
Same result
You will also get cast failed on simulate because the player wouldn't exist at the time
this is at runtime
Print string the pawn owner
You will find out why it failed
The owner of the anim instance is not the type you are casting (bp player character)
As cold has said, the reason its failed is simple. The owner that's running the animBP isn't of the type your trying to cast too. Other than input being null, there's no other reason it will fail.
Chances are, you are assuming it's of the type you're trying to cast to be in reality it's not.
Thanks, will try
Now this is seriously weird
Not really
It seems there are multiple instance in the world that uses the anim instance
And a couple of them are null (not a pawn or derived from pawn )
You mean several of them use this anim bp?
Yup
but would it not also print the names of the actors that use them in this case?
instead of only printing bp player character?
Nope because u r trying to get pawn
If it doesn't derived from pawn it will return null
So in this case , try to use get owning actor
And print it
There should be a preview instance too when u play in the anim bp to check what uses it
it still prints BP_player_character on owning actor
mystery
and now the anims started working properly again
I am confused
Bugs that fix themselves, you hate em and you love em
and it broke again
splendid
try placing just bp player character in empty map
see what happend
and what u mean by run time is play in editor?
you should be able to see the number of instances the abp is using in the abp during Play in editor
Where exactly can I see that? Im a bit lost
in your abp. Play in editor first then go there
if i have 10 instances using it, i will see 10 in there
Idk if this is in ue4 or not
the answers is
the debug target
needs to be set to the world spawned actor
not preview actor
π
thanks, done that now
however I dont see the number of usages? perhaps I am just blind
make sure u are Playing in editor
and make sure there are instances of the abp in the world
Yeah, I am
Anyway I doubt that can be the problem
this is a test world and it consicts of the player and a few cubes
simulate is cursed you shouldnt even be getting Animation eidtor preview actor
that is certainly sound like the problem
just never play as simulate,
I am not doing simulate though
Im playing in selected viewport
It just annoys me that half the time it works and half the time it doesnt seemingly randomly
Like I would have given anything for an error at this point
No clue, hard to find out w/o actually having the project
i would suggest doing it on empty map
see if you can reproduce the error
start a new level, drop your bp first person char there
If that works fine, drop another one
I'm looking at positioning an AI controller in between the character and the player controller where the PC tells the AI controller what they want to happen and the AI handles it. Does anyone have any ideas on how best to achieve this?
Yo hello guys, i recently made a control rig and want to create animations for my sword character, simple question, i just wanna know how i attatch weapons or anything like i do it in the actor viewport
Hey, I'm trying to create a pause menu that opens other UIs aswell (in this example they options for keyboard setting etc.) - I'm facing an issue, that I can open the pause menu via esc and close it via esc aswell. But when I open the options once, close them via esc key and then try to close the pause menu with that key aswell it just stops working. Even when I'm closing that menu with its buttons I can reopen it but it will never close again when using the ESC key.
I'm opening the pause menu from c++:
DisableInput(GetWorld()->GetFirstPlayerController());
GetWorld()->GetFirstPlayerController()->bShowMouseCursor = true;
PauseMenu->SetIsEnabled(true);
PauseMenu->SetKeyboardFocus();
PauseMenu->SetUserFocus(GetWorld()->GetFirstPlayerController());```
The menus itself are blueprints.
The ones with all the blueprints in commands is my pause menu, the other one is my options menu.
i have them both here but how do i attatch it to that skeleton?
Do ReplNotify variables send their current state to a client when they connect? i.e. after the default value has changed on the server, does it notify new clients when they connect of the new state? Trying to troubleshoot a repnotify variable.
i.e. I have a door that has an 'is open' variable on it that is set to repnotify. When a player interacts with it the server sends a repnotify to set it to 'true' to open the door and 'close' to close the door. For some reason when clients are already connected and the door is opened, it works, but if a client connects after it's open it shows up as closed for the new client.
trying to create an event, but when i drag it and under the list of options it doesnt have 'event' just unbind, bind call and another
is there any ways to "set" a variable of type widget animation from the variable panel ?
i have a array of a UDS, inside there is widget animation vars, but nothing appears when you try to set default value
for now i am doing it in the construct event, but its not very "visually simple" to understand what to do to set the widget animation vars using the widget animation created by UE
hello there i want to ask something i have a level in which i have to place coins the level is huge it is taking time for placing coin one by one i have many levels is there any way in which i can place or spawn the coins like using spline or something else which can save time
Are the coins supposed to be randomly spawned or do you have fixed locations?
Are you trying to call or create a custom event?
Why can I not create a blueprint class that inherits from AVolume?
Is LevelName + ObjectName the best way of uniquely identifying actors for save games?
For example, if I had 30 collectable "Blue Coins" and couldn't trust myself to manually assign them all a unique ID
I've seen some people use direct actor references, but I'm not sure how reliable it is, if you plan on adding more saveable actors later
Actors have a unique GUID assigned to them automatically when spawned / placed. You can use Get Actor GUID to get it.
excellent, thank you!
i want to spawn in a line it is type a maze in which there are corners and straight corridors
Then a spline could be what you need.
but i dont know how to implement it do you know any tutorial which can help me
Iβm not familiar with it too so canβt help you much there. Try searching on YouTube?
okay by the way thanks
It's the same concept as this:
https://www.youtube.com/watch?v=dsr0XGfHV8M
If your coins are actors, you can add a Child Actor Component instead of the Static Mesh Component used in this video
Here I demonstrate how to use spline components to place meshes procedurally.
how do you get input in an actor that's not being possessed? I've hit every checkbox I can find, unconsumed the input, etc. seems like a waste of the concept of "input stack" if this doesn't work.
EnableInput on BeginPlay
might be a stupid question, but why does my inputaxis for an IA_event not return to 0 after releasing the button?
I tried modifiers for the input. but I still keep the same issue
couldn't find anything on google about it
Next time use #enhanced-input-system but what trigger are you using
Sorry. didn't see that channel, my bad
Np
i basically have an axis 1d float
that i use for the code.
i am trying to check with a branch if it's 0 to do something else, but it wont go back to 0
here are my settings
I've done that...
class is set to receive input from player 0 by default as well
is there any built in support in BPs if i want to block a function from running for x amount of time?
Triggering on completion might help
I donβt think you can get that value the way youβre doing it
When it goes back to 0, the completed pin should have fired anyways, so better to use that instead
And just on a side note Triggered pin has its own tick, so you can use that while the input is actuated
Use a bool with a branch and set a timer that changes the bool.
Look at the FPS template, they have an IA for the weapon in that separate bp
Should shed some light on what youβre missing
cheers
Mind you theyβre attaching that actor so idk if thatβs your use case
Hi! I am making some vehicle combat game inspired by Death Rally and I've got some weapon types ready ( 5 ) stored as integer in "weapon type array"
I want to toggle between them using Z ( left ) and X ( right )
so I can assign everything with integer value
the easiest / fastest way to do it ?
I mean the script
I've began writing something
but it's not working properly π¦
I'd think it'd be better to simplify this by keeping track of the index of the selected weapon instead of relying on looking up a value in the array to determine the index.
Hey all, I think this is the right spot for this, but I am working on my first Blueprint Utility, and it largely works as intended but I can't seem to get the editor to run it at start up.
I've followed this documentation, and poured over it multiple times and don't understand what I'm missing:
DefaultEditorPerProjectUserSettings.ini is setup correctly, far as I understand.
The only error I get in the log is
LogEditorUtilityBlueprint: Warning: Could not load:
With nothing else to give me context on why it couldn't load.
I'm on 5.2.1, Epic Launcher version.
You might have better luck in #editor-scripting
Ugh, thank you. Apparently my onboarding chose not to add that thread to my navigation bar.
Hey folks
How to I round/format bigger numbers.
So above a thousand go to 1,0k and above a million go to 1,0M for example?
here you go
Top half rounds the In Float to the closest Step
If In it 12345 and Step is 1000, it should return 12,000
and the Text should return 12k , i think
My man, digesting it
Looking through it I pretty much need to copy all of it right? Not just piece of it.
if you dont need the Text half you can omit it , but you need the Float math part for the Answer
Appreciate it π
Hello my dear friends, I have a simple question: I want that when I attack with the sword, so to speak, a specific enemy blueprint that it is destroyed. There are units that should only be defeatable with this melle attack, so it shouldn't apply to all enemy blueprints or Actors only destroy the units that I want to be destroyed as soon as the hit of my weapon touches them
And of course each unit should die with a different effect and sound
i mean can i always use cast to the blueprints and after it destroy actor?
You can use the "Apply Damage" interface which then calls "Any Damage" in the actor that you're applying damage to.
You can create "Damage Classes" and make it so "Any Damage" will only do anything if a certain type of damage class is applied.
ok thanks i go for it!
Sorry, I don't actually understand what "Step" is. Maybe it's my English. Not my first language.
its what you want to round to the closest X
i notice in ue5 character blueprints, making custom collision is very.... limiting. you're stuck with only the default capsulecollision which doesn't allow for really cleaning character collision "outlines" and when you to get to more complex things with your character (crouching, proning, etc) you're limited to changing its half height and radius which is also very limiting. is there a better way of doing this for more advanced collision? I've seen things such as creating a character via the actor or pawn blueprints but those have their own sets of issues (mainly you don't get acces to the character movement component is the biggest thing ive found). is there like a good middle ground/better way of doing this?
couldnt think of a better word for it π
No worries. I'll manage to figure it out with some testing. Thank you π
I am changing my character mesh via blueprint
How do I replicate the new mesh after change
replicate as in multiplayer?
if you are talking about Multiplayer, just repnotify the Mesh component.
From client side you will need to tell the server to change the mesh (Server RPC). That;s about it, you can change the mesh in repnotify function for the clients
hi all, quite new here. I'm working with a lidar point cloud and I'm trying to highlight (and later show information for) the point that is closest to the player's camera center/crosshair. I followed this tutorial (https://www.youtube.com/watch?v=R7oLZL97XYo) that showed how to highlight other actors by using LineTraceForObjects. I have found a similar function called LineTraceForLidarPointCloud, but I don't see how I can make it trigger with the same timer event like in that video
The Character Movement Component is heavily tied to the Capsule Component of the character.
You only have a few options...
Dive into C++ and change how the CMC works - this could theoretically be done by subclassing it and then modifying the required functions (I don't know which)
Create your own Movement Component and set it up how you need it to work.
Use a third party plugin that provides additional/different movement components, such as the "General Movement Component" plugin which provides some alternate collisions.
Where to do that ? I havent done it anytime
this is the beginning of the logic to highlight the object in view. and at the bottom is the LineTraceForLidarPointCloud (LineTraceForObject is above it)
If you are not fammiliar with RPC and Replication I would suggest reading the compedium in #multiplayer
Did you find a good solution for this? I have the same problem currently
The one in pinned messages, right ?
are the widget animation var type read only and cannot be created from user ?
CMC is made to work with capsule component. It's designed for a competetive multiplayer shooter.
If you need a movement component with custom collision ( Not strickly capsule component )
You have 2 choices,
- Create your own Custom movement component
- Buy or Pay someone to do it
There is one in market place called General Movement Component. It cost $300 USD or more I think but it does provide custom collision and many other stuff like replication in blueprint
I'm currently on mobile and can't access what you're responding to (getting teleported to some random convo place, heh) so could you summarise what the problem is? I was probably able to solve it π oh and ping me when answering or I'll miss it
im trying to change one post process setting , but when i do my other settings like bloom look like they get reset to default
how do i keep all other settings?
ah thats it thanks
Attaching the Player to your Train Platform for a smoother ride even if it goes fast
I just did it for my project (spaceship landing on planet) it is creating a bit of a janky movement and for some reason attaching the player to the ship made it so the door no longer opens from a button
I was able to solve it. You have to attach player to moving actor and also create custom character movement component for your player, where you override one function. Right now I cannot tell you anymore without Access to pc (don't remember what the function was) but if you hit me up tomorrow i could tell you or share my train project. Or maybe better, send me a friend invite and I'll send you the info when I get to my pc
Hello,how can i link the arrows my character has in inventory with the widget?
display (update), add and remove the arrow dynamically
widget will have functions to read how many arrow the player currently has
when you add just add an arrow widget to the Horizontal Box as child. When you remove, just take out one from the child
you should let the widget subscribe to the player when it used an arrow. When the event is triggered take out an arrow from the horizontal box
the arrows are not in the player they are in inventory
player just shoots infinite arrow right now
Well where ever the inventory is
although the inventory shouuld be a component to the player or somewhere
Afterall the inventory should be tied to a specific player
yeah player has inventory component
k then pass the inventory component to the widget
widget just read the current number of arrow
a lot of functions ,dont know where to start from)
Start from displaying the arrowhead
no need to update when it's being spent or not
That can come after
Are you maybe triggering the play repeatedly somewhere, like on tick or in a timer?
You want to get the inventory of the player and get the arrow
just try to print string the number of arrow first
very weird and i didnt expect it to work but i somehow did it
this is not the way
you want to have a function in your inventory component to look for the item you passed and get it's index
well it really depend on the design of the game too
looking at your screen you probably want to equip arrows
too hard for me to understand and write this
so when ever u equip arrows, you can then tell your widget to display the current equipped arrow (ammo)
i just want to see the arrows i have in inventory on the screen and when i have arrows i can shoot,when i dont have arrows i cannot shoot
i know only how to break the nodeπ
might help to look at some inventory system out there
i just found out, the construction script of a blueprint doesn't run when it's inside another blueprint / :
can i make it do that?
wdym by when it';s inside another blueprint?
Experiencing a weird bug with a widget, when triggered it causes a smaller window to appear and the screen becomes shakey?
like this
bp_gun_tool doesn't run its construction bp
atleast not when inside the character
if i place that gun blueprint on its own, it does run
Are you running test in multiplayer?
No comment on Child Actor class component, they are broken and buggy. I'm glad I never touched it
i can get around by making my own construction function and calling that from the parent i guess
just feels wrong
No this is single player editor
how would i get around it?
i have a player with a weapon but there might be more than a single weapon
so how else would i have different ones
im still real new so open to ideas!
Inventory system. The item would have an object class that define it's behavior
my role model is system from market place called Dynamic combat system
really depend on how simple you want to take your game
but generally you will want inventory component where you can equip weapon
this way you can just switch weapons
im trying to understand, so the weapon would just be a class?
Each item holds information. They are contained in a struct.
The struct would contain the name of the item, the description, price, etc.
It will also have an object class that define its beahavior
can those have a viewport as well?
@sharp crane Number of player is 1?
i mean like a 3d view where i can place extra stuff
cause i need that for this one weapon for example
Yes it is
yes, it can hold all kinds of information. Including the preview mesh
I see, no idea then. Try #umg . strange indeed
like here, i might try it out later.
i think i get the idea that if you wouldn't place this gun in level on it's own, which i won't it doesn't make sense to be an actor maybe
The object class will have call backs. Example would be on Equipped.
When equipped, you can just add a static mesh component to your actor and just do the rest of the visual logic
so i do all the visual logic on my main player and not the weapon?
No you will do the logic in the object class that reside in the item info
player doesn't need to know about the gun logic
it should just know that it is choosing to equip this item
heya, can you please tell me what is better:
store an object reference an pass it to multiple classes where i'm doing a lot of interaction with it, assuming that i'm calling in one init class and then storing that object in gameinstance anyway or do bps with more complex logic but calling those objects only when logic loop is finished?
hey for some reason the camera on my third person game wont rotate upwards (left/right works)
ive checked and its getting input any ideas?
what class could i make this from?
Afik most of the components you dont have a viewport to place specific objects like skeletal meshes and widgets
which i definetely need if i wanna keep all the gun info seperate from the player
i guess for me maybe a skeletalmeshcomponent?
though, that's all just to get around having an actor, i don't know why they're bad
ill just take your word for it
i guess having too much useless info is not good tho definetely
You can look through history on this discord and type child actor class
don't have to eat my word. I personally never even used it so I don't know what could go wrong
but yea Actor Component or Scene Component can't have widget comps
thats the exact thing i need here lol
how do I reference the players viewport? I want to remove a widget when an object is not selected
i dont think the issue i mentioned in the start is anything to do with child actor classes tho actually. Think it's just how they designed it
still i'd like to use the right classes for the right job! : - )
You can still spawn widget component
and get a ref to it
would be more work for the setup
but i just can't see it when i do
that's what I would do
You get a reference to the widget instead and remove as needed
i think in this case actor is the best choice because of the visuals. and having many different objects together with specific positions rotations and animations n so on. Might be wrong.
But for stuff where it's exclusively collections of functions and code i shouldn't do actor classes is what im getting
I tried this but I get an error as shown
is it in fact not a gameview subsystem?
if you have one of those get a reference to it
When you create a widget, cache it (Promote as variable).
Then when you want to remove it, get the variable and remove from widget
ah, nevermind! I see my issue
That will remove every single widget of that class in existance
you better off knowing how to cache and get the ref when needed.
Imagine you have buttons for every single item, and you just want to remove one button.
Get all widget of class will remove all the button from the widget
yeah I see the issue with the get all and then loop
just trying to get the variable to work properly
I set the info box to a variable here, but when I call and reference it to remove it, it doesn't disappear
this is where it should remove it
It should, unless you are adding another one and set the variable to the last one, in which the first one going to be unreachable
oh there we go - I got it working. I have another area where I deselect the actor
I suggest doing a print string to check
makes me think I should have it as part of the DeselectMyActor function
You might want to create the widget at the start if there is only one selected info box. No need to display it
When you Select an actor -> Add selected Info box to viewport
When you deselect an actor -> Remove from parent
This way you don't keep creating new widget everytime you click on an actor
is it possible in a Animation Notify with play sound from an Array varaible ?
Don't see why not, what are you trying to do? Play a random sound?
yeah
hm i could use on anim notify and play the sound instead of adding it this way...
or no, its not a montage
so i need to add it in here somehow
You can make your own custom anim notify that have a select of sounds to play
or simpler approach would be just to play a sound with random node
You are doing multiplayer tho... each machine will roll their own dice
this one aint MP
so they don't necessarily gonna hear the same sound
its is a SP
oh right
yy
forgot u could edit thje sound
lel
sweet ty,
taking a breake from my MP, switcing to sp to play around abit
everything is so much faster & easier holy sh<#null>
Having an issue with repnotify variables. Are they supposed to send current values to newly connecting clients? Mine doesn't seem to trigger when new clients connect.
They should but remember replication happed from Server to client only
so the repnotify will be called when the value isn't the same with the server
I have a door that when interacted with sends a repnotify to all clients to open the door. The door is closed when you first load the map. When new clients log in and the door has been opened, the variable should be different between server and client but the door stays closed and it becomes out of sync with the other clients.
The repnotify function opens the door, but if I print inside the repnotify the new clients never receive the print on connect and don't open the door.
you should just a bool that decide if the door is opened or close
that's how I would do it but ask in #multiplayer there are experienced ppl there
I am. The repnotify is a bool
And if it's true, it opens the door client side. If it's false it closes the door client side.
and you are setting the bool in the server?
Yes using set with repnotify
With server RPC if client interact with it?
It works for all currently connected clients. It doesn't work for clients connected after the door has opened.
Works for me tho, not sure how it is setup on your end. Try #multiplayer
Yes, client sends a server rpc to request opening the door. Server sends repnotify to open the door.
Sends repnotify?
Client just do a server RPC where the server RPC set the boolean to true
the open/close logic can be placed in the repnotify
When a client connects even in the future, it should sync
It sets the variable, which is a repnotify. By send I mean it does whatever it does behind the scenes to notify clients of the updated value.
Moved discussion over to #multiplayer
I created an interface to let me highlight selected actors, and it works for a test sphere that I have made. how can I modify the points within a lidar point cloud to also implement it? I'm using the lidar plugin
this is an short example video
Anyone able to help my vehicle wheels seem to not be following the vehicle ?
instead they kind of so their own thing. Any ideas what could cause that ?
Data driven is so much better than Inheritance.
Im creating different guns for my spaceship. And before i was doing like, new blueprint child of the MainGun, for each different gun.
Now i just have one data table that has all the info including the static mesh reference and done
what does "data driven" mean?
just changing all the variables via a table instead of hardcoding it?
I'm trying to add a specific object type to this array but I'm not quite sure how to do that. I want to add LidarPointCloudPoint to it but I can't figure out how
i guess. but im no expert. its like when you have your game generating stuff by data using less blueprints. For example use one blueprint of a Ship, then change it with variables from a data table to become boat, Cruiser, submarine, battleship
a
my event graph is a mess. now im trying to find where else i have the F key event. Instead of showing references it shows every "f" character
Try searching for "Pressed"
You can make multiple eventgraphs for a blueprint if that helps with organizing; i have one for inputs and another for other events
yeah thats a great feature. too often i dont use it
that worked. finds all the keys
and there i had another event for the F key doing something else
thanks
In 5.1, I am using "Add radial force" with a negative strength of -20000 with accel change. In PIE, it works fine. In a packaged build it barely even moves... any ideas?
im no expert so just leaving this one here: i had an issue with add impulse so i used set physics linear velocity node, and works
maybe you could try this one
though that one node of radial should work so maybe someone more knowledgeable may answer
I will try, that seems odd. What was your force scale? 10k? 100k?
Hey guys I need help on how to make a system that does a trace in world space from a widget. Basically Iβm making a card game and when I click and hold the card I want to make an aiming Arrow to where that cards a ability will hit in world space.
Something like this
Predict Projectile Path
Is that a function in widgets?