#blueprint
1 messages · Page 16 of 1
Thanks!
Discovered the real issue was my Custom Event trigger does not work with Timeline nodes!
My Custom Trigger Event is not starting my Timeline! See attached. First is correct behavior, Time line after BeginPlay.
2nd is with a Custom Trigger Event from Sequencer.
Get attached actors -> filter by tag ->NOT HasTag("Persistent")
Add "Persistent" tag to boxes
@gentle urchin Do you know how to resolve softobject reference? 👉 👈
Hey @gentle urchin, ah, ok... so I can't just get the actual individual box component (in a loop) and then say "get attached actors" (attached to that component etc)?
Erh, to an asset? Load asset (a)sync
Im not gonna stop you from trying 😅
So this is supposed to subtract an amount and update it on a widget but it won’t subtract
@gentle urchin Basically this but in cpp 😭
Really?
well ok then... I guess I was asking because I couldn't find any nodes or anything... and then I started questioning my understanding of "Attach Actor to Component", in that perhaps actors are only really attached to actors, not components, hence there being no nodes to remove an actor from a componet. If that makes any sense. 🙂
Ye
Lmfao ok, let me try
Actor is kinda really just a component set
I don't know what to do here lol
literary the last node to do before done with refactoring
.Get()
That does it 👍
.gotEm() 🙃
ok, I'll it the way you first suggested. At the moment I'm just destroying all of the attached actors, but it occured to me this wans't very good as I may want to attach other actors and not have those being destroyed.
Thanks for your help 🙂
Id have different tags for different groupings of components to destroy
?
Try making it private
If you can't edit from child then it's probably the same effect
I've had that issue before I believe I promoted it to a local variable then used it if I remember correctly that fixed it not sure why though
Not at all. Protected means that children can edit it but others can't.
Opps
Click on the variable and then in the details panel on the right, there may be an access specifier. Change it there.
So in short u can't I guess?
I only see private being a boolean
Don't see no protected
I have the item set as a local already unless you are talking about another variable
Then I guess it isn't supported.
I would like to run OnPostLogin in GameMode after BeginPlay, I have a problem because Event OnPostLogin is called first instead of BeginPlay
Why?
Looks like you might have to go cpp
because I want to load data from SaveGameObject first
OnPostLogin is a lifecycle method that is called by Unreal. If you want to load the save stuff after BeginPlay, then just do it at the end of BeginPlay
EndPlay? 🙂
EndPlay is when things are in the process of cleaning up pretty much.
The complete opposite of BeginPlay 🤣
I want to load data before Event OnPostLogin
Then look for a different event that runs before that.
OnPreLogin
OnLogin
Or w/e
If you're dead set on changing when OnPostLogin (and potentially screwing up so many more things), go into the source and change it.
Hehe I didn’t even think it existed but makes sense 😅
this error is saying the Array is Empty right
how can i check equal to not empty in an array
oh theres a "is empty
nevermind
hmm still getting the error tho :/
in my project when I press enter it's taking screenshot and works fine, but I packed the game and after 2 hours of waiting when I pressed it's not saving the screenshot anywhere. is there a way to fix it ?
Does console command works in Shipping build? 🤔
a local integer, something like LocalAmount and set it to the result of the subtraction
Ah ok that makes sense I’ll try it when I’m home
sounds good let me know if it works for ya, its been awhile since ive messed with inventory but remember running into that exact issue and do believe thats how i fixed it
This error means whatever you're trying to "GET" from the array is not a valid object, not that the array itself is empty.
yeah so this "Have It" it says its not valid right ?
but if it was not a valid object then i wouldent be able to even get it from the array in the beginning .O ?
Correct. So the array has things in it, but those things aren't valid.
so basicly it says the things inside the array dont have the "have it" bool right
No
Your array contains things, those things aren't valid. They don't exist at the time this loop is running, or they were never defined. An example would be, you can create an array of references like this, and resize the array so it has the appropriate number of indices, but if you never fed in references, then it has "nothing" stored in the array indicies that you created.
hmm
mkey, so in this case the "targets" array have the "Have it" Bool but it only created from a Parent class
so the child class never touches them could that be it ?
No
Your array has an object type that defines what can be stored in it..
That type defines what variables are present, like the Have It boolean.
The problem is, you have an array of a certain size, but no actual values set in the array indices.
hmmm
so this function is run by a parent class, i figured the "Targets" thats being set in the child class would apply here also
so thats the problem ?
Ohhhh
nevermind
i duplicated an existing one that i left blank
)
make sense then
does the GameMode persist when I call Restart Game in a Blueprint? Or is it essentially destroyed and recreated?
I think the latter but testing for that is fairly simple
And is the Level also restarted? As in, will it run it's level blueprint Event BeginPlay again?
True, I will test it, should be easy
You know, you could just reopen the level
Yeah, it seems both GameMode and Level Blueprint are destroyed and created again when I call Restart
Makes sense
You can reopen the level if you need GM to persist
Fairly sure that’s how it works
But what surprised me is that GameMode is not being created in the Menu
guess I forgot to change World Settings
I've tracked a bug to The Left Mouse Button node's Pressed exec line does not fire, but the Released does fire. Any clues as to why? ||I am not able to find any other use of LMB anywhere.||
how are you debugging?
is the print string RIGHT after?
nothing in between?
are they two separate print string?
is the key value on both "None"?
you could do a cleanup. delete all the binaries and rebuild
theres a Key value if you expand the print string
whats the duration?
on both?
if you have a left mouse button in a parent blueprint it could consume that event
Decided to move here as general is busy:
I have a bit of a problem, I want to have a system where each of my weapons can have assignable abilities, but I need to figure out a way to save these between playthroughs and equip them to my character properly. How should I go about doing this?
I was hoping there'd be some kind of Blueprint that lets me drag in meshes ect. that can have its data modified and saved without having to be put in the world.
you are the guy with the multidimentional stuff right?
click on the event, and tell me what are the details set to?
it could be the player controller
Any way to recieve input during editor utility widget time?
how can I add all of these static meshes to a BP? I have tried the merge options but they require the use of instanced meshes, removing possibility of adjusting offsets in the bp. Just want to add selected static meshes, as static meshes, to a bp.
Iirc you can right click and convert to bp?
Oh they’re actors
Theyre static mesh actors... is that not the same as a static mesh?
when i drag a static mesh into the level it becomes a static mesh actor..
Hey guys, would anyone know of a method to apply a material only to the area where two objects collide? Like in this example with a box and a wall, the only part the material would display on would be the red area. It's kinda like an intersection between the two meshes, but, as far as I know, Geometry Scripting wouldn't work for me since I want to turn the mesh back into a Static or Skeletal mesh (you can convert a Dynamic Mesh into a Static Mesh asset, but it would apply to all instances of that asset). Blueprint solutions are preferred, but I'm fine with C++ as well, if there's any way to achieve this. Thanks a lot in advance!
Heyoo, getting some weird behavior in BP, when lerping like this using FLinearColor, the result isn't the same as doing the same color but inside the node
Is there a way to take the four points where the box collides with the other object and input those positions to a material for creating a mask?
the difference between them is the Alpha, when using the color inside the node the resulting Alpha is 0 however if we make a literal color to attach to the input we get alpha 1
Yeah sorry I forgot they make it an actor when placed in level. So if you don’t want to merge them, go to your bp, select them all in the content browser and drag them into your blueprint tab where the root is and all
Otherwise there’s an actor tab with merge into one actor options
ooh exciting. will try.
Still looking for help with this
Someone replied to you. Maybe answer their questions first instead of this fire and forget stuff
I replied to them back and forth for a while in VC
Are you using the old input or the EIS?
both produce the same behavior
Did you try a different button?
it appears as if something else is consuming the click, but I can't seem to find anything else in the project which targets LMB
I can try now, sure
Does anyone know why my character won't change it's animation? I have it set like this: Bottom is idle, middle is walk, and top is run. Then, left side is turn-left, and right side is turn-right.
Then I have this piece of code in the animation blueprint to control the two variables. Hoever, the player character doesn't change animations no matter what.
Looks like cast is failing?
Oh I just saw the highlighted stream stopping at the cast
Did you put a print string on cast failed or how do you know
Anyone have a thought on how to have a character dash across an opening and when they hit ground on the other side, stop dashing? right now I have it where there's a line trace to detect if on the ground or not, but it always goes the same distance (I'm not using any physics, and the character is locked to the z axis, so there's no gravity)
yeah, sorry about that, this ss was taken before I fixed the cast issue, I just set the preview instance to the player character and it fixed it
However, animation still doesn't change
May need to ask in #animation then
k thanks
Hellow ! Is there someone that know how to rename an Actor at runtime ?
I have a lot of AI with the same name and i would like to name them for ex : enemy_gun or enemy_melee
How does creating a new animation notify work? I want to execute a script one time at a specific in the animation
so far all I can find is notify states that can run the behavior every tick, but I don't need multiple ticks
what do you mean it always goes the same distance?
create a variable inside of their class and define them that way. it might help if you provide some idea of why you need this, someone could possibly give you a better method if you are looking to debug something
It will always dash the same amount in the direction I'm pressing, but I'd like to stop if I hit ground after dashing across an area you can fall into
If I remember correctly, you need to create an Animation Montage and, inside, add a Notify Track here
you're clearing and invalidating the timer even if you didn't hit anything
There, you can right click and create a new notify, name it and all that. I believe that's what worked for me ^^
In the animation blueprint, you can link the events these notifies create. Hope that helps! I might have forgotten a step tho
yeah the way it works now it's just a dash forward and when the dash is over it checks if I'm still on the ground or not, which works, but I think it'd be better to check while dashing and if hit ground then stop, but the way it's setup right now if I check for ground all the time, it will say I'm falling regardless if the dash will get across a fall area or not.
What is the best way to check if a Primary Asset is already loaded? Im on 5.2.
I think this is the step I was looking for, but is there a way to link them to events in the event graph of the regular blueprint?
I want to run a collision check at a certain frame
yeah you need to be checking consistently after the minimum requires of the dash has been met, and then only stop the dash once ou return a hit on the line trace
I believe so. Try storing a reference to the character, the controller or whatever else and then call a custom event or function from there. Something like...
Seems to work ^^
Feel free to DM me if you need more help
What do you mean? Would using a "is valid" node and a branch work for you?
Anyone have a method for solving this silly problem of changing a parent blueprints default variable value? I'd prefer to avoid a function as I still have to create a variable for each child class either way
Would I then have to retrace after Dash Is Done to make sure I'm still on ground, say if I dashed out into nothingness? Just Seems like too many traces
I mean if I want to check by Primary Asset id before i do a async load.
Hmm... Then I wouldn't know, sorry. Let's hope someone else does
thanks for looking at it! If its not best practice I would like to know too
Thanks, this works! Is there any performance consideration if calling gameplay logic like this from the animation blueprint?
That would be a problem with your design. You need to either make sure it's not possible for that to happen. Or create a different method of dashing like defining a definitive location of where the dash will land. Unless you want people to be able to fall off the world
For example based on your dash logic, you should always be able to determine where the character will land, you can then adjust that location if it would have resulted in an undesirable place
It would depend on how the blueprint's compiler works, but there's very little "extra load" when calling external variables so maybe it's fairly similar. In any case, like my friend who actually knows programming, forget about early optimization (I know it's hard hehe) and just write it down for checking how much of a problem it is if a problem does actually show up 😉
haha fair enough! beyond just optimizing, I also just like knowing how the engine works as best I can, but you're right this is all premature. Thanks for your help!
How would you go about determining where the player would land? Sorry, that part is lost on me
You should have the property available to you in the defaults of the blueprint itself, or, if you want to change the value on an instance you're placing in the level, you can set that variable "Expose on Spawn" and "Instance Editable" allowing you to directly change the value in the details panel when you have the actor selected in the scene.
I'd have to see your code 😄
Sorry, is what I pasted above not enough?
wait is that the actual dashing code?
lol, yah
interesting
That's probably not how I'd go about making a dash
I'm gonna see about whipping up a simple dash and get back to you in like 10 minutes or so
Oh thanks. def don't need to. For reference I'm using flying instead of walking on the character movement, which is why I'm upping the velocity instead of launching or adding force. The game is top down, so basically all physics and gravity are off.
Do I understand this correctly? If I have, let's say a TPS template, but I wish to add things to it like an inventory. Can I do them as components and then simply attach those components to the template's character blueprint? What I want to know is would I be able to update the template and keep all the other code seperate in components? Do I undertsand this correctly?
Yes, you could potentially do this.
Thanks mate, it was starting to annoy me how I needed to code heaps of seperate systems into the character. Now I can keep it all clean and even use them in other projects 🙂
Solved btw
mix of your suggestion just had to find the right way to get it
On a gamemode blueprint cast, how can I get the current game session class?
it seems i can only get the class
nvm, seems like the only way is through c++
Yeah, I don’t see it in bp docs only cpp
yeah, i was hoping to call ServerGameSession -> RegisterPlayer via the server's game mode
Yeah I'm gonna have to swallow my pride and tap out, I was able to easily predict the location of floating pawn movement based on Dash time and velocity, but trying to calculate acceleration and deceleration is biting off more then I can chew unfortunately
I am not a math god
:(
Lol, neither am I. Thanks for trying tho
without calculating accel and deceleration long distances would get very inaccurate
it can be calculated and predicted though
im losing my sanity, shouldnt unload level stream also turn off its visibility, because its unloaded, or am i missing something?
I'll check around the old internet, thanks again for the suggestions and help
Hey i've made a single layer water shader in UE4 with sine waves as well, i was just wondering if it was possible to take this further and add buoyancy to a static mesh and make it interatce?
Yes it is possible
i have this custom uobject that im using in a utility ai system, but i can't seem to set them in the editor? any thoughts
might be missing a flag or something. show your code in #cpp
can i create data asset from inside blueprint?
i mean, sorry, that its a child of a uobject. the parent bp here for considerations is very simple, its just an abstract function that i override to score each consideration
wdym?
you don't need cpp for it if that's what you're asking, just create DA class
@lunar sleet i would like to create a new file of type: data asset from inside an editor utility widget (and give it a name)
Doubt you can do that, def can't modify DAs at runtime
you made this UObject in cpp right?
i dont want to do this at runtime but at construction through an editor utility widget
this isnt possible either?
there's this, idk if it helps, may not be the same thing
nah it just inherits from the default base object, im guessing theres some issue with that
ok will try that, thanks @lunar sleet
idk enough about UObjects to tell you otherwise, maybe someone else will know
@lunar sleet and let me take a step back. what i want to do is create a system to save and load presets (all the variable values) of a specific blueprint. how would you do this?
I think normally you would just use a save game object
and probably structs (cpp structs since bp ones are broken)
ok, and save game objects, are the presets saved as files? are they visible from inside unreal editor or from the file system?
struct all together are error prone, but for me its just because bp nodes need refreshed
I haven't heard of any of those issues when people switch to using cpp structs but 🤷
from the file system for sure. They save data to drive
I've used both, its easier to use cpp struct, but the moment I use them in bp, same issues
i cant remember now why i chose data assets instead of save game object
may want to check with #cpp on that one
How would I do so?
DAs and DTs are more for having like a spreadsheet or library of stuff to use at runtime, you can't edit them after the fact
I can always fix issues created by structs. Any time they change, nodes need refreshed. In bp, if you have nested structs it can be more difficult, but you just have to ensure that the parent struct is also refreshed and compiles correctly. Sometimes I have to add a member and remove it just to fix it. Its all good though.
I'm saying you shouldn't have to refresh your nodes if you use cpp structs, so may want to ask there but if you don't care that's ok
Well, I don't have to most of the time. Its just a couple use-cases.
For big structs with nested structs in bp, I've pushed more to use data assets where it makes since
is there a way to edit the player characters public variables inside the editor?
Im not sure how because the player start actor spawns an instance of the player blueprint every time
forcing me to go into the blueprint to change variable values
hmm i can't figure out this uobject thing. im guessing since its not an actor that u cant set the default in the editor or smth (since its sort of a data only thing?).
i guess i can use a class reference instead but im not sure if that gives me what i need
hmm
maybe i can use data assets isntead
hmm can't set those in the editor either? wtf
If you use the player spawn, no.
You would need to manually spawn the player, possess it and change those variables.
what are you trying to do?
here's a work around: have your save file or your game instance save the presets you want for your player character and on spawn (begin play) make it look up those values and apply the changes.
Running into weird behavior with spawning/possessing pawns, I figure there's a simple answer I'm missing...
I want to spawn pawns for my players at runtime rather than leaning on unreal's default pawn spawning logic. So, I set the default pawn in the game mode to 'None'. But then when I eventually spawn in the pawn manually and call Possess on it, I can't control it.
However, I noticed that changing the default pawn in the gamemode seems to affect this. The pawns I'm using are essentially duplicates of unreal's default BP_ThirdPersonCharacter. If I set the default pawn to one of my pawns or to BP_ThirdPersonCharacter, then when the new pawn spawns in, it can be controlled just fine. However if I set the default pawn to something different (like 'default pawn' or 'spectator pawn') then just like with None, I can't control my actual pawn when it spawns in.
Any thoughts here?
set up a utility ai system but i want to derive from uobject for my considerations and actions. basically each action takes a list of considerations and scores it using an aggegation method (some funky math) but im unable to set the objects in the editor.
maybe i need instances of the objects to set lol
why not make a singleton actor called manager and spawn it in the world?
when using the player spawn, it automatically possesses and adds input. Chances are, by default you do not possess it NOR do you autoinput it at player 0
I'm manually calling possess on it (and it works, as verified by printing out "get controlled pawn"). I didn't know anything about adding input, is there a node I should be looking at for that?
eh too many actions and considerations to coordinate with a singleton
are you using AI to control your NPCs? because then it would just be a matter of making a child of it with those considerations on a per-pawn basis. This is already used in behavior trees for instance
er, is this the node? this doesn't seem to be working either
sorry very new to unreal and don't know some of the basic function calls
use "self" instead of target the spawn actor
oh sorry
sec
i just realized it's not the pawn
yeah this is in the player controller
where is the input given? at the pawn level?
I'm not sure, I'm still just using unreal's default pawns so I haven't set up any of the input myself
it seems like the 'default pawn class' spawning mechanism is also doing some input setup behind the scenes that I don't know about
Try to find out the input events and to look if it is triggered while you inputting
I haven't done this in a while either. In your pawn, search for "input" and see if it says player 0
I don't think so. I've done some online game spawning with the spectator pawn first and all the player's logged in then possess to their ingame pawn. Just very simply possessed to it.
the point of utiltiy ai is to move away from behaviour trees 😛
not sure if this is what you were looking for but this is what it looks like when it spawns in. I tested the version where input works and its input section looked identical
@lunar sleet ok i managed to save preset as data asset with create asset and save, now how could i load a data asset?
@fringe junco Tom Looman actually have an article on utility ai, and basic implementation in unreal
@midnight wadi async load I think
really eh 😄
@wispy canyon I am stumped I would have to test it out. Normally it should work
interestingly this only happens on the server, characters spawned this way on clients seem to work fine
I looked it up and details are unfortunately spartan
@wispy canyon ohhhhh this is multiplayer????
It might be better to ask the multiplayer channel
yeah but I get this bug even when running in singleplayer :/ I'm not really using any multiplayer oriented code here
Thinking...
You Spawn the pawn, assign it the player controller to possessed and enable input. If you breakpoint or print string it shows it works?
printstrings on OnPossessed in the pawn and GetControlledPawn in the player controller both print what's expected
the main mystery is why changing the default pawn class affects any of this
I have an inventory system and if I'm moving my character, and I drag an UserWidget, why do I stop moving temporarily? Its like the act of starting a drag operation eats the current input, and you have to press WASD to move again (so you can move and drag at the same time).
Is there something to disable some focusing or something? I want to be able to move and drag and drop items in my inventory at the same time. Its clunky without it
You should only spawn on server for most thing. Spawning from client will only create a copy in local machine.
You only want to spawn locally for things like local bullet special effect (which will get replace and interpolate with server version later)
Posses node should only be run on server too,
the spawn code is only running on server side
Well I see a cut screen shoots so I dunnoe
no worries, just trying to fill in missing context
I noticed that I'm getting inconsitent overlap detections when using "Sphere Overlap Actors" to detect overlaps with the landscape...well, I'm looking for Actor, but I noticed the problem with landscape. It seems like the sphere overlap center needs to be below the landscape, or at least clost to the landscape, to detect the overlap with the landscape.
I tried a similar test using a "Box Overlap Actors" and it appears to work as expected regardless of it's position relative to the landscape. I have a sample actor for each test that will draw a sphere/box using either green or red depending on the overlap result.
The overlap test is clearly overlapping the landscape in my sample for both overlap tests, but only the box detects the overlap. In my tests the sphere overlap radius is equal to the box overlap extents which is 85 units.
Also, this is in UE 5.1.1 if that helps.
Is this expected behavior for sphere overlaps?
I can post my BP for both of my samples if that will help, but they're very basic.
@frosty heron this is the gist of the original issue. My BP is pretty long and unkempt but I'll try to encapsulate it
this logic runs in the player controller on begin play, there's some logic and etc but really the main thing is after 1.0 seconds of delay, call onto the server into a method in GameMode to spawn the character for this player controller
SpawnCharacter does some long stuff with reading into DTs and such to get the character class, and ends with this
So you should possess here after the character spawned. Oh no, you spawned from player controller?
And you should never try to get game mode from a player controller. It is on server only.
should I not be spawning from inside the player controller?
that's not a problem
My bad, didn't notice you replicate it to the server.
Well, the way I will do is after the server knows the player controller logged in (it is in game mode), then spawn the character for the relative controller. But your way looks not wrong.
So still the problem that no controlling?
@wispy canyon maybe you should override some events from the game mode that is responsible to spawn the players
im compiling so can't run editor to test
@wispy canyon I mean just put the break point on input event to see if they are triggered.
introduced a hard crash somewhere in all the blueprint shuffling I did to try and find the bug 
ah, I'm guessing I've found the issue. looks like the boilerplate code generated for the pawn's cpp superclass binds input on beginplay() and expects PlayerController to already be initialized
was it the enhanced input that didnt go through?
on server, looks like this beginPlay() happens before the playercontroller field is set since I'm spawning it in manually
so I'll just add some way to force this logic after possession
but that's odd, at times I don't need to do this in the pawn
what if you initialize in the player controller?
Can one actor create, own, and attach a component to another actor?
you can do anything you want assuming it's a standalone single player game
althought "own" and "attach" is a bit confusing
only one actor can own a component
but you can physically attach it to something else yeah
As explained in the pic, all I want is a simple explanation with picture please if possible, on how can I remove the previous widget when I click on the other tower? I don’t want 2 widgets to appear at the same time. thank you.
Second thing: So after 10seconds the widget disappear, how can i make it that when the widget is being Interacted with and still being clicked on, it shouldn’t start counting the disappearing animation until I stop interacting with it
It's not a singleplayer game
But good to know I can do that
same rules apply if it's the server
Hi everyone! Hopefully a simple question: I have a physics vehicle made with the Chaos vehicle plugin. I have a camera inside this vehicle, and I want to be able to rotate the camera around to look around inside the vehicle. ive got it set up so that I can do that, but the camera doesnt rotate with the vehicle when it turns! Any ideas on how I can get the desired behavior?
I have a springarm with distance of 0 inside the cabin. Camera is attached to that and has "use pawn control rotation" and "inheret X, Y, & Z" on.
Is your pawn control rotation updated?
Quick and dirty way would be to get all actors of class Tower and call an event that makes them hide their widget, then show your own
It is, I can look around the cabin. But when the car rotates, the camera doesnt rotate with it
how do i put them evenly without seams ?
they also seem to move by them selves now and then
the car is controlled through the chaos vehicle setup, so its rotation is using the steering input which drives the wheels. I dont know of a good way to convert that to an input for the Pawn Control Rotation
Question is if you should just not let your camera be controlled by control direction
And let it follow the car with just a relative rotatin offset
Ok, thanks for the suggestion!
I could use a bit of guidance. I'm building a card stacking system where you can drag cards on top of other cards to build a stack. Then drag the entire stack, just part of it, combine stacks with other stacks, etc. Basically like solitaire.
I'm struggling to figure out how I should handle it so I can track which cards are in each stack and have the ability to split into multiple stacks with a parenting sort of system.
I also need to trigger events in the bottom card if necessary when certain conditions or combinations of stacked cards are met. This part will probably be pretty easy once I have the stack management working.
Any ideas on how I should approach this?
Hello, I am curious if you, bright minds, have a solution for NPC Capsule Overlap alternative. Specifically for situations where NPC can be close to player and cause damage as well as interact with triggers. Is it better to have a line trace that checks occasionally instead of overlap on tick? Thank you for your time.
I would just check if the weapon overlap with an enemy when the owner of the weapon is in attacking state
Something along the lines of the Anim_Notify? How about for triggers when characters have Generate Overlap disabled?
There is an approach with AnimNotifyState, that's what Dynamic Combat System use
so OnBeginState it start checking againts overlapping component
personally don't really like it because it's frame dependent
but I am still figuring out better ways my self
I used this method before. That's a good solution. Any ideas what to do with triggers that check NPC overlap and based on their id executes logic?
After profiling I noticed that Generate Overlap on NPC capsule eats a lot of ms from transform updates to animation updates. Trying to optimize.
hmmm not sure, I do a lot of checks on ticks and still running on 150 fps++ in UE4
I have an open world with several characters present
I've got like 40 characters max atm but yea I wouldn't know about open world
very hard subject to tap to for me cuz im solo dev
with small brain
Heh same thing man, trying to grow the brain 🙂
I heard that we shouldn't optimise prematurely but if it's crucial for u then 🤔
I am very far in development
imo you still need some kind of overlap check right?
yes
attacks can be solved by anim notifies
but the tricky part is how for characters to detect when they are in damage radius (sphere object) and when they can trigger certain event
my experience with anim notifies is terrible because they are frame dependent
when u lagged out and the frame got skipped
I legit dodged an enemy attacks/spells
Under low FPS
I see your point
Maybe anim notify fire with certainty im not sure
i used anim notify state and it isn't great
anim notify fire once tho
What i currently have is a check every frame inside the anim notify state, so we I get an arch of the sword
There is a way to migitate the frame dependent thingy by substepping
trace back to the previous trace to check if there is actually something that get overlapped
I am curious if doing a short line trace every 1 second will be a good alternitive for generate overlaps
How would u translate that to attacking?
and I don't like doing any sort of check when not required
something should trace only when the character is attacking
simply if player in range do damage, delay and open for another
I've heard more than once that overlaps, volume collisions basically, are kind of the same as line tracing but over a large area, so line tracing should be better, even if it runs every frame. Not 100% sure about this tho. I also believe line tracing is pretty well optimized so I'd say you try at least. If you are in a far point in development, why not try implementing that and checking how it affects framerate?
Will try, thaks for input BOTROM
Line trace is cheaper afaik but different utilities. Like in my RPG game, I can't make do with a line trace, im not shooting bullet. I will either use capsule collision along my sword or I will do a check with box collision over an area
can line trace from the edge of the sword
that's also an option
Every Frame, track the edge of the sword during the animation
also trace back, for better detection
my game is stylized and does not require such a precision
Also, if you just want to check if the player is in range, have you considered just measuring the distance? Like subtracting both positions and using vector length
Add Socket location to the edge of the sword.
Start trace from Current Positon to End (Last Location)
I think I have a solution for attacks now
the issue is triggers and how can NPCs overlap them without Generate Overlap enabled
Perhaps slow line trace can solve both
Let's hope for the best, good luck ^^
👍
thanks for the suggestions guys
here is something I read from Engine Contributor "Overlap ***Events ***are extremely slow, and tbh I’ve gotten into the habit of disabling it globally now to avoid using them. It’s actually much faster to perform an overlap query by ticking the actor and doing it yourself."
hey, for some reason none of the debug key nodes show up in the node menu even with context sensitive off, any idea what could cause something like that?
oh nevermind I'm dumb
I was in a function
ok so i have an issue where Arrays gets reset when reopening the project ://
so its my "talent Tree" it checks if widgest are "enabled" or if they have a bool (have it) to make it enabled
and ive set all content in the array but when i close down and open up the project its set to blank again :/?
ideas ?
anyone ! 😦
Not what you ask but is the line just a border with an image set to tiling?
the line is a widget of its own
with a canvas&image
any ideas why an widget array would reset itself ?
the variable is from a partent class
Got code that updates it ?
Show the code that gets it
basicly when clicking on a button in the talent tree it runs the code
can't save array like that iirc, I ran the same issue when attempting to do it in the widget like that
really 😮
it keep resetting, I just gave up and set my array from pre-construct
Discovered something annoying in 5.3.
As part of a character customization system i loop over an array of values to set on the skeletal mesh.
However in 5.3 this does not work anymore, it only applies the first value then stops. This was not the case in 5.2.
However adding a delay to next frame it does work.
Anyone know if there is a way to disable this? It makes foreach loops unable to set morph values which is really annoying. It can be made to work with a "manual" loop but i prefer using a normal for each loop.
You gotta use custom foreachloop
Manual work, I took all the comp and feed it to the array
Nvm not for this, since its pointers
drag and drop from me 🪦
yeah the system works as intended its just the array thats reseting
oh
so u set the "alltalentwidget" array mannually basicly
pretty much
god damn :/
Top does not work, buttom one does
then it checks if player already learn the skil
The array onto array seem weird
if it already learn the skill , activate the lines and icon
yup yup
While the skill itself also checks if it cam be learned
i mean it works 100% as i want so thats not the issue
only the array
ok so i will try setting the array manually and se
Im confused by the lines in general
It seems a bit odd
But if it works it works ™️ some say
but wait.. u set it in pre construct like drag & n drop the components to set it 😮 ?
aye
unless there is a way to grab them all at once but I haven't discover it
i mean
is there even getter?
I wonder if thats an interface limit?
i have a data asset with a number of variables, i read each one of them and assign their values to the variables with the same name of another blueprint. is there a way to automate this using a loop? how can i get a vasiable names table from a data asset? *variables are not of the same type
I'm setting some Asset Metadata with blueprints.. Then created a custom filter to show all asset in a folder that have a matching metadata.. my problem is that assets are only "recognized" to have the metadata if I right-click, Asset Actions, and Show Metadata.. only then they show up in my filter.. as if they had to be loaded to be discoverable by the filter.. is this the normal behaviour? Is so, it's pretty useless
but i mean this is the array in the "parent widget" thats reseting
i cant drag n drop that ?
you can drag and drop that
But your in editor time
what's stopping u?
Tested it without the interface, same issue. Probably an optimization on skeletal meshes
Thats a weird optimization imo
Agreed, and it caused me a lot of unnecessary troubleshooting :S
0o?
I thouhgt u want to drag and drop the array to empty space in the bp
I tried setting it like the latest picture u sent, I have no luck. It keep clearing it self
Checked source ?
funny enough I was doing Skill tree too when I attempt to do it
My skill tree is so different lol
I don;'t doubt that
must be pretty unlike mine 🤣
Im not a designer at all, so pretty is not in my nature 😄
can't wait to work on new skill tree for my new project. I wanna do the Canvas panel offset you showed before. it do look cool visually
i mean im probably explaining this badly but
Parent Bp= Got A "ALL WIDGET ARRAY" that picks all widget of class * that works.
Parent BP= got a variable "TARGETS ARRAY" wich is a array of targets widgets that i set with instance editeble on each "talent widget" to check what should check to unlock
that ladder one is the one that resets
What's target anyway?
I would just ID each of the Skill.
If Player already learn the skill -> Activate
i didnt bother making a struct yet , nor have connections ,
but the data for the buildup of the widget exists in the widget
Each of my skill have Requirements too. If X is learnt and Y is learnt then can be learned
Targets" are the lines and empty slots
Nice tags
Lines would simply point from one Row/Column to another
I have not, a bit outside of my area of expertise tbh :/
the talent node itself does all the checking for activation, and attempted granting
what function is it exactly that the bpi is calling ?
same here, with discoverable aswell
so some nodes are actually hidden untill discovered
SaveLoadedAsset and SaveAsset more or less the same?
secret nodes one could say
takes a while to save 30 assets
Set morph target on skeletal mesh component
Yeah I had to add some modules today and suddenly my editor become more useful
nothing there that makes it do one per frame etc
strange
Print string the morph target name?
it does send the names
and it all worked in 5.2
top doesnt work, bottom does
only difference is the delay tick
Shouldnt be a problem but I noticed something
the target for the top one is Mesh
While the bottom one are player ref
yeah, that was my test 🙂
and didn't work?
bottom shouldnt work as two are done in the same tick
to make it more clear, the array in the top contains the 3 names in the bottom, the top one applies the first morph only but prints all 3, the bottom ones applies all 3 morphs
They are not, in a sequence it should wait for the execution to finish in the precious before continuing
so 1 one runs, wait 1 frame, run 2, wait 1 frame, runt 3d
All 3 being printed from top execution
No sequence doesnt wait
It executes the code as it gets to it. a delay simply says "dont execute whats after me yet, move on"
213¤"%¤´"#¤"!#¤
its like it dosent save array at all not
what the hell isgoing on
you're updating an array at editor time
it's not reliable ..
im even trying to add a seperate array on the child
and set it to the parent
but the child array is reseted also
red ones happen the first frame
yellow happens the next frame
what in the....
yeah <<<ZzzZ>>>
Shouldnt it wait until the next frame before moving on? Since it does work like that, it does apply all 3
a sequence should be the same as a long line of code, and it should delay next frame when that node is called
not as in a loop
regardless, i do get it to work with a "manual" for each loop like this
Does anyone know how to change the wind component variables at runtime? none of these work :/
No it doesnt wait, it doesnt know to wait
Why not? Its calling a delay?
Yeah but... its not that smart 😁
Wait is like an event dispatcher called in the future by the timer manager
The code executed in the bp forgets about it after calling delay
this should wait 1 frame between printing?
so whats the difference between that and sequence?
should be the same, only different formatting
you seem to be right though, it all runs during 2 frames, not 3
i dont know how i would solve this tbh,,, wy the fuck is the array resetting>.>
coldsummer
what version were u on
when u noticed the but
bug
im still on 5,1
maybe its fixed on the later ones ?
Delay calling delay is different from a sequence calling all delays
Interesting
but the above 3 was all called on 2 frames as well
The first print should be printed on initial exec
Second one 1 frame late
And 3rd one 1 frame late
To prove this you can add a sequence at each step
With an additional print for the framenumber
I mean this one prints on 2 frames
not that this was my initial problem, but its interesting nonethesame 😄
Thats odd
Try game time instead
Of framenumber
There could be a race condition
Giving you false positive 🙂
using seconds only gives me 0, cant seem to find a good node to use
all return 0 :S
I tried a different button and it works perfectly
i know this is a bad way but im not sure what else to do now tbh
is there a way to use the "behavior is enabled" combine it with some instance editble stuff ?
i always forget how to get this getText from variable
just get text
doesnt work
its a text box
Hi, I'm trying to follow along in a tutorial, but the enhanced input event isn't working
yeah drag out from it get text(text)
it was working before i changed the text box name
but it was working before i changed the text box name
you cant get Text (text box) from a normal text commponent
only from a text box commponent
if u use a "Text Box" then u can Set text/Get Text
Delete the var and grab it again
Its buggy these days
ah thanks @gentle urchin
Still struggling with this. Maybe there is some LMB event that wasn't properly deleted; is there some way to regenerate the blueprints bytecode from scratch?
Maybe you have a hardware issue?
Have you tried a diff mouse?
Same issue on a different mouse
Damn
maybe it has to do with the widget I have on screen, but I'm not sure what to do
Is it consuming input?
Doesn't seem to, I also checked with widget reflector
I'll give that a shot
Seems to change the behavior slightly, but still requires a double click
Is this only the first time you run the game?
Yeah it isn't that
Did you remove your old input stuff from project settings?
there are no lmb in settings
Search for the old input node and for things like enable input or disable input across all your bps (ctrl+shift+f)
yeah Im using enable a few places
For what purpose
legacy, I was using this ui widget that was misbehavingh
Ok, can you get rid of them now that you’ve switched?
You think they cause problems?
They could, normally you don’t enable or disable input with the new system , you just add and remove mapping contexts
And sorry, just for my sanity, what trigger are you using on your input
with Enhanced Input it looks like this
Ok good
Show the IA node and the part of your code where you add the mapping context
Why are those greyed out, did you just disable the nodes instead of deleting them?
yes
Ok but the IA itself is also greyed out …
yeah, if I use it instead of those 2 events, same behavior
is there a way to get a characters world location from where there capsule touches the floor? I would imagine I would just need to remove the half height from the actors world location.
K well we need to narrow this down with EIS so get rid of whatever those execute on server nodes are (disable their connections), enable the IA node, and get rid of the clear all mappings which should be useless if that code is happening on begin play
sure done
Any change?
No
Swap pin from started to triggered
Also is LMB present in more than one of those 3 contexts ?
nope
no change
Btw where did those server pressed and released events even come from, whats calling them
But they’re disconnected now right?
yes
Change the string to something more relevant like Pressing, just so we don’t have Hello multiple times
Ok, so it never fires even when on triggered pin?
correct
@frosty heron u here:/?
it fires on the first click, but not the second one
Wait what
don't ask me man UB
I thought you said it didn’t fire the first click but it did on the second
First, it will fire on first click, no double click
Then, it takes a double click to fire
or it will fire on first click, no double click
Well which one is it lol
I’m confused
Ok
So after the first click
It stops working properly?
as I described it, yes
funny how you don't need a double click to reach the first pressed breakpoint the first time, but it is required for subsequent clicks
So you’re doing something on the first click that’s breaking it
Ok, do a simple test, disconnect everything after the print
@steady night wat's up
yoyo so ive been testing out ways to rework the talent tree thingi with unlock and stuff, i cannot find a viable "workable" way to do it tbh
i need advice
if i cant fit them widgets in an array idnno how i will procede
highkey using a keyboard key instead of lmb and it works is indicative of needing a fresh project
Maybe. Where is this code, character or player controller?
@frosty heron
Ok, well you can try moving it all to player controller. On begin play, set input to game mode only, followed by set input to game mode and UI (don’t select any widget), Set show mouse cursor if you need to show it, then, grab the input local subsystem , check isValid? , if valid, add the mapping contexts. In that order
If it still doesn’t work, I got nothing
gotcha, thanks for helping :)
Wdym you can’t fit them?
they keep reseting when restarting
When restarting the game?
y
Why would you expect them not to ?
wdym
im setting all the arrays to content everything works
then i restart and some are reset
Are you using a save game object to store the information ?
no
Well nothing else really persists past runtime except for the default values
well this is a unreal engine bug it has to be
ive tried different ways of storing widgets in an array
they all reset
Sounds more like a logic issue. Why do you need to store widgets past runtime?
try it yourself just do a random array and store some widgets
thats how im locking/Unlockiing my talent tree
Yeah you don’t store widgets, widgets are transient
What you can do is save info in a struct and put it in a save game object so on load it reloads that information and regenerates your tree
Read up on save game object, just keep in mind bp structs are kinda broken so you might need to make them in cpp
yeah i know
hate structs,
but nevertheless
i would have to store widgets in the struct
No
You don’t store widgets
As in they do not persist past runtime
What you can do is use an array of integers for example, where each int represents a corresponding widget
And you recreate the widgets and populate them again on load
At least that’s how I would do it, maybe #umg has a better way but I doubt they’ll say you can save a widget
At most, maybe you can do stuff in pre-construction
hmm
how come some are not reset then and some are :/ ?
if u wouldent be able to save any
I was away but I am also facing the same problem and can offer little advice
since i don't care about my old proj, I just spaghetti with manualy drag and dropping them
i will open it one sec
y but like how ? aye ty
You just click the widget. Get the array, and add on pre-construct?
that will be the same thing right?
oh but then u cant use same widget multiple times ?
not sure what you mean by that
You should be able to get one of your spell, get the Targets, then just add the lines to it
like the "Armor" widget
ive use multiple times
i have widgets for only "add stats"
well since u are manually placing them, you would have a ref to each of the armor
Perhaps the 1000 IQ move is to spawn the widget on Run time, I have no idea
k too much explicit words
i mean
u have to respect the grind
lawl
i mean i will have the biggest graph ever just ot set these bad boys 😮
probably gonna do it in cpp tbh
less spaghetti
Like i try to avoid any cpp in Widget but for this maybe I have to learn something new
right, imagine if u have like 200 spells
if we have to manually do it, that's not efficient at all
Hi all, my project has developed an issue. There's a single BP that does not seem to load on beginplay when in standalone game (it loads fine in editor). It's a custom BP (though I have several other custom BPs in the same level and they all load fine) and I'm using an open world in UE5.3 that's loaded by World Partition.
The BP has always loaded fine before now, it's only started recently.
Any ideas welcome
zzz i had everything working this morning with a perfect system now this stupid wiidget stuff is runing alll 😦
I think I wouldn't check with obj reference in the future
hm
just ID every single spell and let the system work it out
Define does not load, what kind of bp is it? Was it initially made in cpp?
hmm is there no way to add some kind of editible instace of the pre construct of the widgets
you can have variables as editable instance in the widget
true
just not gonna work the same with array of obj ref i reckon
Hey all,
I have a BP actor which is creating a little grid of BoxVolumes. Its configurable in the Editor, when you change the Rows/Columns, it'll regenerate itself (via the Construction script). This appears to be working fine.
I have a function to generate BP actors on that grid (one actor per box volume), and that function has been set so it can be called in the editor.
Dragging the grid actor into the world the grid (box volumes appears) and I can then click the button to call the function to spawn the actors into the level. All good.
What I'd really like is that once the grid has been created, this function is automatically called. This would give one set of random actors on the grid, and my level designer can then call the function by clicking the button again (and again, and again etc) until they are happy with the random generation.
My problem is that when I add the function to spawn the actors to the end of the logic in the construction script, it advises is cannot call SpawnActor because its in the Constructor.
I've had a look and there doesn't seem to be an event/delegate I can grab hold of to notify me when the construction is complete. If I try to add my own, I would then be reliant on something that is called after the construction in order to bind to it. Which I dont have, and if I did, I could just add the call to the function there anyway!
Any ideas?
hmm
i tried doing it like this
but still resets .. so
im guessing the drag n drop is the only way to do it
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
Correct, you can’t spawn actors in connection script
Ok. So, is there some event I can access that would be called after the construction script has completed (in the editor, not at run time)? On a BP actor (not level)
It's just an actor. It was not made using CPP, no.
Can someone tell me what is going on here? Is it taking the value of ORIG Item Weight and adding it to another value and then setting it to ORIG Item Weight?
@frosty heron how much would i cost to just use the Behvaior" enable functions in the widget instead then ? they alll willl have their own tic but ?
I think that's like saying "ORIG Item Weight = ORIG Item Weight + SomeOtherValue"?
Yeah thats what I was thinking. Thanks for the help
How about in game? I had mine in event begin play but I thought pre-construct should be fine since the object exist
Maybe test it with a couple of values, and a result that you would expect, and see if it gives you that result etc
Well, I just do it on Event Begin play and I can use your equivalent of FireBtn array without issue
and if i use the object referense then it works but i would just like to be able to addit from the design graph instead of the "grah"
Yea that is not something I can do either
I tried
and now I rest
Runtime vs editor time
xD
You need persistent data
You can store the links in another object
Like a uobject
Or data asset
Yeah it is weird
The data must be independent sorta
Like my editor quest widget
Builds up based on external data
👀
I started testing editor widgets the other day, they rock 😄
Im messing with editor utility widget right now, saved my day
got hundreds of material to edit and ain't no way to edit it manually
made script to turn on their staticswitch
Bulk edit via property matrix
can someone help with velocity based camera for a vehicle?
🤔 gonna check that quickly
I don’t believe there’s any events between Construct and runtime that would allow you to spawn an actor if that’s what you mean
Blutility could prob help younout
Is it suppose to be an option?
Select the actor -> press the button to spawn the attached actors
Yeah, that's what I mean. I guess what I'm looking for is what the person is doing, e.g. the button for the function is exposed and clickable, but it requires the person to click it, so the editor, at that point must know its moved on from construction (otherwise surely we'd get the same SpawnActor error message). So, if the editor knows its moved on from construction, I want that knowledge available to my BP actor, so it can call the function itself.
Editor widget for this would be quite fast to make tho
Usually everything I've done so far has been for runtime, but on this occasion I'm trying to make something that the level designer can tweak/change, but clearly I'm getting it wrong 😦
Yeah no, that makes sense
Yup, I finished it today. got C++ that output all the asset from a folder. I don't know how to work with ARFilter yet... so I cast to get my materials
What's the best way to have random time in timers? is it possible?
Was this for @keen wedge ‘s question?
Just use random int float in range
I guess, to give it other context, if it was a "Trees" asset you dragged into the world, you'd kinda expect some trees to be visible immediately, and then the level designer could hit the "Regenerate Trees" button, which calls the function that removes the trees and respawns the tree actors randomly again. But, its that first call etc, the one that gives some initial trees thats the challenge.
I mean changing in between events, using a random float there would lock the timer events to whatever that float turns out to be right?
When the event fires, set the timer again with a random float.
Yeah
An independent actor thats not reinstanciated and whatnot while its editing itself
@keen wedge https://www.modelical.com/en/gdocs/blutilities-one-best-way-speed-workflow-within-ue4/#:~:text=Blutilities (blueprint %2B utility) are,as repetitive actions can have. And see docs there seems to be multiple events in there
I'll take a look, thanks, and to @gentle urchin, sorry I hadn't realised your reply was to me etc.
Noddy video of what I'm trying to do... those box volumes are the grid, resizable, but want the actors to do an initial spawn, before I click the button, which would also allow for them to be spawned once the sizes were changed etc:
https://youtu.be/EF69eqILaO8
is it good idea creating and saving directly in GameMode?
Don't make it loop
you just set the timer again everytime u finished
Example
Or clear and invalidate and call it again from wherever in case you don’t want an infinite loop 😛
Its quite had to tell from their documentation how its doing anything other than exposing a button in the editor which they then click (to place their 500 trees in that example).
On a related note, do you know if its possible to restrain the movement of actors in the level? For example, if I wanted the level designer to be able to move a cube in that grid, but say only up to 50UU on X and only up to 50UU on Y?
Thank - I'll take another look
So trigger it again and again? What's the difference of not using one at all then?
Not sure if it’ll help but there’s at least some events listed iirc
I am not sure what your goal is
are you trying to make a timer with random time that run once
or run recursively
Store the base location in some vector that you can manipulate
And on construct verify location with consteained area
run continuously with random timing @frosty heron
Altho this sounds a bit troublesome for a designer..
Arent they ment to decide this 😄
Then what’s the problem with his suggestion ?
NeoExcidious
Ahh, ok, so that would go in the constructor.
I did not
no problem, I'm just trying to understand the difference of using a timer like that or just simply re-triggering whatever I want manually with a delay?
I repeatedly said not to try saving widgets past runtime
Absolutely, but within some bounds. For example if you had a spawning area which had a number of player starts within it, I might be happy for them to move those player starts around to their hearts content, but, only within say the bounds of a volume that has been pre-determined, perhaps because it has some other relevant logic, and if they drag one out to the other side of the map it'll screw the pooch.
aye ok and saving before runtiume then :/ ?
In this specific case (if you see the video linked above), I'd like them to be able to add some variety to the cubes within the grid, move em forward, to the side a bit, maybe some rotation, but still keeping the pivot/transform within the confines of the grid box volume... as there will be other logic on this which is trying to determine a path through, so if they can move them completely arbitrarily, they could create a situation where there is no longer a path through
I suggested 2 things: 1. Asking the right channel #umg 2. Storing integers that you can then load and use to spawn a corresponding widget
Hi , I am using U5.3 and I add MQTT plugin and, it doesn't work and I have these errors :
LogMQTTCore: Warning: Couldn't connect to MQTT server: There was a socket error.
LogMQTTCore: Verbose: Abandoning Operations
You could probably do it with a retrig delay too, just no way to stop it
No idea what that plugin is, maybe try #ue5-general
That's what i've given? if you want to stop it at any point, just get the handle and clear and invalidate timer.
The difference is if you are using loop, you are fixed to the timer with what ever random number you previously got.
Lets say if it was run at 3 seconds, it will just keep looping every 3 seconds.
When you are doing mine, we call the Timer again using new time so you get random time every time it goes back to the InitTimer function
Are these doing the same thing?
Yes
That is odd. Is this a place actor or spawned
it's placed, so always there
With floats you may also wanna remember nearly equal
Instead of exactly equal @noble ledge
And it just disappears at runtime?
the last branch is also connected...
Yes, I've double checked by doing a find actors of class on other BPs, and it's not there.
srry new info it always removes the body
I would like to make an unit that looks like to fly (a drone), for now it's a Character with a thin and tall capsule (to have all the AI movement following the navmesh and not overlapping too much with other units).
I need this drone to move to a target and then swoop on the target.
How would you do this?
- Have a Character and then swap it with an actor that has a rectilinear trajectory
- Have a Character and then change the profile of the capsule to "overlapp" only and then do the swoop>
- Other suggestion?
Weird, is destroy actor being called anywhere for it?
Try checking 'Size to Fit' on the set array element node.
nope, as I said, it works fine when I run the game in an editor window
Are there any multiplayer elements in this game?
no, just single player
Doesnt work
Very odd, not sure
What items are you adding and what disappears?
no worries, thanks for trying, all valid questions
Is this a bp struct btw?
I’d test in a packaged build if possible
will do, I was also thinking of deleting my temp project files too
Okay so When i equip the shirt and than the staff nothing happends but when i equip the shirt or staff and then the spell (a bp class) the last one disapears
is the data still in the array or is it just the representation (mesh I would assume) in the world that disappears?
.
Is this a yes?
So you made that struct in cpp?
just the mesh
wdjm
bp
How are the staff equipped and armour equipped vars set?
K well bp structs are broken af, especially when it comes to editing them at runtime, so that might be a reason
In this case, I don't think the struct is to blame lol.
any solutions?
If that is the issue, you’d need to remake the struct in cpp
Ok, so when you add an item you need to update both the staff and armour. The moment you equip a staff nothing else will update below it unless its unequped.
But maybe patty has a better solution
how can i do that
Quick question: Instead of casting to the player character, how would you go about using an interface to get the character ref (third person character)?
Generally, I wouldn't't use an interface to get a ref to the character.
Depends on where
Interfaces are not for getting refs
Oh lol i read interface, not getting ref 😂
I figured, and confirmed. Just wanted to double check if I was thinking crazy haha
Getting ref through the interface has the same issue as a regulsr cast has
One thing i learn, if you have source control and you are editing/adding a bp struct member, save the struct, but discard the changes of all the other bp that contains the struct, unless its also being edited. Either recompile all the bp that contains the struct or discard the changes that it brings when editing a struct.
Interfaces are great for sending a message to get something to do something, but casting can work to get specific custom controls
I'm pretty sure I seen some sort of hack where someone was using an interface to pass information through from a player character, something like this
nani da hell
Is that ... bad ?
Well it looks like an issue with the general logic for updating (I would assume) held items. What happens if you add an item and have a staff equipped? From what I can tell is it would attempt to set the staff mesh to what was just added.
Seen that before yeha
Lol I don't think so? I'm trying to wrap my head around it honestly haha.
What is the point of that function...
Ye there is one dude that make tutorial that does it
If you already have a ref to the character to call the interface, you might as well just cast.
You would already have the player ref when you call that func
Yeah same, I haven't tried this method out before. I'd assume you make a specific interface function, then use the event/function in the player character to get the ref and send the info out
I think it is because the target might be set wrong since it is not a mesh i spawn when the other item disapears but a bp called parent projectile...
Lol For sure. I'm asking because I seen someone do this and was like "but why?" haha
The only time I would use an interface to get an object/actor is for things like the current held item from the target player. (Assuming I'm not using some sort of component to manage the inventory)
Indeed!
Gas use interface to grab component
Thats probably because you need to pipe from avatar actor to owning actor to get the component
If the asc is at playerstate or some other actor
And its still convinient to just ask the avatar actor "hey, gimme asc" and return accordingly