#blueprint
1 messages · Page 126 of 1
Guys I need help with PCG. When I scale pcg volume it comes with an error. Surface sampler says something like too many points created. So how can I fix that? How can I scale that volume up to the landscape. Also when using "unbound" option same goes.
Try #pcg-framework
Thx
What node(s) should I use if I wanted a random integer from 0-5
Random Integer with a max of 5 should work
ahh ofc, ty
Does anybody know how to hide Brushes from a Scene Capture 2D? Everything I've tried seems to hide Static Meshes but not Brushes
I put an important struct in there. The struct is a database of objects and i imagined it would be stupid to put it in every cell, so i decided to just put it in the grid and make the cells access it when they need it.
delta time should not be time since movement
delta time is time since last call into it
it should be the frame time
hey people i have a doubt regarding a project i'm working on as i got struck in the way , i made a project based on a plugin where i drag and drop from the UI which created using data assets , i made a pillar blueprint and attached a component(bridge component) using socket method and in bridge blueprint i made it to attach to another component i.e, tracks to attach to it using same socket system . now all i can do is i drag a pillar it appears in scene and when i drag bridge part it attaches to the pillar and when i drag tracks it attaches to the bridge only but all this happens to the first pillar once i try to add another pillar from UI components attached to 1st pillar stays with the pillar, and when i try to drag bridge/tracks from UI it straight-up goes and attaches to the 1st pillar only all i need was everything happens with 1st pillar should happen to the 2/3/4/5....so on pillars. can anyone tell me how to work on this?
@pine mesa use get player controller and make it on possessed and not on begin play
I think it should work
@short ivy AFAIK the UniqueID you get on interchange nodes is only in the context of the import.
Interchange = customizable import.
In short: Interchange Base Node is temporary representation of imported data, before call of factories to create assets. You can access and modify those nodes if your create a custom pipeline that you add to the pipeline stack used for import of your file. Not all file formats supported by UE will import through Interchange.
In Long:
Context: new framework to import (export will come later) data into UE. Currently supporting Textures, gltf/glb, MaterialX, Obj, FBX (experimental), some CAD file format (experimental)
Benefits of Interchange is that it is highly parameterizable: more import settings are exposed, you can create and store different presets for your model imports.
Interchange breaks imports in different steps:
- Translation of your file into an intermediary node base representation carrying the payload from the data
- Creation of factory nodes to generate assets and actors (in case of level import)
- Execution of factories to actually creates the assets
Blueprint usage with Interchange can mean two things:
- how you call Interchange functions to trigger imports: https://dev.epicgames.com/documentation/en-us/unreal-engine/importing-assets-using-interchange-in-unreal-engine#importanassetusingblueprint
- how you can now hook inside the import process and perform operation on the intermediary representation, on factories settings or on post import assets. This is here you will have use for the Interchange Base Nodes. Look at how to create a custom pipeline here https://dev.epicgames.com/documentation/en-us/unreal-engine/importing-assets-using-interchange-in-unreal-engine#createacustompipelineusingblueprints or here ( section on "Create custom blueprint pipeline", doc a bit old now in some parts) https://epicgames.ent.box.com/s/r6yhe2uzme1x6orisfwwqas0a3d6e6rk
you have to learn what is a game tick
hey guys my BT stack at this task i don't know why ?it is a pretty simple task and at the end it succeeds but Behavaior Tree execution always runs this taks only ? please help
Hey guys is there a way to flip the gravity upside down for my player character?
You need to create black board conditions for all the sequences I believe
For example for the first patrol It would trigger if robotstate is not equal to attacking
I have load level instance in my Level BP but it does not spawn my instance of the level. Anyone knows why?
I need something like this in my life lol. Nothing worse than forgetting to unbind something and wondering why stuff is acting weird. 🤦♂️
Hey guys, I’m new to Unreal Enginge and I’m trying to make a little carnival shooter game in unreal engine 4.27 where you shout cans and stuff over some water.
It’s pretty much done, but I’m missing the effect where if my cans or my bullet (the standard UE bullet) fall into the water, a splashing effect triggers.
Now sure how to get this done and I’d really appreciate some help.
@misty quail https://m.youtube.com/watch?v=yzvq8aonDYQ
Today we're looking at an amazing property that can be accessed within materials in Unreal Engine called Distance Fields!
Distance Fields can be used to create ripples in your water, blend surfaces together and to create SLIMES! There are some limitations with distance fields and you need to be careful about what emits distance fields and what ...
Not a tutorial or gives u what u exactly need
But he goes over the idea how to make the ripple effect
This could be useful @misty quail https://youtu.be/dMGJv23ezrc?si=V2JAzfowaKiKYT2p
In this episode, we set up dynamic character footstep effects in water on the Third Person Animation Blueprint based on the depth of water that the player is stepping/jumping into, but also the velocity of the player's movement into the water. For this we use the free 'Footstep VFX' pack from the Unreal Marketplace for our water footstep effect...
Not exactly what you want but it could help you start
Why don't this work
Theres clearly an error with the binding, i did a few tests.
and no, the cast is not failing.
Ohh yes
Listen once delegates
Set the gravity to negative
Hmmm okay, thank you
Alrighty, I’ll take a look. Thanks!
I need help with my code. I'm binding events to an object but they aren't binded. I don't know why. Tho i think a call would be the best. If you wanna help, join #424868670049878017
Is there sort of an 'if actor of class' node I can use to check the attached actors of a pawn?
how can i make it so once player reaches 0 hp they die and game end
ok nvm i can't stream my screen aparently...
https://www.youtube.com/watch?v=ZpQmL_TzSPo
Or tie the hp to a variable, and once that variable reaches 0 > open level (set the level name to your level name)
Hello guys, in this quick and simple tutorial we are going to learn how to make a simple game over panel in Unreal Engine 5!
↪️Join my Discord Server, NOW: https://bit.ly/GorkaGamesYouTubeDiscordServer
Simple Health System! 💖 https://youtu.be/kZVIa2uWOiM
Simple Resawpn System! 🔥 https://youtu.be/rHli1ov4ovo
Check out my Steam Game! https://bit...
no problem, alternatively you can also use the Open level by object reference; that's probably easier
I realised my problem from yesterday stems from the attached quests information not being relayed, but I need a way to find the quest in editor
ofc
i don't mean it literally
i want to be able to jump and other stuff while i'm flipped
negating the gravity only makes me fly
casting, or maybe == ?
how would i make an abillity that would summon a wall and has ui that will count down till u can use it again
do you expect us to write a full tutorial for you or what?
didnt mean it like that mean like where would i start with smth like that
i would start by summoning your wall
you could use maybe a boolean for enabled, when its enabled run it and disable it, then on a timer set the boolean back so you can use it again
ok thank you
Anyone else can't diff their Level BP in 5.3?
When I click a revision on the diff button, nothing happens.
Only this gets printed to the log:
LogSourceControl: Attempting 'p4 fstat -Or F:/MyGame/Content/Maps/MyMap.umap'
LogSourceControl: P4 execution time: 0.5519 seconds. Command: fstat -Or F:/MyGame/Content/Maps/MyMap.umap
LogSourceControl: Attempting 'p4 filelog -s -i -L -t -m 100 F:/MyGame/Content/Maps/MyMap.umap'
LogSourceControl: P4 execution time: 0.4301 seconds. Command: filelog -s -i -L -t -m 100 F:/MyGame/Content/Maps/MyMap.umap
LogSourceControl: Attempting 'p4 print -q -oF:/MyGame/Saved/Diff/LS_MyMap-Rev-60-87423BD342FE7950C07E0AB0A40960E1.umap F:/MyGame/Content/Maps/LS_MyMap.umap#60'
LogSourceControl: P4 execution time: 0.5225 seconds. Command: print -q -oF:/MyGame/Saved/Diff/LS_MyMap-Rev-60-87423BD342FE7950C07E0AB0A40960E1.umap F:/MyGame/Content/Maps/LS_MyMap.umap#60
Make jump z velocity negative too and add to the rotation of your capsule component by 180 degrees to flip it
You can't negate jump z velocity
Oh
And i did rotate my capsule component by 180
Can you show the code if you don’t mind
it's just what you wanted me to do
Been stuck for a while
Oops forgot to connect the target on gwr
I am facing several issues while char is sitting. One of them is Head Rotation. Usually it will be be controlled control rot yaw. Even though turned of control rot head movement is also stops rot.
Worked head rot movement with control rig and anim BP by getting world rotation
How can I achieve this ?
wdym "flipped" ?
inverted gravity
inverted like walking on the ceiling ?
Yep
Unfortunately I don't have C moon with me to flip gravity irl
Today in the spider pawn series, we are going to implement movement ability on surfaces with any angle. So, the spider character will be able to move on vertical surfaces, ceilings or anywhere. Here we will use multiple line traces to determine the position the character has to move next and the angle/rotation character needs to have in order t...
Why couldi not find these tutorials when i look them up 💔
its because google uses garbage algorithms that focus on showing you ads instead of the results you want
hey can anyone tell me how can i make phone like gta 5 in unreal engine i cant find any tutorial related to it hope you find
The GTA phone is just a widget, that will switch it's current widget based on which button you press
Try not to look for tutorials for things like that
build the foundational knowledge
Someone that makes a tutorial for that, doesn't do it for a quality learning resource, but instead tries to ride the wave of name dropping the game.
At least in the current state of unreal community resources
I can help with that
dm me
For a small fee of £29.99 an hour... 😄 lol
Is there a way to spawn both a regular character and a vr pawn in a level, and switch between using them, using blueprints? For instance, the player character could be played on a monitor, while the vr pawn could be played in a vr headset, and running a function switches between using those two.
A video explaining a possible solution would be nice.
I wasnt joking
Last year i tried to make gta
btw whats the easiest way to do a random out of 5 different things
spawning an actor
arrays have a built in random
okie dokie
Struct array element is not set
Anyone spot a fatal flaw in my logic, or know of any reason why the values in this array struct are not being set?
(Racing checkpoint system trying to support multiple local players so that they can track their own checkpoints cleared to test against them when starting a new lap / crossing finish line. Everything is as expected up until this point where I am trying to set a value but I am 2 arrays deep and they are structs...)
Make an array and place a random array node
random int in range and select node
And make it from 1 to 3 and make a branch to see if it’s equal to 1, 2 or 3
i thi k that way only but isnt it to bee too many widget for one phone and later it create performance issue i am just worry that only
Of course it wouldn't be.
Don't measure performance on a guess. Measure performance on something
The only time it would become problematic if everything was on multiple canvas panels, but in that case you were shooting yourself in the foot from the getgo
okay rest i all know how can i make that phone i was just looking for some other way i will try it thanks
👍
Is there any way to set a variable within the spawned actor?
As this is from a random spawn actor
Yes
Either create a base class, which the array uses as class, and expose the variable onnspawn (preferred)
Or cast the class to your baseclass and set it that way (less clean)
How can I do the latter
Do the former instead 😆
pain is part of the game
But why do you look like penguinz0? 😀
alr ill look into this tomorrow
new hair cut
Uncanny 😀
Its litteraly the same work
What type of variable?
Hi guys
I'm making a thirdperson game, and I wanted to make my character spawn a meteor in front of him. But I'm failing to do the calculation to get the front of the character. Does anyone have any tips or ways?
In the end, the idea is that the meteor always appears in the direction the character is looking, at a height X and distance X from the character.
im not too familiar with blueprints and my vector math is kind of rusty, but i would assume to at least get it in front of the character, get the position of the character, then add that to the foward of the character times the distance
Get actor forward vector
Times distance + location
Okay, I'll try, thanks for the help🤘
you can get your characters forward vector and multiply it by the distance you want
^add it to the character's current world position as well
Float
hi guys, I'm trying to have an actor appear when I trigger an OSC control and disappear when I press it again. Should I spawn the actor then destroy it or add the actor BP to the scene and toggle the visibility?
you can use level blueprint but if number of actor is too many it will be unoptimized. Can you explain the system a little more?
i have a static camera and i want to have an object (actor) appear when i press a button in resolume (message sent through OSC). When I press the button on object should appear then disappear when i send the same OSC command
And generally shouldnt be used.. not many scenarios is it a good fit for
I'm controlling all my OSC messages in a BP (not level BP)
So you basically wanna spawn / destroy an actor when a specific message is sent
Youd need tonget a reference to the camera (i assume this was relevant) and can use that as a basis.for the spawn location (?)
Could anyone give me ideas why the hp bar would be set as the asset while the body isn't seen? I ended up putting the widget there and setting the visability off as a quick "Fix"
Hey guys, is "Draw Debug (Mesh)" supposed to ignore the alpha channel in it's color?
Lets say I want to spawn a cube in front of the cam at 0,0,0. I got the logic working for this with spawn. Then I want to have 2 cubes in front of me instead of the 1 cube. I can spawn 2 cubes with new coordinates the same way but when I link the exe out of spawn into the destroy of the one cube I get error messages.
Remember to store the references
how do I do this?
Promote to variables (or add to variable array)
Right click return value -> promote to variable
So, I'm making a function to detect when the player is falling down. I wanna use this to detect the apex of a player's jump for gameplay purpsoes...
Since for whatever reason, the default apex jump seems to do nothing.
Also using it on "start falling" just makes it trigger as soon as you jump, because falling counts both going up and down.
I get the following message: "Blueprint Runtime Error: "Attempted to access GasCylinder_C_0 via property Gas1unit, but GasCylinder_C_0 is not valid (pending kill or garbage)
Make it a less than node instead of a less equal node
Gas1unit is my variable for my "1 cube", not sure what GasCylinder_C_0 is
@warped juniper
Show code
Actually since I want the apex it IS less than or equal since the apex of a jump is the moment it has 0 movement along the vertical axis.
sorry for the pic, I dont know where the screenshots are stored on PC (looked in the pictures folder but i have nothing...) :/
@fathom basin Other than that, how else can I make use of this?
Or is there a default function that does what I want.
But when you’re on the ground you also have zero z velocity
So make a branch with is falling before you check for the z velocity
@warped juniper
Hmmm true
In that case
I should make a separate bool that returns true if the velocity becomes 0 from a positive value.
@fathom basin This is the new version.
Does it work?
You shouldnt cross wires like that
Dont cross pins from different exec paths
Grab new ones, "Get whatever"
Then chevk if they exist by using IsValid
Then destroynif they're valid
could you show me an example?
im not super familiar with the isvalid variables
I don't know how to start using this properly...
All I can do is call the function, thing is I want the event to just fire away on those conditions...
But I cannot just have it on Event Tick.
Though it does work in that case.
Isvalid is a node used to chevk if a variable is not nothing, but actually points to live instance of the thing it references
use win shift S
then just paste here
or print screen and paste here
isn't apex already an event on CMC?
On Reached Jump Apex
If you must do it yourself you'll have to just check on tick
which is exactly what the CMC is doing
I want to get each int in an array and compare it agaisnt a single number. How would I do this effeciently?
Alright, here's the current state of my jump.
oh you're messing with gravity during a jump
Yeah
I'm making a platformer kinda thing...
I'm really unsure how to better improve it
It's just so floaty...
This is all I can add there.@faint pasture
Doesn't seem to do anything.
Have you hooked it up or is this as far as you got
Are blueprint interfaces not able receive multiple targets inputs? I have an interface which works fine when the target input is just one input but as soon as I add a second (I want to have 4 target inputs total) the compile throws an error. The target input node itself is able to receive multiple inputs though
Ah! Wait...
That's probably just some syntax sugar on making the interface call on an array of targets
foreach your targets and do the call on them
Alright!
I did it
The notify jump apex needs to be toggled on / off whenever going to and from falling
Weird that it doesn't do that by default...
So instead of having one call to the BP interface that intakes all four targets to one target input, just duplicate the BP interface call four times in a row and input each target alone into each target input?
@faint pasture Sorry for the ping, but for doing some debugging I need to calculate time elapsed between 2 functions getting called... Do you have some feedback on achieving that?
you can do a loop
You gotta get the current time in each function then do math
FirstFunction -> ??? -> FirstTime= GetGameTimeSeconds
SecondFunction -> ??? -> PrintString(GetGameTimeSeconds - FirstTime)
Hm not sure what you mean by that. Sorry this is my first time ever using BP
get all of your targets in an array
for each loop
ARe you looking to find the index at which the first occurrence of that Int occurs? There's a FIND node for that
Otherwise if you're looking to do something every time you find that specific int in your array, you can use a for each loop on the array.
But I'm suspecting this may actually be a symptom of a higher-level architecgtural decision. What exactly are you trying to find an int match in your array to do?
This is what I'm trying to do.
I have a spline road BP with a default mesh set to each element.
There's also an array of integers. Any numbers in the array will be compared against the spline BP elements, and if any match, it overrides the road for a new mesh.
Currently works for one number only.
What's the role of the array of integers. I mean, why did you choose to do it that way? @eager thicket
This doesnt really work does it
Wait, i prob misunderstood.
What do those integers represent? Are they associated with that "tile" or element of the road?
If they're executed at different times and not in the same chain, then yeah it would
A designer can select what numbers to change in the BP spline via that array of integers
in the details box.
So like "I want segments 8, 12, 16 to have this specific road mesh"
etc
How do they associate the mesh they want with the integer. And why an integer and not a string like "road-with-tree", "road-right-turn" etc
(if you're trying to be designer friendly I mean)
That sounds a little troublesome
How about a custom editor widget instead, which can act on directly selected meshes /instances ?
Add some pcg to this and you have a neat little tool
"Randomize this section"
I haven't gone boilerplate enough to figure that out. Currently I'm just building functionality one little bit at a time, starting with being able to change any section of road you want with a single mesh override.
"pcg"?
So explain the defualt road structure to me. It's a pline with a fixed amount of nodes or?
It's a BP road spline that can be set on construction, and it can have as many or as little spline elements as you want
depending on where you drag it
and the array of integers - does it have to correspond 1-to-1 with the number of spline elements?
ie: if you drag the spline and it creates a different amount of elements, now you have to go in and re-edit your array of integers?
I'll check.
Not that I want to complicate your life, but this really sounds like a construction script kind of thing, or maybe an editor-widget, where you can select the spline element and change its mesh interactively
Thankfully, no. dragging out the spline doesn't require the other array any editing. nor does it change the overridden mesh positions
Okay, my spidey-sense is still tweaking that there's probably a better way to architect what you're trying to accomplish that makes it even more artist-friendly, however...
A siple implementation would be to have two arrays:
Scratch that.
A simple implementation is to create an array of static meshes.
🤔
So that way, the artist doesn't have to remember what the ID of a particular mesh is. Let me post a quick example to see if what I'm saying makes any sense
Im gonna quickly run downstairs and grab some cereal, but i'll be back in 5 minutes
but I am interested
Since I can't put macros into a function, what would be the next best thing? I could use custom events, but time delays within custom events are often ignored.
Like this, for example:
I'm thinking something like this might be artist-friendly:
(If I could spell "element")
Are they though?
Anyway, I wouldn't use delay for that, I'd use a Timer
How do I use a timer within a function? I haven't tried those before.
Guys
I'm trying to make my meteor follow in front of my character (thirdperson) when it's spawned, but I'm not able to "rotate my forward", it's "stuck on a single axis"
I will send an image of what it looks like in the blueprint and a video
probably because you multiply by 0.0
but i don't download videos, maybe use something like streamable
or think discord will embed it if it's a certain type, but i don't know what type of video it needs to be
I think it depends on whether you need to pass a parameter to the timer.
sorry for the late reply, if I create enemies when they are needed, how would I go about special instances where an enemy would have different variables than their default? Would I just place all the enemies in their room, assign their variables, then have my spawners copy the enemies and destroy the originals? Or would it be something like, place all the enemies in the room, set the variables, and then make a blueprint of the entire room? Which I guess would be fine, though it sounds like a pain to go back and fix anything, and I would imagine it could easily get in the way of testing 🤔
Sorry if I worded any of this poorly. I'm mainly having trouble getting the custom variables to the spawned enemies. Not helped by the fact many of my enemy classes have their own very unique variables, so just making a general script only gets me so far (I have an enemy parent class, but that mainly just holds any universal information, such as health, armor, damage, detection radius, etc...) Like, how do I store these custom variables as well as what specific enemy I want to spawn and where they are meant to be placed.
My first guess would be placing the enemy in the level, changing their variables and then... I don't know... as far as I am aware I can't make a temporary instance of an object that can be created and destroyed during runtime (ex: having my spawner make a new blueprint of a custom enemy, destroy the enemy, and now create the instanced enemy with all the changes to its variables intact)
My next guess would be a struct of all variables that can be changed, and sending any editable variables to the EnemyParent - but 1) that just sounds like a hassle and I feel I am missing a better solution, and 2) all of my enemies will now have access to a ton of otherwise needless variables - it's not the end of the world or anything, it just makes me think I am overlooking or unaware of some function that would work better
To be more specific, I want to put in a delay between when text appears in a message box and when a clickable "next arrow" appears; and a five-second delay for pictures to pop onto the screen once those are done. I have an On Key Down function so that the player can use a keyboard if they'd rather hit a key to bypass dialogue text.
Unfortunately that doesnt work because the four targets I want to input are different pawns so they cannot be stored in the same array
if i want to use a timer, i just use an event and call it
you can store different pawns in a single array, not sure what you mean here
The variables and all variations are stored in the enemy's blueprint class. So you might have a BP_Generic_Enemy and then a BP_Enemy_With_Cake. and they might all inherit from a parent blueprint eg BP_BaseEnemy. that parent blueprint sets all the defaults, but then your spawner script can select which specific variant of enemy to spawn, and they each have their own overrides where appropirate
So would I use Set Timer by Event?
They need to all inherit from the same bases class
That was exactly the solution, thanks for the help!
ya, and i put it inside an event, then call it from the function, because i don't think you can do that in a regular function it needs to be an event
So your array is made up of BP_BaseEnemy classes and then you can put whatever specific variant you want in there
Something like this, then?
right? So in your example, maybe HumanPawnObject is the base class and AviatorPawnObject inherits from that
And then you can wired up to the event that gets called when the timer expires via that red dot
but you need to go out of the event in the timer, and set the action in there
its not going to be a delay
you need a delay ?
What happened to OnMouseUp? Simply tryinmg to detect the end of a Mouse Drag operation in a Construction Script.
Doesn't mouseDrag fire an event when you end the drag operation?
Like this?
no what are you doing with the delay ?
Yeah you don't need the dela- the timer is replacing that
the timer will fire after a certain amount of time, and the custom event is where you run the code you want to run after the delay
Oh. What should I attach, then?
hmmm. is this performant?
No reason it wouldn't be. It's actually less work because you're skipping an intermediate lookup step
I could put in a custom event that causes the "next button" to appear, but what if I wanted a timer that extends so that more images will pop up? Should I just set the time to twice as long?
How does it work exactly? Like, to add a new part of the road, I don't drag out the road mesh, but I click the "+" on the details?
Furthermore, I'd put it in a construction script and actually create those mesh elements rather than do it at runtime, unless you absolutely have to.
Question then. The reason I was trying to add all the pawns of four different pawn classes into an array is so that they can be used as a target input for a blueprint interface that transfers a var from the level blueprint to the pawn classes. Is it worth re-setting up the pawn classes in the way you're saying, as opposed to just doing four calls of the the blueprint interface that transfers the var - one call for each of the four classes. Like this (only 2 shown here)
add the stuff you want to do after delay in the custom event, think about it you are running the function, you call the event, it sets a timer, and after the timer hits the custom event runs, which is where you could put the code you want to run
Okay, so I think I know what I'll try. One second.
Thanks. What am I missing? Can you not set Mouse events in Actor Blueprints? Can't find the Mouse Drag.
You're probably ovecomplicating that. The level BP should be able to get references to all its Actors anyway...
The level BP cant directly send var data to BP classes without cast or BP interface
I know the input system changed in 4.x so if you're used to legacy input handling there might be some changes.
Something like this?
i hear a lot of "don't use level bp" on here
I'm not sure about that. The Actors can all get a reference to their level, so they should be able to access any public vars on the level BP
really eh?
right then in the function, call the event
yep
Okay. I think I have an idea on how it works. Thanks, and to @golden kite too!
Good luck!
Thanks! I still have a bit of a ways to go, though.
Ah yes, the new 'Enhanced' input system 😂
Not in BP they cant
Unless thats brand new
Why would the level BP have this var, and not say, the GameMode ?
i been storing everything in game instance or the actual character
i'm just learning about playerstate, gamestate
Great question. I have no idea. This is my first time even touch BPs
But I mean performance wise is there any reason I couldn't do what's in that image? The BP seems to execute fine
I generally recommend people to stay away from LevelBP. While it may look tempting, and have cool direct actor access (from those spawned in the level) it's not often a good approach or place for logic to reside. Another thing to note is LevelBP's deprecation status
Performance is not part of the equation
Level bp wont be slower than other bps
It just can’t talk to any other bps
No not the level BP itself, but just the fact that I'm calling the Blueprint Interface four different times, one to transfer the same var data to each of the four different targetted pawn classes
By GameMode, do you mean storing it in a BP GameInstance?
Surely it can, but nothing else can talk to it ?
Sorry other way around lol
GameMode, GameInstance, GameState,
Depemds on whah this is exactly, but they can all be valid candidates
GameInstance is persistent
i like the game instance because of that
So if this was something like a setting from the main menu, that you need your pawns to read, then GameInstance would be a valid choise
What you could do in such a case is to simply let your pawn read the data from the game instance. Elther on Beginplay or some other suitable event
It simply then goes :
Beginplay -> GetGameInstance -> Cast to MyGameInstance -> get var
Ah mkay. I mean my current BP works fine using multiple calls to the BP Interface for each pawn class its transferring data to. So as long as it's not a huge performance concern I'll just leave it as is
Its up to you if you wanna accrue tech debt, and if you're willing to pay the price ;p
Extension, changing levels etc requires the same implementation over and over , as an example
If you were to add a 5th class, then you'd need to add yet another node in all your levels.
(Ofcourse you can get around this by grabbing the parent class instead)
if your staying on one level np, but having to create everything for each level sounds like a pain
GetAllActoesOfClass(Character) -> send interface event message
Yeah valid points. Something to keep in mind for future endeavours. This is just for a simulation for one of my univeristy classes so its just a one and done thing in its entireity
Yup thats how I currently have it. Just four of them for each targetted class
You dont need to target the specific classes if they all get the same value
Just target Character (or whatever common parent they got) and send the message in one single loop
Then you could add 100 new classes to your project, and still not have to update that piece of code
They dont use the same parent class though so that doesnt work
so you are having to get actor of class for each ?
Yup
using a parent class makes that a lot easier
you can get all the actors of the parent class
True its just a matter of redoing the pawns that way
are you just doing that on begin play ?
"that" being calling the BP Interface to transfer the var?
It will done once every minute
Set Timer by Event (looping) -> Custom Event -> Get all Actors of Class -> Call BP Interface
makes sense
you have the array plugged into the function ?
i always forget you can do that for sure i'm not used to it
Yes the BP Interface target input accepts arrays
Hey, I have a quick question regarding controllers.
Do you reccomend rotating the controller, or the actor itself, when making a player character that turns to nearby targets for aim assist?
A projectile spawns from right in the front of the player to hit towards the current target.
Noob question. Is it possible to target a Pawn from within an Actor Blueprint?
I'm trying to add the new 'Enhanced' input system to detect Mouse up to an existing Actor Blueprint.
Or should I redefine my Actor BP as deriving from the Pawn class instead?
anyone able to explain to me or help figure out why safe divide is returning as not in scope?
both A and B are giving proper values
what is self actor ?
what kind of class ?
GetPlayerController not GetController
^
GetPlayerController should fix that issue
for the life of me.. idk why this keeps getting out of scope everywhere i call it
like.. my 2 variables are very obviously set at 1... but both safe divide and == bool both return out of scope
and than it just passes as true in function ShouldInterpGhostBar and never gets set to false.. so its constantly trying to interp
whats the magnifier all about ?
Hm, for some reason my function isn't turning the player towards the actor...
@warped juniper your Get Overlapping Actors doesnt have a class defined.. so technically it wont ever fill your array of checked actors
so you're not setting your firing target
by tag is is something completely different.. that would be a gameplay tag.. for instance if you want to make a game that has No friendly fire... and singleplayer in the most basic terms.. you would give your enemies a gameplay tag Enemy.. or w/e you want to name it
Okay I'll word it different.
than in get overlapping actors by tag you would search to see if they had that tag
I want to search for any actors, get the nearest one with X tag.
And make that the target.
you want to search all actors ?
define an actor.. you could easily put someting like AActor class in that box.. but i really woould highly suggest not doing that
Only the ones within a range.
because it will search every single actor.. not just your players
Eh, guess I really picked a bad kind of game to make...
what are you trying to target?
you could go with all within a collision sphere
objects and players, or just players? or objects?
Enemy actors, or stationary targets based in context.
do they share a parent class?
I sort them with a tag so I can differentiate enemies from other objects you can break.
if so. the parent class is what you would search against
I don't have a parent class for all of them...
if they all share a tag
But they don't have a parent class
^
I haven't made any yet.
if they have a tag. you can just search by tag
you just are using the wrong getter
but it's still a lot to loop through, how often will you be doing that ?
I should use get all actors with tag
Return the distance of the closest one
And if within X range, get that target.
i personally am a huge fan of creating an interface and giving all my interactable objects / characters that interface
Although I also want to add some control based on player orientation...
How complex could it be to instead use a cone of sorts to detect the actor?
I can't find something like that.
Yeah I'd like a sphere trace that gains radius as it approaches the end.
so something like that.. you'd do a sphere trace.. it it has a hit it will detect if the actor has the tag.. if it has the tag it will add to your array of actors
you can stack the traces and do multiples using the same concept
Hmm, I still need the cone aspect though...
the cone aspect would be doing a multiple traces
The idea is that the player would prioritize targets by proximity, both to the player actor, and to the forward vector.
you'd have to do some vector math.. but thats the concept
and if your math is slightly off.. a good failsafe is to do a check to see if the actor is already added in the ArrayOfActors, and if so, ignore (dont add a 2nd time).. just incase your traces overlap
Hm well...
One moment
Okay, so Epic gave away some marketplace stuff
There's this asset called Line of Sight Dynamic mesh
yea. that method works as well
they have an invisible mesh in the shape of a cone and use OnOverlap ... than just do a linetrace to the object that overlaps to see if it gets a hit on the visibility channel
Hmmm...
Though with that method, I'm not sure how to return the proximity aspect.
The idea is that enemies closer to the player vector should have higher priority.
Maybe I should just do it on a proximity based system, I don't think it would be that bad to have nearly fully automated aim...
2 different things.. you want your functions in programming to do very distinct things. your detection function does 1 thing.. it detects.. have another function that fires off after that takes the actor location of only the actors in your ArrayOfActors and calculates its distance and targets the closest one
Yeah that's a good point there.
Regardless I still feel unsure regarding my project, once I'm actually experimenting with stuff here.
Hello, I'm developing a project with blueprints and I'm getting an error when I try to cook that I cant figure out how to fix, would this be the right place to post that to see if anyone can help?
dot product my man
Ahhhhhh yes dot product, I remember it now
Sphere trace -> some metric based on distance and dot product -> now you have the closest most aimed at thing
I used that for making a DMC input system.
It actually works shockingly well.
Though, say... You think making a Mario 64 meets Metroid style of game might be shooting a bit too high, coding wise?
if it's single player nah
you can do all that in BP as long as you're not doing anything too fancy
The hardest thing about cloning Mario 64 would be the movement modes
If I were doing a single player platformer I'd probably just use physics
Well it's not cloning specifically movement of Mario 64
But the idea, 3D platformer across a series of levels you explore and collect stuff in.
If you're using Character, the further from walking around you get, the harder it is
Well the wildest idea I had was a movement move where gravity doesn't affect you at all for a moment...
As far as movement goes.
that's pretty easy
Yeah just get current Z post, lock the player to that until X happens.
for single player that can be BP only
locking and gravity not affecting are different things tho
does gravity turn off or does Z stop changing?
sure
Pretty much that.
What happens if it's over a hill or staircase
do you float forward and NOT go up the hill or do you follow the hill?
see it gets tricker and trickier
a simpler way to do that mode might be that you can now walk on things you couldn't before
like water
and of course you can do anything with the animation, you can move it up to be floating
but fundamentally, the capsule is still just walking
Yeah, but I imagined mostly it'd be used in crossing gaps and the like
Turning off gravity would work for that. What happens when you walk down a hill?
That's the neat part, nothing.
You just walk as if the ground remained at the same height.
So the rule is more like "Collision only moves you UP"
or, gravity is off and you're flying with collision
From the two, the former is the more accurate one.
Ah wait, I have a perfect example.
Have you played Super Mario Odyssey?
i know about it
Alright, there's a mode where Mario turns into a bullet bill.
While in this mode Mario has a fixed position along the Z axis.
Ramps slide him up, but cliffs and gaps are ignored.
That, minus the whole "explode on touching a wall" is what I'm thinking about.
So the thing to figure out is if you can do that sort of stuff with Character in blueprint
you probably can
if not, make your own movement system or use physics
Thanks!! Explains why my cast is not working!
Actually I sort of figured out a way to do it...
Not sure if it's ideal though.
I'm still considering if perhaps going for other ideas would be better for a 1 month proof of concept. This one I chose at first because it felt exciting, but is it unique, fresh, original...?
I mean you have to have something beyond moving and collecting to make an original platformer
because the input type is wrong, if you want to get the player controller WHICH YOU ARE DOING, you have to use 'Get Player Controller', the getController node is another type and will not work with the cast you are using
Right, of course... The base idea wa to mix the Metroid elements with a 3D platformer.
Because it's probably getting clobbered by whatever is normally setting your character rotation
The metroid franchise was always leaning more towards platforming than castlevania, so they have a native synergy.
Haha, yeah someone already helped me with that!
Yep thanks. Progress. Still something wrong though. Even when I wire ALL my EnhancedInputAction outputs (Triggered, Started, Ongoing, Canceled, Completed) to Print Strings I see nothing!
because something is wrong with your code / input ...
I dont know what tho
it can be a lot of things
this is on your player ?
Just a Pawn Class.
I think the issue must be either with the way I've defined the actual Input Action and or Input Mapping Context.
I need to get examples of each I KNOW are working and then reverse engineer why mine isn't. Maybe the Marketplace has a sample?
look at one of the templates
but idk if that will work if the pawn isn't possessed
i would first try with a hard coded input
like a key press
see if you can even trigger it
If you want only certain child blueprints to have variables and be able to set those variables when you spawn them in, you should set the variables to “Instance Editable” and “Expose on Spawn”. You can find that in the class settings or class defaults, I forget which. Then when you use the spawn ai or spawn actor blueprint node and select that child blueprint, you’ll see the variables as input pins and you can plug in whatever you want
Or you can go the struct route and that would be fine too
Is it possible to make the character head always face the camera look vector exactly? I am using the lyra character in a true fps view and the head does not fully tilt with the camera or will look around during idle animations even though the camera stays straight
Is there anyway I can attach my PLAYER to the CINE camera?
I need to make a small trailer, and my enemies are sprites so they must be looking AT the player so that we dont see them from the sides. I've made a sequence with my camera and my enemies dont look at my camera because they only look at the player
Are they not all "Pawns" ? Children of Pawn?
If they're all direct children of Actors then id suggest a simple reparent. Doesnt nees to chabge anything, just reparent them so you have a common editable base, where you can add overlapping logic
(Id suggest that if they're all pawns aswell, really. Or Characters.)
Enhanced Input confusion.
Need to simply define input for the end of a Mouse Drag operation, so even Mouse Up might work.
Third person Template has some working Input Actions and a Input Mapping Context.
But how to define either Mouse Up or Mouse Drag detection?
Nothing in the Input Mapping Context I can see.
Well time to test something else...
What kind of variable can I use to store up to 3 values, and then run a specific function based on the values inputted?
Yeah I guess an array "works" but does an array also care about the order?
In the way I specifically want to use it.
wdym "care about the order" ?
you can store three values
then use the index to get the value
so index 0 is x, index 1 is y, and index 2 is z
something like that
The player use 2 inputs to insert a code to cast a spell.
So the values possible are 1, 2 and 0 (If no value was inputted in that array)
If the array has 3 slots, then 100 would run A, 110 runs B, 111 runs C, etc.
This is checked when pressing an input.
i'm not understanding, what is 1, 2, 0 <-- these will be in an array like when you press each one it will be one or the other ? also what is 100 ?
The values of the array
110, 111 ?
1, 0, 0
what do those numbers represent ?
idk wym by 100 and 110 or 1,0,0 but an array can store multiple integers or floats
but you have to pick the type and all the array is that type
It would be ints.
Okay I know now
This is a morse code style system.
The code should "read" what the player inputs using morse code and perform an according action.
@lofty rapids Sorry if I failed to properly explain this..
Yeah pretty much
With 0 for n/a, in case the player sends info under the array limit.
Probably would be nice to have a way to slot the arrays differently...
So that the 3 values of the array are the 3 most recent values.
That way it updates dynamically.
are child actors bad for performance if they dont tick? i wanna use it for spawning in character cosmetics and attaching it to the player character mesh
It'll probably be fine but why would you need them to be actors? If they don't do anything, you can just add a static mesh component or skeletal mesh component as needed.
i was thinking if i added particle systems and maybe sounds too it it would be way cooler
and i want some of them to be animated too
just more freedom
anyone able to help me and figure out why this divide is showing out of scope instead of the result which should be 1? im so confused...
If you're gonna spawn them in at runtime I'd avoid the Child Actor Component and just spawn and attach the actors manually.
CAC is weird and janky.
Then if they don't tick you still get overhead from attach transform updates, but that's of course the "cost of doing business"!
yeah i was doing that but then i was having problems with setting the actor hidden only for the client i was using set actor hidden in game
maybe the code was wrong but it was set to run on owning client only and it was setting the actors hidden in game
the actors are replicated so i dont know if that had something to do with it
ill try it again
@lofty rapids The main challenge now is the branch / gate based on the values of the array
Is there a a better/more organized way to do this i.e. take a flot and disregard a certain range of the float ( between -5 and +5 ), then clamp to normalize depending on -/+
This feels a bit clunky
fixed it with a rep notify
https://www.youtube.com/watch?v=asgpEgJ8NTQ
ive just watched this video about substractive materials and i wonder if i can do this inside of a actor, does anyone know?
Unreal Engine Level Design Series - Video no.6
In this video I talk about how to use subtractive BSPs, I also discuss some rules and differences between using static meshes and BSPs, as well as the differences between additive and subtractive BSPs and what each can be useful for.
Right now im dooing it like this
Generally pure nodes won't show the value as it doesn't know until it's been called/evaluated. That's why it shows out of scope.
The other ones show the values because they're an actual variable.
so i'd have to promote a local variable, set that and reference that than?.. just to get the bool in scope?.. weird. ok
thanks
was trying not to create more variables for one-off calls but i guess i have to in this case
But then it would only show the value when it was last stored.
which is fine. whats happening is i'm receiving a broadcast when an attribute changes in my attribute set.. when that happens i'm setting a local variable "Target" and than instantly firing a event that calls this function to change bool bInterp to true.. than does a while loop to interp the percent of my progress bar until it reaches the same value as Target.. than setting bInterp back to false
ThirdPerson template has a excellent example of Enhanced Input system.
I took this and simplified it to just detect Mouse Up and Down.
Created a new Pawn Blueprint and pasted the attached logic.
Dropped in a blank level and presto, works.
Now I migrate this (Input Action, InputMapping Context, Pawn Blueprint)
to a blank project and it stops working. Of course Enhanced Input plugin is enabled.
Why doesn't it work? What else is necessary for input actions to work?
it works when i set a local variable..
just weird that i had to do that instead of just using my GetPercent blueprintPure function
@outer terrace delay on tick is pretty useless
U r just delaying the process initially
correct
its to run a delayed bar behind my HP bar
thats it functioning properly now.
just a cosmetic thing
And that's the wrong way to do it
Okay game 2 of the prototype and testing phase.
The goddamn projectile won't collide with anything.
how would you do it than?
Interp on tick is right for the ghost hp bar.
If you want to add some delay before the hp start dropping down, use timer
Not on tick ofc
the HP is being changed instantly
the only thing thats delayed is the gray bar that trails the HP as a visual effect
but yea i guess the more i get off tick the better
its the only thing running on tick
Won't matter tbh, depend on what u r doing
This is pretty lightweight imo, don't optimise prematurely
If something needs to happend every frame, do it on tick
Eg attribute trails
@outer terrace actually I read your blueprint weong
I don't know when the delay is called, I thought it's called every tick
i set my Attribute value.. than after 2 seconds i set a target attribute.. than on tick i have a bool if my attribute and target != it interps until they ==
Probably near equal for floats if you run to any hiccup by any chance
Guys im thinking abt making whole maps on blender, should i use complex collision or is there any downside?
Anyone know how i can fix that?
when there are two blueprints I can't click one of the buttons, when there is only one left I can click it, what's the problem?
blueprint: https://blueprintue.com/blueprint/f7a_pnue/
You don't want to make whole maps in Blender. A lot of your geometry is likely to be reused which means you could leverage things like HISM and LODs in Unreal to reduce the performance impact, but only if you use mesh "parts" and build your map within Unreal. If you have your entire map built in Blender, then all of the geometry of that map will always be considered fully visible and not be able to use LODs or HISM.
If you're not doing gameplay stuff, and are only doing renders or something, I don't think it would matter much. If the map is very small (like a small indoor room of a house) and doesn't have a lot of repeating details, then it probably wouldn't matter either.
hmm.. i think the input action nodes may be consuming input, click it and check the details panel, disable consume input
I have an array that is of type WBP_MyWidget. When I drag off of it and type get I only have the option to make a copy. What dictates whether or not I can get a ref or copy?
Thanks !
You are getting a copy of the memory address
It's going to point to the same object
In bp land, don't think you can get ref. Everything is pass by value
Something like this seems to work but I get a bunch of Blueprint Runtime Errors. Does it look correct?
If you get errors, then no, it is not correct
Ok, let me rephrase... do you see where the errors could come from?
showing the error log would be helpful
Hey there everyone, is there a function or node that can return a specific function or event based on certain criteria within an array?
Basically I have an array with a set number of values.
It's a system similar to a morse code... I'm using ints. 1 is dot, 2 is line, 0 is empty.
TMap for pairing values
Oh thank you... I'm not too familiar with TMaps so I didn't think of them
How do I use them exactly?
Ah sorry, I'm not exactly returning a letter off of this...
where int is the key and string is the value
This is morse code in input for the sake of gameplay.
Hope this helps
Yup, it tells you what the error is
This is the current setup I'm talking about.
The array stores the last 3 values received, reset every few seconds by calling it again with a retriggerable delay.
Gas1Unit , Gas2Unit and what ever listed there are not set yet when you are trying to access it
I can't connect the dots
Basically each array combination returns its own assigned event.
Or function, whatever.
So an array of [1, 0, 0] exectures Function A, an array of [1, 1, 0] returns Function B, and so on.
probably just use branch and call the relevant function then
In other words, you're trying to do a combo system?
Is there a clean way to do a branch like that?
Yeah, pretty much.
Are you familiar with Magicka?
Nope
Are you familiar with dota
A wild thought - you can store as strings and make a SwitchOnString gate
Hm, how exactly would that work?
You cam easily convert back and forth string and int
I'm using the BP to spawn 1 gas can or 2. When there's one there cant be 2 and when there's 2 there cant be one. Then I have another command to destroy all actors. Where should I place the "set" so I dont get these errors?
How do you convert an array of int into a string, though?
Where do you get your input numbers? From keyboard keys?
The input numbers are assigned on button hold and tap.
1 is tap, 2 is hold, and 0 is for no input.
that's on you to do , as in you have to think about your design.
All I can say is you are trying to access it when it is not set. So set the variable where it make sense.
You have to think on when to set, when to access and when to dereference them
So you do string append each input and count to 3
Used to be immortal, but what about dota?
The system I have here is similar to Invoker.
Except that instead of 3 inputs with order being ignored, this is 2 inputs that care about order.
Why do you have reset to begin with, just wondering
when the input is pressed, it should just get rid of the oldest key and add the new one to first index, then move the rest by 1
The reset is so it can be rest after X seconds of not performing an input.
As well as resetting it manually if I need to do some debugging.
Yeah that's waht it's doing, currently.
I can't find how to do that, context sensitive search shows nothing
Thats the node. Ignore the circle, took that from google
Ohhh I see
Hm how can I just use that one?
I'm using for each loop appending everything one by one.
And then you just make switch on string gate with hardcoded combinations
Yeah that seems good.
Given the system I have hardcoded combinations isn't bad at all.
Since that's the whole mechanical point of this system.
You make a string var append to it each loop and after 3 loops you just reset it
I ended up just doing this.
You could do it more versatile like for each loop with break where break on certain loop count exits the gate and resets the string
Hmm, what are the advantages of that method?
You could store more numbers in array and its more automated
Wouldn't for each loop be more expensive?
Though if I wanna add more inputs it would get sorted automatically, so that's an upside.
This 100% needs me to make a string variable, right?
Ah, also how can I make that string based gate?
Its negligible on such small scale and as you can see it'll be more scalable if you add more inputs
Switch on string in flow section
Yep for the gate switch
Looks good but if you have an array of more than 3 you'll need a loop with break
Currently this is what makes the array, it cannot hold more than 3 values currently.
Huh, nothing is resetting the string
It's when I call the function to clean it up and only get the current array
Yeah way ahead of you
Yeah this looks ugly as sin
Sadly it's still the most efficient solution I found, hah
In cpp you could do it nicer with a pointers but it'll do as long as it works anything goes. You can collapse the nodes after that so it won't look this bad on main graph
I'm not opposed to adding a bit of CPP for efficiency and clean running...
Currently, maybe not given this is a concept...
It's always better to prototype in BP tho
Yeah of course.
And I'm sure theres a much nicer solution somewhere the longer you think about it 🙂
It's just much faster.
Mind telling me about those pointers though?
Also, how do you reccomend approaching the character casting a different spell on each case?
Should each spell be components stored together, or maybe just functions stored in the player
You just make an int32 pointer and then fill it depending on outcome
Making an actor component to store all the spells in one place its a first
And store all spell casting functions in it
Hmmm yeah
Like currently I have a simple fireball projectile actor
It has the standard properties and all
Thing is I also need to modify that projectiles qualities.
This lets me recycle spells between players and even enemies, with unique properties for each to differentiate them.
For some generic reusable formulas you can make a blueprint library
Anyone got a second to check over som BP code i have for healing and anti-healing? I want to make sure I'm on the right track and need someone to double check my math.
Well just post a picture or blueprintue link and someone should give their two cents
Not enough of a coder to know much of that, sadly
Its an asset you make just like regular blueprint. Basically a collection of functions that can be accessed from any actor without the need of casting
Thanks a lot! I think this is not really what I need at the moment though. My problem needs a different solution apparently. A bit of context, I am trying to mount a pak at runtime on server and clients and make it replicated so that all players basically know that this mounted pak was basically the same one and that any asset of it spawned will be displayed correctly as if an asset from the base game pak was spawned. I could send you some logs of the packaged build if you want to dive into it as well but I would prefer not doing it in public channels. Let me know if you are open to that.
Huh, that's pretty interesting... How do you set that up? Sounds very useful.
No need for making it a component either?
What's the difference?
Nope. The downside it cant have any variables of its own. You right click in asset panel and iirc it'll be in the blueprint section
Huh... Not sure why should I use components over it then.
It cant have any variables so mostly like basic calculations
Kinda like simplified cpp library
So for instance, a formula for damage falloff on weapons and whatnot
Yep you just make a function there with inputs for damage. Its a very handy thing
Thanks. I didn't know we could post pics. I'm trying to create a stacking disease system that lowers incoming healing. Each stack of disease (disease multiplier) = -20% incoming healing.
What the hell am I doing wrong?
I construct a new viewmodel in the gameinstance and add it to the collection, I do a global binding in the widget, but when I try to use this collection the cast just fails...?
Just straight up cannot find this thing
The clamp makes it so there is always at least 1 stack of disease. Is that intended?
Also the screenshot is really small, I can't properly ready anything
It comes after a check to see if there's greater than or equal to 1 stac. It's a redundancy that also clamps the stack to max stacks. I hope this is better.
This part seems like it has some unnecessary math. You shouldn't need to multiply by 100 and divide by 100 and then store this as another variable. You should be able to use "Disease Multiplier Total" directly.
Let's say your disease multiplier is 0.2
1 stack would mean Disease Multiplier Total = 0.2
100% can be represented as 1.00 so all that would need to be done is 1.00 - 0.2 = 0.80
2 stacks would mean Disease Multiplier Total = 0.40
1.00 - 0.4 = 0.60 etc..
Otherwise, the rest of the math does look correct.
You're multiplying incoming heal by the Disease Modifier, so if we use the 2 stack example and an incoming heal of 1000, you would get an effective heal of only 60% rather than the 100%, equating to 600 for your "Heal Amount".
So more like this
You could also just set Final Heal Amount to 1 if you have <= 0 for the amount check, the lowest value possible would be 0, so it would always be 1.
@tame grotto Sorry for the ping, but you've been a massive help so far... So I have one last question for the day.
How can I make a projectile spawned by X actor gain access to a set of variables such as damage, speed, instigator, etc...
All I can come up with is methods that end up as dependencies, which isn't good.
You want the projectile to read the values from X actor or coudl X actor that is spawning it feed in those values?
I currently have a function as part of a component that spawns the projectile
I want the and properties of this projectile BP to vary from actor to actor while behaving the same way
Well now I feel dumb. Lol. I over complicated the hell out of it.
So have your component have those properties, this allows you to set those properties on any actor that has that component.
When spawning your projectile, you would then feed in the value currently stored on the component into the spawned projectile - this can be done by marking the properties you want as "exposed on spawn" which will then give you pins to input values on the spawn actor node.
Currently it's a fireball spell that creates an explosion on the impact point.
The values in question that I want to edit:
Fireball gravity
Fireball speed
Fireball damage on direct hit
Explosion Damage
Explosion radius
Ahhh alright, thank you for that
@dawn gazelle I need to reload the Spawn actors on the nodes to reflect the change... Is that normal?
Yep, just a refresh of the node
Cleaned it all up. Thanks for the help.
Alright. Thanks for thee help! Such a small thing and yet so important...
Cant you skip the branch, do the regular math and add a max(1, calc) clamp to it
Unless i read the math wrong 😅
So you can set Modified heal amount directly
Something like this?
Yepp, altho you dont need a full on clamp
Max should suffice
Unless you wanna clamp to max, but max is really current-max ..
I think I want to keep a clamp. So players can't heal past max hp.
I prefer doing that in the set health function
Thats hopefully in your SetHealth already
Thats the only place it matters
This wont really work anywyas
If you already have 100% health , healing 1.0 more is an overload.
No worries. If those actors that spawn a projectile are placed in the world and not spawned themselves, you can mark needed variables as instance editables and then adjust each one manually in the world in details panel
Someone helped me out on that, regardless, thank you very much! You are a lifesaver...
Was happy to help✌️
Yeah I get a bit desperate given I have 1 month and other stuff to juggle...
First idea turned out to be less of a dud, and more "this needs way more polish and experimentation that I have time"
It was a Super Mario 64 meets Metroid kinda thing... Shooting without a reticle feels bad, and having automatic aiming / locking isn't what I wanted to have either.
Making it a top down thing could be a possibility, top down platforming is actually an interesting concept worth exploring, but a bit too revolutionary for what I need to achieve right now.
@supple dome Thank you so much ❤️
is it possible to diff two blueprints? i want to see why what i did wrong with my implementation from an example
using version control you can
but i dont think thats what you are doing
hi all, I'm trying to use "set physics velocity" to launch a grenade mesh, but I found in about 1 of 10 cases, the grenade falls directly to the ground with the same velocity set as in other cases - does anyone know how to fix this?
Do you know where is the documentation of the Create Widget Blueprint's node?
Is there a way to set if an object is a shadow caster?
Set what?
Change what?
U want to toggle the boolean?
Get a ref to the object and get the property bCastShadow
Not sure if u can toggle that tho, might not be something u can change at run time
Gotcha yeah, that's the idea
I basically just want to get tagged objects from X distance from the camera, and disable shadows on those tagged objects past that distance
devs, how to play a few timelines in row, one after another?
maybe put them on seperate events and run when timeline finished
I'd use the timeline node rather than directly using it's component though
Try to put delay(equally timeline) between them.
thanks, it really worked
i thought it's gonna work without any extra code, events and delays(
the issue is most likely the play doesn't wait, it just play then move on
Does anyone know if there are any debugging tools that show all event dispatchers and any delegates bound to them? I want to make sure I don't have bindings that are lingering when no longer needed.
hi guys is there alterntive to the set half size node that doesnt make my charcter stop moving after the roll
You can use this to find refernces to individual diaspatchers
I was referring more at runtime.
ah ok, misunderstood
to verify, you could use VS local/autos during breakpoints/debug to check whether the delegate still has any object/function reference, alternatively you could have just call unbind all event if you dont want it anymore.
Hey guys quick question, any counter indication about making a structure in a structure with a map in it ?
Structure inception is that a bad thing ?
Correction its a map that contain a structure wich contain a map is that bad ? will i trigger another big bang ?
Chat GPT answer satisfy me
plz help : (
Hello! What is the main difference between using a component VS doing a parent where I do certain things?
The reason for my question is that I have:
Shared enemy, mini-boss and main boss as three different category types (and I will probably add some more level specific ones as well). These are all based on the "BP_Character_Enemy_Base" and then I have BP_CE_Shared_Base, BP_CE_MiniBoss_Base, and so on.
I have this so I can make them react to different things in different ways and such things when the player shoots on them, and of-course they have a different BT structure and complexity depending on which one they fall into.
Currently to deal with health and damage, I have a BPC_Health_Base, and then children BPC_Health_Enemy_Base, and BPC_Health_Player. And from the BPC_Health_Enemy, I have children depending on the enemy type, BPC_Health_Shared_Enemy, and BPC_Health_MiniBoss and so
I'm wondering, if I should rather in the BP_Character_Base (the base for ALL my characters including the player) add the health to them, and then in then in the BP_Character_Enemy_Base I do what it is different for the enemies and I make a "base way of dealing with taking damage", but then I can over-write it per character if I wanted. Meaning if I have two different bosses they can handle health differently (e.g. one of them might get stunned and get damage, vs one that will never be stunned and get damage).
With my current setup this would be a pain.
Is there any big negative to do this inside of the character BP's instead of inside of a component? I feel like the biggest positive for the component is that I could attach it to anything. But in theory, I could also just do a interface and let that deal with it? + Are the any performance positives / worries with any of these solutions?
Sorry for such a long message, but I was lying a long time this night trying to figure out the better approach and decided I need some help on this. 😄
Why do they stop? I don't see any reason why they should? But, I also don't see that you are resetting the height after anywhere? If that would matter.
I forgot the shortcut to create a branch for the blueprints. Can someone remind me?
something like hold b, and click ?
@lofty rapids mvp thanks
component is something you want to use across multiple actors with different parents
example: i made the health part into a component because i want to use it not only on characters
components are mainly use to separate individual features that one actor should have into its own section to achieve a few things
- Reusability, ensuring similar behavior across many uses.
- Condensed, all in one place so you could "see" all of them without disturbance from other features
- Enabling multiple collaborators to work on one actor, as they may just work on the component, and not the actor.
HealthComponent is probably something that will handle almost exactly the same in every entities in the game (e.g. subtracting floats, damage done eligibility, modifiers, callbacks on change). It probably wont be really different across entities. What could be changed are usually stuffs that happens before or after the health calculation, for those cases, having options/configs in the components or exposing a delegate to the actor bp would solve the job, allowing the actor bp to overrides on each child (e.g. different reaction when dying, boss %hp mechanics).
Polymorphism on the other hand is very much more on OOP designs, where each entities has features or behavior that shares among its children. The children could extend or override them to suit their own use. (e.g. Character can jump, Item can be picked up)
personally i try to put everything into components and have the least possible amount of stuff going on in the character itself
Are the checkboxes for replication client-side predictive & server side reconcilable?
Okay! It sounds like I should keep my current flow, and make a new child component for each type rather than adding it to the character?
usually you dont make child components
FYI: "Polymorphism on the other hand is very much more on OOP designs, where each entities has features or behavior that shares among its children. The children could extend or override them to suit their own use. (e.g. Character can jump, Item can be picked up) " - Yeah, that is where I'm mostly coming from with the OOP design and such. 🙂
Hmm, okay,
Then I'm not sure what the best solution is right now. 😄
what you do is you add the components to the base actor
and on the child actors, either change the component's config (can recieve damage, can heal, damage recieve multiplier), or handle differently when there is a delegate callback (OnHealthChanged, do something different on each child)
Okay, hmm, I'm still not sure how I want to approach this based on this. 😄 I mean I could still have a health component and then send certain delegates like you said. That is a fair point. Then I would still only have "one" component per type and be able to deal with this.
i dont know why it stop
I'm just not sure if the polymorphism isn't easier to maintain. 😄
but when ure using a component already, do you even need delegates?
and yes i reset it after the roll complete but still stop
if you don't change half height, does it still stop ?
if we take HealthComponent as an example each entities that uses health component may handle differently when their health reach 0, some dies, some dont, some destroys, some triggers some event. these are the times where you use a delegate to call in the HealthComponent to inform the actor bp that "hey, this has happened, do you want to handle something?"
its completely different use cases imo
if i dont change the hight at all it will block my way without rolling i mean the obstacle
i mean to see if it's that setting or something else stopping you
its possibly another reason
in this case, we are separating the general tasks that a Heath feature should have into its own component, if there are anything unique things that should happen based on what entity the actor is, the actor should be responsible for knowing what it is.
i dont really know im changing the hight just to make the obstcle dont block
yeah but the component can just call a function on its parent instead
Well, let me give an example what the use-case is.
I have two projectiles fire and ice.
When I hit the enemy with fire, nothing happens.
But if I hit the enemy with five ice projectiles, it's freezes
then when I shoot fire it will explode and instant die.
However, for other enemies they will just take different amounts of damage (I have a damage multiplier I use to check this). So fire deals 10 hp damage and ice 5 hp damage.
So some enemies should be stunned, and others shoulkd not, etc.
And it will be different depending on the enemy type.
That is why I wonder if the component approach is a bit "too" limited. but I honestly don't know.
then you couldnt use it on any actor you want? you need to know the class type to call a function, that defeats the purpose of component, and also circular dependency is bad.
your saying that code makes it stop, it's possibly not that node
but you already have circular dependency when u attach the component basically
uh, the components will have 0 idea who it is being attached to lol
yea i dont know whats the cause i jusst roll over the obstacle and the charcter suddenly stop and the animation still going for run
but it still shows in the size map
is your walk/run in a blendspace ?
i mean like this
in this case, what you need are some configs, usually i will have a StatusEffectComponent for these kind of stuff, you have stuff like whether it is resistance to certain elements, whether they should just take damage instead of applying the status effect, etc etc
is your character stuck on that glowing thing ?
no its stuck wherever the obstacle that i roll over
does it snap back or the animations are all smooth ?
Hmm, interesting.
i dont know how to know this
you could integrate them in the health component, but i usually separate them
when you roll over the object, are you stuck at the spot where you started or finished the roll ?
yes
hmm
i finish the roll and it get stuck
thats not really a question of which one is better, polymorphism or components, i would use both in this scenario
Yeah? How would you use both?
Sorry as in how would you suggest to combine them
firstly i would use polymorphism to make the different projectiles, and i would use a component to handle their impact on actors
i set set half hight of capsule because someone suggested me this
so if my projectiles hit an actor, they check if that actor has a health component, and then interacts with it
I think I will need to go back and think through this design a bit, and how to best do it. But is there any performance difference between the component vs the polymorphism that I would need to wory about?
ya but what i'm saying is that may not be whats actually causing the stop, if you could show a video or a gif or something of what it looks like and also some code maybe someone might spot something
That it already does. If check if it has a health component, and then does apply point damage. 🙂
ok i will
if you need more complex interaction you make an interface
if your using a blendspace based on speed, it's weird it would be running
does it run when you don't press the key ?
actually what does the anim bp look like ?
it may be the play montage also hard to tell without seeing
I mean it sounds like the component is the better approach, from what I hear from you guys. 🙂 So I will liekly stay with that, but need to figure out how to make it easy to add / stop certain actions depending on the enemy. I assume having tons of "settings" is the best approach based on this. E.g. CanBeStunned, if yes, it will get stunned after X hits and so on.
Rather than adding more code to the characters BP's.
yeah u can handle all that stuff in your health component
ok
its the default third person anim bp
looks like your stuck in the floor
notice your roll is a bit low
sticks you into the ground
try jumping out
i tried it didnt do anything but i can switch lanes still
well your stuck in the floor
Yeah. Just need to add quite a few settings.
my component looks like this now xD
you can do a lot with gameplay tags
why this only happens when i change the hight
#animation may know why it's doing that also
you could think of it in 2 parts, applying effects (having some sort of tags or identifier that the effect is happening), and reacting to effects (reading the tags or identifier and reacting accordingly).
The following bracket'd parts are reaction to effect.
Fire projectile applies a Melt Effect, (but its condition is Freeze is required on the Target)
Ice projectiles applies a Slow Effect, (when Slow Effect stack reaches 5, it Freezes its target)
When Melt Effect happens, (depending on the config either it would be instant death or take a multiplied damage. If stun in a unique behavior that a unit has, you can use a delegate to let the actor know that Melt event has happened, and it should stun itself. or you could just have another config to say whether should stun on Melt)
ok ill ask there
thats why i said to just disconnect that node and see if its actually that one thats doing it
Thanks to both of you! I will try and fix this.
Regarding GameplayTags though, don't I need to check for changes to that inside of a "tick event"?`There is now event called "GameplayTagchanged or such right that I can use?
yes
uhh FGameplayTagContainer?
you can use gameplay ability system
i dont recall they have any sorts of changed delegate
no but GAS handles a lot of that stuff for you
that is only a thing in the UAbilitySystemComponent, because adding/removing tags is through the ASC, so it is possible to have these delegate
are you using GAS..?
But is there any performance difference between the component vs the polymorphism that I would need to wory about?
Nope.
Thanks! And currently I'm not using GAS.
I have been looking into it, but not really gone into it
Is there a way to make a delay happen, but then also allow the delay to be interupted?
My use case is that I have a UMG conversation between two characters. When one character speaks, a flipbook starts playing the selected animation. I only want that animation to play for a short while (the delay) while the character is speaking, then revert back to the default pose.
However if the player skips over the dialog before the delay finishes, I want it to cancel the delay/revert to default pose, so that it doesnt interupt the new post that was intiated by reading the next dialog line.
i think there is delay with break
its called a ⏲️ ||Timer|| !
Ooo, this is probably what I want. Thanks 👍
Might sound like a silly question but how do I basically copy/paste an event? obviously it wont let me but how can I call an event in multiple places an tie it to other functions so one event can fire 10 things with out having to drag a gigantic noodle across my graph
why do u want copy paste an event?
you make an event that call that 10 other events
then you call the "thicc" event when you want to call those 10 events
I suppose its cause if you copy/paste it's not clear then which one fires first
that makes sense now
runs from left to right
it would be observable what run first
add breakpoint if need be
no but I mean, that's why they don't let you just copy/paste lol
u can copy paste event, just not with the same name
because then, it don't know which to call
All good I'll do my super event 💯
Am I using the event timer correctly? When watching it while playing, I can see it hitting the Set Timer by Event node, but I never see the print statement show up after that.
set Time to tell it to run after x amount of seconds
Shouldnt it fire immediately if set to 0.0?
if you want it to run immediately, call the function immediately right after
I dont want it to run immediately, but was doing that for testing purposes. Makes sense though, thanks!
and to "cancel" it, cancel from the FTimerHandle that this node returns.
i was using it for some time, but it doesnt make much sense in a blueprint only project so i went back to using my own system
Oh, one more question. Do timers work when the game is paused? Guessing that might be my last issue...my UMG conversations happen while the gameplay is paused.
Ha, dang. No worries though. I've been meaning to implement a psuedo-pause for that anyway