#blueprint
1 messages · Page 36 of 1
Then things like changing input mode and other parameters from main menu to a normal level
there’s only one GI but you can have multiple GMs
yep
Remember that when you want to change world settings you need to override the GM and assign the new controllers, default chars etc
Ill have to keep this in mind in the future
Thats one thing I havent played with yet. save states
what are some bp classes besides a gm or anything else world specific that would allow me to spawn an actor always upon begin play?
do i do that in the gi?
or go c++ 🙂
"world specific"?
I'm making a function that can adjust the player's health, is it better to make 2 functions 'AddHealth()' and 'RemoveHealth() or one function 'SetHealth()'?
I do it in one
But its just a preference
But its not "set health"
Its still Add
Sup folks. Is that possible to make a reference to other actor, and get location of specific mesh (component) of those referenced actor? Currently i doesnt see any possibilities for this. Maybe im missing something?
Not sure if this is the right place to ask but, anyone know why yesterday my mesh was working fine on character controller, but today its not there and i cant edit anymore?
kinda new to this
Thats the problem. I didnt see such possibilities.
To make it more clear. Let say i have 2 actors. Both contain trigger box and sphere mesh. Both of them have reference to each other. So trigger box A have a reference to trigger box B and B have reference for A.
On construction script i set sphere_position vector to its world location, enable "eye" to make it public.
Now when i step into trigger box A, i try to get something from my referenced trigger box B, but it doesnt seems to work.
did you add some stuff to the construction script?
nah, no cahnges from yesterday when it was working
we dont know if you didn't compile and/or save that actor on quit so that it worked before isnt a good reference, you could make infinite changes, not save them, and everything is broken because you saved on close
your details panel is blank, thats not good, and your mesh isn't showing up, i think it is a bug in the unreal
any known way to fix?
like i cant edit any of the stuff in viewport thats already there
5.3.1
normally i have just seen to revert to a recently saved version, i think it's a bug i have seen it a few times on here
you probably have to remake the character, or if you can load a saved version
unfortunately that wasnt helpfull. I see how they trigger some custom events from trigger zone, but not get any data from referenced actors 😕
the only time ive had stuff just vanish that I thought should be there, was when I was in a child actor and you can't see any of the parent actors blueprint
Wdym
Casting allows you to access the data of the ref object, provided that the check passes (it’s the right class)
is there any way to set the "root component" with a +Z offset ?
since now its aiming for the rott (always the feet) basicly
Anyone knows why the Location coming from a Hit Result (of a Sweep) is (0, 0, 0) despite the objects clearly hitting each other during the Sweep event? You can see my "Sweep" flag is enabled, "Simulation Generates Hit Events" is enabled, "Generate Overlap Events" is enabled and my "Collision Preset" is set to Default, but I tried multiple options and the same thing happens 😦
Just created a BP from a cube and never seen this happen. What the heck does this mean
You can aim it at something else
Clearly hitting each other based on what tho?
@lunar sleet yeah obvviously im dumb 😛
You’re just setting world location, that doesn’t necessarily mean an overlap or a hit has occurred
ah got it
Which would give you default value (0,0,0)
The node you see in my screenshot at the left with "Set World Location" takes Obj1 and moves it across the screen through Obj2 (which is huge), out the other side, with the "Sweep" flag enabled. For me, this should clearly be the definition of a Hit result from a Sweep. The Location of the Hit result should be the point where Obj1 first intersected Obj2 as it started going "through it" and out the other side. The movement itself happens, Obj1 gets to the other end of Obj2, just with no Hit Location 😦
For you? 🙂
Try using an actual hit or overlap event
Just because 2 objects move through or in close proximity to each other, it doesn’t mean a collision has occurred
It’s important to understand early on that what you know makes sense IRL does not necessarily mean it works the same way inside the engine, this reality has different rules 😀
“Abandon all hope, ye who enter here” should be on the splash screen 🙂
Obj1 is a tiny object like a satellite, while Obj2 is a planet. The "Set World Location" takes the satellite from "close" to the planet's surface and moves it right through the center of the planet. I'm not sure what could go wrong in this scenario.
I see, maybe I’m explaining it wrong
In UE, for 2 objects to register a collision, you need both (not just 1) to be set to overlap OR (not either) block each other
is there a way to profile a specific actors gpu usage in real time? it'd be nice to be able just throw a number in the corner
Otherwise moving things through each other does nothing at all^
offtopic but LBA 
See #profiling resources
thanks
hmm... now I begin to understand what I'm assuming wrong, but I still don't understand what you mean by "both be set to overlap"... how can I "set" them to overlap? Do you mean they should be overlapped and not just "move through during 1 frame" ?!?!
thats what i forget about. Casting. Its works now, thanks 🙂
I mean collision settings in their respective details panel. You can edit them if you set to custom. You can also create new channels or object types in proj settings
right now they're Default, but I also tried all variations with Overlap
any suggestion what exactly I should try?
Start by setting both to OverlapAll for example, then use the onBeginOverlap event and print something
See if prints when they overlap
If it does, it means collision was detected successfully
i'm just wondering because you can for example feed a negative number into an add node and it will subtract it... so maybe they can be combined if you wanted
Keep in mind overlap all means nothing will block, so things might start falling through them ^
Anyone know how to control Master Volume in BP?
I am able to adjust the volume for effects, voice and music, just not overall volume.
When you "open level", is there stuff you NEED to do? IE: BP things you need to add after open level to clear cache, etc (single player game)
Try #audio
Not really
So its all automated
@lunar sleet Ahh good thinkin!
Engine handles that stuff
Yes, you can have just one if you want
is there an open level (not doing multiplayer or co-op atm) but open-level where you select actors that you want to open it for
Wdym
You can’t just open it for some actors, open level means change the level
ah
So if you want to do zoned instances. IE: a dungeon you enter. Is that not another level? or is that something else
So if you have co-op you can have one person enter but another not
local co-op*
keep forgetting to say that
#multiplayer is a diff beast and one you should prly not tackle on your first game
Speaking from experience 😅
I work on an MMO (Swgemu) and have worked on MMO's in unity. Just not a single player co-op or built one myself from ground up lol
But word. Weird uh... discord question system here 😛
since this is multiplayer and BP question ;P
Legends live in that channel
o lordt
yeahs that's what im doing / accepting
negative numbers
I think it's a UE bug, as I just found this article from another guy having the same problem and he is using the Overlap events properly: https://forums.unrealengine.com/t/sweep-results-for-overlap-collision-not-populated/431170
Maybe add local co-op later
I think sweep checks for hits. My point was to first see if your collision is working at all, worry about sweep later
Have to set object to allow the overlap event
I've set both objects intersecting each other (aka overlapping) and the Hit is still zero 😦
it's enabled!
Understand that Hit != Overlap
If you want hit, use Block
I only said try overlap first for testing purposes
yea hit is a diff event
I use print statements to validate overlap before doing anything lol
And don’t rely on forum posts, some are just people that gave up too early and chucked it to engine being faulty
Show your collision settings for both actors
Ok, now go to your satellite bp and use the event hit
Then break hit result, drag from other actor and plug that into a print string
Hey \o , How i Implement a interface in Data Asset? Let me explain
In C++ , i have an simple Interface, and a Implementation
And my Data Asset has a Variable that is This Interface , But, if i Create a DataAsset
I Cant Implement, How i do this?
i have a Blueprint from the C++ class
ops wrong Image
I now remember why I did not use the Events, it's because this is part of my Construction Script, I'm trying to implement this small logic here, so whatever Event I'd use in the Event Graph won't execute, as it's not part of the runtime yet.
You can’t detect collision in construct afaik
I saw you mentioning something about it but I hoped you’re not trying to do this in editor time
Ahh ok, so that might explain it
Yeah
yep, it's in Editor time
I mean there might be ways to do some form of collision check on construct but that’s more advanced
then... any idea how I can make my Satellite "snap" to the surface of my Planet in the Construction Script, besides this failed attempt I had with the Hits?!?!
🤔 not sure, you’d basically be making an editor utility/tooling
Is it a crashed satellite?
I mean if you select a mesh and hit End it usually gets plopped on the landscape but it’s not always super precise
cause it's not as simple as moving it at the known distance = the radius, since my planet's surface is not uniform and I want to emulate a somewhat realistic collision snap which is not a perfect sphere.
kinda like a crashed satellite yeah
Hello i was wondering how do i get the player ping to the server ? i want to have a widget where the player can see how much ping he has .
Idk if that’s doable but maybe you could try #cpp
ah, hitting End won't do, since this happens after a complex rotation (which works already), so it should still be done in an automatic way, it's not a 1-time manual click
A complex trace is what you're after.
Why not?
Idk never tried it 😀
You can even spawn actors on construct if they're set to allow it.
well.. I was expecting normal collision Hits to work also, but apparently it doesn't
Oh? From bp?
The actor spawn node is disabled there iirc
From c++ too I assume (in OnConstruct)
I don’t think it works in bp
Shrug
I just know there's a setting to allow an actor to be spawned in CS.
You can just make a function that spawns an actor and run that function.
@mental trellis: any tip on what BP node to use for that trace you mentioned?
cause there are many traces afaik
I guess for what I need, a Line trace would be better suited than a Sphere trace, right?
for a small satellite against a planet
Yes.
That'll fine the surface of the planet.
Your satellite centre will probalby be at the centre of the model, so you should add the radius of the satellite to the position.
of course
(in the direction of the impact point from the centre)
yep
Thanks a lot, both of you!!! Back to the drawing board 🙂 I'll keep u posted in case I need some advice ❤️
Good luck.
Have you ever had an issue where doing a camera blend, the rotation back to player camera is janky and studdery?
When going back to my player camera, the rotation is really choppy. Any fixes?
I'm also using the Advanced Locomotion System from the marketplace
@lunar sleet and @mental trellis Haha, I managed to solve it differently, by using a Line Trace Component... strangely this works
and I'm still in the Construction Script
not using any events
A line trace.... component?
yep
Why would you use an event if you didn't weren't using that component?
Ah.
I didn’t know that was a thing
It’s line trace to component
Yes.
yep, but that's what the BP node is called 😄
Ik I meant Epic
strange that the Hit result of this Line Trace works, but the Hit result of the Set World Location (with Sweep enabled) is null :/
Because that’s prly a run time thing
You have to supply the hit result for it to populate.
That's why it's a pointer.
seems strange if it is, cause the Set World Location node itself works in the CS (editor), outside of Runtime, so...
I'm using the BP, not the C++ of the Set World Location
and the BP node looks the same in both cases
Eh.
I doubt it's a pointer, it should be dereferenced already
just like for Line Trace
hello (idk if its good channel for it) dont know how I could do camera transmission like in this game https://youtu.be/_xXD_9vS56E?t=54 (0:54-0:55) like how i can achieve something similiar? In my game player only moves on x and z axis. I thought about trigger and then something like second camera is on with this move after that I lock movement to y and z so nothing really changes in movement. I dont know if it will work, or maybe there is better way? Even something like telling me what to look for in google would rly help cuz I have no more ideas.
The camera is simple, it's always to the characters side
I'm trying to hook up a Material Parameter Collection to our Landscape material instance, which I then need to modify via construction script in an Actor present in the level, and get live in-editor updates on them as I change the values. I do this with some other systems for post process updates as well, I tested it on it's own and it actually works fine for the landscape material as well.
The issue is that the landscape material instance doesn't update live like you would expect it to.
For example I have a Dirt layer with several parameters that come from a Material Parameter Collection - when I modify the variables in the Actor that are connected to the Material Parameter Collection the changes don't show up until I actually open up the material instance itself, and only then it refreshes and shows the changes.
The same applies to if I modify the values directly in the Material Parameter Collection for example.
I can't tell if this is just a visual thing or if there is a different way to go about this, as I need to be able to have these apply automatically.
The image shows the Blueprint method I use to update the scalar and vector parameters.
The array variables hooked into the array corresponds 1:1 with specific parameters found in the Material Parameter Collection, and the For Each Loop is used to grab them automatically rather than me having to have a separate variable for each parameter.
The characters plane of movement is not simple. It's probably defined by a spline in the world.
Would it be possibly to efficiently get all components from a certain class within the level? What I'm trying to achieve is to have some kind of way of giving some special data and identifiers to certain actors. Something along the lines of tags, but that would be more cleaner. The most ideal choice for me would be to create a component in which there would be stored some params. Then I'd want my "game manager" blueprint class to get all of those special components and run some events on them based on their individual data stored in their individual variables.
That mechanic honestly looks like way more trouble than it's worth unless you think of some really compelling reason to have it. It'd have consequences on your AI pathfinding as well.
What's the actual mechanic?
Does manager talk to just one component at a time or broadcast to all of them?
btw is it even a good idea to have something like that?
I mean a game manager actor thing
You need to tell more about what you're actually trying to do
Yes it's fine, depending
Okay, so the game manager is going to be reading files from the disk and based on the data contained within those files it is supposed to "talk" with those special components. Each component should have an ID that is associated with the data pulled from the files, and with the data received from the files, the components should do some logic. I have all the data processing setup, just the communication is the problem.
What is the actual game mechanic. When does it talk, does it talk to all of them all the time?
it can do that often, yeah
just use a dispatcher
component begin play -> bind to dispatcher
manager wants to say something -> trigger dispatcher
i can't do that
each of them should have their own ID
It'd be a lot easier to help if you said what you're actually trying to do here instead of being all nebulous about it.
Just register them with the manager then
and when the data will be read from the file, it should do some stuff on that specific comp bound by the ID with the data
Component begin play -> register self
Component end play -> deregister self
Manager does whatever it wants
so, i should get a get actor of class in the comp to get the ref to the game manger, right?
and then do the registering by calling some function on it?
The correct™️ way would be to use a subsystem if you want to go C++ with it
i want to go BPs only with it
also could i use like the soft references or whatever
to make this less expensive
?
idk how expensive is storing a ref really
@faint pasture
if the reference is to an actor, i'd imagine it not being overly expensive but what do i know 🙃
also i apologize if i'm completely missing the point of soft ref
I don't see how a soft ref would come into play here
hard ref from manager to components is fine as they'd be loaded anyway
yeah, i guess i was just missing the point of them then... kinda
oh, but i thought about doing it the other way
around
doesn't matter, the manager should be loaded anyway right?
you just don't want to hard ref stuff that's not loaded all the time unless you want your entire game to load as soon as it starts up
@faint pasture would it be fine if i assigned the references at event construct?
or is that not possible?
Why do it at construct?
good question
if begin play works then just use it
- Code being "cleaner", if the game manager is something ever present within the level (doesn't get spawned), it could be run in the construct.
- I have quite a few things spawned at begin play, so in my head if i did the get actor of class beforehand it would need to "look" through less stuff to access the game manager (or vice-versa, if i tried accessing the components from the game manager)
@faint pasture feel free to 💩 on me
That's what's so great about subsystems, they're always there, always just 1 of them, and globally gettable with just Get Subsystem
not a bp thing 🙂
Question with a video: When ADS is activated, a "set view target with blend" node moves player to Camera on Gun.
An issue I'm having now is the pitch won't work during ADS: https://streamable.com/dtmgon
Video shows the issue (during second half while ADSing). Let me know if you guys have encountered/solved this before and what you suggest for this issue
@faint pasture could the engine create a sort of crash loop (lol) if i tried assigning the reference within the event construct and doing something with it, making me unable to open the project anymore?
i'm not that type of guy with source control
oh wait
i'm might be a buffoon, but the actor comp bp class doesn't seem to have the event construct anyways
so i just gotta use the game manager's cs i guess
this doesn't seem like the most efficient of things 🙂
ok, i'm gonna do it with begin play on the components
Any reason why do any damage appear like that inside the Function Library?
i just ignore World Context
just use begin play my guy
how do i handle the scenario where a comp would get destroyed? loop through the entire collected array once in a while and check if all comps are valid?
You mean you have no source control?
End play -> deregister
oops
I would have the component tell the manager when they begin and end play
otherwise you spawn one at runtime and the manager has no idea about it
question, is it possible to make bp function automatically pass (and require) world context (self)?
outside of a bp lib
(BPs only)
how would one be able to predict the value of something if 10 of the same item were to be bought at once
im trying to set up a buy 1x, 10x, 100x, and max for my idle clicker game, each time something is bought its price is increased by a set percent, so say the basic item cost 5, it would increase by 7%
You can do the math or NOT do it and make bulk buying more efficient
simplest way would be a loop unless you want to do the math
what's the max buy count?
we talking 100 or 1,000,000,000?
the max would be the max that you can buy with the amount of money you have
A is your base price, R is your ratio, N is how many
r would be 1.07 for you
You'll have to do algebra to work backwards from price to how many you can buy
Hi does anyone have some pointers on a good character select method? the current default charcter when you press play is the purple monster, and im wanting it to set the next character when pressed play as the blue one 🙂
store the selection in the game instance and spawn possess the pawn ?
it doesn't do anything.
it should be true when health reaches 0 but it keeps going to -1
maybe <= @neon burrow
it's a bad practice to use == for things like this
sorry i dont know what that means
save what you selected in something called a game instance. It's a special type of class that doesn't have its variables reset between levels. Then when the level where your actual game is loads, grab the selection value from the game instance and based on it use the correct character
yeah the issue is actually something else i think
probably somewhere you set it maybe a subtraction ?
It's bad to use == on floats on general lol
Learned the hard way that 3.f + 4.f != 7
when i have it 0.5 then its fine and stops at 0
but when its 0.1 it goes to -1
bit confused
do you knwo if theres any youtube videos on this? i struggled to find a video on youtube lol im a visual person, and find it hard to find things when i dont understand one of the steps if i cant see them
https://couchlearn.com/how-to-use-the-game-instance-in-unreal-engine-4/ about game instances
Replace the == node to <= as engage mentioned and see if that works
or even clamp it
i already did
i don't see why 0.1 would go -1 all of a sudden tho
when i use 0.1 it brakes
print 'em values
yeah testing rn
thank you i will try this 🙂 is this also good for using for a saving system too?
Did you try pouring some holy water on your pc?
use <=
i am ....
you're dead if your health is 0 or less
no, when you shut down the game that class will also have its variables reset. For saving you'd have to use a save game object https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/SaveGame/
wdym it breaks ?
shatted itself
to see if health is 0
thank you i will save this for later!
@neon burrow if you want to check if the player is dead do Health<=0
maybe when you set it https://docs.unrealengine.com/4.26/en-US/BlueprintAPI/Math/Float/Clamp_float/
there's no way it won't work then
thats what i am doing no ?
what is suppoused to happen then?
that branch would work, but probably not effecting the display
when i reach 0 health it should no longer subtract the health
clamp it
no <= or anything
just clamp it
or do max(0, health)
if u're feeling a bit special
so this branch then runs the subtraction ?
think about if the number is 0.1
but the thing is it doesn't make sense why 0.5 works but 0.1 not
also while we are talking about this,
I want a number 1-100 so an integer ?
but I cant use integer in a widget progress bar ( it only accepts float )
u'd have to map it to a range
current / max
not sure how to do that
you can use 100 as max, and just change the current, it's current / max
so whateverYouWant / 100, will give you the percent
Does it matter if the result is exact like how many currency you have, how many items...ect If so then yeah int is good. or is it ok if it's imprecise like health. If so then float or double it it
yeah it doesn't really matter i guess, the fact that it doesn't do what it's meant to is just confusing.
If it doesn't effect gameplay I wouldn't worry about it tbh
i mean it could in some way, but rn i am just testing ( if i wanted to use it for gameplay, then that would be quite annoying )
Sure
Btw you could find references of the set node
Maybe you have something somewhere setting your health to -1. Idk from what we know it could be a ghost changing up your variables to fuck with ya
no it's just that i made it specifically for this.
this ? it comes out as 0.1
Add a breakpoint just before you set the health
And hover over the health variable to see it's value
Then step (F10) then hover again to see the new value
Just do that for all spots where health is being set and you should find where the issue is
Anyway gn!
Gn :)
yep, it comes out as the health value converted to 0,1 range for use with the ui progress bar
When setting your health as you do here, use a clamp. Min = 0, Max = Max Health. This will ensure your health value can only be between 0 and maxhealth.
You can use the map range clamped if you want to for the visual display, but really, it's just health/maxhealth will give you the 0.0 to 1.0 range you would need for a progress bar.
is your health 10 ? because that would be 0.10
Does anyone know what the deprecated Bind Analog Event function has been replaced by?
I gotta do some Real Math. Is there an actual For loop in Unreal? Like, NOT a "for-each"?
yep
Resize
Haha this is gonna be so complicated I'm an idiot for doing this in BP
But I dont have VS installed on my new machine and I'll be damned if I'm doing that crap today
Oh, do we just use Create Event now?
Okay if you've got a vector in LOCAL space, and a transform in world space, how would you add that vector to that transform?
How to make a function not require an array param (make an optional argument)?
yepp
Make 2 functions
Have one, without the array, call the second one, with the array, using some default empty array.
Or just pass the Array ref in , but make a Local array inside the function and play with that
does it really let you not pass the array when you have it set to pass by refrence?
I think a functions Array is greyed out and True on Pass-by Ref
BPs do dodgy things with references.
took me a bit to understand the difference between a Copy and a Ref in arrays
never heard the word "copy" before you understood the diff?
i now
i'll have to test that
i'll be shocked if that's actually true
was a theory
because you dont want to modify the array you are feeding into the Function , right ? you just need to filter it or something ?
i just want to either pass it or not pass it
There's another array that that the function collects by itself
and the passed one should be added onto that one
(if it exists ofc)
No wait...
I am passing it by the reference
and it's greyed out when the param is an array
i think thats always greyed and true, no choice
there's no way i'll do it like that
why do you need a Array copy?
i dont need a copy
.
ohhhh, misread question
yeah, i misread stuff often too... too often even 
make an input boolean for use it or not
or ... a select node ?
but that would still require the array
i can't just not pass it into the function call
huh? you need to decide if you want to use an array or not, but you dont want to know what the array is ?
I'm confused
you mean you have to pass it ?
ohhhhhhhhhhh
oh yea
make a boolean, and make array
make a 2nd version of the function
set the input boolean to use/not use the array
show what u mean
I dont wanna dup it tho
call that one Choose Random Recording (No array)
or create another func
and omit the array as an input
that calls the old func with empty array
and just make array and pass in an empty array
then you can just use it or not
Mocking it up, sec
i dont want to
.
unfortunately like the error says you got to pass something
Hi, can someone help me? I've got a simple request but can't seem to get it working. I have a vehicle bp and I have a keybind, when I press the key i want the vehicle to spawn as many times as i press it. I am using an actor placed in the world and want the vehicle to spawn there.
have you got it to spawn at all ? are you going to be driving it ?
you should be able to spawn actor when you press the key, probably with a do once
I dont want to drive it, its basically like this in the video, he is using a key and when pressed it just spawns the actor / vehicle https://youtu.be/Yrf4d5IGpKk?si=8RsipkMF6s_R0uNY&t=5
➤ PATREON - https://www.patreon.com/REEANIMATION
➤ TWITTER - https://twitter.com/Ronnie_Ree
➤ DISCORD - https://discord.gg/cmsBqGtnqP
➤ BUY ME A CUP OF COFFEE and some Popcorn 🙂
https://ko-fi.com/reeanimationandgaming
➤The Adventures of Gorm - Devlog #1 (Making an Action Sidescroller Rogue-Lite)
https://youtu.be/naX40P726Js
➤How To Animate Lik...
you have your key event set up ?
yes I do
this is the bp, very messy and when i press it does say its pressed and also on the right it shows it being spawned but i cant see it.
why are you adding a child actor component
but never doing anything with it
which i mean is probably the best way to use them considering you shouldn't use them :P
Im not even sure haha, I have the spawn actor in the world where i want the bp to spawn, I just dont know how to go about doing that.
yes its in the vehicle bp
maybe get rid of that child actor component add, and change collision handling to always spawn
I changed the collision type and got a surprise when 20+ actors spawned at the same time hahaha. Thankk you!
is there a way to spawn it on the actor that i added in the world?
just spawn and attach actor to actor
if you don't want to attach it, you can also spawn it at that actor's location if you've turned off collisions between each other
depends on what you're trying to do
can someone help me recreate the free flow system from arkham knight pls?
cause there isnt really a tutorial and its kinda hard to do on your own
if you're looking for volunteers use #instructions and #volunteer-projects
how can I attach it? Im trying to get the actor into the bp and then just connect it but cant do that.
I mean idk if you'll need a socket or something but the node is attach actor to actor
I got that node but i cant get the actors target, everytime i drag the actor into the bp i get this component
That's not an actor then
I add a blueprint then click actor. It should be then
yeah, but you can't just drag into the graph from the content browser
you need a reference to it
nvm, so just right click the graph, find attach actor to actor
then you can plug in self as the parent and drag from that spawn actor's return value (or promote it to a variable) and plug that into the target
Hi would anyone know or have good tutorials on youtube about when your inside a box collsion and press a key it activates something (in my case i want to activate a niagara system for 10 seconds only once the key is pressed then it switches off )
Thanks i got it working, i used get actor of class and got the actor location that way.
Ah, were you not doing this in that actor to begin with?
I mean that’s pretty straightforward
You can use spawn system at location and then use Deactivate after a 10s delay
doing some troubleshooting and trying to make sure my understanding is correct ,
Do widget blueprints still fire on Event Construction despite being collapsed?
Construction called when it's created
Logic run as normal it doesn't care if you collapse it or change its visibility
gotcha thanks , i wasnt sure if having a widget start collapsed would mean its construction would happen once its made visible
That's not what gonna happend. Yea
It just fires when you do create widget
I have a Blueprint project. Whenever I make a C++ script and try to build, the IDE i use can't compile. I have tried Visual Studio and Rider, and both have been problematic.
How do you get IDE's working with Unreal??
Been troubleshooting all week, it's pretty frustrating
So for #cpp you want to ask in that channel, that crew’s got centuries of experience combined
sweet thanks
Is there a way to stop BP from opening a new duplicate tab every time I double click a function? After 30 mins of working I always end up with like 20 tabs and have to close them all.
Actually to be more clear, if I double click an event graph and then double click a function, and then double click that same event graph, it opens a new duplicate tab for the event graph. Eventually my tabs overflow after working for a long time.
Why are you double clicking the graph tho
Just go back to the tab
I mean it seems like a bug, I can double click a function all day and it will open the existing tab. Generally I think about my functions in the context of their groups as defined in the function list.
When I have 10+ functions open it's much easier to find them in an organized list than in a random unorganized tab list at the top of the screen.
I always move the event graph to be the left most. And I try to ctrl+W functions once I’m done with them
I hear ya, just seems like a clear bug to me.
Idk, maybe there’s a setting in editor settings for you tho
Yeah, the same thing bugs me, I usually, just ignore it and let the tabs build up to like 70+. I have a plugin that lets me search for what I'm looking for, so its all good.
Yeah just every hour or so I middle click spam them all closed. LOL
BeyonderBeyonder"{P,y6hpg5o76
Gotta try that out! Seems like a time saver!
This might sound noobie, but why do I never see rep notify used in single player systems?
It can run a function when a variable is changed which seems helpful no?
Because it's something meant for multiplayer and it can make the logic harder to follow.
Your better option is to use a setter function which can then set the value and trigger whatever logic you want when the value has been updated.
duh setters right right 🙏
I've run into quite the roadbloack here. Would it be possible to stop execution in a graph althogether?
is there a relatively simple setup for making the gun_muzzle of a weapon always point at the place where the crosshair is? As this depends to a degree on depth I guess it involves a line trace of some sort (?)
I have delays that if they start running they later trigger code that (at the time they finish) possibly shouldn't be triggered anymore.
Should I replace all of the delays with timers?
Or is there an another way?
you can do find look at rotation
that seems to require getting a target rotation from somewhere
find look at rotation takes in 2 vectors
1 should be your gun's muzzle
2 the crosshair's location
it will return the "look at" rotation from 1 to 2
The crosshair is a widget though, does it have a location like that? I would expect that to just shoot at 0,0,0 or something.
ah i see
Just get the camera's forward vector * 1000 + its world location for B of find look at rot
and for A do the gun's muzzle world loc
If you're unhappy with the rotation, increase the forward vectors scale
until it suits you
that would accomplish the same as doing the line trace, without the linetrace
Thanks I'll give that a bash and see how far I get
I always get lost with the object definitions. What works in one blueprint doesn't in another lol. What should I be using here?
probably get player character
but there's an another way you could do this
without casting
with GetPlayerCameraManager
oh is there? maybe that will work. This current version is shooting off in a totally different direction
doesn't that require a player index? how would I specify the player
I have a simple blueprint that adds static mesh components based on an index number I give and puts them next to eachother. These meshes gets their lights baked but now they all use the same lightmap. Is there a way to make this "unique" asin that they each check their own lightning situation rather then copying the first one?
get owner seems to work. However it's pointing the gun 90deg to the right of where I'm looking
Greetings,
Probably a question that has been asked and answered a million times...
If I am doing a simple platformer(PaperZD) for PC/Console will I ever need to be worried about performance if I opt to use Blueprints?
In essence should I use C++ or will blueprints be OK for this case?
blueprints should be ok
but still use a c++ base class for underlying logic
matter of preference totally
you'll be fine with bps for a simple platformer
Haven't delved that deep into Unreal yet, so not sure how the two interact, but I guess I shall find out.
yeah then go for bps
👍 Thanks that's what I needed to know.
How can I convert UTC time to computer local time? I tried this setup but it returns invalid date (01/01/0001 - 00:00:00).
Hey devs , does unreal have ability to change render length of the camera ? In unity there was some settings so too far objects doesn't got rendered , and it optimizes game a bit
render distance?
Doesn't look like there is any way to do it easily in BP natively.
It's rudimentary in C++ to expose it. There's also some blueprint plugins out there that give you nodes that you could use to convert in BP like Low Entry Standard Extended.
Probably you want to look at Clip Plane.
How to do in C++?
anyone have an idea?
Local = UtcTimeStamp + (FDateTime::Now() - FDateTime::UtcNow());
Probably could do this within blueprints too, but the + and - nodes you have to work with don't like the date time connections.
I'm guessing UtcTimeStamp is FDateTime::UtcNow().ToUnixTimestamp();. Right?
No. It's just whatever UTC time you have that you want to convert to local.
Oh you mean some date time UTC that was saved to a variable.
Yeah... Here... You should be able to copy and paste this into UE5.
https://blueprintue.com/blueprint/c5hd5y84/
Thank you so much @dawn gazelle. Appreciate the help! 🙂
You're pulling different random values with each pull from the rotate vector node....
wdym
I think it ends up getting called twice, once for the start and once for the end, but still likely not the desired result.
oh true the start point is weird also
bump
.
i dont get it it spawns at 0,0,0 map position :/
it is hitting the landscape tho, and im printing the impact point
that print string doesn't show 0,0,0 tho
yeah i dont get whats going on .O
the weird thing is
im using this on another actor and it works flawlessly
If it prints something other than 0,0,0 then it means it must be doing the hit there
well im not even seeing the line trace there
always at the same spot .o
ehhhhh
even this spawns it at the same location
wtf O.o
Spawns != trace
wdym
not equal ?
if it dosent hit u mean ?
it dose hit,
ok yeah so its the origin thats the problem
i dont fucking get it O.o
Is there a way to have an async delay? I want to have my code continue on, but also run some additional code seconds later
AsyncLoadAsset is perfect for this, but I don't need to load an asset. I need an async delay node, with 2 white output pins
oh I see now 😅 ty
I'm trying to make a "shadow" underneath my character for a platformer. I want to make it so I spawn a decal underneath my character (of a simple black box), but it's just a fixed location. How would I make it so it would go a maximum of X units and if it comes into contact with a surface before the max distance, it stops and displays there?
Workflow question:
In my BP Character I need to access some variable from my GameMode, and also in other blueprints. So I created a Struct and Data Table to select from there my Game Mode and other general use BPs. What do you think, guys? is it dangerous or not good approach in some way?
traces
yep, JUST found that. Was using "draw line" which is a "painting" function. (Whatever that is)
Thank you!
Hey so I'm trying to make it so that when you're in the collision of a certain object, it sets a UI thing to appear, but it isn't working.
Pumpkin Collectible is an Actor Object Reference
What does that hypothetical async delay node do that a sequence + delay doesn't?
Trying to use a enum for weapon switching and controlling the animation layer , But Only The shotgun layer seems to get set and all others seem to stay on Unarmed. and going back can set the playet to T pose , Is there a better was to do this
bump
.
use timers, you cant stop delays
Anyone can think of a reason why when I package the game I can't click on the Start button?, nothing happens
is it perhaps something related to the window not capturing mouse input?
Nice, good catch! Let me try that
Thanks @versed sun
that worked, but now the game map doesn't.. I'm getting something like
LogScript: Warning: Accessed None trying to read property LocalGameInstance
would this cause issues in a build?
how to easily get the delay-like behaviour on timers where if it starts it cant get retriggered unless it finishes?
DoOnces would make it all look extremely messy with the exec lines
There isn't with delay
Just use timer
You can clear and invalidate
And does a timer get reset if the settimer node is called again?
wouldn't that just schedule another timer?
Or uobject
Then don't call it again on the same timer
U create an instance (component or object) which create the timer
When u call the function again it will create another timer instead resetting the previous one
I was trying to create a screenshot for you, but this stupid editor crashed, but yes what cold summer should work.
you can use timer to cancel too.
I mean, why would it get reset tho?
Can there be only 1 timer per event?
you need to use time TimerHandle, to design it.
Use TimerHandle to allow only one instance per event and also TimerHandle to cancel,
for it should set another timer that is a very good question ? i think it will set another time, unless you use TimerHandle to cancel the first one.
Yeh i think it works like that as well
yes, in theory it should set another timer, can you do the test let us know the result.
but it already does ? its float i dont need map range for float as its already 0.1-1.0
float health 1.0
no, floats aren't just 0 to 1
you know, sometimes it would be so nice if they just added a short description of what numbers you can use
Then that would make sense then, i was confused at that part, i thought floats are 0-1 and integer (idk but much more )
just search up the types in google
I have this on my GameInstance BP.. Simple command line stuff.. runs at Event Init.. worked perfectly in Editor, but not in a packaged Build.. am I missing something?
Ah, I used Execute Console Command instead and it worked
So I want to spawn an actor from an Editor Utility Widget, but it fails to spawn one. Is it possible to do this?
Deffinitly, seen ppl doing it
Infanct Matthew video about editor utility widget spawn an actor in the world iirc
Ok I'll have a look at it!
Why does this First Picture work , But the seconds method ONLY key press 4 works ?
the first pic isnt hooked up to the Link nodes , false positive that it works ?
then hmmm
Im sure second pic should be working,
does pic 1 and 2 exist at the same time ?
the first pic might be consuming the input
no
print out the Enum to String after the Link node
I have and the enum is changing . But the animation only changes on key 4. , but in the first pic they all work
I just removed the select and re added it and now it seem to be working. ffs
ahh , just had to kick it
These are the worst kind of issues spending hours trying to fix something that already worked , just because the editor wanted to be finicky
at least your bug either works or doesn't 100%
Im searching for a bug that works 99% of the time
deadly kind of bug
can i Save Input Action References in SaveGameObject?
Hey folks
I'm trying to understand "order of operations" in order to know if I'm draining performance without needing to.
In the screenshot the bottom Boolean is based on a DOT Product and is not relevant in most cases.
Will the stuff coming in on the bottom left be excecuted/calculated if the top Boolean is false? (the "Only Front Shots Crit" one).
i think all pins in a select node get calculated, no matter the Index
seems silly to me
hmm, so I need to find another way around it is what you are saying.
And thank you for clarifying by the way 😄
This usually as 0 impact if all of the data is already calculated, like multiple string with values,
but if you going to calculate, its bad
might have to branch it
So in this case it would not calculate selects if "Only Front Shots Crit" is false?
no this is same thing
can remove that Select
So basically "Selects" are calculated no matter what? Even if their output is not used?
yes , or a Switch if its not a Bool
I can use one without Diamonds if that helps?
can you plug it in and it stay non-diamond ?
This will not calculate, every node
hmm, might work
nice ,and it works?>
Haven't run it for anything. This is a sample setup.
Just to not drag you through my spagetti 😄
I can compile it. All I know so far
Now, how would you even check if it is referencing all nodes or not ?
Set up a massive calculation (much more than DOT Product) and see if it hits performance. 😄
You can create a UObject Class which has a float, now try to read the float value form null object ref, now you will test the oposite boolean, eg: if you put the null object on A , you should only try to get B, if it did not reference A, it will give no errors or warning, But if it did reference A , you will get error in your message log.
hmm, i think it still calculated both pins
Hmm, guess that is for Ryck0Shae. Too complicated for me.
you tested ?
hmm, which means select nodes are trash
maybe because these are pure functions
okay, maybe Select wants to have the return data ready, which means each select is calling Node A, Node B, before doing the boolean check,
this one only calculates once or the other
Conclusion : Select Trash for Calculation, but if data is already present, then it does not matter and will behave like a simple branch
but as always , use whatever is right for your needs
Is it actually expensive to do the DOT Product then? Like in the screenshot
I have many towers firing often.
this one is not that bad, Because you are using it a value.
Its expensive to do in BP little bit then C++
Okay. Thank you all 🙏
Laura came with a Fire of truth and burned everything down.
Just as a general statement, all code that is not executed is not hitting performance right? (perhaps except for Selects and other exceptions)
In other words, I can go crazy if I want. As long as a Branch or similar is making sure only one path is excecuted?
you can go crazy, but traversing a 1000 count array on tick in BP and in C++ has a very big difference.
It's also worth pointing out that large branch chains normally indicate something wrong with your approach
Though it's not a guarantee
Right. I'm not so much trying to compare to C++
Rather I'm looking for a way to set up different damage calculation options in a Template tower with many children.
So that the player can unlock a new unique shooting function (for example the mentioned "can only crit is hitting the front of the enemy" we talked about above.
But I need flexibility to have many different unique functions a player can unlock.
So I'm not quite sure how to keep this flexibility allowing a player to change a towers functionality if I can't do as above.
This sounds like a candidate for overrides.
Basically the tower base implements default.
The tower that can only apply crit from the front, overrides a function you make called CanCrit() or whatever, then does it's dot product there
For each unique tower, if a default setting doesn't work for something, you just override it
overrides meaning implementing code in the childrens BP's or what do you mean? (like overriding code for a specific Event in the child BP)
Yes
Parent Class has a Base Implementation
Child Class overrides and either replaces or extends the existing logic
And that goes on for Child Class of Child Class of Child Class
Okay. Then I can't use this approach. Because It applies to a whole group of children, and only when/if a player unlocks/picks it in the game.
I might make it out to sound worse than it is since I'm still on my first small game.
I'm just trying to be proactive for both performance, but also Blueprint clarity for my own sake.
Hey, so I'm trying to create a collision-dependent UI element, but it stays visible after before and after I'm away from the objects collision
The top one is the object itself, bottom one is the visibility binding on the widget
Pumpkin Collectible is an actor object reference
That group of children can share a common sub-subclass, and part of the check to see if you can use the feature could be, just checking if it's also unlocked as well as the other criteria to apply the crit, otherwise if it isn't, default to parent implementation
Not sure I fully understand.
Is it pretty much like this you mean?
If that is in your child, then yes
Fascinating. Not sure it helps in this case, but certainly something that opens up my mind to posibilities. Golden info 😄
In my case I kind of just want to seperate a bunch of functions.
Almost cosidering doing them in a Blueprint Library. And just pick the function I need and feeding it a whole bunch of variables.
Guessing a function in a blueprint library certainly will not be run if it is behind a false Branch? (meaning not actually called/run)
hi guys, I have to transform array to string, so that I can put it on a db, and then I can take that and re-make it as an array var in ue5
how can I transform a string to array and viceversa?
there is a Transform to String node
i dont think there is anything built in for string to Transform
but there is String to Vector and String to Rotator
what's a db ?
Database
yes
I can use Join Array with a custom separator
and the Parse Into Array with the same separator
I have some logic in my GameMode blueprint which is attached to BeginPlay. I'm only declaring a Local reference to my Game Instance and Player Controller.. There are other functions on the same blueprint, but in editor the BeginPlay always fires before anything.. In a Build however, I'm getting errors of the functions trying to access None when referencing those declarations.. The EvintBegin event runs, but only after the functions.. Why is that?
What if you had an Actor Component perform the calculation? Each tower would have its default Actor Component, then when an upgrade happens, replace it with the upgraded one that has different behavior.
The pro to this is that the tower doesn't have to do checks, it just has to ask the component for what happens.
The con Is that I guess the actor components would still have a base class to override behavior. And the reference lookup time. But that would only be an issue with a massive amount of towers.
In Other words, why BeginPlay isn't the first thing that runs in a build, and it is something that runs first in Editor?
plop a Delay until Next Tick node after Begin play
Do you mean on my functions?
here
But that makes it not work in editor
because then I'm ensureing it will not have run before the functions
But thanks, let me try putting that on the functions
Double check and see that the casts don't fail in the build.
That worked, thanks
i havnt done much packaging , but this might help
All I needed wa to delay the functions by a tick, to make sure Event BeginPlay fired first
very weird that it doesn't happen in Editor
me neither, lol, first time packaging a project
This is very interesting. I was considering it earlier, but I'm not yet familiar with how to use the components. Seems pretty easy though.
Would both keep Blueprint complexity down, and avoid calling code I don't need if I'm not mistaken.
The two cons you mention:
Reference loopup time: That is only done once right? When tower (actor) is constructed and if the component would need to be updated on the fly which it does not in my case.
Actor components would still have a base class to override: Not sure what you mean by that one.
The lookup time I'm referring to is the time it takes the cpu to access a reference, and is a cost that happens every time that something references something. Like GetActorLocation() just as an example, would require a lookup time for that actor reference. It's small, but depending on the game....
Just like how you were talking about having a base class for towers, that other tower types could then override the damage function of, you'd probably want to have a base class Actor Component that other more specialized would override*.
*Inherit from
Would it also have to "Reference" the tower (Actor) every time it needs to use one of it's variables?
Because there are many of those.
Guess "many" is relative. Say 50-75 in this case.
Well, yes. But I don't think it should have a major impact. If something is impacting your game, you probably have other, more expensive things to look in to.
I think the most practical way though, is that when the actor component swap happens, update its variables then. Then you don't need to look up every time, which again is a small cost.
Quick Question, when should I convert a function to Pure?
Generally, when it doesn't modify anything. Like, "How much is int A + int b?"
Understood. I appreciate your help 🙏
But I like to keep functions that return an array.. unpure. Saves me from creating a temporary variable.
Thank you. 👍
So generally, if its just simple calculations, it's fine.
Absoltely, even encouraged I think. Saves from having a bunch of stuff connected to the execution line
Time to un-spaghetti my BPs, slightly.
Woah how the heck did you make your nodes look like this
not my code screenshot, but i think it is a plugin?
Flat Nodes ?
@noble crescent keep in mind pure nodes fire every time an execution node they are attached to fires
Thank you!
Got it, thanks.
yes it was my screenshot, Flat Nodes plugin
Hey, I am trying to achieve eye tracking for my HTC Vive Pro Eye. I followed tutorial by Varjo: Eye tracking | Varjo for developers . However, it doesn’t accurately track my eye. Can you see where the problem might be? Thanks in advance. Thank you for your assistance!
I have an actor that needs to have Simulated physics on but it moves when colliding with another object. How can I make it so it doesn't move when it collides with another object?
Hello all, seeing something odd in unreal engine 5.2. I have a custom actor component that has a variable array of a structure type. Inside an actor BP that has his component, I am attempting to get the array and run it through a for each loop inside the construction script. I can see the array has values populated in it, but the for each loop doesn't run, it terminates immediatly. If I move the logic into the event graph and try to call it from the construction script that does work, but doesn't fit my needs. Is there some limitation here anyone else has encountered?
yes, it works, thanks
Show Code ?
My first thought is to have it have a custom collision setting, so it doesn't collide with things you don't want. Here's an example where it would only collide with the pawn.
It needs to collide but it needs to be "immovable" too
How about constraining axis?
or more mass?
in order to see if it's really a limitation of the Construction Script, try making a dummy array of 5 integers, fill them in with 1, 2, 3, 4, 5, then do a "for each loop" and print their value * 2.0 and see if it works. Just to rule out any possible strange thing in your custom structure or BP
Would that affect velocity? I also tried making the mass like 999999kg but still moves a tiny bit
try always enforcing its real world position to be the same, like in BP you can do a Set World Position and plug in its own Get World Position
or better yet, if you have the position as numbers (pair of X,Y,Z), just always put that in
In every tick?
yep
the Tick will anyway feed transform matrices for the objects, so it's a neglectable overhead
Thanks ill try that out
thank you trying that now.
If I make an array on the actor of the same type, it works. So something about it being an array on my actor component is the issue?
Maybe the Actor is trying to read the Array on the Comp before it has a chance to load?
yes, probably u should check the order in which these things happen
yeah I thought so too perhaps but its odd, if I hover over the array as it feeds into the for each loop it is clearly populated
and not assume or rely on your array being there no matter what
I'm just using it in editor, not during PIE. so on this instance of the BP I have the array values set.
I had to do a fake Construction function on the Component that i called from the Actor's Construction for a similar issue
you probably have an issue with accessing the array across the different actor components, or BP...
hmm so what does that entail? you setup some function on the actor component that you called from the construction script of the actor? what did the "fake construction" on the actor component do?
yes , and for my use i wanted my component to add Collision boxes to my Actor
So is it something wrong in my approach/setup or a limitation?
what is the array of ?
So maybe try and set the variable array to another matching type in this fake destructor and see if I can pass it through to the actor that way when I call the function?
its an array of a custom structure I made.
you just need the Actor to accurately grab the Array which is stored on the Component, right ?
and it is saying it is empty, when you know it isnt
mostly correct, its actually not saying its empty. if I hover over the variable get node output I can see its populated. but the for each loop I try to run on this array doesn't run even once, it immediatly completes. so maybe its getting populated right after the for each loop runs or something? and I know its not empty, I have the actor in a scene with the array variable set on the instance.
but yeah, even just me grabbing it and trying to set it to a variable in my actor fails. I'm a bit lost honestly. actor component is setup to auto activate, has tick enabled, etc.
hmmm, I might have a different setup, but im reading the Comp's Array from the Actors Construction
did you set those values on the component itself? I am setting them on the instance of the component in the details panel for the actor which has the component on it in the editor.
Yes, so if I hard set those values on the actor component then it works.
but if I leave the default value empty, then set it on the instance of the actor it behaves as I described above.
I made the array Instance Editable , and can change/print it
mine is set to instance editable as well on the actor component.
in my actor bp, its now reading the defualt value of the variable set inthe actor component, not what I have it set to on the instance in my scene.
make sure everything is saved/compiled
indeed, been doing that but I'll be safe and just save everything and restart unreal.
So just for sanity/recap.
I have an actor component with a variable array of a structure I made. Its default values are empty and its instance editable.
I have an actor bp that has this component on it. I don't set any default values here as well.
I have this actor bp in my scene, on the instance of the actor I set the values of this variable.
When I attempt to read those values in my actor's constructor script, it doesn't work.
seems the same best I can tell.
I myself am getting into Actor Components
I just tried adding a new array of bools to the actor component. same thing. no default values set on the actor component or the actor using it. its instance editable so in my scene I have the values set on the component. attempt to print the bool values from the array in the actors construciton script and nothing gets printed.
are you setting it like this ?
yes!
did you get it ? mine isnt reading the array now
yeah its not working for me.
dragged a new one in and it printed at first, but that was just the default value set on the variable in the actor component. once I removed the defaults and tried to set it like that image you just showed it doesn't work.
same
trying to think of what the alternative is....I guess maybe I can try changing the flow? setting the variable on the actor instead of the component, then trying to set the values in the actor component from the variable in my actor maybe? not as reusable that way but I need to be able to access the values in construction.
even if it isnt an array , it only reads the default value
now that I'm re-reading your whole setup, I can't help but notice: you are setting the values of the array via the actor instance in your scene, meaning it's already placed, therefore the Construction Script has already executed by this point. So you're doing the for-each-loop in the CS but that runs much earlier compared to when you actually populate the array via the Editor.
so this is just a poor idea/approach on my end?
so first time you place your Actor BP in the scene, the CS runs, the array is empty.
then you populate the array with values, but now the CS is long gone, so you missed out.
now if you further move your actor around the level or you save/recompile the ActorBP, the CS will be re-run and since your array values are already set in the Editor, you will now see the for-each-loop execute
so it's a hit and miss because of the order in which your trigger the events
either move your for-loop out of the CS, or if you really need it there, make sure to initialize the array before that, so don't rely on populating the values later via the Editor, cause u run into the same issue
so initialize your array also in the CS, right before the for-loop
hmm yeah if I move the actor around or save/recompile it still doesn't print those values. if I move the for each loop out of the contructor (like into event graph and then calling from constructor) then it does not seem to work.
you might have some other things we're not seeing here
when you say "make sure to initialize the array before that" can you explain what that means please?
I mean initialize the array with the values you normally put in the Editor, just do it in the CS before the loop
aka "populate it"
ah okay, yeah the values are different on each instance of the actor.
understood... even so, you can think of a clever way to do that procedurally in the CS
so maybe have some abstaction between variables set on the instance and this array? where they set a variable on the actor that fills in the array?
so that they have different values according to whatever rules u want
that could also work
and in order to better understand how the CS works, or more like when it actually gets executed, print out a "Hello, world" in your CS, then in the Editor make sure you have the "Show Stats" enabled in the preview window. Now compile your BP and see the Print appear. Then nothing happens, as normal. Then if you further move the Actor in the level, you will again see the Print outs for every movement until it settles down again.
yes I understand that aspect of it. again, I was fine with missing the first run of the construction script and just having it run when cs got run again. even added an "active" branch so they could toggle it on/off to force rerun the cs
last, but not least, you can extract this logic into a separate event that you can fire/trigger at any point whenever u wish to
both during CS, also at BeginPlay, then later on also during runtime (EventTick)
okay thank you, its just needed for the editor, not when playing, hence why I was attempting to use the construciton script. I did try adding an event to event graph that is call in editor enabled
I have this first person character blueprint, i want that the mesh rotate with the camera boom, how can i do?
try to Get Rotation from the camera and apply it as a Rotator to your character
if not, try using the Look At function and make both the camera and the character "look" at the same thing
Set the inherited mesh to none and parent a new skeletal mesh to the spring arm
ok i'll try
Like this, because still the skeletal mesh doesn't rotate with the spring arm
hmmph, the only way i can read the values on a Component is to set them in Construction script
I made an Array on the Actor, and set the Comp's array to that
Seems janky
Which of them is the arm mesh
The arms should be parented to the spring arm
The one parented to the spring arm has the arms mesh, the one without parent is empty
thank you for that info, I will try that. is janky but worth a shot if it works. appreciate the help from all parties.
Weird, so the camera moves but the mesh doesnt?
yes
Try parenting it to the camera
What is the best way to Send a Exec to another BP ?
Custom Event ? or something else ?
i have a actor that "kills the player" and i need the Widget to show the death screen"
so as soon as health = 0 happens i want it to send a exec to show Widget
only in z rotation because i use pawn control rotation
im not sure if i understand
Yes a custom event would do the job
You could also use an interface
is there any advantage of using either?
You won't need to cast every time if you use an interface
okay thanks :)
No problem
Assuming camera and camera boom are driven by ControlRotation (they probably are), just make the mesh driven by it too.
Make an OnDeath event and call that
Have OnDeath show the widget
this solved the issue for me, not the best but it works. thank you for the help
by that you mean Custom Event?
Exactly how can i do?
my fav error
i am getting Widget reference from my player character Cast
Just make sure its valid i guess
i am confused, but it's working
if it works, don't fix it.
Fix the naming convention
Do your future self a favour
yeah, it's not everything that's confusing, most of the stuff are named good.
just couple of ... yeah...
How can I do an Add like this?
thats just adding a struct to an array but they right clicked the struct input and pressed "split struct pin"
no problem!
what math am i looking for here
Is it possible to find where a specific type is used in blueprints? For example I want to know where a enum type is used. If I right click on the enum and look at reference viewer it shows me which blueprints it is in. The issue is some of these blueprints have hundreds of functions so I would have to search all the args as well as local vars which is becoming a pain.
I don't get it since it says 0 to 1 -> 1 to -1, but then the diagram shows something different with 0.75, 0.25 etc.
so what are you actually trying to do?
Right click find refs and click the binoculars or ctrl+shift+f and type it manually
map what range to what range?
that would be the 0 to 1 input
essentially trying to get a direction from a 0 to 1 float in x y
so you wish to pass X to f(X), which outputs Y, where X is 0 to 1 and Y is 1 to -1
?
meaning convert 0..1 to -1..1 ?
i think im trying to do something with pi probably. imagine 0-1 is degrees with an arrow at 0 and 0-1 pointing the the degree around the circle from 0-360 but getting the end vector which is -1 to 1
Map range
Does the output need to be a whole number for both X and Y?
So if I right click the Enum blueprint I can only click Reference Viewer. Then I end up at this screen (image). Which just shows me the blueprints it is in. But not where
very easy, like I said, if X is your input float and Y is your output direction, your math is: Y = (X * 2) - 1
X * 2 takes the 0..1 and makes it 0..2, then the -1 takes the 0..2 and makes it -1..1
simple domain mapping
Do the second thing I said
need a 2 dimensional output x,y
do that for both axis
Like the "blueprint" file/icon
don't confuse X and Y in my reply with the axis
X is the input
Y is the output
or replace them with A and B
and keep X and Y as the axis
Oh I c what you mean
This enum is a type, but I want to find where this type is used
You should still be able to search for it
Maybe like this?
this looks like what im looking for thanks
