#blueprint
1 messages Β· Page 18 of 1
this throws an error.
@true igloo what are you trying to do, have a single ABP for multiple characters?
Yes, a basic set of state logic that many NPCs can use
I believe that things like screen settings only take effect when you're simulating a build
are all those NPCs using the same skeleton?
im building it then runing the .exe
Yes, well maybe Iβll do male/female skeletons. But for now just 1
Yeah strange, as I said, limited knowledge without being infront of my project to verify
ok... i mean if its the same skeleton, as long as that NPC uses that ABP, you can make it do any animation you want. Typically, you would just either add all of them in the ABP and switch states (like in a state machine) or play montages as needed.
You could alternatively load data assets asynchronously and only load the animations you want however you'd find that you aren't saving much power.
Finally, if your NPCs don't need to do anything complex, like they just idle around, you can throw this onto the GPU through material WPO.
I guess what Iβm trying to save is time. Each npc would need a clone of the anim blue print. I could make a child of a master for each npc and set a bunch of animations per child copy. But that is an asset that goes along with each NPCs character blueprint. Itβd be nice to have 1 asset, but itβs not imperative I guess.
The more I can consolidate assets and data the easier it is to scale.
Anyone know why I am getting an infinite loop error for event construct?
do anyone know why the teleport function is not working ?
it already hits it but the character doesn't teleport
The error occur during play time? or in editor time too?
That setting only work in packaged version of the game
it will not work in PIE
When I use my inventory. They are alert messages.
I just turning it into a component FYI
and when you disconnect the pre construct does the error even tstop?
my guess is you have Object X that spawn Object X
I think it's sending a message saying inventory is full when I drag something inside inventory
Because there is a bug making max weight 0 so it will trigger that message
It hits what?
Infinite error loop shows up when something happend 10000 times or a number of times that you set in the editor
Use breakpoint to find out
or printstring but Print to OutputLog
Pre construct is before runtime
Yeah I suspect the image he gave is irrelevant since it's infinite loop error (which means he got it when playing)
lol, true I was giving them too much credit
yeah it does
Try using set actor location instead
was going to try it
Do you actually need to do this on construct or can you just set the text in the details panel ?
They are dynamic messages and it's event pre-construct because it's the message widget
I'm not testing this in the editor. I test it in a build.
Yeah, pre-construct is the widgetβs construct technically
Does it work if you do it at runtime instead ?
What do you mean?
Like not on pre-construct
The infinite loop shouldn't have anything to do with setting a text on pre-construct, what make you deduct that to be the problem?
works for me π€
oh wait, I still have to press Alt-Enter
for the window thingy to pop up
nvm I don't, I just cant do it on my max resolution
otherwise the Window bit is at the top
try lower resolution for the window mode
Alt-Enter works >.>
im going to have to include that in the instructions
prob not ideal :S
you can probably change the resolution for a few pixel at the top to make room for the window bar but that sound hacky
The heck, I just noticed something
Alt-Enter Auto resize my Resolution
From 2k to 1080 p
hey everyone. I haven't used event binding before so I'm not sure why it's not working. I know the event is being called via print strings, but the event that is supposed to be subscribed is not firing. Does anyone know what could be missing? I also checked to make sure that MusicManager reference was valid
still havent had any luck with this, if anyone knows how to select from an matrix array based on XY coordinates i'd appreciate the help
what like
for(x = 0; x < 256; x++)
{
for(y = 0; y < 256; y++)
{
return index x*y doSomething;
}
}
i have a hard time remembering this
did this a bunch a a while back but have a hard time remembering the details.
what are you trying to accomplish here? To get the sphere to circle the player in a square shape?
I see your video but I'm still a bit confused
You'd need to detect the spheres location relative to the forward and right axis of the pawn then use that as a boolean to set the values?
Is it possible to hide the camera mesh in BP/map viewport?
Search for visible and untick in the details
Tried - doesn't actually turn it off
On the actual camera component, you can just set the mesh to null, but this is a SceneCapture2D and doesn't have that field
There are also settings in the viewport itself
Game view for one should hide all visible actors that shouldn't be rendered in game
Ya the camera doesn't show in game, but I don't want it to show in editor either
Untick the eye on the asset in the outliner? Not a permanent solution I know. π
i'm setting values in my material depending on the position of the sphere around the player:
That's only on the map, not BP editor, sad days... Wish they added the mesh area to the scene capture like they did for the camera
currently it's snapping only when the sphere is at an exact coordinate, instead i want it to leap between the 9 positions:
https://gyazo.com/a2ed3bfad3c4245d26a821de6a626a30
i have an array of arrays for all these values:
and an array for corresponding coordinates, my problem is an array is only selected when the sphere is at the exact coord, instead of learping between all the points in-between:
ignore the wiggle that's a different system
here's a better view of the snapping issue:
https://gyazo.com/d368c7c4ac43ee121eaa26cd36ca902b
I just child classed USceneCaptureComponent2D and exposed the mesh myself - problem solved
i usually just scale it down to a comfortable size (i think even scale 0 works for it)
With the base class I made I can just set the mesh to 'none' and then not have to worry about
i would like to rotate my projectile to face away from the normal direction of the wall or whatever it hits so if it hits a wall it would be sticking out and if it hits the floor it would be up but im bad at math so i dont know how to turn this normal into a rotation
i figured it out nvm XD
Is there a way you can change a splines starting point?
How can I setup variable here, if my blueprint inherit from C++ class that inherit from UObject, and that class has variable?
it wont show up in the variables list, but you can rightclick and search "get taskname" and it will show up
also in the class defaults it should be visible
Hello guys. I am facing a small problem where the begin overlap event is triggering a bit late and the particle effect is happening inside the wall instead of on the wall. Sometimes its at point and sometimes its inside. I think I need to tweak a bit of settings but which one?
probably the physics settings in the project settings? although im not entirely sure if changing these settings will resolve the issue
Yes, but I don't know which setting to tweak.
I did this method too, I have some stuff that load quicker than the UI. You can always use .2 instead of a whole second.
Why select and not calculate?
It's pretty trivial to math your way to the matrix from the locations
Convert world to local ref frame, divide, clamp, then round
Im confident this is ok But wanted to Know If there was any better ways to add Any ammo amount Up to a maximum limit .
does this essentially do the same thing as above? but cleaner?
Hey,
I'm currently working on a mushroom picking simulator.
The soil moisture of the terrain also plays a role in the spawn condition, which is why I need a βHumidityβ variable on my terrain, but unfortunately I have no idea how to implement this.
That on my terrain at coordinate X,Y,Z -> Humidity = 2;
On the other coordinate -> Humidity = 0.5 etc. can be.
This value should not be visually visible via landscape material, only the numerical value plays a role.
Does anyone of you have an idea how I can best implement this?
I would do that either with a volume box \ sphere of some kind or and actor that is using a distance value from itself to set the value ?
or even use Niagara system that set that?
just some Ideas of the top of my head
If you haven't already, save a reference to the currency widget by promoting it to a variable, then on your pause input get that variable and remove from parent
Max only clamps downwards, not upwards
Youd prob want min
Thank you
How do you guys link data from 2 different data tables?
e.g. i got one DT with NPC data and one with Item data.
Now I make a merchant wich obviously needs an array of items that he sells the player.
What is the best way of doing so? Currently said array is a stringArray, wich holds the RowNames that come from the ItemDT but this seems stupid , cause as soon as I rename lets say IronIngot to IngotIron I need to check every single Merchant if they have "IronIngot" in there as sellable variable π
haha
And i make sure, tedious as it is, that row names are gameplaytags
i mean it doesnt happen often but you know how it is π
okay so lets play this through
ItemDT the RowName is IronIngot
and in the merchantDT you got like a row with tags like: Item.Pickable.Ingot.Iron ?
this still requires, when you change the RowName to change all entries in merchantDB though,no?
ohhhhh
i see
Im gonna make an editor tool to help me out with this tbh
And a tool for searching for all instances of said tag
this means you can rename the tag.....all data in MerchantDB changes to the new name and then you change rowName of ItemsDT....aka you change it in 2 areas only
Is there a better way than this to manage all the equipment slots for a player? Should I just keep this huge list of different variables? Or should I use a key-value map to better organise and look through? Because right now if I want to get a variable by an enum, I have to use a huge list like this. If I use a Map, I can just search by the key, and get the value I need
i do the same, let me know of theres another solution π (i save the data as struct though)
Oh yeah i forgot rename exists
Array - component - slot identifier
haha so i (re)taught you something with my question π youre welcome LOL... jk jk thanks π
Well i havnt gotten to that part yet but ill prob just wipe it
yeye but your solution is amazing,as mentioned it only requires 2 changes and all are changed.
I do that anyway
I wish there was a gameplaytag alternative
when you create an item...you name the row anyway
Ill make a tool for it
and as you use gameplaytags.... you have to create said tag anyway too π so technically:
make item tag->copy it
make new itemDT entry->paste it.
gg
So this is a common practice. Set timer to get reference to the widget for like a second
so to make sure the widget is loaded before we get the reference
yeah, whatever your solution will be, the proposed one will do for me π changes in 2 areas is good enough.
i thought i was doing something sketchy
though now im having other issue, that is sometimes some actors spawn but are instantly killed in an explosion.
so when the settimer fires to get the widget the actor no longer exists
so i have a crash
someone told me in cpp to use weak pointers
Try using a Validated Get
You can even have excel do it for you
sorry this part is in c++
Oh
and im using IsValid
Export -> import
but its not working
Or you can delay the spawn to happen after explosion? Like set a boolean flag "IsExploding", and set a delay-loop to read the flag before moving on to spawn.
I don't think it's common practice, because you would normally do something like "Is Valid" then if false, try to call for it again until it is valid. I'm just not bothered to personally do it that way
@kind estuary
yup
like me lol
though i have an isvalid check
still crashes
FTimerHandle TimerHandle2;
GetWorld()->GetTimerManager().SetTimer(TimerHandle2, [this, TempActor]()
{
TSubclassOf<UMyWidget> classToFind;
classToFind = UMyWidget::StaticClass();
TArray<UUserWidget*> FoundWidgets;
if (!IsValid(TempActor))
return;
UWidgetBlueprintLibrary::GetAllWidgetsOfClass(GetWorld(), FoundWidgets, UMyWidget::StaticClass()); //crash happens here.
TempActor->WidgetRef = Cast<UMyWidget>(FoundWidgets[0]);
}, 1, false);```
so my crash happens after the isvalid
I have a gut feeling that it is still executing the next line after return; basically your "if(!IsValid) is doing nothing
This is hacky π unpreffered
hows that possible
Does using "return" break out of the entire function straightaway?
So that isn't the "proper" way?
And skip the rest of the code?
Yes
it should. i mean its a return
Hmmm
Break wouldnt
seem to have forgotten how to set the widget ? just shows as empty in set widget
It doesnt hit return π debug it with a breakpoint, its not gonna hit that return
What does the crash actually say?
Try
AUnit* TempActor = this;
FTimerHandle TimerHandle2;
GetWorld()->GetTimerManager().SetTimer(TimerHandle2, =
{
TSubclassOf<UMyWidget> classToFind;
classToFind = UMyWidget::StaticClass();
TArray<UUserWidget*> FoundWidgets;
if (!IsValid(TempActor))
return;
UWidgetBlueprintLibrary::GetAllWidgetsOfClass(GetWorld(), FoundWidgets, UMyWidget::StaticClass());
TempActor->WidgetRef = Cast<UMyWidget>(FoundWidgets.Num() > 0 ? FoundWidgets[0] : nullptr);
}, 1, false);
See if it works
Instead you can make a safe getter.
Which checks if the widget exist, if not it creates the widget, updates the ref and returns the updated ref.
If its valid it simply returns the ref
Whoever gets the widget first will create it
No more race condition
Or is this widgets in widget components or smth?
the widget exists. what doesnt exist seems to be the actor
problem is this is one of those bugs that happens only sometimes
Where is this code located..
its in the begin play of my unit
The unit exists by then , always
yes it exists but idk sometimes units are spawned in explosions and they die immediately
must be that
They cant die pre beginplay
they appear on the map, then they die, and ahve a the settimer of 1 second to get the widget
by then they were killed by the explosion
yup
You shouldnt need one.
because at the start the units are spawned before the widget it seems
Ofcourde
so i make them get the widget reference 1 second later
no the widget is spawn somehwere else
Thats not very logical
If they own it they spawn it
Pass in their own owner as the owning player controller
You're even using getallwidgetsofclass, despite managing widget creation yourself ?
Thats... questionable
found it. the widget is being spawned in the controller
Is it s common widget for all units? Or one for each unit ?
Are they always visible or only when selected ?
What do you mean by this? Isn't this just a map?
its just the main widget, where everything happens
Could be a map, depends on what equipment means and if its multiplayer
So how come every unit needs access to it ?
because of icons and stuff
so i just communicate with the widget to draw the icon
it does
@kind estuary tried it out yet?
Does anyone know if the default UE subtitles from Dialogue Waves can modified in a blueprint-only project? I have two issues, the text is way too small and Unreal's default Subtitle system just seems to display the entire Dialogue Wave text at once. Is there any way to splice the text up? Everything I see on this topic appears to be C++ related
yes, so far no crashes
but this is one of those crashes that happens only when you are not expecting
I had little luck with it.. not very customizable
Are your units spawned from the playercontroller aswell?
If so, let it pass in the widget ref aswell, after spawning it
I guess I have to build something in UMG then :/
yes
they are
great idea
well actually they are spawned from the controller and from buildings
and they are also spawned in the c++ there is one function that spawns them in a kind of orderly manner
i prefer to do it in the unit
because of this
But also the playercontroller would be their owner
else i will ahve to do it everywhere.
imagine i have to remember that everytime i spawn the unit i cant forget to also give it the widget ref
its better to make the unit get its own refs
i think
Its easy.
Always spawn them through the controller
always
Let them input a vector for the location and only maintain the spawn logic in that one place.
Hey Guys
Just a question regarding this
I've made this graph exactly the same as the following video.
https://www.youtube.com/watch?v=iqi-kg7n-io
Would any one know why The visibility is not working correctly?
I think the first step would be addressing:
Source:
https://forums.unrealengine.com/t/how-to-make-a-variable-public-and-editable-when-the-eye-icon-next-to-it-does-nothing-when-im-clicking-on-it/790869/16
Issue Resolved
To reword this a little. Try to keep the spawning happening from one place. Personally, I would make a manager for it but pc can work depending on the end goal.
If anything ever needs to spawn a unit it has to do so through the one place instead of using the spawn actor of class node directly.
ah so create a function in the controller that spawns it
then call this function from any other actor by casting the controller
Pretty much.
Same, im also using a manager.
Also just making a getter is a valid path
In the unit class
GetMainWidget () -> get owner -> cast to MyController -> get main widget
you need to explain what 'is not working correctly' means. What is it doing and what should it be doing?
Sorry I added context.
Apparently on the newer versions you need to assign variables and bind it to the widget element variable.
I'm not sure what you mean by that statement. You need to explain what it is doing and what it should be doing. Generally, there tends to me many ways to do the same thing.
Yea, managers are much better for helping contain the code in one place. I find it makes it easier to get access to stuff as well.
Especially when the complexity increases
I often create a manager for stuff even if it only ends up have 2 or 3 vars and a handful of functions. You never know if you'll need to add more stuff later.
Is there any way to replicate set actor rotation? Without having to use RPCs
Yeah if there's a SetControllerRotation built in or I'd have to make it myself
you can always replicate variable, eg replicate the rotation of the character
I guess, was hoping there was something built in, cheers
and on every tick, you want your character rotation to interpolate towards the TargetRotation
Not sure wym by built in, try to read the compedium in #multiplayer
Yeah, i had camera manager and even npc manager π
Placement Manager, stats manager, action manager, inventory manager, level actor manager, dialogue manager, notification manager, Point of Interest manager, everything gets a manager haha. Need to keep the code in line so it doesn't get a mind of its own and mix with the wrong crowd.
you need a Manager manager to manage the managers
Max 8 managers per manager is optimal i've heard
after that you need a District Supervisor
i cant spawn a simple projectile sphere. Im using get actor eyes and spawn actor
yeah i know, probably the dumbest question ever asked regarding unreal engine
It may be colliding preventing its spawning. Try setting the collision settings to one of the always spawn options.
when in doubt print it out :D
Anyone know what might be causing this the train is following a spline https://gyazo.com/5aaf43b4aebee8ce52959b2efc9b8aae
it just won't angle correct and face plants the track when going vertical
Seems like it got mismatching directions
As if the train actor was upside down while component was turned or smth π
needs to negate rotation
When confused , post code you used
is it cause its only on the x vector?
On the bottom Return Node , add a Multiply by -1(Float)
or, World coord space on bottom one
a lot better results with the multiply by -1 float
I will try the world cord space on bottom and I will show u result of the -1 float
already tryed π , to no avail π
what does it mean?
use print node π
this is the result from the return node adding a multiply by -1 float when I changed the local space to world space it rotated the train backwards
Looks alright
Have you tried spawning it at a pre-defined location? Otherwise, determine if perhaps the location is incorrect by printing it out?
Except to steep curve
yeh I can mess around with the curve looks way better though ty
what is the function for a pre defined location? i tried "make transform" with no avail. Idk how to print
btw when i play and i see the outliner, i dont see any sphere spawned
You could just disconnect the input on the spawn node and type in a value where you know you can see and nothing would prevent it from spawning. First I'd say try putting a print string node by your spawn node and see if you actually get the string to print on screen, if you don't that means your logic isn't reaching the spawn node.
i created the sphere by creating a BP, adding sphere compnent, adding it to root, adding projectile movement, in costruction script i binded the projectile movement component to the collision component and finally i created a variable
Like Datura said, just put a Print node before the SpawnTelep node, to see if your logic reaches this point or not yet.
Alternatively, use a Breakpoint and see where it flowed to.
i putted a print node and it does happen nothing, i guess my game logic is off
You mean the Print did not show up?
Then you need to backtrack along the code to see at which point it got broken.
Post your code before the SpawnTelep so we can see
im working in a blueprints project
Ya so take a screenshot
windows+shift+s
mark the area of the code
open discord(make use you click in the text box)
ctrl+v ->enter
tada picture is in discord
this is the code
im trying to follow Chatouille s second comment in this post https://forums.unrealengine.com/t/it-cant-be-this-hard-to-throw-a-projectile-and-teleport-to-it/747079/2
- You're specifying an asset as the object to check if it is valid or not. Assets specified like this will almost always be valid when doing Play In Editor stuff, so the "Is Not Valid" path will never be called.
- You don't have the input execution path of the print string connected. The white wires show you the execution flow.
Why would you need the IsValid check for?
prolly for the actor that has been shot
1st time it aint valid as theres nothing to teleport to.....2nd time around though(as 1st time is the shot) it is valid and now he wanna tp there
- but thats how is in the post i linked? and to him he is working? maybe he organzed the asset in a different way
red =remove...white line= you need that
- i deliberate chopped the connections off for trying first the only Non vallid path, and secondy for trying the pre set transform location
No it isn't though
If you look at the post he actually has a variable hooked up
The "IsValid" node gives you a place to input a value. You've decided to select an asset that happens to be named "telep" which happens to be the name of the blueprint you're trying to spawn and the name of the variable you're trying to use. What you've done then is selected the "telep" asset in the IsValid check node which will always return valid.
big oof now is working
yep this is it. thanks guys
whats a good way to store an inventory item's data
im using a struct right now but i feel like theres gotta be something for it
something like Scriptable objects from Unity?
Data Assets
Or DTs
thanks ill check it out
should i have 2 types of data assets
one for base item and one for each item
Why DA over DT?
If even π
Guess pro is being able to use tags as id's natively?
would i make a unique asset for every item
Thats the part that scares me lol
But ofc you can bulk edit them so
It becomes much like a dt anyway
You can also easily make custom editor widgets that edit them π
Subclass data assets π
1 Per Type I would assume
Group them with similar functionality
PDA_Sword could have 3 DA's (Basic,Rare,Unique)
then a different PDA for Consumables, and another for Shields : Each with there own DA's
Inhertiance in other words
To compound data
Guess it also supports limited function implementations
Which is more than dts easily do
Youd need a struct library to compare..
They also dont take instanced uobjects do they
I'm disabling my editor utility stuff atm cuz I can't package π.
I never make module or editor only module but I think it is time now
Gonna try to make editor only module and move codes there
Work it out in paper. You most likely want some state, things such as bInteracting
When you want to pause the game, check if the player is currently interacting. If the player is interacting then don't pause
Disabling ?
Hmm havnt tried packaging directly yet
Yea I commented out my utility stuff
But i assume they're excluded ?
I thought so too but in calling material editor stuff in one of my library
The code itself is nothing special, just wrapped in #if WITH_EDITOR
im new so im asking for a blueprint code to do the job since i dont know many blueprint codes
I tried with if with editor but it still not cool with it. As long as I have dependencies declared in the main build.cs it won't compile π«
I have a UUserWidget that implements a interface. The EventGraph has these 3 events that do nothing. Is the purpose of this so that the Widget implements all the interface functions even if they don't do anything?
Nah thats true, no export or whatever, right ?
So custom editor module it is
No export or import. Just changing material slot names in bulk and ticking materialinstanceconstant parametre
Yeah I will try editor module
You can if you make the keys into an array and then get their values, but you can't iterate through a map directly
maps have a function for getting an array of the keys
Point of a map tho is to have random access. You generally should know what you want from the map and then it can find it quickly
What does "Server only" mean?
It happens on the server not the client
Oh is this a multiplayer thing?
If your game is single player just ignore it
Ah got it thanks
What does it mean that some are gold and some are gray?
This is under the interfaces tab
Best saying ever. I use Print so much
Some will give an output while others are just calls for the function
So all the "gets" will return whatever you're trying to get while "sets" are setting a variable on your class.
I think Gold is Event/No Return Node
Gray is Function with Return
Sometimes you can have both, so it calls the function, does what ever it needs but then also gives you an output.
That's right
Yup
Ok intersting. Thank you
Hello! Thanks for any help for this! I always struggle with this menu. I want something to come down (with gravity) and land on top of my player character, but not pass through the floor (oh and also not cause my camera to zoom in, I'm in third person). basically I'm dropping an anvil on them. My player character is a pawn, what should I choose in here and set stuff to in other actors? I can make my floors and walls whatever and as a little bonus it would be great if it could go through walls as well, though I feel like that's probably harder.
Do you want the anvil to fall through your character or just stop and fall to the side?
fall through it
over it I guess is a beter wird since i want to kind of hide the character for a few seconds before the level restarts
Wait tbh, I don't think it really matters.
For the Camera, is it using a spring arm? (I haven't used Third Person starter in a while). If it is, the arm might be doing a collision test which is the Visibility trace I believe, you can set that as ignore/overlap.
As for that, everything makes sense. Maybe change CharacterMesh to overlap if you have a mesh on your character or it will stop the anvil from falling.
can someone explain me how to use Get Timer Elapsed Time by Handle?
I believe it returns the duration/time that the timer has been running for.
Say you have a timer for 30 seconds and you need to know how far through it is, you can get it with that.
yeah I'm trying to get the time elapsed between the same Exec triggering
but this doesn't work
but perhaps there's a better approach
The Timer Handle isn't valid so it's adding nothing, unless you've set up the timer before hand.
I guess I need to use Game Time in Seconds
Say your STBE has the event attached to it, you have a 30 second timer and you've triggered it. You've set the Timer Handle variable because it's been triggered, then you can call for Get time elapsed
The Elapsed Time will return 0 or 30 (not sure which one it returns)
thanks for the help! I also had to set it to query and physics so it wouldn't pass through the floor
0 it returns since the timer just started
Sorry, missed that. I sometimes forget to check that myself
thanks for the help mate, I tried this but doesn't do what I need.. I need this to run inside a bigger logic, and right now it looks like it blocks the rest from executing
All good, that was just an example. I haven't personally used it.
Are you just trying to track time between events ? and record them in an array
yeah pretty much
but that's since creation, not exactly suitable in my case
you can Math it to what you want
Array(1) - Array(0)= time elapsed from 1st index to 2nd
I'm going to try that
how do i make an array of a map
i am trying to make an array of an item slot
and have the item slot contain a data asset AND an amount int
Make a Struct of the Array
you mean array of struct?
or whatever object/actor whatever you use
Then you can use it either as a key or value
thanks!
i ended up making an array a struct for inventory
the struct consisted of a data asset and an int for an amount
I dont like how maps are restricting. like i cant have certain functions like get or length
its a list like any other i dont see why there are restrictions
Question, on UpdateSnap could I have just called the event instead of tapping into its execution? Where the read circle is, could I just connect it? Just trying to see if it is basically the same thing.
shouldn't this Custom Event fire every second?
That will give you undesired effects, but its ok
Either disable Physics on the sphere or Enable Collision
Just dont do it on tick
Do it once (On begin play)
thanks!
Hey I want to create a fixed pattern line trace shotgun spread for my game, how would I do this in blueprints code?
i want it to be able to go through objects but still trigger on component hit events
should i make it just go through everything, then instead of using on component hit, check if the sphere ever overlaps an actor? or is there an option for it in the details tab
If you dont have Collision, then Physics cant work (Can punch a ghost)
Just uncheck this to remove error
it needs SOME collision to be able to trigger on component hit effects right?
Uncheck the Simulate Physics
I don't want to cross-post but lmk if you have any insights on this please: #chaos-physics message
Does anyone know how I could make swords collide? So during the sword swing animation, if the sword collides with another sword, it should stop/stay there, instead of just going through.
Same with other things like shields, walls, etc.
how would I make the animation stay though? it kind of bugs out
prly need to make an #animation for swords clashing to run on hit
k
Hey I want to create a fixed pattern line trace shotgun spread for my game, how would I do this in blueprints code?
my first thought is some vector math
yeah but like how
I'm getting hitches from async loading π¦
Anyone have a link to best practices for native game logic with blueprint subclasses?
Iβm hoping someone has a naming convention that clarifies the back-and-forth of a single task across the native-bp boundary.
Are you doing lots of em
yup
I probably should have made a manager π₯Ή and load them in chains
too late for that I guess
In theory Async load shouldn't hitch
but we are talking about Unreal (As Laura says)
Still weird
If its that many you could still breaknit up in a loop
Do them sequentially
the way I did it was by creating an object (for the purpose of loading) for each soft object. Perhaps that was a bad move
can't figure out a way to que them up now
If macros are as they say, duplicatino of nodes,
macro inside a macro should work
nvm , not like that
sequentially is ok, that's a macro with a loop delay
something like this
or inside the loop
internally
@gentle urchin π€ I will try that, cheers
only 'issue' is that if you keep on piling objects on the array, it will never complete or reset, but maybe that's not an issue : )
If that would be an issue for whatever reason, you'd split them in two arrays, and do batches of say 20 items each time or smth
common loop behaviour, ofc
also another issue is that some Soft object depents on other Soft Object.
Eg, Material can only be loaded after the skeletal mesh is loaded.
but I suppose I can just load what ever after the loading screen and that shouldn't matter
when I'm opening the data table, I will load them again anyway
so I can try what you've shown right after map load
and then Just load normally after, which shouldn't be an issue if the soft objects are already loaded
you could split it into categories i guess
"load Materials" -> when done -> "load skeletal meshes"
or the other way around
Sounds good. Right now I kinda only pre-load the icons and that's what caused the hitches.
Then when I load the Material and skeletal mesh for the first time I get this black artifact
but switching between what's already loaded will look seamless after
so yeah, I would deffinitly look into pre-loading them
in a sequential way like you showed
Surely loading 1 obj at a time shouldnt cause any hitch
In this video, I'm going to show you how to set up a Health and Damage System in Unreal Engine 5. This system will allow you to track the health of your characters and damage they've taken in game.
This tutorial is designed for beginners, so if you've never worked with Unreal Engine before, don't worry! I'll be walking you through the entire pr...
this helped me a lot
Have the stat as component instead and use event dispatcher to broadcast when the Stat is changed
Calling a function that only update a specific widget is not good,
You should just be able to broadcast Stat change. And ANYTHING that subscribe to that delegate will do the update in their end
hi
Hey guys, bit of a dumb question, I think. How do I keep an actor or a component from unrendering when behind another one? In this case, I have a widget on world space with a post process material overlay so it displays over other objects but, when it's completely covered y something else, it just disappears like this. When selected, it's back being visible, but it disappears again once unselected. I bet it's a simple setting but I cant find how to disable this. Thanks!
I think it won't be needed, but just in case this is the material it's using as overlay on top of the basic widget material
Hoping this is the right channel. Has anyone ever encountered a bug where going through a level transition breaks your AI movement (walk/run anims) and behavior tree? Like the AI just stands there instead of performing its actions? I built the transition with blueprints.
ok so im trying to replicate rotationg of my charcter
but whenever i play test, the joystick controls both players
i have another input that adds velocity and it works correctly
i also did in the same way with rep notify
i added a print and it just prints from client 0 for both screens
any ideas why
Does anyone know how I could get a specific slot, lets say "full body" to not run in this layered blend?
Btw, "test" is the main state machine (ie. running, walking, jumping)
guys how do I customise a scalar value of a post process material using a blueprint? I started with that but don't get where to move on to
Forgive me if I'm not understanding you, but you're using parameters inside a custom material you created, right? Have you tried creating an instance of your material in the blueprint and then modify whatever parameter you want?
I mean, I haven't tried modifying parameters from post process materials, but I bet it's pretty much the same as modifying parameters from any other kind of material. Again, forgive me if I'm wrong
Are you using the same controller for both characters?
the same class?
I'm fairly new here so honestly, I'm not sure if controllers can have multiple instances of the same class, but I'm guessing your controller is "possessing" both characters and then applying the same input on the two. If I'm understanding you right, maybe you want to create a different class for the other player from where you reference the controller and copy only that part of the input. Am I being clear '^^?
it should work automaticly tho because i have another input under space and it works fine
Space input doesn't get replicated?
no it does it works fine
its just that the joystick control the same player
the space input controls different characters
Hmm... Then I might not be getting what you mean, so why don't we wait a bit and see if someone else can help you better than me? Feel free to DM me if you want me to try any further tho ^^
ya id like to try more
I am getting an "infinite loop" error. What I've done is converted my inventory system into components, but I also made it so the inventory can be on other players (not just NPCs) and I am trying to reference the same component I am coding in. Is that the reason I am getting an infinite loop? When I use my inventory (and force a notification) it says the notification widget (on event construct) is an infinite loop.
We can't do anything unless you show us the code :P
It's one of those bugs where IDK what code to show you
Normally if you click an error it shows you
But I plan to convert back to the way it was to see if me referencing same component is the issue.
Did you disconnect the stuff on the pre-construct?
Take not of the max weight being 0 (which is a bug) but it is triggering a notification message within the inventory system (saying item is too heavy to be added to inventory)
But this is the issue I think
I am trying to reference the character component within the component
That is the "extra" step I took when converting to components
Disconnecting gives same error
Wdym? The loop is sending you to that pre-construct event isnβt it?
Well, it is trying to send me a message saying the item cannnot fit in the inventory (as there is 0 max weight)
Right, but thatβs not what I asked
If you get rid of that pre-construct, does your infinite loop go away?
When I delete it and keep disconnecting things it goes right back to the actual notification function in the UI widget
I felt if I converted back to just detecting AI it will work again.
Nah something else is wrong there
Show the code where the widget is being created and added to viewport
But I am doing this inside the character component, is that ok? Or does it need to be done in the character blueprint?
should be fine in theory, but what is calling that Create Inventory Widget function
OnBeginPlay
of what
Inventory Character Component
hmm try moving it elsewhere
Not sure if anyone has ran into this issue,
I have a characterBP that has a C++ class as a parent.
I bought an asset on the marketplace that uses C++ and the base character also has a C++ class.
Is it possible to somehow create a child of my custom C++ of the asset's character BP? Essentially inhereting both C++ code?
Progress.. finally. I disconnected way back to the notifications and stopped loading the UI widget and the loop error went away
Wdym? What kind of asset ?
Are you loading it on tick or something ?
So Iβm currently trying to parent the blueprint with a βdummyβ on both the left and right side of my character, is there anyway to do this?
I am trying to set this up because I want to use βdetour crowdβ stuff but only for the left and right side of my character. (Enemies are supposed to follow the main character but avoid its left and right side)
Also any documents and examples of this are greatly appreciated. Iβm trying to learn as I go with this project
I just bought the Ascent Framework asset in the marketplace. Its basically a plugin you activate and you plug their Character base BP that has their C++ code linked. Im trying to figure out how I can inhereted my C++ code on top of that.
Youβll need to reparent yours to that one
After you Construct /Create something , there should be a blue Return value
That is your Texture, off of it you should be able to set Size , or Width/Height or something
You might have to wrap it in a size box and Align to Fill
Not sure , I never messed with Media Texture
Well if I create a child of the assetβs Character BP and then I reparent that child to my C++ i just loose evertyhing afterwards no?
I'm trying to make a camera that pans around the character by rotating a spring arm that has a camera as the child component. When I rotate the spring arm in the viewport for the character blueprint, the camera is always facing the center but in game its always facing the front of the character. What should I do?
#materials
there is also nothing people can do without seeing the code, but for future reference the material graph is not bp :P
Looking good!
How did you end up setting the Matrix
for my game, I'm making a mission editor where the player can choose where on the map they spawn, how do I move the player starts to where they need to be before a player spawns in?
Single player?
Rather than moving a PlayerStart object, you could override ChoosePlayerStart in the Game Mode, find and feed in a reference to the actor that you want to use as the location.
multiplayer
how would I place the actors there before the player spawns? There won't be set locations for players to spawn, it can be anywhere in the map
in the chooseplayerstart function, could I spawn a playerstart in the right location and pass that as a reference?
You normally wouldn't want to allow players to choose a specific location. If you have a mission editor, I would think that you're setting positions of player starts and would allow players to choose from valid available start points.
How do i remove the collision entirely from a mesh, so to save performance?
Just this?
or there's more to it?
Hey, I want to gain some clarity on fundamentals of how engine works (and things break)
If I have a Timer that calls an event very frequently
And that event has slow code - like, an unreasonably super dense calculation, or even a delay() node.
With such situation, could it happen that the event gets called multiple times, while the original call is still executing, leading to chaos and overwriting values in the variables it operates on? π€
Hi.
Level streaming.
I have a starting level with just a CameraActor and PlayerStart that loads a BP_LevelManager.
In that blueprint Event_BeginPlay triggers LoadStreamLevel of a TitleScreen_Level.
That level streams in correctly.
In the BP_LevelManager I have a Event_Enter (the keyboard input) that SHOULD trigger a print string (for debugging bc the real load swap wasn't working). It does not.
I actually want it to unload the streamed TitleScreen_Level and load a stream of the Gameplay_Level but it seems getting the Print String to work will resolve that.
Any thoughts?
It's for a flight sim, but I think for now I'll go with this advice and have player starts at airfields, thanks for the help
it's both, here's the corresponding mat:
The box looks like Box is moving in a box path, but sphere is a smooth rotation
Its hard to tell because of the material change is trippy
Maybe the Boxe's Clamped ranged needs to be larger?
the values are based on the sphere's smooth circular path, the smoothness should match
but yeah i noticed it looks like it's moving linearly
Looks like -1 to 1 needs to be -1.3 to 1.3 .... or something
changed it to -2 to 2, no difference
hmmmm
I see you got it down to 4 arrayMatrix, are they Cardinal directions(N,S,E,W)or the corners(NW,NE,SW,SE)?
Can I somehow create an object in array from editor?
Make a double for loop in construction enabled by int > 0.
Set int to 1.
Editor freezes π₯Ά
In order to make a player character's collision capsule rotate to follow the camera direction, does the camera need to be set as the default scene root component in the character BP?
why would you be rotating the collision capsule
For a character that is always oriented toward the camera direction and freely moves in 3 dimensional axes (except for Roll/Z-rotation)
still dunno why you're trying rotate the capsule itself but π€·
I assume that's the only way to keep collision accurate to the orientation of the character model when rotated
How do I check to see when the right mouse button is clicked?
Is this something I have to do with the enhanced input system?
Depends, is this for a widget click or just clicking anywhere
Clicking anywhere
Then yeah, you should setup an input action with the #enhanced-input-system
Read the docs and look at how the templates do it, you should be able to figure it out
hey, sorry to butt in. I just don't know the channel were we can ask about extremely basic questions?
Super new to UE
#ue5-general or here, we can redirect you to a better channel if needed
ahh ok thanks. I think I'll try general.
Just trying to figure out first person movement and the UI
Thereβs a first person template you can build on
That's the issue. It looks nothing like any video tutorial I can find [nvm, finally found a good guide on how to get to content]
there's an event for right mouse button nvm do what neo said
Yeh, except that system is deprecated now so itβs better to learn the new one
I'm having trouble too. I have a character, character shoots bullets, that's working fine, but if I pick up a powerup to say, make the bullets "should bounce" from the projectile movement component to become true, I cannot seem to do this because the only actors they will recognize is the power up, and the character that collided with the power up, and the bullet, somehow, is not as interactable, even promoting the BP_Projectile to a variable in the power up, I cannot drag it from the content browser, and because it's a bullet that exists for 3 seconds, making it a level asset that just exists in the void doesn't seem plausible either
Where did you promote it to a variable ?
And sorry rephrase that, whatβs not colliding with what exactly?
the logic I feel is simple, player spawns bullets, to change the property of what is shot, change the BP_Projectile of that object being shot, as it'll only ever be itself
Is bouncy bullet a child class of bp_projectile?
no it's just an actor, making it a child of bp_projectile has the same issue when trying to address bp_projectile as a parent
Ok, is this bouncy bullet supposed to travel through the cube, or bounce off it?
the cube is just a power up because I'm not 3D savvy, it would change the property of future bullets fired to become bouncy
basically A hits B, doing so effects C, but C is invsible to event dispatchers, parents, cast binding. I feel like there's a principle I'm not understanding
Ok, but you want to hit the cube with this initial bullet first, right ? Whatβs supposed to happen to that bullet next ?
the player runs into the cube, like old fashioned games where you run into the thing to get the thing
running into the cube should change BP_Projectile's projectile movement component "should bounce" variable from false to true
the player spawns bullets through the spawn actor so it doesn't know what BP bullets are either, technically
Oh ok thatβs much easier
yeah
I feel like solving this everything else would be smooth sailing but my kryptonite is making simple things very hard
Ok, so what happens now, does running into the cube work as intended?
no, but I had an idea of changing the variable bullet to a class variable instead object to see if that'd make it populate from the content browser that didn't help I have no ideas.
Yeah you canβt really reference something that doesnβt exist yet
But itβs not too difficult to achieve this
unity gave me a lot of bad habits apparently π
Make a new bool on your player, HasBouncyPowerup, default false
Make your player make to overlap the cube and vice versa. Then, on the player, use actorBeginOverlap , cast to the bouncy cube bp. On success, change the HasBouncyPowerup to True
Lmk when done and youβve tested the overlap works with a print string or something.
hi can anyone help me with the maths here, i need to get the input direction relative to the player's current direction, any advice? even if anyone has pointers towards what i should look into
what kind of movement you want
simple enough
Good. Now on your BP_Projectileβs begin play, get player character, cast to your char bp, branch check if the power up bool is True, then get the PMC or drag into the graph, set bounce to enable
Interesting, it'll take some getting used to but I think this is the way it is, thanks Neo
i am using it to add a dash that takes the input, and turns it into a directional vector based on the player's rotation. So pressing left will return a vector that is left of the player, pressing right returns the right vector, etc, etc
so i know the maths i gotta do involves the forward vector and the directional wish vector, but im not sure what to do with them
There are still times when you can directly create variables of a certain bp type, but other than doing so inside the level blueprint (which you generally want to avoid using), I think it mainly works for widgets inside the HUD
right
There are get forward vector and get right vector functions you can make use of
Nvm I guess you already know that
yeah, it would mean having a different calculation for each possible vector, but ik there is a way to do it with the wish vector and the forward vector, i just cant figure it out
oh. wait. I just realized something, when you create the bullet, for the time it's created you have access to the object
Neo's bool still applies to this, but it opens up all the doors I had wanted anyway about modular powerups
Right but it does get destroyed eventually. Maybe you can get the class and set the bounce from there, but I havenβt tried that
right, ideally changing the class, but for now this will do until getting lower level becomes necessary, just wanted to update that I completely forgot spawnActor has a return value of the spawned actor 
π€I canβt test rn but what happens if you multiply the fwd vector by the incoming action values and add it to the location, then set the actor location to that (you can interp later maybe)
Iβm thinking it should be as simple as breaking into 2 where W/S uses fwd vector and A/D uses right vector
facing an really weird prob;m, baiscally i want to my array to get reset however at an index i want to keep the value. when i try to access the array via event tick it only work for once then if i test other values array reverts
at event begin play the loop changed all values to 0 then it re put the value at given index after completation of for each loop. Now evnt tick do shows the right value for once but if i change the index and try to get the value; the problem occurs
I donβt rly understand what you mean but whatβs this whole thing for?
got it working, this seems to do the trick
which part u dont get have u even checked the code?
Yes, I looked at your code but it didnβt make much sense what youβre trying to do
Nice
Noice. If you look up or down, might that forward vector be pointed up? And that would impact your wish direction
this the array and i want to make all the item values 0 but keep 2nd at the value its ie 1
Unless you don't gotta worry about it
so at event begin play i use GET (copy) and stored its value ; then i used for each loop to change all items to 0
then i took that variable which stored before the loop; then used set array elm to set it back to the index ( 2)
its getting the actors forward vector and not the camera vector so this shouldn't be an issue, will clamp it just in case haha
Oh that's true!
now Im checking the array's items via event tick
let me know if i am able to explain it
btw for anyone wanting to use this, make sure you normalize it, just accidentally sent my player flying lmao
Lol classic
If you leave "Active Index" and "Given Index" as 0, what does the event tick print out?
Yeah, I understand what you mean now, I was trying to figure out where you went wrong but needs debugging with print or breakpoints like Datura said
active index supposed to check array via event tick
But if you leave it at 0 as well as "Given Index" at 0, what displays? Based on what is happening here, you're only storing the value of "Given Index" which means looking up "Active Index" will only return a value other than 0 if it's set to the same value as "Given Index".
How do i set the restitution value over 1? it wont let me
if i type active index 0 (which item is 3 before the for each loop) at event tick and i dont change the value via BP slider; it would show the item = 0 which shows that EVENT begin play code has worked BUT if i change the active index via BP ; it will revert the older value DONE BEFORE the event begin play
Idk much about phys mats but I imagine you need to check one of those overrides first
Nah doesnt work, i think i have to go cpp mode
thats where the clamp is defined in
But does it show 3? That's what I want to know. Don't assume. Test.
I would imagine its disabled for a reason but π€·ββοΈ
if i unplug the loop code then only it will show 3
I didn't ask you to unplug the loop. I asked you to set Given Index and Active Index to 0. You should see 3.
Is that maybe an overridable bind ? Check the + sign in the panel
event dispatcher?
I am trying to add spline points between spline points on a spline actor in the construction script.
I figured I'd do this:
- find the total amount of spline points
- for each spline point, find it and the next point's distance along the spline
- subtract to find the given distance and then divide that distance by n+1 of the intermediates you want to have
that way if you want 1 intermediate, you want it at the halfway point (d/(n+1)) = d/2;
- take the current spline point in the loop, get the distance along spline and add the d/n+1 value to it.
- get that new distance and find the vector
- add new spline point at the vector
It sounds good but works wonky...
It adds spline points at already existing spline points and after a certain point, they go away from spline.
If I set the value to 2... all hell breaks loose...
So, then it is operating exactly how I described. You won't see anything other than 0 unless Active Index == Given Index because you're retaining the value of "Given Index" only.
All the others you're setting to 0.
Kinda, yeah. I havenβt heard of it before tho, so not sure if itβs doable in bp
there is no on destruction
No no, not right click
im telling u now if change the active index at runtime to anyother value THE otther items which suppsed to be 0 would give the preivous value
Check if itβs in the overridable functions in the left panel
u can check the code from ur side
use simulate and try to use active idex value at the BP detail pannel
idk why other values are turning back ( they should be 0 ; as the loop code supposed to turn them 0 )
@dawn gazelle
that saved the day
https://stackoverflow.com/questions/14184515/action-delegate-uses-the-last-values-of-variables-declared-outside-foreach-loop scary thought but it's not this is it
-__-
My math-fu is not as great but shouldnβt it be (dist(N+1)-dist(N))/2 ?
lemme check
why /2?
this?
I thought you wanted the halfway point between this spline point and the next
ah, i set it up with the # of intermediates you want +1
so 1 intermediate means divide by 2
2 means divide by 3
etc
so yeah, that's correct π
Might need to ensure it doesnβt go past the last spline point if you donβt already have that in place
yeah i just added a fix for that
but it doesn't change the fact i get extra points i don't need and past point 3 it's way off the spline
Also look here it just keep having this weird problem even i try to set a new blank array to older one with al items being 0 and num of items being same. This is happening when i change the active index via detail pannel at runtime
It works flawlessly on my end as I described. Only when I set Active Index to Given Index will the stored value display and all others show 0. Maybe try restarting?
π€ floating point error maybe ?
I added another layer of debug
damn i never faced error like this
have u tested it with sim mode?
@lunar sleet here it will print a text near the points. at intermediates = 0, it looks good
That looks to be the cause.
hm?
Values are retained in simulated mode.
π
The actor doesn't "begin play" in simulated I imagine.
if I add 1 intermediate....
or something along those lines?
damn so is there any node like BEgin sim??
Begin play should still fire
Shouldnβt matter really, you donβt make games to be simulated. You can just have something change that index value on a timer if you need to test further
i bet ur right
It does fire in simulated XD
ofc but i never new this shortcoming of simulation mode
was Datura said it wont retain
Perhaps its just in how the variables are handled? I don't know as I don't use simulated myself :/
yea but i used to use that mode for checking now i wont use this mode
Itβs prly not a shortcoming but the way it was intended. If I simulate and hit play and move a wall, when I stop the sim it moves right back
Itβs possible this is a side effect of how the mode works
i used to think its a mode with no pawn support
now it looks its a "SIM FORWARD" thing meaning it wont going on if conditions are change
meaning if i change active index *it wont count the change
instead it will use the the original values
So are they all ok except for the one at 10..4?
no, they keep adding too many
I have 4 points
I expect 3 more to be added totalling 7
i get 10
so something is doubling
Is it possible itβs counting the ones youβre adding as you add them?
Right yeah
so I set the number of spline points before the loop
it cannot go past 4
or whatever number i have currently
Iβd set a breakpoint and step through each node to see what actually happens tho
Prly some weird side effect
Cant call this function its an BlueprintImplementableEvent
UFUNCTION(BlueprintImplementableEvent, BlueprintCallable)
void RemoveIcon(AMainBat* Actor);
@lunar sleet the first loop works 4 times, which is what i expected.
The second loop will itterate 8 times...
hmm
Is this code within a const function or something?
its inside the OnPaint function
overriding it
Which looks to be a const function
its a blueprintimplementable event
sorry yup spagheticious
I think the point is you canβt do it inside a constant function
So move it out of there
OnPaint is const though, which means it's not supposed to be changing things and if you call a function that isn't const inside of a const function I think that is what causes that message.
so maybe create an event just for this
and in that event in blueprint
i call the removeicon
sounds a bit hackey
Shouldnβt this just do one thing on each loop for a total of 4 loops tho?
OnPaint isn't supposed to be used to manage changing things like this. You may as well use Event Tick.
Yeah, thatβs odd, Iβd check the input array maybe, in case it somehow gains new elements as it goes
But I wouldn't recommend that either for looping over things like that to check if its valid or not :/
its drawing icons. The only thing new that i added is, if the actor is not valid (its dead), then remove the icon.
its working now
but what is the issue with doing this in the On Paint?
SO i have an array of texts and when i do remove item and remove the item form the array it removes it but shortly gets added bakc bc the length goes form 3 to 2 and thne the next time it prints the length its back to 2 its not like its perm removed what am i doing wrong
Try adding a resize node, removing elements from an array can mess with the indices
the thing is its removeing by a text variable and not index
Youβre removing an element from the array, I imagine
when you remove, the index gets shifted, dunno if this was talked about
Again the problem is likely because OnPaint is const and const is a promise that you're not changing things about this object. By attempting to call a function that isn't const in a const function signals that something could be getting changed and the engine wants to stop you from doing it. As for why the Set Render Translation function doesn't throw the error, it is likely because it's called on a separate target that the const function wouldn't care about and isn't considered "read only" in this context.
Perhaps you need to explain what youβre expecting vs whatβs happening again
is it possible to bind a custom event in the construction script?
so i am making a 3d bingo caller and whne the number gets called and displayed on the ball it supposed to remove it form the array so it does not call it again and it removes it fro mthe array but when i cal lthe next number it sometimes picks it again
Show the rest of the code so we can see how youβre calling each number and if that array is being modified anywhere else
hm, if i add spline points in construction script, is it normal to not be taken into account at begin play at all?
Doesnβt sound normal
in the construction script, it takes into account all of them in that debug, at runtime, i made it print the amount i have and it's the original number :/
brb crashed engine
Where is this code, the part where you make the array
Did you have to pull from source control?
No, the first screenshot
Yeah I mean where is it being called from
its right ther it make array that has 3 elemtns in it
its a test array its not the origonal one
I know I mean where? Begin Play, Event Tick, random function , etc
thats on begin play
i orgionally hadd it in a fuciton on its own whne the cal lvbutton was clicked
its like the array is getting remade or like reset when i do the next number
Begin play of what bp, the widget ?
Ok, is it always the exact same instance of the ball then?
Or do you have more than one ball
Store the array somewhere where it persists
Or simply hide the ball, move it (if necessary) and show it again rather than destroy
so how owuld i go about storing the array
should i make the array in a seperate bp
like make a new bp secifcally for the array
You can store it in like player controller or game mode if you want or like I said, avoid destroying the ball and youβre golden
thnaks
thanks
UObjects don't have a world context.
i also tried learning how to work with uobject but found it hard because doesnt have anything. so i just use actors
Why not use UActorComponents instead?
Much cheaper
And have functionalities
or that
Can't I add tags on already placed actors?
Isnβt it also that not all objects are actors ?
I clicked "+" like milion times
No. All objects are characters
You can add a world context fairly easily but needs C++ to do... And in this case, it tries to use an assigned Actor as the "Outer" to retrieve the world context.
UCLASS(BlueprintType, Blueprintable)
class YOURAPIHERE_API UWorldObject : public UObject
{
GENERATED_BODY()
virtual UWorld* GetWorld() const override;
};
UWorld* UWorldObject::GetWorld() const
{
if (!HasAnyFlags(RF_ClassDefaultObject) && !GetOuter()->HasAnyFlags(RF_BeginDestroyed) && !GetOuter()->IsUnreachable())
{
//Try to get the world from the outer actor if we have one
AActor* Outer = GetTypedOuter<AActor>();
if (Outer != nullptr)
return Outer->GetWorld();
}
return nullptr;
}
On level, you can place only actors
What you see, are actor's components, e.g. static mesh component
Components =/= actors
Components on the base level, inherit from UObject
So, you are corrent
Not all objects are actors
Ok, ty
well i hit a funny snag... i have spline with points 0, 1 and 2. I want to add intermediates to it, but anything added becomes... 3, 4, 5, etc
How can I make my new points move the old ones?
π€ maybe once the new one is created Add Unique n , n.5 and n1 to a new array?
You can set point data directly
Youd need to move the old points manually
Is there a specific reason for making intermediates vs just adding to the end ?
yeah my ai needs them for patrolling
I kinda dont feel like that answered it but
ai gets spline points and walks to them in order
Add point at the end -> set its data to the previous point -> continue doing this untill you hit the location /section for your new point
Right but why not get them in order in the first place
Or is this dynamically changed by the player at any random point in time?
well that's the thing, the AI goes straight, doesn't follow the spline. What I am doing is adding extra points on construct so that the AI can now go to intermediates between them and better mimic the arc
the issue is that those intermediates are added later in the index instead of in between
I think an idea I had was to create a temporary array/map and add to it the index, the distance, the tangent and the location, store it, run the calculations and at the end, rebuild it entirely
Just reversing from the end does the same thing but saves you from caching it additionally
the array becomes like this:
0
1
2
to
0
1
2
3
4
but 3 and 4 should be
0
3
1
4
2
how would reverse fix it?
Add point(4) = get point 2
Add point(3) = get new 4
Add point(2) = get point 1
Add point(1) = get new 3
Reticulating Splines
For inserting?
my client didn't scroll (my answer was about the construction script spline point thing, was apparently >1h ago xD)
π been there done that
Suddenly i answer to things 3 days ago
I rly should get back to my spline project
Was quite interesting to play with
reticulating?
I want to paint a bunch of static meshes with the foliage tool then convert them to blueprint actors in the editor.
I cannot figure out how to get a reference to the exact static mesh type of foliage that I'm painting
wondering if Datura comes clean or finds another ref for Reticulating....
branching?
You know you can paint actors directly right ?
Sounds like it'd save you a middle step
oh that'd be way easier thanks
I'm going to need to be able to get all these painted actors and store them in an array, then delete them from the world.
Then I'll randomly spawn a fraction of them at the start of every round
does unreal have a json or xml parser / serialization built in
Guys I'm trying to spawn a text widget on an actor of the scene, but it's binded and locked on the player camera, is there a way to make it fixed and frozen on top of the actor?
Hi folks! Do you guys know if I can do this inside of BP? Just changing where the wires plug by clicking and dragging? Maybe native or with a plugin?
In the video, I am using another visual scripting app called Max 8
that looks horrendous
And also this. Just press SHIFT and click to connect to different nodes
If you are referring to how my patch looks, it's ok. But I was referring to the functionallity of it
Does this currently follow the actor?
I believe there's an experimental plugin for JSON stuff.
The functionality I would like to use in BP as well. It is a lot faster to do it like that, than draging again and again and again.
Blueprint assist is pretty much the best when it comes to blueprint qol features. It has pretty much everything I can ask for.
https://github.com/fpwong/BlueprintAssistWiki/wiki/Features
He shows off everything there
So you say that if I learn those shortcuts, I can do the 2 things I showed in the video? That would be cool!
bp assist basically makes everything 10 times faster once you learn the shortcuts. I don't use like 50% of what it has but Definitely the auto format and pin shortcuts
it does the first one, but the second video is more unique to material-type graphs in UE, I think there's one that does it somewhere
I will definitely check the info there. Thank you so much
Regarding <<but the second video is more unique to material-type graphs in UE>> I will have to figure out what "material-type graphs" mean first π
Still new to this
hi is this the right place to ask about issues and problems?
yep
im having an issue in 5.0.3 where nothing is showing up on my detail panel when working on BPs
i saw some other screenshots where there should be a gear on the top right of the panel with the filter options, but i can't seem to find it
when selecting variables, events, and other things similar?
The details panel doesn't have much, to change, but there are options like showing plugin content and other stuff
yup, regardless of what I select, it just shows up as a blank
5.3 maybe?
There is a bug in 5.3 where it wiped the detail panel
But I am not aware of that happening in 5.0 or 5.1.
If it isn't the bug, maybe try restarting the editor. Close the detail tab and open again
Hello, I have a question.
Is it better to download a whole json for each time it is updated (of an API) or just request the API each time I need ?
its 5.0.3. I have tried restarting both the editor and my own computer, but the problem still persists
thanks for the advice though, I guess I will poke around this a bit longer
How does one transfer information from one game level to another?** (Example: You picked up and equipped this weapon on level 1, so now you will start level 2 with this weapon) **
Have you tried resetting the editor layout?
Could anyone tell me how I add a check to see if I hit an actor with a certain component on?
I would like to add so it plays a "hit" sounds when I successfully hit something that I can hit, and not when I hit something that doesn't have a health component, OR when I hit something where it fails to give damage (since you might need a special bullet or such).
DataTable?
Two options, put it in the game instance or put it in a save game object and save to disc and then load the data from the new level.
Whilst putting it in the game instance would be the easiest option, this isn't always the best option depending on what you're doing.
Savegame is one option
Try putting the info in GameInstance
Show your full screen?
Is it a built-in or a plug-in?
Other Actor, then perform your checks
its a plugin. $20, but well worth it. The speed jump using it is insane.
Will check it out
I'm using the other actor, but I need to check so it has the "Health Component", but when I tried to do this it sadly didn't work. π¦
Show us your code?
You can also use tags
How do i remove the collision entirely from a mesh, so to save performance?
Just this?
https://cdn.discordapp.com/attachments/221798862938046464/1165439588450439240/b.png?ex=6546db32&is=65346632&hm=f85d4a4a3a9583d5359b80b7efc7795a38eb2316a094a404d2a803ccb87174c9&
Because it seems there are at least 3 places where the collision of a mesh is set up
Ah, which would be better? To use tags or to check for a health component? I'm good with either, just trying to learn and unreal and setting up a basic first projectile. π SO I can shoot destroyable walls, and enemies.
(To start with)
If you are absolutely sure that you wonβt need any collision at all, you can go to Viewport to remove them
Remove collision from the mesh itself π
How did you check for Health Component?
so the mesh
open the mesh
just this
no need to go on the blueprint and change the collision settings and all the stuff?
This is what I tried, but I get the warning it will always fail, and I'm honestly not sure how to solve that. (Sorry)
Though, I wonider if tags might be better since I want the bullet to bounce when it hits something that is "protected" and just make it bounce on those, deal damage otherwise, and just kill the bullet if there is no tag or wrong tags.
so the mesh
open the mesh
just this
no need to go on the blueprint and change the collision settings and all the stuff?
@gentle urchin
DM me
or do i need to change this too?
see there are 3 places that relate to the collision of a mesh.
1- The collision itself, can be removed.
2- Collision settings inside the mesh.
3- Collision settings inside the mesh inside the blueprint.
There is also the option to not import the collision when importing the mesh into ue.
quite confusing
Should i remove everywhere?
Is there a way to set up simple parent/child (attach) relationships within the blueprint editor (viewport)?
In the outliner of the level I can make two actors and make one a child of the other.
In a Actor's BeginPlay() I can spawn another actor and attach it to the first.
But in the actual viewport of an actor blueprint I can only make ChildActorComponents, not a simple "actor which is attached to me". Or am I missing something?
Are they not the same?
so that means complex collision is not removable
it always exists
because its made by the triangles themselves
should i also touch this?
depends on the mesh
use complex as simple
you dont want this for meshs with many vertices
it's good for doorways and stuff tho
then leave it to project default
remove collision entirel