#blueprint
402296 messages · Page 844 of 403
read it too quick
in that case then yeah thats good, unless unreal's for loop has built in overflow handling
then what should it look like? some screenshot?
I'm curious about the second option
like that i imagine
so anyone know what eaxctly is happening in Remove Index BP Node?
Don't forget to -1 the NumOfItems
thanks 😉
I'm only worried about performance in 40-100 positions
can it somehow be replaced so that it does not have a bad effect on performance?
Unless this is running on a legitimate calculator, I wouldn't bother caring.
Even then I'm not sure I'd care. 😄
generally you never have to worry about that
you could loop through it every frame and it still probably wouldnt matter that much
be a bit pointless
but theres a lot worse you could do
Like sweeping character movement calculations. 😄
Depends alot on whats done in the loop
see this
true, but just looping through an array is pretty light
i mean if thats followed up with like 12 get actors of class, and spawn 12mil poly meshes then it might get a tad problematic
i might put away the calculator for that one
unless its like a ti-84, it seems they can do anything
The amount of loop filtering and checking, and such that goes into UI design would make some people cringe.
UI design makes me cringe anyway tbf
It is certainly a different way of doing things for sure.
so i don't have to worry about that? 😄
Add about fivefour zeros before you have to consider worrying about it. -edit: Blueprint and all.
Not untill it becomes a problem 😄
Anyone know why I can't assign Object references within a DataTable? It just skips the field in the row editor
First curiosity is the name. Will test.
Maybe it's worried about referencing itself? But I can still set the data manually in the CSV or something
What are [EventActorBeginCursorOver] & all other click interface functions based on? I mean, a component could have it based on collision+raytraces (I'm guessing) - this one however requires the mouse cursor to be in an area roughly somewhere around the blueprint's scene root. I would need to use it since working around the components would be a pain, but idk how to make it's "hitbox" bigger/tweak it since idk what it's based on. What does the engine mean by "actor"? It's bounding box? Instructions unclear 😅
Oh, wait, no.
You can't assign Object references as static data.
What are you trying to put there generally?
Depends on the Itemslot, it'll be a Material OR a Static Mesh reference
or Skel Mesh potentially
yes
Hmm. I'd assume that it's an issue with assuming that uobjects can reference instances of things instead of static assets. You can change this to a SoftObjectRef though.
lol it was working fine in the struct (I made it a map originally, but wanted to be make it a table so it doesn't have to live in my game instance or something)
@odd emberThen, why doesn't the bounding box take into account the huge meshes the actor has as components? 😄
perfect, thanks!
Should probably be a soft object ref anyhow. 😄 Best not to hard pointer that stuff in static assets unless you really need to.
You right 😄
if it's perspective, maybe something is obstructing it?
@odd emberfair point, i'll check. thanks!
Get class default isn't passing my variable value to my inventory system. In my items they automatically get there info from a datatable and that information is stored into a variable which is accessed in the inventory by the get class default node.
The item detail variable is getting the correct data. I've checked it with print strings on the items and the correct information comes out. But when I access the variable in the inventory system using the class default all the data isn't there. If I manually set the data in the item details now it shows up.
Get class defaults also isn't showing the correct values even in the item class. Even though the info is going into the variable correctly without problems it doesn't show the data inside the class default unless I manually input it
I'm fkin retarded - it was the fog sheets with collision on 😒 U saved me hours of pointlessly digging stuff online - again. Thanks! @odd ember
hey all, is it possible to create a bp spline with attributes to control how wide a mesh is?
Yeah
i'm creating a pavement/sidewalk and need at times for the pavement part to be wider.
but it can get pretty complex i suppose
if you want it to be just 1 spline atleast
Wut? I'm confused, are you getting your data from a datatable or the item's class defaults?
You cannot edit the CDO in blueprint, and you should not edit the CDO even in C++.
hmm, i have seen you can have multiple splines in a single bp right?
Im using that node to retrieve the item details variable but the updated data isn't showing up
It doesn't get updated. You don't change CDO values except in the editor in the blueprint class.
nvm - i'm going to watch this https://youtu.be/wR0fH6O9jD8 - i think i'll find my answer here
In this Livestream Tutorial we'll show how to use both Spline and Spline Mesh Components to construct an easy-to-use racetrack generator tool in UE4. Viewers will learn about custom structs, functions with local variables, using for loops, and much more!
[00:00:45] - Google Drive file - https://epicgames.box.com/shared/static/2ws205gi1nct0g5vvc...
The CDO is a default object that is created and held in memory so that Unreal can copy it for quicker object instantiation. When you edit values at runtime on any instance of this class, you are not actually affecting the CDO at all. It retains any values it had when you start the game up.
Im editing the variable in the constructor thought
Construction script or Constructor?
Construction script
That runs on an instance after instantiation, not the CDO.
People, I have the image below describing a Widget Component I have in an Actor. Looks neat.
However, if I get far, this is what I get
What I want is to always have my Start Match \/ to look at the center of my mesh
This is the Widget component config:
I'm not exactly sure how to achieve that. Ideas? 🤔
It is at the center. It's just a matter of perspective.
It is, you are right. However, I'm not sure how to "bypass" this perspective to force the Widget to always feels like it's at the center, no matter what. Because what was shown above looks clunky.
Posting this again since no one responded.
Hey, so I am trying to tie the FOV of my game to the velocity of my first person character, but for whatever reason the velocity is set to 0 when I crouch, even when I am crouch walking around. This causes the FOV to just jump back down to the base value instantly when you crouch. Any ideas why this might be?
Maybe establish a point on the bell mesh and then raycast to the camera and place the widget in the midpoint of the raycast
Is there any difference in how you control the character when running vs crouching. Ie maybe if you were using forces to control when walking, but a fixed movement input when crouching?
No there’s no difference. I’m just using the base Unreal crouch and uncrouch functions.
Hi, I'm new, I'm trying to figure out buttons for doors/animations but without using trigger boxes because as it is right now you can open the door from anywhere in the box but I want it so you have to look directly at the button, any thoughts?
Look into traces
Sorry, i only just started coding this year, what are traces?
How would I edit my pawn movement speed from the Behavior Tree blueprint?
that's cheating!!1
Thank you
I HAVE VICTORY
🤔
This is a personal widget component of mine. But if you replace GetOwningComponent->GetOwner with a passed in variable of your actor that has the WidgetComponent, this math would let you point the bottom center of the CanvasPanelChildWidget at whatever you project to the screen.
May need raised a little with some Y subtraction, but it always points that V at the target.
Hmm. Just gonna go archive this into a blueprint function library in C++ now. Neat function to have.
I read this in the voice of michael scott from the office 😂
Close enough. 😄
Does anyone know how to find ghost references to an enumerator? All I know that there are two references in a particular blueprint:
1. ExecuteUbergraph_BP_Character_Player
2. K2Node_ComponentBoundEvent_1
For context, I am trying to delete this enumerator
But every attempt to delete the enumerator causes errors because of existing references to it
And when I re-add the file, I can't find the reference at all
Uh, ok, it magically disappeared
😨
Just gotta figure out why my Blueprint Interface is still hanging onto it
Ok so. I figured it out, and this is dumb
I had to force save the file
Or make a random edit to save
So, I was experimenting with your solution and one question came up.
This is occurring inside the User Widget file, right?
Yes. Everything screenshotted was in the UserWidget's Tick.
What I quite wonder tho
Is this a Static Mesh? 🤔
Or an Actor?
The type of it I mean
Actually that was an Actor, yeah. 😄 Not sure why I named it that. In that case it was the actor holding the WidgetComponent that the Widget is in.
How i can cast to a custom Actor class ? I cant get actor -> cast to my BP.
Why can't you?
That's a neat function, indeed! Honestly, I've always had this problem I raised and never got the balls to overcome the issue myself. So I'd buy it if it was a Marketplace plugin 😛
Anyways
which node is it ? I have to get actor and then cast to my custom BP actor ?
My Widget is invisible 😦
Not invisible... Like, it goes off screen to somewhere over the rainbow I can't see
And I believe it's exact the same code?
This GetRepresentativeSceneComponent is just part of an interface that asks the Actor to pass which SceneComponent represents the mesh I want the arrow to point to
And the Wrapper is the equivalent to your CanvasPanelChildWidget
Hi Everyone,
I've been following this guide to implement a way of sending an URL via WebRTC/Pixelstreaming into unreal:
https://docs.unrealengine.com/4.27/en-US/SharingAndReleasing/PixelStreaming/CustomPlayer/
See the attached pictures showing my work against the example in the tutorial. As far as I see, the code checks out. But I'm not setting the affect. Does anyone know of a good way to debug this? Increase verbosity? writing to the screen/log file? Something, so I know what's going on unreal side 🙂
The URL is inject like this
I've got a question about the sequence node. Is this the same? (ignore the fact that in the first picture there extra nodes connected. This is just an example).
Yes and no ?
I'm looking for a node that returns true/false based on a list of strings. (eg if any of the string is found)
If your Hierarchy is correct as in a Canvas and then your Wrapper in it, I'm unsure. this all looks correct, unless this tagged function here is causing trouble. Like not returning a valid scene component, or the world refs acting weird.
Sequence will execute them in order, but not latently... if something hold up on any of them, the rest is finished immediately, so to say
That's what I wanted to confirm. Thank you very much!
I know there is such a node just can't find it
Given this scenario
the outcome is identical
but as soon as you add some latent stuff to it,
they will differ
In the first example, 2 bools will be set, then delay, then 2 next bools will be set
using the sequencer however , will set all 4 bools instantly,
and whatever is connected after the delay will be executed after the delay
the "Sequence" is asap firing off the next event
@maiden wadi This is the structure I have. Pretty close to yours, except that the Wrapper is not a VerticalBox but a SizeBox.
But I bet this wouldn't be the culprit.
This should be fine. It's the CanvasSlot that matters.
I'd double check that other function first.
BTW if anyone can help me so this blueprint issue, there's a bounty
Yea I'm doing that right now... Let's see...
So, after some investigation @maiden wadi
This is where my Print String is
It seems correct lol
I need to dive deeper..
But your idea on how to "address" this problem is just shiny. 😄
That's odd. I don't see anything wrong with your stuff.
Can you print before the SetPosition what is coming out of the minus node?
Is there a shortcut to focus on a node if your Zoom level is too low ?
f
doesn't work on nodes for me
in event graph, you can double click it
if it's a specific event you want to focus
unless i'm misunderstanding
No I want a shortcut to focus on all types of nodes
like for instance I have a branch I need a shortcut to focus it because my middle mouse button doesn't work properly (when scrolling)
so like the F button in the 3D Sceene to focus on objects
Hi all! Duplicating question my question from #cpp because don't know were exactly is my mistake xD
I have weapon c++ class with declaration of overlap events (it seems correctly because same code working fine with another actor) but overlaps for weapon never called. Where the mistake can be hidden, what BPs should I screen?
ok it works
my WorldStatic objects can register overlaps but not hits? yes i've checked simulation generates hit events
Looks like you have the "Collision Enabled" option set to NoCollision. This at least needs to be set to Query only.
how would you check to see if a material is applied on a static mesh in an array?
I have this so far and can print out all of the names of the static meshes from the sharedroot but cant figure out how to collect the materials applied from the children components
I've tried that but nothing comes up when pulling from the array element.
Is there a shortcut to focus on a node if your Zoom level is too low ?
I do have Context sensitive turned on
ty
Should work. May want to drop into a function if it's a simple bool check or retrieval of a single mesh component for early return.
can we ask nooby questions in here?
Nah. They have to be entirely noob. No nooby halfways allowed.
lol
aight well this ones pretty bad so i'll see if anyone responds i guess lol
so i'm going to try to phrase this well.... I want to call a function from my gamestate to end a players turn, but I want to call it from a widget on the clientside player controller. It doesn't appear to do anything even though the player controller intermediary function is set to "multicast" or "runs on server"
any thoughts?
You cannot RPC to gamestate directly. Your widget can trigger an RPC on the player controller, and once running on server do the stuff on gamestate.
i'm going to research RPC and try again, thanks
So have a "Run On Server" event set on the player controller that will call whatever you want to do on the server in the gamestate.
Then your process would be:
Push Widget Button > Call that newly created Run On Server event on Player Controller > It'll end up doing what you want on Gamestate
thats how i have it laid out now
let me grab screenshots
lmk if you spot anything, i'm unsure what the gamestate function should be (multicast orrun on server)
Should be nothing. You're already running on server from this point.
lol
i think i might have spotted it.... i didn't connect that player index on the second image
lmao
i guess i'll use this as an opportunity to ask why this code works when i run "play as client" but not "listen server"
its kind of a mess though lol
@unborn compass You're always telling it to end player 0s turn. That is incorrect. If you have more than one player you'll have different indices. You should just pass over Self from PlayerController to EndTurn function in GameMode or GameState and let it figure out the index if needed.
Every player is Player0 LOCALLY but they have a different index on the server. Don't use indices until you're serverside.
Im having a problem with the new water feature, and I hope maybe you guys can help. I am sending out a trace of the projectile arc, which is fine, but what I really want to do is determine the firing angle from the end location, maybe using physics. What I am trying to do right now is to use the camera and a line trace (the red) to find out where in the water they are pointing the camera. The problem is that the line trace does not seem to interact with the water, it just goes right through. It works with the projectile trace though, just not the line trace by channel. Idk what to do. Also if you have any tips for this kind of mortar thing let me know thanks!
thanks for the response, this image is from the gamestate
and the 0 from the == is just to seperate when one player ends vs the other
essentially "is this player 1 or 0 ending turn, true is player 0 and false is player 1
Also the player controllers know their indices as i've had it sent to them earlier in the program
like i said, this works completely as intended when using play as client, but on listenserver something doesn't get sent at the beginning
I'm having trouble with checking for a gameplay tag on an object. Im using on actor begin overlap event and then checking of the overlapping actor has a certain tag and displaying a message if it does and message if it doesn't. I've assigned a gameplay tag to the actor and even checked if it's assigned by displaying the tag as a print message when the game starts up.
When the actor overlaps, the result always returns as false and I'm not sure what's going wrong.
i saw in a youtube video that you can see when the functions fire on the editor, like with those "bubbles" moving down the line of functions
anyone know how to do that?
That's just what happens in PIE. I believe when it's active, you can select the instance you want at the top of the bp editor
yeah it doesn't show the same red bubbly line for me when things are getting called
unless maybe it only does that for things that are happening constantly
The function you're using assumes your actor implements the interface: IGameplayTagAssetInterface which is not implementable in Blueprints. You'd need to make a base C++ class if you want to use that and implement the interface on it.
If you want to do it purely in Blueprints you need to either try to cast Other Actor to your class and then get the tag variable directly to compare or you could make your own Blueprint Interface and have that return your tag or a tag container
Hi all, so when the length of an array is counted does it start counting at 0 or from 1 ??
I am having an issue where my array thay have item 0,1,2 when I go through and I do a check if less then or equal to item index in array against length of array it not working
I either have it not do last item or it adds an additional item to end
An array of length 5 has indices of 0, 1, 2, 3 and 4
can anyone else see the pictures people uploaded to the unreal engine forums? everytime I click on a blueprint it says page not found https://forums.unrealengine.com/t/line-trace-hit-normal-when-tracing-on-edge/388491/2
Isn’t that just the correct normal for the face the trace is hitting? The edge itself can’t be hit by a trace yeah, it has no surface, so it either hits one face or the other. I’m not sure how Unreal determines which is hit in that case. But you’ll get the normal of one or the other. So some sort of averaging/smoothing would work. You could do...
then I cant see the blueprints people use, it use to show the pictures
So when I check if equal or less than it would be wise to minus one from my array length so I get the right length that matched the 0, 1, 2 etc ??
Or would I start my index number on 1 by default
Or just use less than instead of equal or less than
there's also LastIndex which is length - 1
So instead of length I can just do last index and check that against the index number
I would prefer the length to match with the 0123 etc then length starting at 1234 etc
Would using this allow me to do that
So you want length 0 to be 1 item at index 0?
What would you advice
Would it be better to start my index on 1 so it matched with what the length would return
It would be best to use arrays how they are meant to be used :/
Like
If you want to check if your index is valid: >= 0 and < length
So basically I want to check when I have gone through the total number of array items
So I do something add one to the index and grab next item then do a check and repeat
Until the item grabbed is greater then length of the array when it will do something else
Is there a reason you're not doing a For Each loop? That will go through each thing in your array and then has an execution pin for when it's gone through everything
If I save a static mesh variable in a Save Game Object, will it save all the mesh data (vertices, tris, etc.) or will it save a reference to that asset on the disk?
Is there a way to get only a location in the red area and not in the orange/yellow area? To get a location in the yellow area and not the red area?
If I wanted to stick to blueprints, wouldn't there be no difference really if I were to use regular tags instead of gameplay tags? My understanding is I cast to Other Actor and then retrieve the tag info from it, convert it to a variable I can use locally within the current actor and then use that to check? I feel like this defeats the whole purpose of gameplay tags as a whole. Please correct me if I'm wrong
Well, if those areas are circles, you can check for distance from the center and decide if the position is in the required area or not
Ok I'll try that out, thank you
Hey there. I'm a bit new to sockets. Any reason why this is spawning and immediately falling to the ground? Thanks 🙂
Maybe it has physics enabled on it?
I have bp exposed to cinematics but the keyframes I have set in sequencer are not rendering in movie render queue, anyone see this behavior before?
or know how to fix
@sharp rapids aha! That was it. Thanks!!
I want to have a deployable bipod system in my game. Players will be able to deploy their bipod on surfaces of different heights. Should I handle this by using different animations of the character's knees at different heights(seems like a lot of anims) or can I use IK to bend the knees to a degree depending on the height of the surface?
Sounds like an #animation question. Arma III had a stance system like that. If I recall correctly, they had multiple leg positions for different ranges of height, such as dropping to one knee, full butt-on-ground sitting and then finally prone. So it was a blend of different animations and IK; it's a milsim so it's simulating what a person would probably do.
I have question about node does save game exist no need to cast or anything to use this it will follow the default path on game contet right even if level persistent is different right?
Does anyone know why the widget doesn't remove from parent whenever I press escape with the menu already open
Replace destroy widget with remove from parent,
Also dont create a new widget if the reference is valid, jjst add to viewport
I mean I legit just have remove from parent in that function
And swap your bool with the integrated is in viewport check
Couldnt possibly know that 😅
How do I access a BP in a Level instance that was loaded using Load Level Instance?
Don't see that
I tried using Interface on the level blueprint, but it simply does not work, There is no way to access the level blueprint on a spawned in Level Instance
What are you trying to do?
I'm trying to divide the map into chunks and then load them in as needed, (like Minecraft)
I have a base level that I'm using as a chunk. I create instances of it at runtime. That base level contains one actor that is the placeholder of the chunk mesh. I want to access this actor after the level instance has been spawned in.
I tried using an interface on the chunk level bp that return the chunk actor. But calling that interface on the loaded level instance does not work. Load level instance returns a 'Level Streaming Dynamic' reference, which, after some testing, does not implement the said interface.
It seems you need the 'Level Blueprint'. But there does not seem to be a way to get a ref to it from the Level Instance object 🙁
@gentle urchin I did everything you told me and it still no work ඞ
I am the NeonContext person btw
Would it not be easier to just spawn the actor itself?
Guess ypu gotta show more code then. Both the destroy widget funcrion, and event construct in the widget
Yes. But I wanted to do it this way. for the added benefit of unloading the chunks (and everything in them)
You would still do that, by destroying the chunkmanager(which destroys everything in the chunk)
Set imput mode ui only is your issue
Streaming levels have instant Garbage Collection, that's why I thought about doing it this way
If you really wanted to, you could trigger it manually. Altho i'd rather try and reuse the chunks, but that may not be possible
I might switch to a single level if this does not work out
But my question still stands, is there no way to access something in a sublevel?
There is, but you need some methodto reference it. Be collision, trace etc.
The easy way is often just a simple manager
Which you let the actors register themself to on spawn
The Chunk is a single mesh BP with data such as Tiles, what occupies each tile, etc.
Every chunk also registers the items that were dropped by the player when the player was in that chunk
When the player is far enough, The chunk saves all the data and unloads itself
When simply destroying, The actors get destroyed, but they stay in memory (which pile up after a while and cause one big hitch in the gamplay)
When level streaming, the actors get emptied from memory at that instant
If nothing is referencing it, it gets gced on the next gc trip (usual worst case would be 10 minutes)
Minecraft monitors this and unloads by what appears like an interval and if memory exceeds designated memory
The gc used by level streaming and regular gc are the same ones, right?
Anything else would be double work^^
Ans as mentioned, you can trigger it manually if desired
Altho i wouldnt worry much untill you know the memory footprint of your chunk
Make's sense thanks
Seem's to be working now but the widget still won't remove
Yeah, I was thinking about that.
But idk why, Level streaming just seems more performant to me than destroying and gc-ing manually
(I haven't tested it though)
Check what code is running. Do some print strings
Premature optimization. I love doing it, but its often a curse :)
Fixing theoretical problems etc
What if ... And if... and then this...
I feel attacked, lol 😅
But yeah, I do that a lot
Not my intent😅
I was just assuring 😂
Anyhow
Id have a high level chunk manager, which all chunks obey,
And a low level one which internally handles the actual chunk
It plays all the code
It can't, unless its working :p
Also
Ur not setting the variable
"Pause Menu"
What?
You're just creating the widget
Pause Menu is just a ref to the widget
Not setting the pause menu ref
You could wrap the widget creation/getter in a function
I do have both of them. The High level Chunk Manager tracks the current player location and decides which chunks should be loaded and unloaded. And then there's a single Chunk BP, that contains all the data about that chunk.
I was split between choosing whether to use Level Instances for individual chunks or just spawning them in the persistent level
I'm gonna go with the second option for now. Will optimize later if required 🙂
Sweet !gl
Why would that matter?
Easier maintainability usually
Especially true for branches and stuff like that really
I just need it working
has anyone ever heard of a for each loop just skipping to completed? The array i'm using is not empty and the for each loop works when its called the first time, but after that as i'm stepping with the debugger it just goes right to completed without doing the loop body
i'm completely bewildered
So save your created widget to your variable, and it will work
Sounds like its empty the second time around
there isn't anything that modifies the array after it is set
its an array of player controllers on the game state and the for each loop only changes variables within the player controllers
Guess id ask you to show code then
Theres little reason to suspect it being an issue with the array iterator
Print length of array before stepping into the array
i'll try that
yeah so its showing as the array being empty.... i have no idea why though
that "firstplayerturn" is only called once from the gamemode
Getallactorsofclass is not considered good practice either
its only on setup and called once so its should be fine
this is all of the code in my gamestate
i just dont get why the array would empty
It seems the array is only set on server tho
Not replicated
So clients wont have access to it
I believe thats gamemode
Gamestate is replicated iirc
This is more #multiplayer tho
gotcha
Saved/stored it now? Did it work?
Is it possible to disable Overlap Event on a Box Collision for a moment to enable it later again ?
I'm already disabling collision but it keeps generating the overlap event somehow
oh wait
SetGenerateOverlapEvents could be what your looking for
in this setup, "Pause Menu" will be forever empty (nullptr) because we're not setting it to any instance
while if you set the variable like this ; it will work
However I would suggest setting it up something like this instead
I disabled the collision on the actor containing the box collision because using the box collision it has an event called "Set Collision Enabled" and with NoCollision preset it does work like intended, but the other parameter to enable is Query only or Physics Only or Both and I think it doesn't work properly with the player
I just tried that and it still can generate Overlaps somehow
at least on the client
Or even like this
cant you just filter the event anyway?
If its not ment to react to overlap, simply blocking it would suffice ?
Read above for example^
and printing my player state containing booleans where if player overlaps one of the trigger it puts to true a certain boolean (so each trigger has it's own boolean) and those triggers need to be enabled only at certain time (24 hours system), and using the Generate Overlap Events node it keeps printing true, so I don't know if printing the player state is client sided or server sided or both
how ?
Simply check if currenttime < endtime and > starttime ?
On overlap -> branch (CurrentTime < EndTime AND Currenttime> Starttime) ->
Something along those lines ?
I wanted an easier solution
a question I have what the box collision is at on the collision by default between all of theses states ?
Really not seeing how its easier how you've done it but oh well 😅
all the time its not working 😛
i think query is from traces and such ? while physics is .. well physics collision
That is usually set by you on the box component
In the 'Collision' settings
Oh yeah thank you, it's Query Only by default
Anyone know how I could replicate this? So that the flipbook is set on server so other's can see it
I need to know if the player state has 2 versions 1 client and 1 server ?
yes
how to get the server version ?
by doing it on the server
Likee, if the event is executed on the server, it will get its local version (Server version)
while if the event is executed on a client, it will get its local version (client version)
so I messed up somewhere then
The potential complexity of MP games is mind numbing... 😛
But like It prints the overlap on client and server on the first one at the right time, and the others only on client so all of that is good, but printing the booleans it keeps telling me those are true when I overlap triggers that aren't supposed to be active (even if it's not printing the overlap on server when I overlap them)
Server should do all these checks
Is it possible to always have the player state of the client be synced with the server one ?
those checks are done on the server
this print is in the BP_Character printing the boolean of the player state, so it's on the server so it prints the server sided player state
That's the Playerstate with the custom event "ValidateTask" being server side too
the only thing not being server sided is the "Begin Overlap" event of the Box but I don't know if you can make it server sided
Is this a bug?
maybe using the HasAuthority node ?
or just strange semantics?
that'll ensure it only runs on server
yup thank you
Is there a way to hide unconnected pins from all nodes across all blueprints? it's messing up my search results
sounds like a very unique scenario, so i'd bet no is the answer
At the top bar in BP Editor there should be a button called 'Hide unrelated'
does that filter them out of search tho?
Guys, how can I implement inventory logic with items that have custom variables (weapon ammo, sword strength, etc.) How would I best implement methods like 1) Equipment (as I understand it, we must first understand what type of item we take in our hand, based on this, get custom variables looking for the object we need and assign them when spanning) 2) Reset item 3) Pick up (as I understand it, we need to understand what item we should pick up, and based on this, take its custom data, create the desired object based on this and add it to the inventory)
I had a way to implement all this logic through Enum, based on the type of the item, already perform some actions, but wouldn't such code turn out to be too cumbersome? You will have to prescribe your own logic for each item and action. Or is this the only way to implement such logic?
Enum for type, Map for attributes (Ammo, strength, damage value, whatever)
Single player ?
hey guys i have little problem with object reference does anyone know how to fix ?
what do I use to get same result?
oh im so silly... thank you I fixed
for that first one i guess just drag it out and look for 'get player controller'
Hi guys, I'm working on putting in an export movie cinematic sequence at runtime function. So far I can easily output a sequence of images but I am trying to use the AvidDNx encoder plugin to output a video but when I do it outputs a video per frame (e.g. 600 frames = 600 videos rather than 1 video that is 600 frames long).
Does anyone know how to get around this?
What if Ammo is an int, while Strength is a float?
Can a single Map store them?
then you've created a problem^^
Strength would typically be an int in my book
if you need some decimal to it (1?) you can always have a 10x on the strength int,
reduced when displayed
so 501 strengt is actually 50,1
But you are correct, a single map cannot store two different data types.
I have a bunch of different variable types. So, I can't store them in a single map.
I have 'Tools' which have 'durability'.
'Clothes' which have Material Instances, 'display name', etc.
'Placable' items which have different conditions for their placement.
Currently, I have to create separate classes for all of them. There's no generic way to store all those variables in a single class
Maintaining all of them is a pain in the ass 😅
There's always a way, but if its worth the effort is another question :p
Material instance path could be looked up from a string and loaded that way 😋
Placeable would have actor class references
But I wouldnt advice this 😂
Yes. But different items have different placement conditions. Some would require there to be a coal tile, others would need a plain tile, etc.
The current approach has a lot of flexibility in that regard, where I can just overwrite a single function and define the conditions there
Yepp, that's how i'd probably do it aswell
even if it means a realtively large struct ..
with persistant durability etc it almost sounds easier to just save them as Actors or Objects and keep them in the level... almost
I am storing them as Actors 😅
When I have used a loop in the past its just run through. I'm doing this way because player has control of when to move on to next item in array.
It's hard to give good advice without proper context^ Knowing your codes intention helps in this regard
So I have text that appears on screen
Instead of having it all there I have a button which set the text to the next text. I am currently each time the bind event is called to update text
I am checking if the text index is less than or equal to the length of the array. So when there's no more entries I simply remove the widget
So far I think my issue is I'm used Less than or equal to so its adding an extra index where there is no entry
I would be better to do less than, as length starts at 1 but index array starts at 0
A question about widgets: Would it be better to remove a widget from parent or to hide visibility for when it's not needed? (i.e.: player wishes to close inventory or map but will probably open it again soon).
Okay, thanks.
Hey, I have this box collider on a door mesh that on begin overlap it creates a widget and adds it to the viewport, on end it removes it from parent. Right now the whole concept works at times it bugs, as if it doesn't read that I left the box at all, the widget stays on screen regardless
Here's a more thorough explanation
Any ideas?
but the code that opens the door has nothing to do with the widget
Suddenly it does
okay
lemme show you
It's a custom event that plays a flip flop connected to a timeline. The time line sets the value of frame at 0 to 0 and at 1 to 90 so it rotates. That's it
And your collision volume in relation to your pivot?
hm
alright
so you're not flipping around the volume
and you're not altering collision,
which is good
yeah
Is this really all that happens when you interact tho?
"Key input" -> Open door?
FP pressing the key input
this is in the door BP
and in the FP BP there is
right ok
Make the collision volume visible
uncheck "hidden in game"
in the volumes details panel
Drawback of crossing wires in exec streams!
Since it's not parented to the pivot
You're creating two widgets

