#blueprint
402296 messages ยท Page 847 of 403
It's easy to criticize :p
Is there a nicer way to do this? UMG and Level blueprint
Time machine
Dont have multiple event dispatchers that basically do the same thing. Using only 1 would suffice in this particular situation.
Button Click > Call Single Event Dispatcher with the desired color sent through it.
On Begin Play > Bind to the one Event Dispatcher, setting the color to the color passed through.
So I do this in the UMG bp
Yep, that's a bit cleaner, no?
Yeah, and I was going to ask how to do this, but the event magically seems to have to color returning
That's as clean as it can get?
https://i.gyazo.com/32d601aebab0299086627c1e777e0302.mp4
Anyone have any methods of aiming your gun barrel at the crosshair without event tick?
I'm sure someone may disagree, but I think that's plenty clean.
I think it's pretty clean too, nice for only 2 weeks I think! I'm coming from unity's C# and C++ is too hard for me, so I'm sticking to BPs "choose your poison" ๐
Surely something as important as animation aiming deserve to be updated on tick
Right, was just wondering if there was a cheaper way out there but that makes sense
Native tick , sure
Can you elaborate?
I don't mess with c++ so I'm not aware
Its fine if you don't. Then you're best option is to keep it as is, or sacrifice quality
But id suggest keeping it as is
Right, appreciate the help
I've got a tedious bug in UE4 BP.
Basically I have a base class that has an enumeration value that is instance editable with 3 possible values.
When a function is called, it returns the value of this enumeration.
When I instance a child derrived type, it returns the default value of the parent class, not the instance's value nor the child's default value. Both of these non-parent values are not equal to the parent value.
I saw some bug report about enumerations being reset, but not outright ignored.
NVM never called the code.
ISSUE WAS:
Branch that requrired a true statement.
True was never being passed in.
Devils in the details :p
how do you pick up a skeletal mesh with a physics handle?
have you asked in #legacy-physics ?
hi guys. i have this bp wich : when i click static mesh i can change its material and i want same thing with the character but i can't find the class anyone know how to solve this?
let me make it simple : i did this class but when i match it with the class it came with an error like this
idk why i can't make a (promote to variable) to change it to the character but i can't
I don't understand what you're trying to do
What are you trying to promote to a variable?
same static mesh if i made it to variable it is error
i want it variable to choose the character because it is not in here
That class is a Component Class. Character is not a component
is there a way to change the class or add the character? what i want is click the character to change the material
I think your'e confused at what you're doing here and I certainly am
Which class are you working out of
*?
Is this a Paper project?
paper2d yes but i've tried in 3d also
I need to see more to answer your question. You're giving me little bits of what's going on and I don't understand what you're trying to do
So on your blueprint, you're using "Get Owner" from a graph (I don't know which because yo uhaven't shown me) and then asking if you can convert that to a character
the bp up there is a bp for changing static mesh material and it is working very well. i don't know what to change to make it the class character not the static mesh
Back up, you're telling me what you want to do and not where you're stuck. I'm trying to figure out what kind of car we're working on here and you just keeping telling me it wont' start
This graph is located where? Inside your character?
no
ok, where is this graph?
it is an actor component wich i can add it to any class in game
i'm trying to make a simple click mouse when i click something it is chaning the material
I have some categories and sub categories - I'm trying to think about how to display them - I thought a map would work but it's not filling out the structure like I thought it would -
So if I had category - Fruit - that contained "apple, pear, banana" (an enum)
another category - meat - 'steak, pork chop, hot dog' -
How would I store that in one structure
and up there i tried static mesh it is good but i don't know how to change it to click at the character to change its material
Well, I'm not familiar with paper2d projects but when you get the owner, you'll have to then figure out how to get what you want. So when youg et the owner, you then have to get the mesh component but you said you don't want that
So on that class dropdown, if you select mesh does that do what you need?
Unfortunately maps aren't great for blueprints yet since you can't modify them at runtime. But it sounds like a structure would give you what you want. Or a blueprint library that returns what you need? What have you tried aside from map?
Should have just set up a data table, all the stuff is set before runtime anyway
data tables are nice
As long as you have it all setup beforehand, I haven't tried modifying a data table during runtime but I would think it is possible
why wouldn't a third person char object ref won't pin into a third person char object ref
This is in a widget
just remove the node and add it again
If the class was remade or things were moved, sometimes it can cause it to think it's referencing something different
I'd just delete the node and try again, pulling from your Player Ref var
No, I still can't get them to pin up
I want to take a structure that holds one base layer that is a enum, and then each element in that enum is mapped to another separate enum -
I have been getting these errors recently any help would be appreciated
I am using an asset from the market place I have to use their get but I am not sure how because they dont explain
How to do a validated get?
Hi! i'm trying to record some points in the map to get the spawn points of my creeps, is there any way to record positions with just a click?
Like a raycast but while on the editor
same error
Are you sure player building component has been defined?
can you explain please I am pretty sure though
I have used that before but I am at very basics
You can do this the editor utility tool... Pick the actor class
You can get selected actors in editor
Create a function and call it when right clicking the object
If that's everything in the blueprint then it has not been set as something
that would be pretty much the same as doing manually
i had to change back to regularly get because it broke
i was thinking on something to pick the spawn points and just record the x,y,z
you prolly dont need it
was just making sure that wasn't the problem
Im not sure what the problem is
Maybe wait until someone who knows more than me can help
I asked the people who created the asset but they haven't helped
Assets can be hit or miss
Sometimes new unreal versions break them, or they're just incomplete
hey does anybody know how I can set an angle, like 60 degrees for example, and have a projectile spawn within it? like a cone
do i do this
Hey... I made a pawn with floating pawn movement but the clients can't move :o What do I do now?
I'm having an issue where none of my child blueprints are inheriting variables from the parent class. This is affecting all my character and game modes. This screenshot is just an example. The same exact function, when run on begin play, prints the array as expected. If I use the key press version, nothing. I've never had this issue until suddenly I did. I'm at a loss for how the variable seems to be both inherited and not. :/ UE 4.27.2
Using a validated get, you need to attach the execution pins so that it works correctly. When you see a node that has the triangular [> input that means it is expecting an execution path input, otherwise it will not function.
The issue you are having is that the reference "player building component" is not defined. Looking at your screenshots, this is likely because you haven't added it as an actual component, you just made a variable of that type with that name as it is not appearing in your component list (see second screenshot), or you just have not set it to the reference to the component you're trying to use (like the component could exist on a different actor, or you added it at runtime and just haven't set the reference to the created component)
I have messaged them and they have said that is because I haven't added the playerbuildingcomponent to my controller however it is added and I tried added the component to that blueprint and it still does not work. Do you think if i added individual eventactions to each input that It would work or is it the component itself
I can't figure out how to access this setting in my Landscape Material Instance from my level blueprint, could someone give me an example of how this call would work? I'm trying to toggle rain drops when it rains.
This takes an input vector and selects a random output vector within the cone of the defined radius of the input vector
So, yes, so long as you feed it an input vector, you'll get a random vector in the cone out.
Get forward vector of the muzzle of the gun.
Or the camera, whichever you prefer ๐
it has me stump. I can call the playerRef and get what I need for other widgets. don't under stand why is doesn't work on this 1 widget. UI_Inventory widget
Just adding it into the controller won't make it work - you appear to be trying to use it within your FGCharacter which is a separate blueprint from your controller.
You need a reference to the specific component you're trying to do stuff on.
So if it's on your player controller, you need a reference to the player controller's component in order to use it in your character.
thank you everyone for the help I actually just fixed it there was a problem with my gamemode I readded the component to the gamemode and it worked
that's why, using wrong char
Use a blueprint library to do that
Can I clamp an angle
Im trying
this
Im getting the cone to spawn but it keeps spawning either up or down, I want it to go forward
out of order sorry
Can you apply scale to a mesh in UE4 similar to Blender? I have 4 skeletal meshes but they aren't all 1,1,1. I want to set them to be able to use them in my enemy spawn manager more fluidly
you mean like in here?
Yeah
I want to be able to set them all back to 1,1,1 without it changing the size
Kind of like the apply scale in Blender
Without changing size is throwing me for a loop
I don't know how you'd do that, Prescott. I'd ask somewhere in content creation and see if someone has experience with that
I don't know if it is possible. The meshes were imported at the wrong size, so I resized them to fit but now it is biting me
probably have to do it in blender and re import it
one time i had a model that wouldn't rotate correctly until i fixed the axes in blender
use this, multiply by a small amount (say 10.0), add to location and that will be your spawn direction for projectile
oh location and not rotation?
gotcha
No.
I'm creating a coin collecting mini game and when all the coins have been collected I want the game to finish and have a level complete widget appear but I'm not sure how. I've already created the widget I'm just trying to figure out how to have it pop up.
Each level has a different amount of coins as well so I think it will have to be done in the game mode blueprint
anyone got an idea why spawn actor causes the pivot point of the spawned actor to be set to where it spawned, and not the actors pivot point?
Yes, have either the game mode or level blueprint handle that logic. As for showing the level completed blueprint, you can have your controller spawn the widget and show it onscreen
Anyone know how i can tilt the camera to the movement of the player
something like this
If I over ride a function in a child class, does that change the signal flow of the original parent or does the parent still use its blueprint, say the funtion is connected to other functions and stuff in the parent do I need to copy everything over or will a simple over ride work in the child?
It should override just fine - you can do things like use BeginPlay on the child and then execute stuff BEFORE the BeginPlay fires for the original functions
Hi everybody! i did some changes to one class and the project is not opening anymore, i'm trying removing that class, but it still crashes.
what was the 2 folders that one needs to delete in this cases?
Derived and saved? saved and intermediate?
if you are certain of the file, you can check the autosave folder, which should be saved folder - you can find a nonbroken version and copy it over and replace the one in your content browser, then restart editor
@runic parrot I hope it wasnt cpp parent, unreal still has some weird bug if you reparent a c++ character it starts to lose functions, I lost my movement function, I couldnt see it in the blueprint so I made a child of the broken one and it worked
it was saved already, it's not on the auto save : (
also, i have a back project and i tried replacing the file, but it's still crashing
Im trying to clean it all up now before release because it worries me
but i'm sure it's because of that file
restart pc might be a memory issue
it was Enum replacement.
I had a Enum with some actors class references as strings and i created a new enum with like 600+empty rows so i can just change the name later
when i did the replace for the other one, it crashed hard
already done : (
This is the time to get perforce setup, pain though it is
dont you have a backup folder?
prob some reference is still saved somewhere, i can't remember if intermediate and saved were the trash folders
hope backup is not the one way out, i can backup the enum, but not a lot of changes i did this days : (
what do you mean?
you should back up alot, Im buying some DVDs and burning my work to disk just in case the russians hit america with a EMP, I think my DVD will be saved
South america here, hehehe.
but I mostly back up to SDD I got a 500 GB for like $50 its cheap now
one of the only moments where there's some advantage to being on a really poor south country
Oh boy, okay Perforce is a type of version control that integrates well with Unreal - you can literally compare versions of the same file and see the differences on the blueprint (or the text differences if its code)
You can install it in windows on a machine, although you really aren't supposed to because if the machine does, you lose everything, but if you are just getting started with it, do that
hi guys. this is working with the cube it is chaning but with the third person character it's not chaning and not working (even that i tried print string still get nothing)
work fine
not working
find the sulotion : enable visibility to block
Bruh at that point it's Fallout 3 and video game development (and most other computer work) is probably like ....well yeah. Collect your bottle caps.
Is it possible to match with Parents when using Switch on Gameplay Tag?
It seems Switch uses an exact match
Youd probably need to filter it yourself
Ok guys, so I have a weird one because i'm sure my code is terrible. I'll try to phrase this well. I have a print statement to show when player controllers come into my game (right after "OnPostLogin" in gamemode. Could anyone explain why when set on ListenServer and 1 player selected I get TWO player controllers logged in? Does the server get a playercontroller besides the one that actually functions as a player or is my game just haunted?
Your game is haunted. I only get 1.
It's probably your dead great great grandfather joining in just to fuck with you.
Or maybe your terrible code.
full disclosure, the code is a complete mess, but I have a "GetNumPlayers" that leads into a branch and only continues when getnumplayers == 2
is it possible for that to happen unless two people are logged in lol
May be a silly question, but have you tried restarting the editor?
Dang
yhea thats definitely not normal. i get 1 print with a single listen server
idk if anyone is brave enough to take a look at my code lmk i'll dm it to you though, don't wanna post it on here
None brave enough for that ๐ We've seen all sort of stuff being posted on here, so not willing to that sets of a few red flags ๐
i'm just pretty embarrassed. you wanna see it?
its weirdly enough working perfectly for what i want if i play as client
Wouldnt it make sense to try and fix it tho?
okay
if its that bad
At least you're not like "Guys! Please help! I'm trying to open a door using tick and it's not working! Here's my BP!:"
lol
Thats what i saw in my head
haha its not that much of a mess but probably using some really bad ideas to do what i want
turning the world on tick with getallactors of class because the door didnt move
lol
That's how we're going to make warp drives one day. It's too bloody hard to make something move faster than the speed of light. Let's just move the universe instead.
lol is that from futurama
Yes. Yes it is.
if you guys have a better way of assigning player indexes I'd like to hear them
my current way is putting them in an array and using the array index
indices
**
i was copying someones stuff to do this but it just didn't work for me at all but this seems to, at least for dedicated server
how is this possible that there are two player controllers
check the world outliner perhaps?
it only shows one
but heres my issue that started this whole thing. When I play as listen server with 2 players that "fake" one is getting used instead of client1 to set variables
so i'm trying to set client1's variables and it instead does it to this one i guess, i'm not sure
i'm pretty lost
should also be noted about that screenshot that index 5 is the default player controller "player index"
are you printing them at the same time?
player index shouldn't change but they reliable give the same results that they always do
when run at various times
can you try printing one after another and see if you get the same result?
Is there anything you're doing in the parent class? Like why is that call there? Also not usually good to leave the pin disconnected as then it doesn't know the controller that joined.
^ good catch
i copied it from somebody else but had the same results with it connected
no clue what it even does
calls the parent event
so if the parent also added to this array
it would be added twice
despite having no input, since you're not validating the input
you're adding whatever regardless
I am currently trying to start both of these functions with event beginplay because they are both needed but I cannot. How can I?
got no clue why we're on #multiplayer here tho ๐
my bad
but i did try it without that parent called and it still did the same thing
just hook them up? what's the problem?
Connect them in series
right well but you see there's an output pin as well that you can use?
or use a sequence node if you really want to
can you explain?
but you don't need to
Begin Play > Parent Begin Play > Spawn Weapon > Change Camera
ohhhhhhhhhhhhhhhhhhhh
i'm still kind of lost on what the parent function does
Calls the parent function
sorry if dumb question I just didnt want to break anything
don't worry blueprints are already irrevocably broken
so what are you accomplishing by calling the parent function?
Executing the parenting funciton,
Your game mode you made is a child class of Game Mode. Game Mode itself contains that OnPostLogin function. By calling to the parent you're asking the parent's copy of the function to fire, whatever it may contain.
extending its functionality
and how does the parents function differ or how can it be utilized in this scenario
We dont know what it does for you,
you must inspect the parent class if so
if its not yours, then you probably dont need to call it in the first place ( thats why you're overriding it I assume)
Always consider why you're doing what you're doing
Some one help me how do i stop get Player character after player got destroyed
otherwise you're in for one hell of a ride
Ask yourself what are we trying to accomplish here
What does that node do ๐
Spawn a new one
It does stuff.
is that a only solution, is there a way to check for NULL
Though I'm not sure if OnPostLogin is actually this function.
Isnt OnPostLogin Virtual ?
NumTravellingPlayer++
and mostly there for bp catch?
Thats what I'm thinking
ok... so i'm just printing my Players array and it says only one in there, but somehow GetNumPlayers is returning 2?
i got rid of the parent function fyi
Oh interesting
And yeah, that was a screenshot from github.... I'm not on there very often but just turned on dark mode ๐
aight i'm done bothering you guys for tonight
its passing that branch in my last screenshot though before the second controller connects
which it shouldn't
aight, with that i'm done
i'm gonna start drinking
later guys lol
Hello everyone! Got a little a problem here with my Camera Headbobbing
I wanted to make a simple up/down headbob which I managed to create with matinee camera shake, however it doesnt work perfectly
First of all, when I move the headbobbing starts and looks completely fine, but when I stop it sort of snaps the camera back in a weird way.
Second thing is that I dont want to play the shake when jumping, any tips?
Here are my values
here's my bp
Alright, I'll try it out
where should I put isFalling?
well, now the camera shakes even when idle, however I tried this and it sort of fixed it
I tried so however the camera was shaking when being idle
also how can I do it on a tick?
Sorry for sounding like a complete dummy
I just wanted to finally start working with BPs, I'm following a tutorial series however I also wanted to add something myself to the project
Can i make a variable which is a map of maps?
or array of arrays?
i think it's called 2 dimensional maps
You can create structures that contain an array or a map, and then use that as the value in a map key/value pair. Then you just need some code to manage it.
Amazing answer, thanks!
not sure what went wrong either
the above I tried to explain myself that it works like this
Check whether velocity is 0, if true > do nothing, if false > check whether is falling, if true > do nothing, if false > shake the camera
also, should I notice a difference after plugging it in event tick?
or is it just better for the code itself
I changed the boolean to OR and it seems to work
and should I notice a difference in the effect?
alright, so the jumping works again, its on one tick event as it should be
now I just need to figure out the values for the shake so that it feels more seamless
what it sort of does now is that when I move, it starts shaking up and down which looks alright, but when I stop it snaps back to its original position but in a not so seamless way
the values are a bit tricky because when I seem to get close to my desired look, it does look more seamless however the shake is almost gone
blend in time seems to do almost nothing
blend out is doing something but its hard to find the right balance with the duration
Any idea how to prevent that
Some one help i made a simple InterpToMovement script to make my enemy go front and back but how do i make him to rotate to the moving direction
How to auto-reset editor view back where it was before i press Play button in editor?
on the character movement component theres an option called "Orient Rotation To Movement". That should be what your looking for. If your not using a character then you can get the direction of your AI's velocity and rotate the AI to face its velocity every frame.
i did that oritent Rotation to movement in char comp but it did't work
Get velocity -> safe normal -> RotationXVector -> set actor rotation ?
Along those lines
second option it is. just force them to rotate to their movement direction. since the first option didnt work for you im assuming your manually setting your AI's location? If this is the case then you probably cant use velocity (its still worth a try since that would make this much easier). Without velocity, you would have to get a rotation from your current position to your target position, then rotate your AI to this rotation. The vector math is a bit rough so lemme know if you need help with that.
but hopefully Squize's solution works. It would be a lot easier ^
If its by using set location, one would need to make the delta (velocity) manually
Which would be this frames location - lastframes location
still not rotating
i think i have to do this
Ooh, that's gonna do some weird stuff
Theres a finished pin for when it completes the timeline..
I can't usually tell for sure when looping back in on itself will crash, so just use timers for this kind of stuff.
Or tick
Now it goes to the location and just keep on turning front and back not moving after that
Use tick here indeed
This is not what a timeline is designed for ๐
Use VInterpTo or VInterpToConst
On tick
okok
Hey, does anyone know how to make ai to do something like in job simulator, like ai going by path from spawn location to destination by path?
Like regular pathfinding?
I need my enemy to move form 1 point to another point and turn back and move to previous point back and forth like that what should i needed to do HELP
Divide it into several tasks. Walk to job is one task
Do job is another
nah, like ai in job simulator
Not sure what that means then
not "do job" just go from spawn location to a queue and if i will done his "shopping" then he will leave
VInterpTo only moves form current pos to target pos and that's it and then how do i reverse that
Sounds like a regular moveto by my accords
Reverse it ?
Ok, i just need to do something like cars ai, just go from a location to b location, then wait, then go from b location to a location
this is what i needed @gentle urchin
and even this doesn't work
Requires navmesh iirc
So some patrol then.
Have loc a and loc b as vectors
Ya but not using ai move to
Flip flop between them in the target loc based on last visited
No, using VInterp
I get that
Because my enemy is bee he needs to fly
Sure
Please help me understand why Im getting this error, I mad a MAP variable that I want to output the correct ammo type enum for the weapon, But everytime I try to add a actor to the map I get this error
Them keys must be unique
So.. you must save the default type to last
In this case you must update your nullptr before adsing a new nullptr ๐
Not easy to do in defaults ;)
sorry I dont quite understand, I thought I could just click + to add all the gun actors I wanted and set to enum to output the correct ammo type
not sure what this key thing is
You're using a reference, so untill updated you cant add more
And you cant update a reference from default values
I have a question, why some basic blueprints such as "for each" is a macro rather than a c++ written function?
Is that a future milestone? Or because it would be bit difficult to make it all using c++
Afaik not going to be updated
If you want it fast you need to go c++ anyways
Iterations are slow no matter which stone you flip in bp
So i cannot just make a c++ script to loop stuff faster ? instead of using this macro node
Nope, marginally if any, faster
And im not sure you can get those wildcard inputs?
Morning community! (or evening depends on your location)
i have an issue with blueprint..
i have 2 blueprints. and i'm trying blueprint A to edit a variable of blueprint B at runtime.
but it does not seem to work at all.. i can print the variable and see it has change; but the blueprint B did not get updated..
any idea?
I mean i really enjoy using blueprint, would have been cool to enjoy the advantages of both worlds
You can do a specialized loop doing a specific task in c++ tho. That would be way faster.
You can, but not for a generic looping function ๐
I do tons of loops in cpp,
And call them from bp
Some copy overhead and whatnot but flexible and still so fast
Maybe with custom k2nodes it would be possible
When im done iterating I move the entire function to c++
Im not saying its impossible,
But the gains would be marginal
I guess i still need to learn what goes better with c++
So if i make lets say a function library in c++ to do some loops it would be worth it at heavy stuff?
Yepp, for sure
Cool
But the loops would most likely be specialized
And not as simple as foreachloop
More like.... "adjust vectors according to this math"
Or.. "find nearest X from this TArray"
Thank you for the information!
Not very scientific and probably full of holes, but yw ๐
I think it's the best explanation to my current level of understanding
I just figured out i can collapse nodes, so useful
any idea?
Are you sure its bp b you are referencing there?
yeah.. the main one is userWidget BP, driving an actorBP
actually i'm lying, it is defintly working, i can see the variable being update when i check the blueprint.. the thing is the blueprint does not seems to update inside.. ?
You need to call the event for it to update
oh! how do you do that?
From the reference of the blueprint, you can call its public methods (functions)
If this is beginplay, you must replace it by a custom event
Wh8ch you can then call from elsewhere (and on beginplay)
Now reverse them
First you must update the integer
Then you can update the pod
I would also suggest doing a step extra here
For future you troubleshooting where the thing got set etc
awesome! trying
(and thank you btw for your help)
WORKING!! thanks you so much @gentle urchin !!
Hold your horses !
I would humbly suggest the following:
Create a new function in the bp B. "SetPodType"
It has an integer input.
Connect it to the newvar.
Then after setting its new value, call the UpdatePod function inside the SetPodType function
Now in the widget you can directly call SetPodType and feed it its new id, and the rest will handle itself :)
In the leftside menu, there should be a add function option
go it
Alternatively you can select the node(s) you want in the function , right click , and collapse to function
Hey! Any idea how to stop an actor from interacting or moving without un-possessing? My basic idea is that the player pressed 'E' on an object, the camera view changes and the character actor becoming invisible (as if he hid inside that object and the view became a top-down). My issue right now is that the character is able to move while hidden because it's not un-possesed
Block the input, or disable movement if you use cmc
There's a function for it, if so
Perfect
Another thing which may be good , or not
Is to check if the new set value is within the scope of the variable !
So before setting it, you may want a branch
Which checks that the new param != Podswitch
And that the new param is within acceptable range (numbers used in the update pod switch)
ok doing that
0-4 if you havnt updated the switch :)
so which node to "Which checks that the new param != Podswitch"
Branch
ok! trying
yea now you are stuck here until release
Atleast i got first seat to early access
he still gonna make you pay for it ๐
also john, post a screenshot when you are done
like this?
because that sounds like it could go wrong
Not bad at all
yea that looks good so far
Well, if I block input how is it gonna take input so when pressed again it will stop hiding

Try the disable movement first :)
now add the other check, and combine both with an AND node
and use the result of the AND on the branch
This is great. The second check may not be necessary in this case, but generally you only wanna react to changes, not things set to their existing value. Thats why we wanna in addition the check if its in range, check that its not equal to the current value :)
Another tip is to give yourself a rope and toss print on things that could go wrong. The Switch is one of these things. Imagine you figure out you wanna add a new pod type to it, and you increase the range inside the function but forget to update the switch in the UpdatePod function. Then it would exec the default pin (which mean no other pin fit the critera). Having a simple print string there will tell you if this happened, without having to look all over to find out why it doesnt update :)
also that's why enumerators are nice for things like types
True, but the mistake would be even less apparent in such case wouldnt it ?
If i recall correctly theres no default pin on switch on enums
great! trying
So in a switch case an int would be ... less prone to errors id say^^
it is
if you use the enum through all "instances" e.g. actor bp, function call, etc.
You could always return to byte on the actual switch
And still get the default out
Which would be great, i'd say
Does anyone have insight on adding a double click function to an already working drag and drop system
Hey I have a pawn why can't the client move it? The server works just fine but clients can't move
Guys.. when i was using Unity Bolt (Unity visual scripting addon)
it was SO EASY to create ANY reference to anything and call it where you need just with 2 nodes!
Why its so HARD and confusing to do the same stuff in Unreal?
I dont whant to use casts, interface or dispatcher for a SIMPLE task
Why i cant do the same suff in unreal like create ObjectVarible with reference to varible i need
Why dont you want to Cast, interface, or dispatch?
Why not use the tools avaliable?
cus its confusing and reqires alot of different nodes and understaning of class hierarchy
Things you should know, and learn, to make scalable , performant solutions..?
its a BASIC task, it should be very easy to do
Casting is basic
Easy :)
If you wanna just tie it all together in some chaos oriented method, feel free to do it all in the level bp
You can tie anything together in any sequence you like
No need for casting
Hard refs are the way to go
is there a way to create global object varible of some gamobject to call it anywere ??
eh
There are a bunch of statics avaliable
Which you can add stuff to
But will require either:
- Source editing (not adviced)
- Casting
- Interface
It IS easy to do
It's just different from the way Unity does it
It'll take some time to get used to it
Feel free to toss one of these very easy cases, and surely we'll find a solution for it, rather easily
Hey guys
I am working on a mobile game
So there is this button which brings up the weapon wheel
and when I select a weapon it closes
but for some reason when it closes I have to tap the weapon wheel button twice to open it
Is there a way to prevent that?
at this point i'm just wondering if it's valid to use references of other events, like you use that widget reference
Can somebody explain what the problem is here? I don't get it..
Binding: Property ' /Script/UMG.Image:BrushDelegate ' on Widget ' Image_263 ': Member:F_SetCharImage Has the wrong number of arguments, it needs to return 1 value and take no parameters.
Same
Apparently, some nodes hold references to objects they create just like a variable. Once the node is executed, the reference will be there until you run the node again (then there will be a new ref)
'Construct Object from Class' is similar in this regard
Char Image is a parameter.
Has the wrong number of arguments, it needs to return 1 value and take no parameters.
Char Image is a texture2d, I want to convert it to a slate brush. Isn't this possible?
You're talking about two separate issues.
Yes that is possible. No you cannot make a function like this that takes that image in and then bind it in a widget using UMG bindings.
The UMG binding doesn't pass parameters when it calls that function to update. So it doesn't allow parameters.
Ah ok, so I have to do it in a seperate function and not with a binding?
Try printing the 'Wheel Enabled' variable on Pressing the button? See what its value is?
Also. Pretty much all UMG bindings are crap sans the Tooltip Widget one. Whatever you're doing is probably better done on Tick with SetBrushFromTexture
Thanks ๐
UMG bindings are basically ticked functions. So having them just incurs another function call overhead versus just using tick to begin with. And also if any of your code sets their properties anywhere else besides that binding, the binding is entirely broken and will never run again until the widget is re-added to screen. So for constantly updated stuff, best just to go with the widget's tick. It doesn't run when the widget is collapsed or removed from parent, so it's not a huge performance issue when the widget isn't on screen.
Thanks, will try that
Guys, I have a question. I have an item that is lying on the PickUp Item map, inside it I have a Uobject variable (with all the data about the item). So, when selecting, I create this Uobject, pass it to the Uobject variable and then transfer it to the inventory. But when I throw it out, I will spawn the object and pass the Uobject to it. The fact is that the necessary data is already there, and when I re-select it, I will no longer need to create a Uobject again and transfer data to it. Is there a way to create a Uobject only once for the entire map? If I register the creation of a Uobject on the Event Begin Play, it will be constantly being created, and I don't need it. I need it to be created exactly once.
Hi guys,
Got an interesting questions.
This is the scenario:
Let's say in multiplayer, people have a widget component attached to their character that is on 'Screen' space (lets call it a chat bubble). When they chat, it appears above their head. A repnotify fires to make it visible, and the chat text appears in the chat bubble. After a certain amount of x time it becomes invisible again.
Now what I want to realize is that only people within a certain distance of this 'chatting player' will get to see the bubble appear above his/her head.
How would I approach that.
So basically, how can I control chat bubbles visibilities of other players based on my location in relation to theirs?
lmk if anyone has pointers
You would need some kind of system to keep track of what's been spawned. For example in game state or something keep a list of them, and before spawning you need to look it up to see if it exists in the list yet
I'm not fully understanding your usecase though so there may be better options, such as using a data asset if the uobject describes the properties of the object or something
Getdistance to, if its smaller than the range, you can show it
GetDistanceTo is a node
Hell all so Im at a point in my game where multible types of things will end up doing damage to the AI,
this is kinda what I have now
I defiantly need a more modular system for this
also is casting to an item like a sword or a fire ball the best way to get damage form it or is that creating an unneeded cast
- Also for the sword I have a reset hit thing so the sword does not hit 2 or 3 times a swing
Im gonna need a way to dynaicall get the animation / reset time of the weapon I hit with
instead of a value like .85
maybe I should put the core of this in a function but I feel like Might be a faster way of reworking
(Fast like compute not time)
Hey there I'm setting a Pawn reference OnPossess but once I try accessing it it's not been set... how can this be?
Can you not use the existing apply damage system
you see I didnt know that existed untill last last night
Rip
lol
May be worth giving it a rework
Damage just uses apply damage and receive damage, and you can specify a damage type and a damage causer
Not sure I would be using RepNotifies for Chat. Chat is usually just an RPC thing.
So you could make a damage type of say like fire, then if i have somethinf weak to fire, i cpuld multiply the incoming damage if it is fire damage
Since it's the rep notify making it visible I would just check:
Is Target Location Distance > SomeDistance
@thin panther any resources about the built in damage system
or maybe a node or 2 I should know about
Apply damage and event on damage
Thats all you need
You can go further with instigators and damage types
would I put apply damage in lets say the sword/fireball or in the AI
seems like once I figure it out
should stream line things
Damage support is a feature of the base Actor class, making it widely available. The system provides easy access to common functionality for quick results, while also being extensible to allow you to customize your damage model when needed. Weโve also made an effort to avoid making assumptions about how to respond to damage, meaning you wonโt fi...
So apply damage goes in whatever causes the damage
So you shoot a gun, the bullet will damage tje thing. You stab someone, and the knife deals tje damage
I did everything the hard way ๐
then in the AI I can use the event like taking damage or something
get that value and pass it into the damage number above my ais head
cool
What is the Class: Damage Type in Unreal Engine 4
Source Files: https://github.com/MWadstein/wtf-hdi-files
This may also be useful
But yes
Everything you want to take damage has a receive damage event, everything that deals damage has an pply damage
Don't you wanna replicate health? ^-^
Sure
well this makes my life easier
why did the tutorials I watched when I was getting started with this Not do it this way
that is the question
Tutorials usually are old
And generally made by people who are still also learning
is it possible to turn blueprints into code?
no i mean is it possible to view the code
You can open the source code and look at it
Hi, I have this pickup blueprint in my VR folder that I want to use in a new blueprint but I do not remember how to do this so I get the Event Pickup with the pickupActor interface attached to it... Hope you can help
using an object. how come event construct or event begin player don't exist in a object
sorry don't understand ...
I'm trying to cast to a third person in my inventory object. When I try and use Event Construct or event begin player. Those nodes don't exist. and I was wondering is this is true or is something wrong
They do not exist
Begin Play is a characteristic event in Actors
Construct is a characteristic of Widgets
Objects do not have any event
any idea how to set a cast in a object
Cast should be working normally afaik
What's the problem?
Can you post a pic
It's too early in the morning for me. never mind. I didn't need the cast because I was getting info from the third person when the info I needed was all ready in the object. How dumb can I get. Just getting too old I guess.
any idea for my problem ?
sorry, I don't even under stand what your saying at all @hybrid hare
I just want to attach the pick user interface from my VR folder to an Event in my object bluprint
ok, so your trying to attach a pick to a player using an interface.
Just like on this capture. I did so 2 years ago following a tutorial but I just do not remember how to do this... so frustrating
Just do not have clue on how to do this. My rotating doors bluprint works fine. I am quite the beginner in blueprinting so my knowledge is more than basic
You need to implement the interface in your blueprint where you want to receive it
and what your trying to do is to put a axe or pick in the players hand. Righr
I guess you're talking about addding the interface event to your BP?
That's what I was thinking too
Then you can call the interface event via every other blueprint
that's why I asked. I don't think he's calling it right
no I tigger an open event when I am in the delimited zone (box trigger) by pressing my controller buttons (or a mapped key. Mapped keyboard key is fine though)
Go to 'Class Settings' in the toolbar
Under Implemented Interfaces, you can see an 'Add' button which can be used to add the interface
How do i tell if pawn is no longer being seen on pawn sensing?
If you are testing Maybe you can print a string for every sec it's sensing and when it stops you'll know it's not sensing
@sharp rapids Thanx, I have added the class to my BP. Could you tell me how to attach this interface to my event ?
You should be able to see the event name under 'Interfaces' in the left panel, Just under Functions
Right click on the name and click 'Implement Event'
I just bought this and got errors???
ok !
Swap the wire from the faulted one to the one above
Thank a lot @sharp rapids
like this?
Thanks, wonder why that was a problem???
renamed the pin at some point
I built up a radar which is cool but not really quite right.. everything is gathered by tag into an array, they are culled by distance and drawn and rotated, but it's drawing based on actor world location, so everything remains centered around WP 0,0,0 effectively
I've tried adding the vec3 for actor location with my player location, or subtracting the vectors, either on first, or scaling them before doing the vector math.. help
the desired behavior would then scroll the radar display around like a proper radar and not like a map just rotating around
Hi! does anyone know what is the max value possible for one Enum?
Pretty sure it's 256
Basically an ENUM is a byte, or 8 bits, which can store between 0-255.
Did someone ask about GameplayTags?
Okey, my setup is not going to scale with enums, i need to find a better way to store "classes" references
quick question. does this blueprint not fire twice?
or does the parent not fire begin play unless you include Parent Begin Play
in the child
It fires once for the server side and one for the client side if you are on Mp.
The child is going to play the parent method first and then what is next
Beginplay is an override. So normally parent beginplay won't run unless you call the parent version. If you've used C++ it's the same as calling Super
got it. thank you!
๐ฆ
I was thinking it might overflow back to 0
Ah
But then it would violate data access, no?
Unless uint8 had some manual overflow ofc
Regular byte might have
Guess it'd be different for an enum vs byte in that regard
just #define a bunch of ints
yeah
GameplayTag ftw
i'm doing a enum with the name of my classes and than having a map for get the class for each enum, so i can use it later and only store the classes as strings.
Can anyone think of a better and more scalable way to do this?
you're trying to do reflection in BP?
Not sure what you mean by reflection
case example:
My items are one ST, when you want to use them, you read the property "Class" spawn one actor of that class and pass the ST into the actor
for some reason i discarded datatables before, but it sounds perfect.
going to check on those, ty
GameplayTags also !
They are way superior to regular tags, strings, names etc ๐
They're like v2.
from what i'm seeing gameplay tags looks more efficient, i'm going to check that one first
They are hierical names separated by .
Very convenient , easy to use, and impossible(?) to do wrong with typos
i think the only problem with Tags would be that i also need to make a map of tag -> Class Reference.
With DT i can just struct the DT as RowName - ClassRef and store just a rowname
i can skip one step to grab the class ref, but it's pretty much the same
Tag == rowname
Class references should probably also be soft refs.
I gotta get into soft refs at some point
Me too, i'm not quite sure how they work. If that may be usefull in this case i think i'm gonna get into it now
A soft reference is just a weak pointer and a disk path name. Weak pointer points to loaded assets but doesn't stop them from getting collected to release memory. Path allows you to load the asset from disk into memory.
Dont you rely on a cast after load soft ref ?
Hi, anyone know a fix so that my for loops dont freeze the editor? I go about iterating 20 million times and yes I changed the iteration number in project setting.
Even if you don't use Async, and use LoadSyncronous, you'll end up with a lot better data structures storing stuff as soft refs in a lot of cases when it comes to static data.
You don't cast to the class you're loading though. Take my HUD loading main widgets. It stores them as UUserWidget types. It loads them via soft class type, casts to UUserWidget to create them and then adds them to screen. HUD has no memory connection or requirement to load those widgets before it's CDO is loaded by doing that.
Right so you get around it that way. I see
You can do the same thing with a massive spawner. Spawner doesn't need to care about their meshes and materials and anything else. you can spawn 500,000 different classes from a spawner by just casting them to actor.
Yepp they will all be actor childs anyways
True that
If you were to cast to your class tho, that would break the entire point of soft refs, right ?
Pretty much. You avoid that by putting any initialization functions you need in a baser class with no reference to materials/meshes/textures/etc and cast to that base class.
You get around that with implementations like AActor's ApplyDamage system too.
But wouldn't that give troubles if i want to spawn actors of Class type = Spawner.Something?
i would be spawning spawner and casting when in need of data, but the actor itself woudl be Spawner
base class
Basically your visual classes that have actual meshes and materials are treated as assets and not as actual gameplay code classes except for code that specifically only ever relates to that character on itself. Everything else goes in a baser class.
Not sure what you mean by this?
it's on reference to this
what i understand from this is to have a Base Class Spawner and build childs on top of that, so later you only use spawner and cast when needed. is that an accurate interpretation?
No, you need one spawner class.
I think the* idea would be to have all the functions/events/implementation youd need to trigger in the base class
And avoid any refernces to any assets that makes the class more than it needs to be
Then the child classes would have custom logic if necessary, but more or less mostly work as a datacontainer that can be accessed through the base class
But how would you get the Class needed when trying to spawn the actor in order to use it?
Let me throw together a quick demonstration, you'll understand it a little easier.
For example:
Spawning actor Item.Consumable.PotionHP -> how am i getting the actual implementation of PotionHP if i'm spawning actor of class "Item"
You would spawn the Item.Consumable.PotionHP, but you would never need to cast to it.
Item would have Use() overridable function which would call the appropriate implementation of Use() in the hieriarchy of the Items
that makes sense, but i still need to save the reference to Item.Consumable.PotionHP at some point
No you dont ^^
Lets say you need 3 things to display a Item widget
Name
Description and icon
In the Item baseclass you could provide overridable functions for returning these values
The base class dont need the actual implementation (debug strings here are great) nor actual references to this, just the definition of retrieving this data in a child class
But i still need the Child class reference in order to spawn the original actor, if not i would be spawning actors of class Base and the implementation would be that of Base, or am i missing something? ๐ง
dummy question but is analog movement from a gamepad not working for me? it comes out as either stanting still or going full speed, it doesnt seem to use analog stick values
Direction should be normalized
The datatable would have the path for the child class(soft ref). The loadasset would load the child class. But you dont need to tie the spawner to the actual child class if the base class (light) has all the definitions (functions) you need access to
oh i get it now
so it's just a matter of better performance and not just practical store
what do you mean by that? Im making it top down with a fixed camera, dont know if that plays into that
The size of the vector should be 1
So... 1.0 in either X or Y
Axis values is a range and increases, you should multiply the value of the Movement Vector By Axis Value
Let's say that you want to move 90 Units to the right when the Axis Value is 1 (Max).
You would do Axis Value * 90 = Your X vector Value
Thats not quite how the cmc works
The cmc uses acceleration and max walk speed to determine how fast the player can move
oh my bad, you are right
You're probably thinking about SetActorLocation()
@runic parrot Okay. So I have some minor setup here. A few main things and then a folder of 20 children of the EnemyBaseClass. In a Datatable, I've made 20 rows. Each row has a softclass pointer to these enemy classes.
With the upper display. I have a datatable of 20 softclasses and 6 get loaded into memory and used. If I used normal purple hard class pointers, all 20 would be loaded into memory the moment I use that datatable anywhere.
Oh i see, thanks. The value wasnt normalised and immediatley maxing out the top player speed in the cmc, making it look like it wasnt analog. Thanks @gentle urchin @runic parrot
Struct used in the table, for reference.
Let's say i change EnemyType here to hard reference to a base Class of "EnemyBase" and my DT is Row - Hard Reference.
That is different to your method in what sense?
hi again,
i think yours is more efficient in terms of performance
also, thanks for the explanation, it's quite usefull
I can now open my drawer but the reverse action is not working . When I press my VR controller button, the drawer should come back to it's position (LERP)
@runic parrot Look at this difference in memory. What this screen means is how many things have to be loaded into memory whenever this spawner is used somewhere. This screen here is with SoftClass
If I do nothing but switch that to hard refs and check the same class. I see this. And those are empty enemy classes.
Lets go add a static mesh to them.
holy ._.
Would be interesting to see with my function setup in a light baseclass
i didn't knew that the Class Hard reference on the DT would also take extra space depending on the class it's referencing.
from what i can see, i tought that hard reference was actually soft reference
I added a couple of very simple static meshes to five of the enemies.
So if i understand correctly now, Soft Ref is a pointer to the class, but hard ref is almost a loaded version of the class?
Consider character level textures and skeletal meshes. Animations, Particles, materials that go in particles and on meshes, etc. All of that would need to be loaded JUST to drop that spawner into a level somewhere and do absolutely nothing.
When you use softrefs, you only load the ones you're actually using.
I get your point now, the difference is quite significant
This is even more important when you consider dungeon runners. You usually use majorly differeny enemies in like levels 1-5, another set in 6-10, etc. 50 levels later and you have a decent amount of enemies. There's not point in having 80% of them loaded when playing level 1-5, but you'll have them loaded if you don't use softrefs in the datatable.
yeah, i'm going to play around with it to understand it fully and change my setup, it makes way more sense this way
Thanks a lot again for the explanations
Is it possible to create a level sequence and move/spawn it at different locations? Specifically, if I create a lev sequence of an AI picking something up, I'd like to reuse that lev sequence in different locations - so it is possible?
Not sure. I know there are also Actor Sequences too. Might work to put it there. Haven't done a lot of cinematic stuff though.
Ha! I just found the answer. Here it is if anyone needs it too: https://docs.unrealengine.com/4.27/en-US/AnimatingObjects/Sequencer/HowTo/DynamicTransforms/
Hi guys,
I Have persistent level(room) and 2 streaming sub level(actor& light moved)
I want to know how travel/teleport/transition between Sub levels and persistent level.
I tried direct jump on sub level 1 using open level by name it showed actor of sub level not actor & floor persistent.
something like Load Level Async?
Correct.
A fantastic engine level example for this is probably UImage. It has a great showcase of how soft pointers are intended to be used well. Quite honestly it's shocking that default SkeletalMesh and StaticMesh don't have SetBySoftRef functions.
^Above requires C++ reading though
hi, my reverse action is not working. Anyone could help ?
How would i go about making a character fall in the direction of input? I guess i need to apply rotation to the velocity vector
Because you've never told it to play forward.
just manage the air control on the CMC?
unless I'm not understanding what you're saying?
that kinda works but i guess i need something more complex
Id want it to be more like gliding
@maiden wadi and how do I tell it to move forward ???
well "more complex" isn't an actionable statement
you can adjust air control to be more or less depending on your situation
You don't need to. I think you're looking for Reverse From End. You can't reverse it unless it's been played forward. ReverseFromEnd starts it from the end.
i think air control wont quite work, ill try to figure out something with adding to the vector
maybe clarify what you are looking for exactly?
@maiden wadi So i should branch it to reverse from end ?
I mean false to reverse from end ?
Probably.
Ok, let's give this a try
air control basically lets you stop in the X and Y axes so you fall straight down vertically. Id want it to be more like gliding, so i think i need to have it so you can only control the X axis of the vector and not the Y
im assuming y is the forward axis im not sure
@maiden wadi nope it's not working either
Have you checked that the false part of the branch is running?
its X nvm
@maiden wadi how do I do this ?
Prints, breakpoints, etc.
an easy hack for gliding is to lower gravity and increase air control
@maiden wadi sorry If i sound stupid to you, blueprint noob here
We all start somewhere. I didn't know what an enum was three years ago. ๐คทโโ๏ธ
Thing is I have a pretty similar set up with doors in whick reverse works fine. Just do not understand why it's not with my drawers....
quick question. running into issues of my character falling through the floor. i've tried disabling gravity on everything, but no go. any thoughts on where to start looking?
random question, when did you start? youve been helping me out for like a year now
In your first thing, you have two different timelines. If you want it to act the same, it needs to be set up the same.
At 46, my memory's not the same it was back to my 20's ๐
@maiden wadi yeap about the time line i did realize but well, still not success...
Pre 4.10 era !
problem is it still lets you basically reverse mid air. I need it so it will only turn
is the lerp with the new location the problem ? Could it prevent to find the original position ?
Why not use a flipflop instead of a branch? (not an expert btw)
According to google, about two years and seven months. I never saw 4.22 being released, and I very vaguely remember 4.23's release when I started. I avoided 4.24 for a while. Really started picking everything up in 4.25
if i use flipflop, A is first timeline and B the other one ?
????????? i started almost 4 years ago on 4.19
Did you know anything beforehand when you started, like any other engines, programming, etc? Seems like you learned crazy fast.
Whaaaa. How can i have been on it longer than you
^ exactly little_pappa
kinda off topic for this channel but now i have to know
Spill the beans Authaer
@desert owl @maiden wadi it's working with flip flop ๐
Have never touched another gaming engine. I knew the difference between a whole and decimal number. I vaguely dabbled with Lua out of necessity when I was still playing WoW like a decade ago. Like I said, before UE4 I didn't even know what an enum was. ๐ Didn't actually realize there were different integer sizes besides byte, 32bit and 64bit. Also didn't know they came in unsigned flavors.
........
I read tech blogs a lot. I avoid Youtube. And I just generally mess around with things to see what works. ๐คทโโ๏ธ
So im working with the Unreal damage system now converting everything. I have a problem that when attacking I will do damage like 3-5 times a swing, IF i put a bool is attacking in the sword I can only hit one AI at a time, if a put a bool in the AI then ALL the attacks of any time will be limited to that reset time
You consume knowledge like i consume food. Or beer
mhm now your gonna tell me datura started 2 months ago. . . i feel so behind now ๐คฃ
We're fucked
you should have seen the bone head stuff I was asking like 4 weeks ago
Anyone know if there's a way to essentially line trace the entire screen? or like a field of vision collision cone?
I want to make my interaction system (for like interacting with item, opening doors, ect) work by detecting actors I'm in range of but also looking at, and preference the one that I'm closest to.
In our defence. Alot has happened since way back then !
Screen isn't a cone, it's a frustum, and I believe there's a frustum trace?
axis constraints
wait datura started 2 months ago? I don't believe that
Nah for sure not :p
I only started in UE4 about 2 years ago myself <_<
I quit
I started with 4.12....
I've had a luxury that some people don't have tho - I've not been employed for the past few years so I've had plenty of time to mess around and work on my own project.
Sounds like well spent time if you ask me
Yeah, that kinda helps when you can spend 12+ hours a day reading blogs and messing with things. ๐
Now learn c++ and get a UE job
I started learning while i was a junior in highschool, so half of my time learning i was in school but still. . . 2 years compared to nearly 4.
It does speed it up a notch, gotta admit it
Thanx all for the help by the way.
Funny enough, I got hired right out of this Discord a year ago. ๐
+1
I got hired 4 months ago from this disc ๐
I'd love to go full time, but need stability that game industry dont offer :p
So only sidejob at 20% for soon a year now
Well if it's telling.... I started learning how to program myself back when I was in highschool, mostly Perl & PHP web-based stuff that I learned by ripping apart other's examples. And since then (been over 20 years now) I've always dabbled with programming in a variety of languages, so I had a bit of a headstart in that sense, I just needed to learn some of the syntax and what things do what.
Now that I have this working , i'd like to add doors to the same cupboard, in the same bluprint... I can animate doors but apparentl can only use once the event pickup from the pickup function. and can branch only once from it...
noob question, but if my Character Component has Simulate Physics set to "False", shouldn't it not move at all when spawned?
Sequence will let you run two things one after the other from a single execution line.
also, Gravity to "false".
By Character Component do you mean CharacterMovementComponent?
Sorry, I meant capsule component. the pawn is a child of Character, which comes with a capsule and movement component
Characters don't simulate physics. They're moved via the CharacterMovementComponent.
That setting being false won't stop the CMC from moving your character because it's movement isn't physics based I mean.
right. so in this case all i'm doing is spawning my character and it's falling through the ground even with physics and gravity off. character pawns are effected by gravity, when it comes to jumping and falling
but regardless, my character isn't doing anything with the movement component. it's simply spawning, with gravity and physics off, and falling
and it seems like that shouldn't happen?
@maiden wadi thanks i ll have a look at sequence after my daughter's done testing the level ๐
Characters automatically fall when in air. If their capsule isn't blocked by the ground.
@maiden wadi got it. even with physics and gravity disabled?
Physics doesn't affect the character. Gravity I feel like might be a physics setting. The only thing that will affect default character movement will be inside of the character class's CMC. If you want to stop it from falling, change settings in that.
CMC may have it's own gravity settings and such that differ from Physics stuff.
curious that the movement component would have gravity scale then?
so character movement component has it's own simulated gravity
Yep
All Character movement is done via sweep of it's capsule. Cause as far as gameplay code it's the cheapest, safest way to do it where you can ensure it's network stable.
so i have a second capsule collider on my character, set up the same way as the original, other than being rotated a bit. but for some reason it doesn't collide with walls and stuff, any idea why?
collision settings, most likely
You also cannot make it stop CMC movement. It'll collide with walls, but will not stop rotation if that's what you're after.
CMC by default does not consider any component on the character other than Root which is it's capsule for movement considerations.
but that wouldn't mean the capsule would phase through walls, correct?
Here we go... Evidence that I am still a noob.
Your second one would. Depending on setups, it might actually even fight for it's position by snapping back and forth to where it wants to be and where sweeping allows it to be.
hmmm, well all i need it for is to stop the player from clipping their head into walls while swimming, all the collision settings look identical though, but i'm not sure
You might be able to offset the skeletal mesh from the capsule slightly while swimming. Leave it centered normally. Do some traces, and offset the mesh to not glitch through walls when moving against or away from walls.
We should start a club
@maiden wadi is it a correct use for sequence ?
Finally! I can compile. Man I hate Slate already. Trying to add rightclick to a button. You'd think a few overrides and good to go. Nah. Have to literally copy two classes just to change a tiny little thing.
Looks like it.
What
Just overriding OnMouseDown probably would have done it and added in a hook for your right click behaviour.
what would be the quickest way to add item to inventory.
UButton has no OnMouseDown. It's SButton does everything for it.
@maiden wadi Thanks. i'll check the result tomorrow morning, my VR headset battery is dry...
This is why I prefer working with slate :/
Yeah. ๐ Pure slate would be a walk in the park compared to all of this wrapper stuff. I do admit that UMG has it's perks though.
You'll need to be a bit more specific.
UMG is great for prototyping and using default defined behaviours.
Anyone got a couple of minutes to look at this tutorial and explain how the Material Instance knows about the render texture he has created? -> https://hippowombat.medium.com/tutorial-line-of-sight-visualizer-for-unreal-engine-f32113b1f6f3
He probably set it as a texture parameter?
I've got my RT working the same as his, but my Post Processing ignores it, and I cant see in the tutorial how it connects
Any idea why i cant see the destructible mesh option ? I have already enable the apex plugin .
His MaterialFunction uses a SceneTexture:PostProcessInput, I assume thats how I should get the RenderTexture in....
But I cant see how
@mental trellis what is the differance between using ADD and Set Array Elem
oof pinging people directly
Add will add an extra element, set will change an already existing element
so set array elem is that all it does is change it.
I'd recommend setting up some key press tests and prints to see what your data is doing when you call different things on it. It really helps clarify what those calls do.
There is a reason that programming's most used intro is printing "Hello World". ๐
also breakpoints
although I recognize that is more advanced
I hate blueprint breakpoints. ๐ฆ
I've solved problems using them that I would hve been able to otherwise
If I need to see data. I tend to format it to text and print it. If I need a callstack, I need a C++ breakpoint anyhow.
I tried to add an item into the players inventory. and I use ADD and this is strange. The max players number of slots is 20, when I tried to add an item in. It started adding the item in at index 21. and there is no index 21, I only have 20 slots for the player. anyone have an idea why it's doing that
By adding an item to an array, you're increasing the array size.
So if you've set your array size to 20, and do an ADD, your array size will now be 21.
Ok started the game again and well I fount the results at the bottom of the player inventory
Just the icons are not showing. That that means I need to use set array elem just to update that index
i am new to using unreal engine, but i'm trying to find out how to spawn a character in front of my player, give it ragdoll physics, and be launched directly away from the player
like a gun that shoots ragdolls
Lol. Nice.
the issue i have is, I can't find a way to spawn the character, the spawn actor only seems to work with static meshes
spawn actor will work with any actor class
It specifically won't work with static meshes, but it will with a static mesh actor
I'm assuming you want to change it to a skeletal mesh actor
i'm not exactly sure. the original player has a physics asset and i wanted to spawn specifically the physics asset in front of my player
so far, i can only spawn a floating character with a tpose
Sadly I know nothing about physics assets!
I've got a pretty simple issue. I had to mess with some collision groups and now my character seemingly has no max walk speed even though the max walk speed is set properly. What could be the issue?
You gotta add a physical animation component to the character, set the strength multiplier to 0 to get a ragdoll