#blueprint
402296 messages ยท Page 781 of 403
I admit, the few programming assets I've looked at on the marketplace were very badly done.
Yeah I looked at a few and they were super tightly coupled spaghetti messes so that kind of turned me off of the whole idea. And I would never use one in production, just get it to reverse engineer it and use what you need
Even art ones often end up disappointing me tbh. Then again i have yet to pay for any of it so i guess it serves me right
Organization and extensibility were non existent in them at least, and that's not a good thing.
Art assets are fine, but they have their own set of extra work. I really dislike that a lot of the foliage comes defaulted with textures like you're going to take a photorealistic render of it at 10k resolution. They're not at all optimized for game use in a lot of cases. Too much movie rendering crap.
Kind of like the 8k texture resolutions on a six inch tall flower.. Really?
anyone got a sample or a good idea of how to load soft assets in an array? since the array just keeps firing it doesnt really load everything so im trying to figure out some alternatives
You mean that the array is an array of soft object references?
SoftObject references are just a way to release memory. You only really use them with heavy visual assets like meshes, textures, sounds, particles, etc. To use them, in most cases, you can use them in an Async manner. UMG makes this easy with textures via things like SetBrushFromSoftTexture. For meshes you have to roll this yourself for meshes, or materials, but it's not that hard. It's mostly just making a simple callback for it that resolves the softpointer to a hard one that you use to set the mesh/material with. When you switch to another mesh you do the same thing, which relieves the hard pointer of the old mesh, and garbage collection sweeps it away. On the other hand if you want them loaded up ready to use, you could resolve them into an array of hard pointers.
Problem with that is this is for a school assignement and just having any market place or starter content in the content browser makes me lose points:/
Unfortunately tech professors don't usually care. You're supposed to follow their exact book and their exact guidelines so that you can pass their exact tests so that they get more funding. Your learning experience is secondary. At least in the States.
Well they are trying to teach you to follow specific directions. Most tech companies have a standard set of practices they want you to follow
This is true. But every company has different standards. Even every group in large companies have different standards. Learning how to learn is a lot more important than following strict standards that only 20% use. If you're told that "This is the only way" and you go join a company with that frame of mind, then you're going to be very stuck if you aren't aware of how to reteach yourself to new methods that your employers prefer.
Hello! So I'm a TOTAL noob here and I'm working on an independent project of my own and I have just hit a wall.
I've followed a couple tutorials on YT about programming doors to open after a certain amount of collectibles have been acquired. I am struggling to get it to work right however...
When I start the game the door is at the position it should be AFTER all collectibles have been acquired. I can't seem to get it to start closed and then move to open. I've tweaked the coding a bit to no avail and I'm just lost on what I'm doing wrong. Any help would be appreciated! Screen shots coming...
Door blueprint
Collectible blueprint
Door starts here...
But should start here...
Wouldnt it be easier to do a timeline with relative location/rotation?
Also the door
Should be triggered from something else than beginplay
Alongnwith total colectibles being 0, i guess it would instantly move
Your gameinstance could for exMple have a delegate each time collectibles change
Which every intetested actor would bind to
Every door or area or whatever that is going to react to it at some point
@gentle urchin I believe I tried using "target collectibles left" and that didn't work either...I could certainly try it again.
Thought about changing the trigger to something else as well just not sure what if not beginplay
I could program it to open upon collision but I was hoping to just have that door drop once all collectibles are picked up
I have a vector origin from my character and I'd like to use that save vector as a point to define a local rotation for another component. What's the "get rotator from vector" approach?
I bet you have plenty of doors reacting to collectibles, and if so, a delegate could make sense :)
happy friday.. how do you represent a uobject in bp. to clarify i have a uobject as a struct representative in cpp that i need to expose to my bp
Find look at rotation
More of a c++ question really. Uproperty, with bpreadwrite, doesnt that get you there?
Not solid in c++ yet sadly
it can't be because the vector origin is the same and normalized
I have another door reacting to a lever pull but this is the only door attached to a collectible. Not sure what a delegate is...I can google it though ๐
Also, you mentioned timline with relative location/rotation, I understand the relative location/rotation part, but not sure what you mean by timeline? If there are any other tutorials or documents on this action out there that you know of that might help this situation that would be awesome!
From another component you said
If another component has the same transform as your origin, your rotation is everywhere/nowhere
hm lemme draw it
Maybe i misunderstood you,
But it seems your question is not in line with your setup ๐
If you use sphere components location and origin location (not normalized?), youd grt the proper rotation
Otherwise you can make rotation from xvector, but didnt sound like what you wanted initially
red and green are forward and right
orange is my velocity vector
I have a component aligned with the forward in pink
i need it rotated to what the orange is
I tried to make a rotator from X but that failed
If its only one door thats gonna react to it then delegate dont make so much sense :p
Rot from xy?
How? I have only 1 vector
Let me boot my pc.. tossing ideas here ๐
I gotcha. Appreciate your feedback. What would you suggest changing the trigger to other than beginplay? That would be the next thing I would try.
You need some event to trigger the door to open when the amount of collectibles required has been picked up
nope, won't work
here's a setup
Get a character, add a sphere component and add an arrow component to the sphere
rotate the sphere according to the velocity of the character
and the arrow should follow
i'm missing something
guess its hard to see the actual velocity in this case, but it is correct according to my input
k
Makerotfromx doesnt like normalized vector i think
Is anyone in the mood to assist me in a longer thing? I just can't figure it out, and it's too complicated to try and explain here, it's a skill behaving weird (but it's based on a fairly convoluted/generalized skills system) - so I would probably have to stream/explain first. Or should I try it here? Anyone in the mood? ๐
Tiny thing, does anyone know if I can force "stat unit" to launch every time the editor opens?
Remove it from your other logic for the testing to verify if the problem is the setup or the rest of the code/caching :p put it first on event tick and go directly from velocity
@snow harness
if you check them there, they'll be saved in the config (in project save folder)
else, you could try a shortcut with arguments (but I never did it myself)
Well somehow you must inform the door that you've collected enough items. Perhaps the system could be tag-based, where things react to a specific gameplay tag. This would require a few steps (and probably easiest abstracted to a compoment for reusability)
Didn't even know about that dropdown after all these years, I've got a document of useful commands I've been references. Lol. Thank you very much.
Sure np, happens to me too - I just check random official tuts/courses from epic. There you see all kinds of gems like this one ๐
Iโve never seen that either
If anything you can just add a consolecommand to beginplay, or a hotkey
Stat uobjects helped me a ton
When its cpu shiet
Iโll keep it in mind
Ik itโs prolly some old blueprint thatโs running on tick or something lol
Then again i had it easy with empty level, a bunch of ai, and seeing which functions cosr the most
Ah so thatโll so show u cost of functions
Iโll have to do that because I think itโs my ai causing it as well
I see, I thought I already had that set up, target collectibles-->branch-->move component to...but something is definitely not right, I'm missing a piece somewhere. I'll mess with it some more and see what I can figure out. Thanks!
What im seeing is some journal pages with some hardcoded input adding widget and destroying self (?), and a door that checks only at beginplay if collectibles is within required amount
Absolutely amazing thank you
This is after the c++transtition, so the cost is now a fraction of what it was..
Ah I see, even if nativisation isnโt on?
I canโt remember if nativizing is on my default
Nativization is getting tossed and has a ton of issues so never bothered with it
what was your minimal value?
I think this is causing problems for me (see pic). So, here it is: that array contains actors. I'm grabbing one, calling a function on it which should remove something from an array inside of the actor. Since this is a copy, will the array update or not? The description suggests it won't.
It wasnt mine , so i dont really know. I had none, seemed fine
The journal pages are the collectibles, the collectible actor is programmed to cast to the screen how many have been picked up, and once they are picked up they disappear (the actor is destroyed)
I think what you said before might be the issue...at the start of play it's checking the number of collectibles, it should be checking how many are "left" to pick up, not how many I "have", but "target collectibles left" is what I thought would fix that. But I guess I need another event to trigger in the sequence to check the collectible amount again during play?
You need either the collectible, or the collectible 'manager' (gameinstance in your case it seems like) to somehow broadcast or inform the door about when enough items is picked up
If you go the event dispatcher route you can make a dispatcher in your game instance
"CollectedPage", with an input integer for the amount
Then in your door on beginplay you cast to your gameinstance then you "bind to collectedpage" in the game instance
Then you create a new custom event from the red pin there
Which will have an integer.
This is the event where you wanna check the amount
Then in the game instance whenever a collectible is picked up, you want to "call CollectedPage "
The array you remove from, is inside the actor you called the function on?
yes
Then the array in question has nothing to update
The refs are still there, still valid, and nothing changed
but If i get the value of the array inside it which got modified, will it return the "state" it was in when the ref was taken, or will it update the info according to "current" value?
As long as the modified array is modified properly, yes
It doesnt hold on to/copy any state of the object
The array elemt is purely a pointer
To the actual object
if you are using event tick and delta time.. what is a good way to reset it during tick?
Reset what
sorry.. i should post images
on the right.. its flooring to get the index of the virtical component 1 text item pos.. but when it gets to the second set.. the index / floor doesn't go back down
I have groupings of story text that display on screen.. then eventually the image swaps and the next set of text shows
so somewhere in here.. should i be resetting story counter to 0?
Its hard to say whats going on, but surely thats not a great way to set it up ;-/
Consider using timers instead
Should keep things cleaner, simpler and more organizable
Or timeline for that matter
So you can handle your opacity
the bigger issue.. which is sorta why this direction. I have a number of images, and for each image I have a number of lines of text
and after the end of text, i need to go to the next image
and so on.. then load a level
i know the image number.. not the text number
i was hoping so! seriously like.. no tutorials but i feel like this is pretty common
if i setup and group in arrays all my stuff.. will timeline allow me to loop that stuff right?
Either you can serialize a bunch of widgets,
Or use widget switchers , timelines and some clever logic for when the text is endimg
Id go for the last version ofcourse
i know when the text is ending in this case
The is valid is false when there isn't any more text
A struct containing the image + the text lines
Or something along thise lines atleast
The widget would handle it all
If you wanted sound effectd to it, that could also be handled there
One widget that can generically read an array of the struct containing the image(s) and the text that follows the image
Could someone help me with something? I'm trying to change the color of a attached weapon after picking it up using the same way I am changing colors for my characters armor. But I don't know what to use on the object wildcard for a "cast to weapon_BP". I'm at work right now so I don't have screenshots of my blueprints but if someone has a idea on how to make that work
Ok, I'm going crazy here:
I just don't freakin' understand how does something get removed, then ... not get removed.... HOW?! ๐ญ
End effect != remove effect?
@gentle urchin
Left that out not to kill people with too much info ๐
Spent 4+ hrs on this, going frame by frame, and it just seems the remove effect doesn't get called... Used print strings, did all of it. I just don't understand... It's meant to replace a buff... If it exists, remove it. It works fine for all skills except this one which links two units together. If unit 1 casts the link on unit 2 and then unit 2 on unit 1, unit 2 is left with two buffs. It should remove it before applying...
anyone know how to fix this multiplayer problem all of the actors look at mouse cursor
Only checking buffs for the effect to remove? Using a select on debuffs.. what type is removed ? Buffed i suppose. Also pro tip; in a function where you have a single condition for exiting (break) you can just do what you wanna do after the branch and go directly into a return node. This exits the loop early :)
Whew! Alrighty, I will take all this and see what I can build here. I'll be back in here with updates. Thank you so much for your help!
@gentle urchinHeh, u won't believe it, but (it either bugged or not sure), but I thought I know that too until i spent some time debugging my AI only to find that the branch fired "true" regardless unless I've connected another return node with an explicit false value (the bool was passed by ref, so no default values to set it to true). After that, for some functions I just throw in another node with an explicit false node.
This is true, the outputs are saved so you need another negative exit aswell on loop completed. But that also means that if you completed the entire loop, you're sure you didnt find what you looked for, and thus can just exit negative anyways
Looks alot cleaner than breaks imo^^
Now, back to this, the remove event works as intended, had 40+ skills with this buff system in a previous game and this is the only skill that breaks on circular casts. The select is based on effect type which is stated in the data table for that particular skill effect. Jeez, sometimes I just wanna drop this and freaking learn GAS and be done with this crap.
Wait, then I misunderstood you. Let me read that again [Loading...] Oh, so... Inside the loop itself throw in a return node? ๐ฎ
And ofc you dont have a debuff named linked, right?
Yes, after the branch succeeds, you can simply call the end effect (we found it and want to end it) and then just return
Was affraid that would just loop further into other things outside the function. That's GOOD to know! It would be much easier to make helper functions! ๐
No, I don't ๐ And I've checked that part of the code, it does get removed, checked the bool & array elements.
Also your end effect and remive effect couรธd've returned values too, couldnt they? Be functions so youd get the true result and not just the search result
Id also suggest splitting the function
Find
And Remove
Find could be pure, and remove would not be
If you think that might clean things up, then ofc I could
Keeps the logic clearer if nothing else
Doing to much in a single function sort of defeats half the purpose of making it a function in the first place
fair enough ๐
top
They dont mske alot of sense to me really
yea, that's why I asked earlier if anyone was up for a stream since it's farily convoluted:
Unit 1 casts Link
Adds effect on unit 2
Adds effect on unit 1
______________ so far so good.
Unit 2 casts Link
Removes effect from unit 2
Adds effect to Unit 2
***Should remove effect from unit 1 <----This is somehow skipped. The code is that with the sequence (remove from target, remove from caster, Apply)
Adds effect to unit 1.
Now, unit 1 has 2 buffs, out of which, one is invalid (leftover)
Worse case, i'll just drop "link" skills altogether and be done with it jeez!
But then I don't get to struggle and learn so ๐คฆโโ๏ธ ๐ no good!
maybe im overthinking this
and i should just make a hud widget for each story scene and use the damn timeline
One generic widget with a timeline handling any inputed array of image/texts
yup
i only need.. 3 scenes so im splitting that now
maybe ill make it generic later
Yeah id say thats fine
@gentle urchinFInally got it. I'm an imbecile and since the system ALWAYS acts on it's parent (the ability is a component and fx are actors with ref to the caster), it called remove on the caster only. Thanks for ur time man ๐ apparently it helped ๐
Some rubberducking tends to help ๐คฃ sounds interesting if the master remove doesnt work but oh well ๐ i dont know your setup ๐
Gj in any case!
hey, I'm having a problem trying to add health boost zones to my game
Well, it definitely helped ๐
In the blueprint you need to reference the firstpersoncharacter but I can't find it anywhere on the world outliner
Health boost zone like... collision volumes?
@gentle urchinThe master remove does work but whe I made the system I made it assume that the parent of the buff is the ONLY parent. Didn't think I'll want to make "shared/replicated" effects. Anyway. I'll just accomodate this posibility now I guess ๐ Would've been nicer if I haven't forgotten about this "assumption" but there it is ๐
yeah, I added like a green sphere with a collision sphere around it
wait i'll take screenshots
Well you figured it out so thats all that matters^^
so this is the ball
There, ducktaped, works like a charm ๐ . Jeesus how simple stuff can waste a day... Thanks again man! ๐
teacher said to create something like this in the world blueprint
i don't understand much of this rn haha
You'd probably want to cast or atleast compare to the player pawn* if only the player is affected
this is what he told us to do in the firstpersoncharacter blueprint
that would replace the get player controller?
Yes
On the event node
You have a pin "overlapped actor"
You want to use that for the damaged actor
^
connect it to event insitgator instead?
Yes
damn
sorry I'm so confused
The red node, the event overlapprd
Has two inputs
Overlapped actor
And other actor
Overlapped actor is whatever actor walked into the sphere
ok i'll try to redo what you said an send a ss
If you want this to affect anyone then you can just plug it directly in
If only the player shall benefit, then you must compare the overlapped actor with the 'get player paen'
I thibk
Actor must be valid for overlapping
it's only to affect the player
Good to know
like this?
Yes
Yes
Now it works for anyone who overlaps
tysm i'll go test it and come back
Question, I have a Data table of items where row name is the item id, and want to be able to have a variable in my BP that can let me set item id from a dropdown like an enum in the editor, is there a clean way to do that? creating a separate enum will cause duplicate data and will force me to maintain both row name column and enum to be the same at all times.
welp, I have bad news. It didn't work
Do the player have theevent any damage
Its a bit of spaghetti code (no offense that's how everyone starts)
yeah sorry about that
Give me 5 mins I'll remake it a bit better for you
ty
If pawn is not overlapping the collision setting might be wrong,
Or generate overlapping event isnt checked in the sphere
๐
It should atleast overlap pawn
With query and physics collision
And generate overlap
Did it work now
welp I tried to change it as you said but still no luck
i'll send a ss of the settings
i,m sorry where can I see the bool?
i hadn't checked the box when i took the ss but now it's checked
Yes, and the clamop is to prvent it going above 100 or 0
clamo
clamp
So you dont need the 2nd branch
oooh nice i'll change it
you are printing your old health value only
oh im late
if you use deans version, don't forget to set your health back to 100
Health is health, its correct, albeit not a clean way of doing it
i guess you do this as a respawn
so just add a set health 100 at the end?
and after he set the position
Oh yeah
that would be to show how much health you have?
If I have multiple print strings ill use append to differentiatie between the values
It would show your health before damage is applied, and show your new health after the damage is applied
would this be useful if there's going to be a hud that shows the character health?
its always useful to print some values because otherwise you have no chance of fixing stuff if something breaks or goes wrong and you don'T have a clue whats goin on
ah makes sense, i'll it then
It could be maybe, but for the HUD setup I use, I have a function within the HUD widget that will get the player health
if you do not want the text on your screen, just set the print string to log only
Depends on if you want it to print to screen
Btw I have a question about widget functions
I have this setup
But when is this function called? It seems to update as soon as player health changes
It runs on something like tick
But I am not manually calling it
You're better off having it event driven
Makes sense, guess the course didnt wanna go too deep into HUD management hehe
^^ bindings are easy, fsst to setup, and doednt give major performance hit right away
But for long term hud its a bad idea
So on event any damage in my player character I make an event happen in this blueprint? Or do I
Yes.
Alright Ill try that out
and this should be empty then, or should it have the function I will call on that event?
I'm having some trouble with blueprints and them not doing stuff that I want and at this point there's too much for a message, It's probably very simple but I just don't know where to start:/ so was wondering if anybody would be willing to help me in vc?
What i'd do is either;
- make a callable function in the widget which the playerbp must call whenever health changes
Or
- create a event delegate in the player pawn which when the widget id created is bound up to said delegate. Then youd call the delegate every time hp changes
@zealous fog
Sorry to interrupt with another question. Just that for the sphere that adds health earlier, I think it doesn't work because there's nothing related to the first person character in the world outliner
The benefit of the delegate is that you can have several actors listen to this event if you wanted(like an enemy that attacked you can be notified when your hp is below 10% so they can do some execute special anim on you)
Does your character spawn on the PlayerStart?
Wont be in the world outliner then
Delegate is event dispatcher?
Yes
Thanks a bunch
Ok Ill send you some of my setup when I was trying a similar exercise biono
on thirdperson character
oh
Your collision trigger has a collision box right?
or sphere or whatever
on the collsionbox
thanks Dean I'll plug in those settings
Does anyone know how to use EQS? Im having a bit of trouble with it
Biono, otherwise here in an Unreal Developer who is pretty much doing what you are doing right now (you will have to adjust it a little bit to fit your, what I assume, is your homework assignment ๐ )
Announce Post: https://forums.unrealengine.com/showthread.php?101051
This Training Stream takes a look at Blueprint Communication. We find that Unreal Developers of all levels can sometimes struggle through the concepts behind moving data between objects. So in this video we'll take a look at the different ways to make Blueprints talk to one an...
Although its probably just a little bit above your level, it really is still the basics and if you pay attention and watch it a few times Im sure you will understand
Its what I did when I started out
this whole video is gold if you wanna know about how blueprints communicate
If the timestamp doesnt work its 21:24
thanks so much! yeah it does seem to be very close to what i'm trying to do
i'll follow along to try and recreate a bit what he did
Watch out though he is in the actor blueprint while you are making it in the level blueprint
So you cant just copy it exactly
But its useful for you to understand what you're doing exactly haha
oh alright
so what if I did it in the actor blueprint instead of level one, could it work?
Yes but I thought your teacher said it had to be in the level blueprint
oh, well that's how he did it in the tutorial he made, but we can do it however we want
Doing it either way isn't wrong I think
The tricky part about blueprints is that you have a million tools for the same thing
And you gotta decide what the best tool is
Level bp is generally not preferred
game is due in a week so I think i'll just do it in the actor blueprint instead to save time
If you do it I the actor BP it means you can spawn it in other levels
Bsps are cool ๐
oh then i'll definitely pick actor blueprint
But its great for fast prototyping
it's a two level game so it needs to work on both
yep I'll save the vid
You can do it
fr you've been so helpful
You shoudlnt model with bsp (unless your cool ๐)
We are all learning here
No I know its just clunky even for its intended use
Or I just am not cool enough its possible๐ค
Perhaps both ๐
I was wondering, there ever any reason not to use nativization when finishing a game
I'm reading up about it and it seems like it just makes everything faster?
I use bsp to design the collision of the level
I stick to increments of 100 sometimes 50
In seeing repetition i can design the mesh kit
Bsp can be exported as a mesh if needed
So you export your bsp into your modeling software and then flesh out the level?
Sometimes but not always
If i made a bsp pillar i note the dimensions and make one in the 3d software
Unusually, its common for platfromer games to load large chunks of areas
Having the entire level collision as reference can guide the final design
Im a fan of modularity, but some studios will load a single mesh environment
Hmmm this is a little bit beyond where I am now I think, I havent really found a true workflow for my own full games
For example the entire interior space of a building
So far I've been following courses and getting a grasp on how everything interacts
But thats an interesting method I'll note it down
rate it
Looks like #work-in-progress
He means the channel hehe
this is going on your peeerrrrmmanaant reccoooord (echoes record record record)
lmaoo
hey people,
Could someone from you help me.
How can i take the component (decal in my case) from the blueprint and use it in another blueprint. I tried with get and cast to the blueprint, but no result
wayttd?
i am trying to make puddles and rocks on the floor and interact with them. When the player step over the puddle, receive scores. When step over the stone , he loses scores.
This is a little part. I know , that maybe it has to be done with one blueprint. But i am asking if is possible to do it with two blueprints, as they interact each other
alright, still not sure
Whenever I add an actor into the player capsule, it propels the player at speeds that you'd expect in msfs 2020. Why
I have no clue how else one would describe this
huh
on my screen its full length
it loaded
oh ok\
yeah, weird
spawning an actor in another messes with physics
disable physics of the box
shit, sorry, i wasnt thinking, turn off the collider of the box
k that makes sense
If I want to use a umg to change the color parameters on an attached object that the player can pick up, how should the casting go for that to work? I have the info working on the parameters of my players armor dynamic materials but the same way won't work when I try for the weapon
try #umg im not sure what your asking
Im disapointed I didn't think of that sooner
thx
Just changing colors on an attached object, using anything. I have a widget that pressing a button on it changes the color parameters to random numbers for a random color. But it won't work for the weapon my character is holding
np
so you are changing the color of the held weapon using a widget?
Yeah, trying to atleast. It works for the player's material but I can't seem to find the right way to cast for the weapons material to be changed
how is the weapon setup? is it already hooked up or are you spawning and attaching?
The weapon is spawned on the ground and the player picks it up
so you need to have a variable set of the weapon that is held
Okay, I have a variable for "equipped weapon" that makes it so they can only hold one weapon at a time
It comes off the weapon BP I believe (I'm at work so I don't have my pc right now)
When I've tried casting from the widget button to the weapon, the object wildcard keeps asking for target no matter what I put in
so it sounds like you can access equipped weapon, which sounds like a child class (weapon bp)
Yeah it is, but when I put that on the wildcard, it also asks for target again with the weapon ref
hmmm
not sure of your setup - assuming you are getting reference to the character, then getting the equipped weapon?
Should I cast to player bp and get the equipped weapon ref from there? I thought I had tried that
its attached to the character, but if you have a reference to it already then as long as it always exists you should just be able to get it
if i were to do this, i would get the player character and then use get child
again, maybe you have the reference already though
Okay I'll try that when I get home and see if it gets me any closer lol
child actors get a bit tricky
they are not quite treated the same as working with an attached component or actor
though again, i dunno if it is a child actor
an attached actor is not a child actor
I even thought of trying to create the dynamic material inside the weapon base
And going for that but it did the same saying anything put into wildcard "doesn't inherent"
well setup of dynamic material can also be erroneous, seems to be hard to flawlessly setup that ive seen
Yeah the player's mesh material went pretty well it's just this damn part that's driving me insane
honestly dont know where this wildcard request is coming from
would need to see how the attach graph looks
The button that shows on the HUD when I overlap an item for "changing the color" then I have three buttons. One for change armor color (cast to playerbp, then to the dynamic material on the skeletal mesh of the player and changes colors) second button is for changing weapon colors (I've tried casting to the weapon actor itself) nothing worked
this is a quick question but is there a way to add notes to a blueprint
Third button is just to exit the menu
two ways, yes
By note I dont mean comment
you can add a note to a specific node
oh that was easy
i dont follow, the explanation also doesnt communicate the setup, but i figure if you have the player with color change then its something specific around the area of the weapon
therefore the weapon bp, the attachment graph, and the widget logic
I can't give any pictures right now so I guess I'm still just SoL on it then
yes, that is what i am saying ๐
The explanation was literally every node that went into something, how it was connected, and what it was for
It's called visual scripting for a reason ๐
Well even "code" you'd have to show your work. Generally rundown usually won't cut it regardless
Hi! Any idea why i'am unable to destroy components and descendants?
Were they inherited
Fix redirectors, then check it out in windows file explorer
thx
Does saving a map of objects(both are objects key and value) to slot dont work?
The docs claim maps are immutable
they said the value cannot be modified when its created, but im modifying it all the time
Maybe they mean maps cannot be set?
I made a simple map of integers, and it did save
Yeah its a bit confuaing but i think it matters as to what the map is made if
Where did you see maps are immutable?
Its vaguely put as well
"Created maps are immutable"
I would assume to not use them more than just to store and reference
The values and names of the keys are immutable once you add them, but you can add or remove key/value pairs
But doesnt that mean they can be modified?
Yes, you'll have to remove and re-add if you want to change a value
Using integers you dont have to remove the key or value first, you just use the key u want to modify and apply a new value
prob with other types too
I'll try your way with my object map now, removing first then adding again
What do you think, do i have to clear it or remove the keys?
If it's just the key that's immutable then idk why it's giving you an issue
My first try was trying to set the map with another map
They have a remove node.
So I'd use that and then add the key back with the new value
But why do they have this if it doesnt work? ๐
What is that supposed to be setting
I tested when a new objects map, it does work
maybe i have a problem in one of my functions
I think the point is that you can't modify the keys once they're set in the map.
For example, let's say you had a map of integer keys to object values, and you had a key in there of 0. You have no means of modifying the 0 to anything else. You can add the same object to key 1, but key 0 will still remain in the map until you remove it. Additionally, you can reset what 0 maps to.
That sets a map inside a game slot with a new map
yea a key cannot be changed because there isnt a node for it, but values can
but what im trying to do is set the map with another map
Which you absolutely can do.
yea i can
i might have another function reseting it again after i set it, i'll take a deep look
so i have a character, with multiple child classes, in the parent class, i have a UI being spawned and promoted to a variable, then in the child classes i have it setting a variable in the UI which it uses to bind a progress bars percent, but when i do it, it doesn't update the progress bar
alright..
nvm i think i fixed it
Hello I need help using two timer by function for my health show damage amount and my mana damage amount
hello has anyone worked with bitwise enums,i wanna have it so i could set the flags on the bitwise,how's the best way to do it
so for example i have a jump
i wanna have 3 states of it
first jump,second jump,boost
how would i change the flags of it but not having to input the stuff manually
followed a toturial
you ok with joining the feedback vc?
having a timer of 0.5 seems slow for updaing values
for now i'll ignore the lerp
try it out with just dividing the cur/max value
if you want it smooth
decrease the timer loop duriation
and have a finterp
in the finterp
@stray moat
i don't have a max hp/mana so i just divided by 100
the interp speed is basically how much is the maximum value it will substract every time the timer ticks
you can also bind values
you can click create binding
and do the math in the binding
there are a few ways to do this stuff
i recommend you to check epic tutorials in https://learn.unrealengine.com/
Usually best just to use a widget's tick function for things like that.
tick in ui is fine yeah
I am working on trying to do a kind of jank parallax based upon player movement, but one issue is atm I just have an actor which tries to follow the player and updates some material params based upon that movement to create the parallax effect, but the actor following player movement is both delayed and a bit jittery when movement stops what would be the best method to solve the actors movement?
I tried making a timeline to smooth it a bit but it still doesnt pass the eye test in particular when falling as the momentum builds then stops abruptly
ideally I would want its movement fixed to camera location but its just a vertical slice of the level and the camera is simply a component of the player pawn
bobby can you show the thing
i'm confused a bit
you want the stuff in the background
to move in paralax
but the way you are making it follow your character makes it ubrupt
wow
you don't put a timeline in tick
and not like that
even when you do
you just need a vinterp
to interpolate the 2 locations
Also. Please use variables. Expecting nodes from another execution path to save variables is not a good idea. You'll end up with trouble with that later.
i axe the timeline, np i was throwing stuff at the wall trying to get it working
authaer
adding extra variables for clean up is not the best way to do it as you still end up waisting resources for making it more readable
in his case he should do it so the variable is accessable if need be
but i don't recommend to do that
epic needs to have named reroutes in bp's too
this doesnt need to be a scalable solution tbh
it's practices not your specific case
Kay. Next time someone comes in here asking why their variable doesn't work from another execution line, I'll tag you.
it's on begin play
in this case it's fine
it's for practices not use cases
or being correct
Using returned pointers from another execution path is never fine. It's really bad practice.
Doesn't matter if it's working in this case. I made a point that he 'should' consider changing that if he keeps this blueprint.
basically your saying that my event begin play line should just feed into a variable and then call that variable in the event tick?
yeah thats fine its like a couple clicks
because you should have it being defined
Does this moving actor have collision? I can't see why this would jitter unless it's fighting collision with something.
he doesn't have a sweep on the set actor location
and guessing it's a static mesh component
so it odesn't have extra movement
or is it a character
when you fall you gather momentum and then come to an abrupt stop, so my assumption is to break out my z and X movement and put the interp speed to below 1 for the Z
its connected to a player pawn
Wait. The ultimate intention is to slow a fall?
the ultimate goal is this the material on the background changes its orientation based upon the player position giving the effect of parallax movement to a static background
the only issue is while side to side movement works fine
vertical has more abrupt movement that the background isnt perfectly in sync with
meaning the player stops then a fraction later the background does
its very hard to see on side to side but the momentum build on falling makes for a noticeable delay
Odd. There shouldn't be that huge of a difference between your game and render thread.
will I be able to use use it for both mana and health with out the issue with the the timer by event
where can i find this node?
right click a set varaible node
i have never seen this get before does blueprints still have it or has it been renamed?
hm did they remove it in five
oh a get
i'm dumb
right click a get node
and you can convert to validation node
" validated get"
there are 100's of get nodes is it just called get like the get array?
ty appreciated
sorry to bother you again but I will I include both the health and mana function
just do it in the same function
Random fun fact, Validated gets have a 14%ish performance increase over the traditional IsValid node. which is still completely insignificant considering it requires hundreds of thousands of them in a single frame to cause a performance issue.
the tutorial doesn't seem to be that great if hemade it tlike that
Venci is saying to use one timer. Make a red custom event on it and call both functions at the same time.
i mean merge both ffunctions
he can also just call the update mana in the health one
too
not recomending that though
did it like this works now thank you for the help
perhaps someone can tell me what i am doing wrong with applying the fog of war (works perfectly until i attach it to the character
i assume i am attaching it wrong but not sure why
it initializes but does not seem to update it
I've got a blueprint that has no static meshes by default, but is designed to Add Static Mesh Component a large number of times, and move each static mesh component around. Right now the Bounds size appears to be zero, causing the meshes to pop in and out of visibility all at once whenever the Blueprint's origin is out of view.
I can post the whole node setup if it's helpful. There's a lot of moving parts figuring out which meshes to load and where, but the part that actually adds and moves the meshes is fairly simple:
How do I get the Blueprint's bounds size to expand to contain all the meshes that are spawned?
((Possibly related, sometimes the blueprint/static-meshes flicker, even when the camera is standing still, but only if the blueprint is unselected
https://blueprintue.com/blueprint/quj_19mn/
This should work for previewing the whole node structure, but most of it is just parsing a file-type into an array of mesh names, locations, and rotations.
Hi guys. Can I get an Overlap location somehow?
Cause Im not sure that "hit" is what I want. So I want to know if its possible to get Overlap location?
One of these?
Nah, that will just create new overlap things. Im talking about this. Sad thing is that NONE of those locations are good for overlaps
Seems like only a hits have a "locations"
But is there any workaround?
Ty :), unfortunately I am not sure this will help, i will attach screenshot of my nodes
.
The changes seem to work when I test it in edit mode but when i add it to the character, it only initializes it but does not update it every frame and every movemtn even though it is set to do so
Sorry, what I wrote wasn't in repsonse to your problem, but a problem of my own :b
I thought I would share everything. If anyone knows why the fog of war is not updating your help would be appreciated
Is there a reason not to use post process fog for the whole fog of war?
Using looks like a mesh seem not to be a particularly good idea to me. Is it used to manipulate AI's Environment Query?
Usually static mesh components bounds depends on the mesh itself, unless it's specifically said to use parent bounds
That's how I understood it, but I have Bouns view on here.
Here I have bounds view turned on, and have manually placed a single static-mesh inside the blueprint, the rest are generated by the AddStaticMeshComponent. You can see the manually placed brick in the middle has bounds, the rest of the bricks do not.
What. The fuck
Solved it.
lol, how?
IDK if this is supposed to be enabled by default, but I've never heard it let alone touched it. It's an option on the AddStaticMeshComponent node. It was enabled by default.
Now to sort out an entirely different problem XD
Thanks!
I knew it ๐
Problem two is a bit more. . verbose.
Same blueprint, I've got this at the beginning to make sure the construction script only runs when the 'refresh' variable is ticked.
I had to implement this because otherwise every time the blueprint was moved in the editor, it ran the construction script again, which creates the array of meshes to be placed again, which places more meshes again. Moving it around a couple times creates ~3000 meshes to be placed instead of ~200, which is predictably tanking performance.
As it is now it only regenerates that list when I tick the "refresh" box, but as it is that still adds to the mesh array.
I -could- solve the problem by making sure the mesh array is wiped before it's calculated.
BUT
I feel like the CONSTRUCTION script being run any time other than the instant the level is loaded, or the first time the blueprint is placed in the editor, is itself a problem, no?
Level load could just be done using begin play right? Not sure what you are trying to do exactly, still
I think this is one of those thing where BP is used to procedurally place around object. I did similar thing back when I worked on virtual studio production.
Construction script get executed first right before Begin Play, which is basically the moment the actor is spawned. In runtime Construction Script won't be executed again
The high-view is there's a Lego Model format called LDR that I'm trying to build an interpreter for for UE4, so that a user can dump a ldr file in a folder, and when the 'game' boots up it reads that file, puts bricks in place, and the user can view/interact with it. Eventually this will lead to building environments where buildings are created using these LDR files, so envrionment artists need to be able to place the blueprints in the world.
This is how it should work yes. But my code is entirely within the construction script and is clearly being executed before "Begin Play" exists, every time I place an object, or every frame the object moves while in editor mode. This tanks performance during Play mode too, so I know it's not wiping things and running the script once before the play event.
That is the kind of fact which will make me use the Validated node over the IsValid node even though I know the performance difference is practically negligible but I'll do it anyway because of my never ending need to have the 'perfect' code ๐
It's possible that on compile the actual game execution will run fine - but it's impossible for level-editors to use, shooting up from 200 meshes to 10k just moving a blueprint a few meters to the right.
The validated node is also better looking ๐
If it's in editor, yeah, that huge amount won't be practical for construction script. The best idea would be to make some kind of custom asset type, akin to Datasmith actors.
Beginplay + editor event?^^
You likely don't want to create the blocks then, except for on startup. Record them in a list somewhere, and update their positions in Construction still though.
Editor event for preview/practicality
I'm a UE scrub, so there may well be a better way, but how I'd do it would be (root object construction script):
if has_children:
update_child_locations()
else:
spawn_children()
update_child_locations()
okay-
Quick question 
so you know the anim graph right
which is supposed to play the animations
#animation ? ๐
hang on
but i can also play animations in the anim blueprint
and in the character blueprint 
And apparently you're supposed to do it in the anim graph
That pseudocode might not work if say user update the source LDR file after it placed on map
oh wait i'm interrupting you guys, nvm
#animation for anim BP stuff
The problem is that these are user-made lego sets, which means the number of bricks, as well as what kind of bricks being used, will be changing wildly.
yea it was just a general blueprint question, wasn't specific to animbp
One problem at a time though, and this would solve the mad GC thrashing that would happen with spawning thousands of objects for a few you might move
The position updating call can be moved to hook into a more generic location
Hmmm okay I don't think this would work, but it suggests an idea to me that should work.
Even though it's not answering the root of my question, which I phrased poorly, which is why is the construction script running in the editor at all after it's initially placed?
The root would have a reference to what the set is though, right? Which means you know how many children to expect, and can invalidate and delete them all, should the sets require changing (sorry kids)
In editor procedural arrays get wiped tho iirc
These ones sure aren't
From what I can remember with Datasmith actors, it generates static mesh actors (maybe modified one), and basically place the entire scene along with it
Construction is a weird name, but it's basically On Fucking Anything Changed In Object =>
*in editor
It's functioning vastly different than any other use of the word 'construction' I've seen in programming then lol.
Construction script runs once before BeginPlay in runtime
i am following along with this tut https://hippowombat.medium.com/tutorial-line-of-sight-visualizer-for-unreal-engine-f32113b1f6f3
I'm having trouble parsing this, give me a second.
I thought you're making fog of war, not line of sight? ๐ค
At least based on my RTS understanding, fog of war isn't necessarily line of sight
The array probably is (so you cant simply iterate it at the start of construction script to clear out already placed blocks)
Yup, FoW is to hide map and resources, LoS is to hide enemy movement. Both turn information into a resource to gain and exploit
apologies, I must of used the incorrect term
I wouldn't even clear them out, but rather update their positions. Of course, if they are children of a root object they move relative to the root anyways so
Well yeah that'd work too ofc.
If you make them editor events,
How can I reload an instance of a blueprint(actor) in the editor/map?
Sometimes when I edit the viewport of a blueprint that already exists in the level, it won't update its mesh layout until I delete it and add it again. But other times it works just fine. And restarting UE actually doesn't do anything, it still keeps a "corrupt" layout. Same if I click "Play in editor", it's just plain wrong..
You can add/clear before moving tho
Jesus this channel is a bloodbath haha
Okay so if I understand right you're suggesting I should, in this order:
Parse the LDR file into the array/structure(Called brickArray from here on)
Use brickArray to add staticMeshes into the BP
In the construction script update the staticMesh locations
๐
In editor, this wont be saved :( pretty sure it wont work..
At runtime it will
Conscious brains aren't multithreaded ๐
So my first question is where is the parsing and adding of meshes being handled if not in the construction script?
With a slight addendum, double check if the bricks are indeed created in case something goes wrong, and to have it prepped in play as well
That is indeed a wise safety measure, but for now I'll settle for just getting the bare-bones system working and then work on error handling ๐
Any screenshots for reference?
Well is the set moving around going to happen at run-time? Or purely by level editors?
For now the set is not moving, but in the future there will be moving objects I'd like to be constructed either in-game or via LDR. Trains, vehicles, etc
(NGL threads would be useful here :b
Just like games, our brains multithreaded but just for the organs, otherwise conscious minds are mostly single threaded
The difference being runtime or in-editor
Damn this sounds like a fun project TBH, Legos good.
For now just build the logic, and add run-time support later on. It'd just be hooking into other events anyway, no big issue
Runtime the suggested method workd flawlessly
IF I can get this very basic ldr-importer running, the whole damn project is going to be open source :3
could you perhaps help me, point me in the right direction
I'm thinking that you spawn static mesh actors instead ๐ค
Okay! This still leaves me with the question of where LDR-parsing and AddStaticMeshComponent is happening if not in the construction script
@ me, but also consider Python scripting the editor for sanity's sake hah
I'm going to go The Matrix here, due to the trend.
Do you want fog of war, or line of sight? Choose your pill
Ldr parsing should happen during engine start somewhere? Unless we now can make assets / data assets in editor / runtime?
I would like line of sight ๐ The red pill
I sort of understand what this means (adding extra utility to the editor for level-editors?) - but I'm not sure what would be useful to add right now? I mean the editor needs to be able to select a default LDR for each BP, and probably some other parameters, but I figured that'd just be handled via editor-exposed variables?
I cant imagine importing ldr at runtime in a standalone game..
Well, that is what I'm trying to do XD
Not each Step, but during level load, so users can customize the island how they want.
Well typically this is solved by ray casting, like old skool Wolfenstein 3D ๐ค
For 2D games it would be easier to do so because the raycast don't need to be concerned about another axis
done with Line tracing i assume, i kinda got the setup working i just do not know how to add it to my character
If it's a horror game and 3D top down, I would've just let light do its thing. ๐ค
The left screenshot is in the blueprint viewport of an actor of a "room". It has "doors" on all sides.
The right screenshot is in the level editor. The "top door" is completely misplaced, even though it's correct in the BP-editor/viewport.
To clarify, none of the "doors"(w/arrows) were present on the room when I added the room to the level.
However, after adding all doors to the BP, all doors except the top door are placed correctly in the level. It seems random. Restarting UE doesn't even update it. I can also move it around, and even "play in editor" without it refreshing to correct layout.
But if I delete the instance from the level and add it again, it shows up correctly. So I'm just wondering if it's possible to "hard reload from BP" or something.
There are no properties on the BP that should justify this behaviour, as far as I know..
Though shadow casting can be expensive...
The idea is to havea top down shooter game but you cant see behind pillars and walls
The line tracing already works i am just not sure how to attach the blue print to my character, the video shows it attaches itself but does not update every frame or movement
Still though, complete darkness, but one light source emitting from the player
You're basically replicating shadow mapping there (but maybe worse because render target performance)
stylistically i would like to controll the lght source outside of the character, i have a few post processing effects that require me to manipulate the light source and i would not want it to come from the character
So I had an idea that maybe not so bright.
On Construction Script or whatever your update event, check if the actor has your own static mesh actors (not components) attached to it already. If yes, do nothing. If not, populate your BP with your static mesh actors according to the rules in your LDR file.
It's similar to what Datasmith actors do, containing entire scene in one BP
I might brainstorm on this but don't hold your breath.
Yeah. I think having a branch near the beginning for adding the static meshes once, and then after that just updating the location would work?
That could work, but assuming the extremes, I would regenerate the child static mesh actors in the event of the user changing the LDR file.
LDR file changes should only occur between level loading.
how do you attach a blueprint to a your character
Context: graphical line of sight system
is there a guide on what the construction script can handle? id like to know how much 'code' and what 'code' i can put in there since it seems handy to use for... purposes
it seems pretty handy when trying to iterate through data tables but something like this for example doesnt seem to work(works fine when hooked to event begin play though, of course)
It's probably best to treat it as a setup for the actor
Any data that's directly referenced in your actor itself via a variable should be fine to use to do stuff in the construction script
But anything that tries to get data from something that's not the actor, no, because the data might not be available
oh okay, or initial set up using data tables and then any additional manip should be done through event begin play? lets say i have a chest and i want randomized loot with randomized stats so i set the base items with the data table but manipulate some of the variables(quality rarity or whatever) through begin play later on?
A data table might work since it's an asset which should probably be accessible during construction time
please, can anyone tell me, japan, china, and Korean developer manage to complete the project with so, little documentation. i tried so many times to complete indie project. failed only because lack of knowledge and documentation on interactive system. similar character interaction assets on the marketplace. how can i achieve the same result before dying can one?
not sure if this question is suppose to be here
how do you edit a data curve table? And i cannot find a way to see where the original source too. Unlike the one with simple UStruct in BP
What?
Are you asking about language barriers or manpower/ project scope?
Also degrees don't help as much as hard work.
Trial and error, my friend
Also a lot of experimentations
I'm on the eastern side of things.
Also I don't have a degree, but I do have modding background, so I learn things from reverse engineering games as well
Hello Guys what can i use for Bolts and nut to check if the bolt already exist ?
it's getting weirder and weirder every minute
i was thinking to make Actor have static mesh ( bolt ) and Box Collision checking if its have nut
nvm, you are the bridge guy, right?
Yes i'm still working on the foundation and pillars
is it possible to move a blueprint actor as an AI without using character as parent class?
No. Actors cannot be possessed by controllers. Only Pawn and its derivatives can.
I think you need to disable marquee (or something along that line)
Hey,
Could anybody help me. ๐
I am trying to scale a mesh with add timeline and box collision. I want to scale the mesh always when i step into the box collision.
Right now it happens once and after that the mesh doesn't scale
ok, i did it with play from the start .. ๐
and i can't use two classes for a single blueprint, right? or maybe just implement the movement of the character
you can add an character movement component to any actor if im not wrong
nope, i couldn't manage to do that ๐ฆ
It's about controller possessing BP
how can i grayscale a texture2d?
In Material? Just desaturate it once you put it in a Texture Sampler
im setting that texture to a button, and im dynamically initializing the texture using victory plugin.
So I'm working with a plugin from the marketplace and I always thought if you wanted to Bind an event to an Event Dispatcher from one blueprint to another (or UMG to another UMG) you have to do get the UMG/BP -> Get Bind Event To and then create a new event. However, this plugin seems to just call the event from the other UMG as is? I'm not sure what they did here.
That is from W_CharacterPanel
Then in another UMG that has a CharacterPanel they do
Shouldn't that event have its top right square thingy connected to a Bind node???
that's an interface call?!
Yeah I'm seeing they are doing something with the interface there. But I'm not sure what you mean ?
The event node doesn't even have a "Custom Event' Tag on it
so like where did it come from?
they may have implemented the interface as event
but don't take my word on that
i'm not sure if you can have an interface method + event dispatcher with the same name
or is the interface implemented on something other than what your top screenshot shows?
There is no interface method with any names from the event, I just don't get what they are doing or rather how
The interface BPI_CharacterPanel is on the W_CharacterPanel WIdget
and what is opened on the top screenshot?
So i'm working on my game, and i've noticed these 2 things with the movement, when you are walking and change directions, there's a moment of braking before the change of direction happens, it doesn't feel smooth, and then when you jump, by moving side to side really fast, you can essentially just float, how would i fix this?
Character Movement Component has settings to tweak for that.
which settings though, there are so many and it seems so cryptic
Hi! i want to setup a system where when the player clicks 1 he equips an rifle and when he press 2 he equips an shotgun etc. Does someone knows an tutorial?
alright, i'll play around with it and see what i can do
this too
Anything under Walking
is there a way to parent UMG elements together? I have an image as a backdrop and I want to put specific buttons in specific locations as per the image. However, when resolution changes, the buttons fly off
Anchors.
Not sure what you mean by fly off but if you want buttons adjust correctly use Anchors
is there a way to package a game with saved file inside?
@zealous moth If you want it so that the top left and right bar stretches but the whole thing does not, then you need to add all four of thsese images in the green to one panel. Adjust them, then set their anchor to top center with an offset of 0.5X and 0Y. Then for the Orange, you just use the margin settings to keep the left square part of it intact, and allow the rest of it to stretch. Then you can anchor it to fill the top left of the screen with some left right and top margins. Mirror for the right side. That should keep it stable for anything from 3:4 to ultrawide resolutions.
How do I fix this return value from being "HOTRELOADED" instead of just "Weapon Base"
Don't compile C++ with the editor open.
You should be able to use live coding now right?
Check the second pin in the #cpp channel. You'll get used to it. The basic gist is that any changes in the .h files or class constructors needs to have the editor closed and compiled before reopening. You should do this for more than just that naming issue, because hot reloading can also cause some pretty severe blueprint corruption. It's not a pretty thing.
You can play with this https://gyazo.com/f4b88807701ddcb52891737db9bfa720
And yeah, any C++ .cpp file changes that are not class constructor can be livecoded safely.
Just constructors? How about header files?
Livecoding won't work on constructors or any .h file changes. Nothing that alters how the engine could use the function, so no changing arguments and whatnot.
You'll get used to it though. I admit I remember it being incredibly annoying. Now it's just tuesday.
I guess its better I learned this now than earlier... otherwise I might have just stuck with using Unity but now I've kinda committed myself to UE
Having never used Unity, can't speak for it. Heard it's easier to program in, but eh. Unreal is really easy.
Personally I had a way easier time picking up Unity than UE. I tried and failed several times in the past to learn UE, but this time I'm actually making progress and figuring stuff out on my own without following tutorials.
Hi. I have a simple BP that forces push objects. I am looking for a way to clamp the spell and not be able to cast spheres if my camera is behind my back
I cannot clamp the axis from the rotator directly in get control rotator
Is there any way of doing this? Or I must cast a tracebychannel If I wanna clamp something?
Could probably just dotproduct the camera direction to the character forward direction.
i've been playing with the values but nothing works! the odd thing is, none of this was an issue before, and i never touched the movement component between then and now, the only thing that changed was updating from 4.27.1 to 4.27.2
@vagrant flickerIf DotProduct of Cameradirection and CharacterForwardVector > 0, allow sphere creation.
The closer to 1 that is, the more forward the camera needs to be looking. 0 is at the character's sides, -1 is directly backwards.
How can I obtain the character forward direction to plug inside the camera direction?
Where are the controls that spawn the sphere?
What do you mean by controls? Sorry
Input. Or whatever code you use to spawn the spheres.
You can get the character's forward from GetActorForwardVector. And you can get the camera's forward via GetPlayerCameraManager, GetCameraRotation MakeRotationFromXVector
Er
Being an actor, you could probably just get camera managers forward vector directly
Probably. Either works. I'm so used to working abstractly with the camera manager. ๐
I'm plugging all this to the tracebychannel, right?
No, this should be used as a check before that. Is this on button press?
Pretty much just a branch gating your delay there with that check.
Though you may also require checking at sphere fire time as well.
To make sure you don't start a cast, then rotate the camera behind and fire 0.2 seconds later. Could just branch before and after the delay.
Oh okay.. I'll try to do that now
Oh man, it is working like charm.
Thank you very much.
So basically, If I want to clamp left and right angle more, I have to change the value of 0.0 after the dot product, right? To shrink the perimeter
Yeah. Dot Product goes from -1 to 1. It's just a measurement of how closely two arrows are pointing in the same direction. -1 is pointing in opposite directions. 0 means that one is pointing perpendicular to the other, and 1 means that they are both pointing in exactly the same direction.
Actually, is there a way of drawing or visualizing this arrows? I assume there have to be a way of debuging this
Sure. You can use something like tick to DrawDebugArrow.
If you make start point GetActorLocation for both and then take each of those vectors you're plugging into the dot product, you can just multiply them by like 300-500, add that to the GetActorLocation for the end point.
Should give you two arrows on your character, one is it's forward facing arrow, the other would draw facing the direction of the camera.
You may also consider locking their Z to the same as GetActorLocation in this case for easier viewing since you only care about backward and forward, would make seeing the arrows easier, but it's not necessary.
Will try that!
This'll get you started at least.
Hey guys, not sure where the best place to ask this but I want to save user progress, I think on a server (I have a webserver and DB set up pretty quickly) but I'm not sure if UE offers a more seamless way to accomplish this in BP? I want to save info like, player coins, player xp, etc.
Is it better to save that kind of thing on a server, or just say whatever and do it local? Any reading material on this?
Hi, I have a quick question. I don't if this should be in the animation channel but I am trying to use BPS to attach hands to my floating gun on my screen. I am trying to bend and attach both arms to sockets on the weapon mesh and don't know how to do it. Currently I have one arm connected but I am using a solution found in a tutorial where the Left arm IK is attached to the Right hand but I can't do that because I need both hands on the weapon and when I move the right hand the left one glitches out. ๐
Definitely #animation, I can discuss it there.
okay thank you
How do you set up the ADS?
I don't think activating/deactivating the camera is a good idea ๐ค
Because ADS view isn't happening instantaneous. There's always be a small blend from hip aim to ADS in other games.
You should have the camera offset lerping over time. Depending on how you set up the FP camera.
If it's a static mesh, you can't. You can only add sockets on skeletons, those that skelmeshes use.
Hi everyone - What would be the best way to go about coding CCs (Crowd Controls)? Is there a good video explaining stuns and knockdowns?
Crowds as in mass #gameplay-ai? Stuns and knockdown sounds more like a fighting game thing
Yes sir or ma'am - Of the fighting game type. A couple videos I seen had information scattered. So was tough for me to understand the concepts
It's sir :3
(Shouldn't use my waifu's name as username but oh well)
I'm inclined to think that it's the same as regular fighting AI, just in higher quantity.
this is hard to explain but i'll try my best lol. so, i want to collect like a powerup or a drop and i want it to do another thing outside like turning on a light or something or calling upon an actor that is in another BP. how would I set it up to do something like that?
I know I don't explain things well
so, if you need me to elaborate then I will
appreciate the help
Sounds like a job for Event Dispatchers, particularly if you have specific relation from one key item to something in the world
Yeah, compared to BP interface, Event Dispatchers could be useful for more specific communication between two (or more) BPs.
BP Interface is more "one for all", as it could apply to any BPs using the interface.
how to package .txt file?
depends on what exactly you're doing with it
in project settings you can find packaging options which you can use to package specific non-asset files which could be used
I figured it out - Thanks for responding ๐
problem is, I can only add folders which are inside the Content
but the .txt is not working inside the content ๐ฆ
you will have to elaborate on what you're doing with it
I need to store offline ghost replay for my racing game, like the default
because idk if I can package the .sav file
You don't store them as .txt file then.
I have location and rotation into a struct and I thought saving a json was a good idea
I cant seem to set the external curve on a FRuntimeFloatCurve in BP...
Not sure about ghost players in racing games but maybe you want to store the inputs instead as a replay ๐ค
but they will end up somehow in some kind of file no matter the way you record it
because idk is it possible to package a .sav file? It's my first time with this kind of things
No. .sav files are not asset files.
And this really depends on how you made the replay system
did you check how big those files become wozzos?
so, I am kinda stuck if anyone can help then it will be appreciated. I am trying to get a powerup type of thing then when acquired it will turn on a light or do something else. I tried the event dispatcher and it seems I cannot understand it tbh lol. If you need a screenshot of my screen then I can provide.
i made a ghost-race-thingy with structs too, and lerped between the positions every 0.1 seconds because the files became insanely big on tick
provide a screenshot then
who picks up the powerup?
it's in the training map the third person map
so i guess the third person character
I got the basics I think lol
maybe I am not so confident and very self conscious now
destroy actor is like the end of the line. if something is gone, it can't do other stuff
(most of the time, there is actually a event on destroyed but i made the same thingy)
like I want the square to not be there and the light to turn on
should I put the destroy actor at the end?
the light trigger is super strange ๐ what do you want to to here? (just say it like "i want to move on a button and then the button switches on a light"
lmao
I knew I'd get torn into lol
Idk how it'd work there tbh
i'll explain it the best I can
np, i can make you an example ๐
Rotating Cube's overlap should just cast it's overlapped actor to your character type, and call a function on the character that turns the light on.