which is the issue..
Exactly
Its good practice to save the widget refs 😛
Or have it exist in the char, and save it there so only one interaction widget is ever needed
If you were to create the widget on beginplay instead
and just alter its visibility on overlap
this would work flawlessly 😄
Alter visibility or add / remove from viewport , up to you ofc
I see
hmm
okay lemme check
hmmm so altering with visibility didn't really work all that well so i instead just did the adding/removing from viewport as follows 
Hi all, I have four ammo types and the lecturer only uses two. Would this be the correct way of doing this?
Fair enough, removing it should be pretty safe in this setup
It works, works well but uhm having some minor warnings that are just not fun
Its because the event is fired again

just check "is in viewport"
before adding to viewport 🙂
Not sure why it triggers twice, perhaps the overlap is a tad to small
yeah probably
I was doing that, just thought of a follow up
so then your warnings are gone, yes? 😄
I'm trying to remove an EditorOnly referenced asset in some BP that had messy assets everywhere but I can't for the life of me find where is the reference, anyone has any tips?
Yup! Works perfectly now. Simply had it set to true or false when adding / removing and checking on each to make sure nothing slips in that shouldn't

ty
what, setting to true or false? 😮
the more time passes the more my hate on the previous dev goes up exponentially
This should be all you ever need
"clean up redirectors" maybe
nah it was because of a get node
🤦🏻♂️
there was a disconnected Get Sphere with an empty target which had to be connected to a BP_EnemyProjectile
Is it possible to take an object from the world and convert it to a class type?
Similar to right clicking content browser, create Blueprint and then setting various parameters...?
say I add an actor to the world, derived from AMyActor.
Then I set some EditAnywhere properties on the instance.
There's no way to convert the Instance to a class type / prefab type thing?
I have to manually copy the properties?
Yeah I was just hoping there was a way to convert an Instance to a PRefab using the Unity terminology
it's quite nice for artists to build some of these objects in the world, but annoying to then convert it to a BP for re-use
I just want to make a new BP type from the same class as the instance and copy the EditAnywhere params
what do you mean manually? copy/pasting the properties?
yeah fair enough, thanks for the clarification
i have a game that uses multiple 'decks' and the player is able to click on them to draw a card from them. However, with multiple decks in the scene, it seems to pull the card from a random deck instead of the one being clicked. Can anyone see anything wrong with this? I think the problem is around here somewhere
Wouldnt a cardpick like this usually involve some sort of trace?
how would it be able to know which one is picked?
how do you mean, sorry?
How does the player interact with a cardstack?
Mouse click? VR Controller? Eye direction?
just a mouse click
Right,
so you already have a trace
which means you dont need get all actors of class at all
the trace will return the actor currently hovered when clicked
so what would the target be in the bound event?
Also there's a Get Player Character..
Target would be self, if self owns the dispatcher( which it appears to do)
In this case the card stack
so these are 2 different blueprints
the deck and the card itself
each card is a separate blueprint
Card stack would normally represent all the cards in the stack,
and have some array of their data/classes
On clicked, The Stack would spawn a new card from this array (remove card from the array),
and give that to the player who clicked it
the array just has the card 'ID', which it compares when drawn
We're back to the comparison huh
Let me toss up an example..
If you have a pure function with multiple outputs.
Is collapsing it to the a function a good way to cache those outputs so it doesn't run each time you use output?
or is there another way that doesn't involve creating this new funciton
Seems a little silly to create a new function to get around this
Actually it appears the built in events are pretty bad for this setup
Instead of picking up the overlap/click in the actor, i'd do it in the playercontroller , and forward it from there with an interface
yeah think you're right. might just scrap this and try again with a different approach
thanks for looking at it
In the playercontroller, using BPI_Interaction (which just has an interact function with instigator reference (Actor))
then in the carddeck all you need to to is implement the interaction event
which tells you who clicked it (so you can send data in return)
there will only ever be 1 player in this game, but multiple card decks
its just about the game knowing which deck is clicked and acting accordingl
ah i see
Completing the roundtrip with the implemented interface event in the playercontroller
so this is all happening in the player blueprint?
playercontroller *
Both playercontroller and the CardDeck has this BPI_Interaction interface
does this mean each card can still be a different blueprint?
Surely
in this example its just an ID , since that's what you said it was
but it could be a card class
so how does your event dispatcher have an instigator
Ah
they have their uses
you have to add it to both the PlayerController and the CardDeck
alright, i'll mess around with this. thanks very much for having a look
No worries
trying to set a movement speed multiplyer so when a mount is equipeed move speed increases.. started following https://docs.unrealengine.com/4.26/en-US/InteractiveExperiences/HowTo/CharacterMovement/
Get player Char -> Get Movement Component -> plugin to MaxWalkSpeed
do i need a variable for player char?
wow thats all i was missing?
awsome thank you.. just started UE4 again on new adventure so all new to me again
Wouldnt advice hardcoding the speed multiplier like that tho
typically you'd probably want to get that from the vehicle/animal you're currently on
Or simply attatch the pawn to the vehicle/Animal and let the animal do its job 🙂
which is why the variable? so the animal/.mount can change the speed multiplyer?
this is all new to me.. and im getting sick of tutorials not explaining so im figureing out oipn my own with little help.. so yeah........... bound to do thjings wrong i guesss
No worries, you'll learn as you go along
oh your saying let the mount manage its own movement
Exactly
ok what aboiut shift to sprint?
Then its also easier (and cleaner) to implement things like horse sprint, slow walk and whatnot 😛
you'd temporarily either possess the mount , or atleast enable inputs on it
okie dokie
would this way work if i wnat to change my shift to sprint variable later? or is there a better practice?
Yes it would
like boots equipment speed?
the horse would then implement the sprint event
You could allow player stats influence horse speed, sure
Horse would know about player on the back, and could fetch the current speed multiplier from the player
okie dokie
blue lines ok ort should i bring out a new variable node per action?
i really need to find a better way to learn this stuff lmao.. so many fine details no one talks about
Cleans it up quite a bit by just moving this to a function
Not sure why you divide by 100 ^^
to get the %
anyone know how to do swinging?
big difference between max walk speed 800* 150 or 150%(150/100=1.5)
because im complex and was my brains way of figuring out
yeah probably right why the extra step
thank you
sprinting would now look like this
Probably using variables aswell instead of hardcoded values 😄
even encapsulating it further could make sense
Less work if you wanted to change it
If you went for the first method
using this directly
and after a while you've suddenly decided to change the sprint speed
you'd have to search all your code for wherever you manipulate this
When its stuffed into "Sprint" , all you need to do is edit it there, in that one singular place
Perhaps the most correct way would be to have it as read only variable instead
so it'd be part of the class defaults instead
yeah i wanna be able to change it with gear and skills and potions etc if i want. i like modularabilkity like that being able to change anything in future if i need to.. will look at the custom event thank you makes sense now
gota go get son ready fo rschool thank you @gentle urchin
Okay Guys got now Headache i couldnt solve my Array Problem, like, I have an Arraym, i remove Indexes, with Remove index Node, If i have 1234567, i remove 345, ITs like The begin Work, but the Last Indexes are get copied, so I have 1-2-7-7- , When i Remove in that order 543, it works, than 1 -2- 6- 7, anyone could have an Idea, what is this Messed up?
Are you removing while iterating?
no
show code 🙂
I can but it wont Help that Much, because I just Communicate directly with Savegame Array, Each reference Sets Each Information, and the Index Creation is assigned at Creation Time, like When i Press button , + 1 Widget and +1 Integer [aka Index] is created, So than from the Savegame it loads the Information and gets the Stored Index and Expose it to the Loaded Widgets, So i didnt touch anything about Index , The FUnny part is if i would fake Delete , like just Set them Hidden, it works flawlessly, but when i REMOVE Index, i dont know its like it does something Wrong with the Array Indexes, because i can look into my Savegame all Information are stored Correctly, only what i can See that the Last one have all the Same Index Saved
also that the Remove is super Simple -> https://puu.sh/IKMmD/783724546d.png
there's a tendency of information being left out when people explain what they do insteadof showing what they do
Mostly because they explain what they think they do (or intended to do) and not what they're actually doing
I show u the Important Part ones, because its not that much i Only Communicate the msot with SG directly
Well what you showed me doesnt appear to have anything obviously wrong so
What is that cast node? Never seen before
macro
indexes will go out of sync tho
1,2,3,4
Removes index 2
1,3,4 remains
Removes index 3
1,3 remains, when it's 1 and 4 that should've remained
but how i can fix it?
Simple Macro, so i can C/P ist
find the correct index that the object is located at.
this array is BasicGameplayFeatureDataInformation struct, right?
clearing and repopulating the list would solve this
Yes in the SG directly
but thats more Work, and for what i want to use it it could be an Huge amount of Reordering Work
So instead
you must implement a find method
So you find the correct index to remove based on some variable
Yeah but i Remove like its Stored when i Remove Actor 3 with Index, 3, ITs all Assigned Correctly, So ,
it should work Correctly
Not when indexes fall out of sync...
When you remove an index, you shrink the array
Having indexes as keys would work, wouldn't it?
yeah that'd work
Yes, i understand that ,
So there sno Simple Sorting Method?
So then you understand the issue ^^
i never worked lots with Maps tbh
All you need to do is loop it, find the first instance with matching X, and remove that
so you mean not the Direct Remove Index Node, more than Check array, For Each LOOP; get the Index, and Remove the Item ?
instead of remove index?
Sry im more Artist then Code ppl, still learning it
It's similar to Array, Just that you don't have indexes, you have keys
In an array, you have a value at index [0], In a map, you have a value for the key [0]
You can remove a key and it wouldn't affect other keys
THanks bro i will try it !
thes macros?
Functions
How can I clamp the falling velocity? Doing so I get errors
is it possible to set some values in the create object node?
mmmmm, not exactly what I want I guess. But I dunno
What's considered "good practice" to handle the persistent parts of a player's inventory?
Should GameInstance handle the main data to persist from level to level and then save/load progress to/from SaveGame to carry over from previous sessions?
whats the blue one above player charactor?
I have a problem with this. If the player is walking in the colider the first time, it works and the player takes damage. However, it doesnt work the second time I walk in the colider
Please also send the "take damage 5%" part of the code.
yes, just a sec
this is the code
I personally find it a bit weird to handle armor and health this way.
Try adding various "print string" nodes within your code and see up to which point your code gets executed.
oh ok
Don't forget to change the text within the print node so that you know which one fired.
What values
Ok @gentle urchin my Problem was that i Was thinking that my Object Index stays always the Same, after Removing Index, after Index Remove, my Array Index 2, was Object Index 3 etc, now i Assign everytime the Object Index Based on the Array Index, now works flawlessy
omg imn so happy my movement works :).. now to get animation to work
The character movement component. A component within the character template
is what it allows me to do doesnt let me use im assuming multyplayer indexin?
Pretty much what i said all along , isnt it? :p indexes coming out of sync
so Map would be like array, and when i remove SOmething it wouldnt, get Reorderd , and Index 4 stays at 4 even when 3 is removed?
Anyways, glad you found a working solution
Yes Bro exactly
Map is key/value pairs that can be randonly ordered
But you will always get the same value for a given key
Untill the value for the keynisnupdated, ofc. Or pair removed
Ok but i guess for what im use the Array is the Perfect Case, i just doesnt need an Object Index, bc u always have an Array Index
Some Help?
U have an Specified Row, and Column, for that Position
u mean something like Grid Panel or?
@hollow gorge This regeneration code is causing problems. It is basically regenerating the player as soon as it has damage.
so how to make it regenerate after sometime it was hit?
nvm I got a solution myself
I cant find the delay node tho, it is not apperaing when I rightclick
to find the delay node, just type in "delay" and you should find it right away
oh, ok, looking at some issues tell me that we cant import delay node in functions
Yes, you can't use delays in functions. Use them in the event graph if you need them
Something else: In general I'd recommend avoiding event ticks where possible and use an event driven design approach instead to save performance. That way you probably wont need a delay either
oh. But I would need a delay if I want to start regen after 1 secs of when the last time the player got damage, right?
The way your armor currently works also bugged me for a while, do you intend it be more like a "shield/absorb" effect? Because you always set it to a reduced value after taking damage. Just wondering.
no. what I am doing is making only the armor regenrate not the health
I have like 2 health bars
Yes that's probably a good use for a delay. Also make sure you have a way of checking if you're currently regenerating (maybe add a boolean) that way you don't regenerate multiple times.
thats exactly what I am doing
tho I cant get this visual scripting to work, cause I switched from unity and I am used to coding in c#
@hollow gorge how to access a variable in another GameObject?
GameObject?
DM me directly and I'll look at it more, let's not flood chat lol
A Game Object is probably the equivalent of Actor in Unreal Engine but I'm not sure
Can't found it even in C++ classes
it's from unity not unreal engine 🥲
it doesn't exist in ue4, he's using unity language
Anyways, I don't know how stuff in unity works, but in unreal engine you need a reference to an actor (game object) to access it's variables
Oh... So it's from Unity vocabulary...
Wrong reply, it was @patent plover who was asking
Being so used to UObject being the supreme class and not necessarily for gameplay, "GameObject" felt weird
yeah, I know
Is there any website explaining BP nodes in details. (except unreal docs) ?
only one I know of is Mathew Wadstein's YT channel
Pinned in #ue4-general
Have you tried using a timer? On damage, set a timer to the delay you want and then run the code you have there as either a function or linked event.
is this outdated? i cant fiund the node calculate direction one i find is green and doesnt hook up like this
Yes. You can use the green one just fine, it just doesn't hook up into the execution path, but can still be connected to your direction node.
hello everyone, can i delete those folders and keep this another's (green box) to "clean and reset" project status ?
Is there a way to expose Child Actor Component's child actor variables in the editor, when selecting the parent component that contains the child actor component?
I can only see the parent's variables in editor, and clicking the child actor component from the editor doesn't show its variables either, I can only change the child actor class there :/
Also its probably risky to base jumping state etc on a keypress and not on actual state change (e.g. in air etc)
you happen to have a more upt o date better guide? im just trying to follow unreal doc learning etc
feel like im beating my head agents an outdated wall
no and it's recommended not to use child actor components
you're better off attaching actors to actors
Thanks for the tip! I suppose there's no way to do so from the editor/blueprint editor, rather only via blueprint nodes?
you can do it if both actors exist in the level
otherwise you can use Expose On Spawn for variables to expose them on the spawn node in the graph
Thanks!
uh how do I access a variable in one game object in a blueprint script in another? (sorry for my unity jargon)
those blueprints have to communicate somehow
I believe there's a pinned link to this channel on blueprint communication
yeah, found it. Thank you
@odd ember, uh the vid is 2 hours long, and rn I cant give that much time. Could you tell me what is the problem here?
you need an object to cast
casting doesn't magically provide you an object
this is the error
? Cant I just call the ThirdPersonCharacter class from another gameObject?
nope. the reason the stream is 2 hours long is because it is going over the basic understanding of programming that you need in order to do blueprint communication
and I'm not about to repeat that
oh ok
Hello. I posted this question in Paper2D, but I would like to ask here as well. I have a parallax camera that follows me around and it has been working fine for me. When I set up the camera on the level, I add all the objects per layer that I want to move slower or faster, and then on event tick it sets all of their locations. The problem I just found out I have is I can't get it to work on level streaming. It only works when I load a whole level by itself without level streaming/as the persistent level. I created a dungeon generator so it's very important that every room has it's own camera. What I don't understand is the camera on the streamed level doesn't have the actors I added to the parallax array, so when I play and close, it gives me an error that is accessed none. So basically, my parallax array that I set in the camera's details panel on the editor is not registering, or maybe it can't find the sprites? I don't understand why. I tried putting a delay on the camera's begin play in case if the camera loads before the whole room is loaded, but that didn't fix it BTW, If I load the sub level directly(without level streaming) the parallax works, that's the part that confuses me.
anyone have any idea why I can't change the parent class for this blueprint interface?
Yes, like a grid panel, and I have columns and rows variables of each item. I know that I have to make and array but when I do, it don't obtain anything.
I set up the load game but i have problem with put time or date when the save file created and level of character
Hey fella's, I'm trying to think of some better logic or a better way of approaching this.
I'm wanting to make it so that every 5 ranks the xp needed to get to the next rank is a specific amount.
Instead of doing this sequence where it just checks where if greater than 5 ranks, change experience needed to 2400, if greater than 10 ranks, change experience needed to 4800.
If instead I can setup an array? Or some good mathematical equation for this? You'll see in my second screenshot, if I could put a nice math equation here under the branch where every 5 ranks it makes the input true followed by the SET Var Experience Needed as another equation where if rank is X follow this array of experience needed?
Honestly just kind of spit balling, not sure how to approach this.
is there an equivalent to the meta UPROPERTY flag EditCondition in blueprint?
There is this "warning" when build a project, but i don't have this object in my game, how can i find it and delete it ?
Var Experience Multiplier = Floor(Rank/5 + 1) * 2400?
Change parent class? Why?
Is there anyway to detect if a user is on mobile like a bool?
Get Platform Name
Anyone?
the 2400 experience "multiplier" isn't really a multiplier so I don't think this would work.
Basically, ranks 0-1 takes 800 experience, ranks 1-2 takes 800 experience, ranks 2-3 takes 800 experience. This is the same up until rank 5. Which then ranks 5-6 takes 2400 experience. Ranks 10-11 takes 4800 experience, etc.
Used multiplier for lack of a better term to be honest haha
then if Rank >= 5 you can use my function else ExpPerRank = 800
Right, I can do that for each step of the way, just was wondering if there's a better way than that.
If not that's fine.
If (branch) Rank >= 5 (true:) ExpPerRank = Floor(Rank/5) * 2400 else (false:) ExpPerRank = 800
ahhh i see. Yeah I'll give that a swing, might be able to get something outta this.
your exp function is a little bit weird I would have assumed something that scales up somewhat linearly but your initial value of 800 is off here
if you could make rank >= 10 require 4000 exp it would be even more straightforward
yeah, I'm doing an odd end system where, every 5 ranks you gain a level. Doing this since my game is based off of Dungeons and Dragons and I'm trying to stick pretty true to the rule set. So the max level is 20. So I want the players to have something inbetween each level since each level will take quite some time.
it'd be ExpPerRank = (Rank/5) * 1600 + 800
I see
and DnD doesn't have a formula to scale exp per rank?
DnD doesn't typically have a ranking system, it's just levels 1-20. But since I'm going to have to drag those 20 levels out throughout the course of the game. Trying to spice it up with ranks inbetween each level.
Gonna tinker around with your formula there and I might make what I have currently a little more, exponential instead of specific.
Hi! does anyone know if this is a reference or a new array?
ah I see, but I rather meant exp per level in this case
I assume it depends?
It kind of varies, there isn't really a linear experience scale. It's kind of random? ish? lol I can toy around with the numbers though, a simpler leveling system may help here. If you're interested I'll show ya what I end up coming up with probably with some variation to your formula.
as you wish 😁 the one I last gave you should be somewhat interesting I think but as a rule of thumb you can use Floor(Rank/5) to get the DnD "level" and then play around with it :p
I do Load Level Instance for level streaming a random dungeon. The problem is that when I load an instance of a level, a blueprint in the level doesn't keep the array of actors I set in the details panel to reference other actors in the level. It only keeps it if I load level, but then I can't load multiples of that level. Is there a way around this?
Were all of the assets in the loaded dungeon a part of the same level?
yes
Every room has it's own camera, and every camera keeps an array of several background and foreground actors in the room for parallax reasons. The array doesn't keep the actors I set when I load an instance of the level. I kind of understand why, because if multiples of that level are loaded, how does the array know which actors it is referencing, the actors in level instance #1 or level instance #2 (if that is even how it works).
i can't add the hit actor to the target, thought changing its parent from interface would help
that is the wrong call anyways, you need the one with the mail icon
The message one
Not sure what this one does really?
Is it like a local call of the implementation?
it's the 'interface' call apparently, its the only one i can use
ah yeah, context sensitive was it, thanks
Anyone Have any resources to help me figure out bhopping? besides this http://adrianb.io/2015/02/14/bunnyhop.html
can anyone think of another way to go about this instead of the 'bind event to'? another blueprint interface maybe?
How do I take something like Fog and be able to toggle active/visible/density from another blueprint?
Whats up with the get class from instigator etc?
Make a return function in the interface to pass the ID back to whoever interacted with itn
I showed you a working example of this
trying to get it to feed into that bind event, but since it doesnt know what's been clicked it wont accept it
yeah ive been looking at all of that, trying to set it up
Do some of you like to use Metasound?
This part
is send card to instigator another function of the bpi?
sorry its just all mega confusing. i should probably start a new project but i have so much other, working stuff in here
Yes, it is ^^
The naming of that function was pretty bad, but i hoped to get across the gist of it
ah i see
Wait
there's a mistake in it ofc xD
You must use the "index to Remove" as the "Get" index, after picking a random!
otherwise they will not match
Like this
got it, thanks so much again
I'm a little confused right now... if I want an event to run only locally (cosmetic event) do i still have to replicate from server to client?
so I have this now, but still not sure how the deck is supposed to know when it's clicked like this?
unless the longer part is supposed to be on the deck bp?
I might be able to help you :o Would you like explain what your problem is in detail and what you'd like to achieve? ^-^
Event Interact should be implemented in the deck, not in the player controller 😄
it's a game where the player clicks on tiles and moves around a board, and every tile clicked reveals a card from a deck. i had it 'working' but it really struggled knowing which tile i'd clicked on so this is a workaround about that i think
So the Deck recieves the "Interaction" message , does its thing, and returns an ID in the return event "Send Card ID to Instigator"
i think im starting to understand it a little more now
having the card ID stored like that should be really helpful
i just tested it with 3 deck-tile-things and it recognises them each as seperate things which is great
sweet
So essentially what you're doing is:
InYourController -> GetHitResultsUnderCursor -> Message Interface Function
which then executes the stuff you need on whatever you clicked on
can i add a custom depth pass to a terrain?
or do i need to apply it to the material?
yeah, this seems like a good way to do it. before, it didnt seem to actually recognise which i’d clicked on and just picked a tile from random
I'd also recommend to not hard-code your input events. Players might want to change these
oh for sure, this will be a mobile game eventually so it’ll be changed to touch at some point
Good Luck
Guys, in my old and low configuration PC, the Unreal 5 (early access 2) i felt its was hard for my pc config. but i want to know if now in this new version is more optimized for low config pc ... tks
Hi guys! Can you give me some hints on how to spawn projectiles that move in a spiral outwards from the player?
is something like this how you'd approach the cards blueprint? to check if its ID has been drawn?
In a radius around the player?
Not sure what there is to check?
Like... the card would just be told " You are card of ID 'X'"
create the projectile attached to some spiral projectile blueprint, move the projectile away from center relative to the center of the blueprint internally, and rotate the blueprint in world space
this is how I checked it before, not sure of a better way tbh
Oh, never thought of two separate motions, I am so stupid sometimes, thanks!
I have one, how would you store multi block structures in a voxel world. So say I have a minecraft style world, how would I have a, say, water tower thats a few blocks wide, few blocks deep and like 8 blocks high?
So lets say I interact with the side of the tower, how do I store that in such a way that the game knows that block is actually part of a larger set?
'But like.. why check? Why not spawn the correct type and let it be it .. ?
nah, youre just thinking about how to do it in meatspace thats all
Does anyone know of some "good" inventory system tutorials? Would appreciate any recommendations!
Is there any way to find a variable named X on an actor and if found, do something with it? (like subtract int/hp)
Dont do that. If you have to, there is, you can cast to it, but even asking that question tells me you need to read up on classes and inheritance. You should know what variables each class have
the best approach, and what I think you are trying to invent accidently, is is a blueprint interface
Well, I'm trying to think of an automated system where a "bullet" fires a function and in that function, it will look for the target's integer variable (Health) and remove some of it
So interface is the way to do it?
the bullet should just sends its damage and armour pen stats and whatnot through a blueprint interface at whatever it hits, and that should triggger an event in the target if it impements the damage interface, otherwise ignoring it
yes thats exactly what i am trying to do. thank you for clearing it up. learning interface now
Why not use the "actor overlap event" for the hitbox instead?
You still need to do that, but on the bullet, not the target
if it overlaps, it should then send the interface message to everything it hits
Is there a way through blueprints to get a list of files from a directory?
I'm trying to get a list of .sav files in the savegames directory
those things should then decide in what way they should react, if at all, to that information
This one is pretty long, but he does a pretty good job of explaining how to do it all, from picking up items, storing in your inventory and a slot-based UI.
https://www.youtube.com/watch?v=yxqSkFNAzE0&list=PL4G2bSPE_8uktjEdP4ZuRq5r2o4JMdZfM
wouldn't it be better to check for player / npc that has been hit to avoid an interface?
I dont think you understand what interfaces are, they are just blueprint to blueprint messages
but where can I designate its ID in its blueprint other than backwards like this?
Thanks, will give it a look
no because i get this issue
you only send the messages to objects the bullet is overlapping, not everything in the entire gameworld
I always thought in terms of programming, interfaces wrap around the actual class, therefore using tons of interfaces could be bad practice
but maybe I'm mistaken, gotta look into it
From the targets perspective, its just a custom event, with information passed along also
@barren flower how about event dispatcher? Is it better than interface?
Using interfaces allows you to be able to send a signal to multiple types of objects without having to know their specific class, and having those objects react differently to that particular event.
Okay that is exactly what I was looking for. Thanks
The CardDeck would spawn the card, and tell it about its ID
Event dispatchers are a horrible way to implement damage from a bullet. They have their place, but honestly I dont think ive ever actually used them in practice. The problem there is that every single thing needs to specifically be setup to do stuff, rather than just either implementing a damage interface, or not.
Like, if you want your walls destructible, implement the damage interface, and it will receive hits when stuff shoots hits at it, otherwise dont. Its class agnostic, which is its biggest strength, it doesnt care what it hits, it only care if its listening or not
That's good to know, thank you ❤️
So a player can die, a glass window can shatter, an energy shield can glow and shrink, a steel knights shield can dent, and the bullet doesnt have to know about any of that crap, it just sends its velocity, its damage and its penetration to anything that says it gives a shit when it overlaps
but if i had 6 different bps, surely all of their events would trigger when any card is sent to instigator?
Sounds like you'd wanna pass on a class instead of an ID really
a subclass of "card"
No thats extremely wasteful, each card can have an integer value as an ID, theres nothing wrong with that approach at all
Just have a generic card class with variables for stats/images and whatnot, thats totally fine
Are there going to be duplicate cards? Can I draw the same card with the same ID potentially?
and whos asking, who needs to know if the ID has been drawn?
Potentially you can have the card be aware of what spawned it when you create it, and add that information to an array in the parent object if its like a game table blueprint
Is it the deck blueprint? To see its remaining inventory or something?
Theres a few approaches potentially, but its really a game design question, I need a bit more information as to what exactly you are doing and what to achieve. I would approach a poker set very differently to magic the gathering
@barren flower can I ask you, where do you think it would be best to store armor, damage, etc if they are meant to be changed (upgraded). Gameinstance?
Depends on what they need the cards to do really
If its just stat lookups, then ID into a DB would work wonders
If its a lot of custom events, you'd need (want) custom classes to handle that
yeah, i'd want it to be able to have duplicates in the deck. The card BP is asking the deck if its number has been drawn basically, and will do all the actions in that BP if it is. Ideally I want all unique cards to have their own BP
In whatever needs those things, if its the player, put it in the players character blueprint. Dont worry about interactions between blueprints so much, the best practice is to just send events to everything and let them do what they may with the information
Thank you
The deck keeps a list of cards (either ID's or classes, whatever fits your needs)
Im confused as to why this would ever need to happen, the card should be able to infer it exists by its existence, and should be told what it is on creation
