#blueprint
1 messages · Page 310 of 1
The damage calculations and whatnot happen when you hear that impact sound, not when the vfx first manifests
This is the player's part of the code, where it traces for damageable objects, then runs an interface on them with all of the damage info, followed by the accompanying hit sounds and vfx
This is the accompanying interface function on the overarching parent class for all enemies, where it basically just takes the damage info from tthe interface call and then sends it to run an event on the Damage System Component that we have (which is that universal code I showed earlier)
what about the code for updating the material on the enemy?
That is (very annoyingly, I might add) done on a enemy by enemy basis for some asinine reason, this is how it's done on the frog enemy for example
Now interestingly the M on Damaged you see here is some kind of generic white material from the PCG plugin of all things
🤔 Hmmm... nothing jumps out so far. How is the UI stuff structured? Are the health bar a widget component?
yes
Does it happen without the health bars? (No widget components)
I'm not sure, tbh
Ill make a build and check
Im also disabling the material change
It seems to last about 2 seconds on average. 🤔
Well I think that's because of the godawful frame rate seen in the video
It's usually pretty brief
It also seems that if there's a black screen, around the frame before the damage is applied it clears and then gets reapplied the following tick. 🤔
edit: scratch that, it doesn't do it at some parts lol.
How does the widget, update the health bar?
I believe through a binding
Also it still happens even after disabling both the material change and the widget component visibility thing on the frog
Hmmm, I would add a break point at the start and just step through until it's finished to see what gets called. It might help narrow it down.
Hi I have a problem,
I manually loop through each interactable world item/object class (Grindstone, Furnace), each with their own Do Once to prevent showing the tutorial twice. But it's duplicate logic, not scalable, and clunky. Even tho the Do Once will be there once I might wanna change this in the future and this will create a lot of non-centralized, or non-modular code...
My goal:
Have all indicators share a common system (like an interface or tag) and a central broadcast that hides them 🤔 once and cleanly🤔 without hardcoding each one.
It's like...
whispering to each widget one by one, "hide now," using a personal note that self-destructs after reading (that's the Do Once). Instead, I want to use a loudspeaker that tells everyone at once — and only once — to hide. I just wanna **simplify **my code
I feel like im using a sledgehammer to crack a nut here🔨 🥜
That's fine but its more to see if anything jumps out. If I was to take a guess though, there's probably an image asset or material that is sometimes used that doesn't get packaged so when it goes to be used, it just uses black.
Event dispatchers are you're friend. Also check out common UI, there's lots of useful stuff to help handle UI stuff.
Also, don't connect the completed pin to the same exec path as the loop body. In this usecase, it doesn't do anything but could result in access none messages.
That what I was assuming, but the thing is that it doesn't always happen, as you can see there are several occasions where it works fine
does common UI help deal with all UIs in terms of code related enabling/disabling visibility problems? I think common UI could help in terms of fonts & design & stuff because I have a a lot of widgets that don't match in terms of style
There could be some randomness built into the logic thats been setup.
since disabling/enabling seems more like a blueprint code related thing
True
Maybe the particles?
Widget stacks in common UI are nice. They also have style objects for text which are used by a common ui text box. Change it in the style object and it updates for everything that uses the style.
Possibly if it fills the screen.
I mean none of them should
Still happens 🫠
I have to go to class so I'll be back in like 5 mins, I will kill this bug goddammit
Ok I'm back
Anyone got any tips for a Status Effect system that adds gameplay effects to things like "OnBeginJump" "OnTakeDamage", etc. My intuition keeps leaning towards dispatchers for each type of event, but I feel like this is limiting and messy.
These are the things I've ruled out as cuases for the black flash
at this rate idk what other visual things are left for me to disable
The only other thing I can think of is something to do with the PP material as this wouldn't affect UI stuff.
Post processing?
Yea
This thing gets called only from the server, the actor is ticked as replicates in the class defaults. Why is the rotation of the object happening only on the server and not the client. Do I need to multicast the spinning part of the code ?
Does the actor have Replicate Movement turned on?
that won't be butter smooth but it'll "work"
Also do I only need replicates movement or also replicates
yeah
replicates means it exists
replicate movement means it'll ALSO replicate movement related properties
IDK what all it does but probably at least the root components transform
would that be something on the post processing volume? That stuff was not my area of expertise
Yea. There should be a post processing material section.
@final heathMy hunch is it's something in the 3d/rendering side, since your UI seems unaffected
The pp volumes have nothing in their material arrays
Yeah that's been my hunch too
Can you reproduce on different hardware? What is this hardware, some sort of cobbled together thing or modern stuff?
My computer is a Razer gaming laptop, so I know it's obviously going to have issues but it also happened on whatever computer SCAD was using to demo the game at the GDC show floor
Quick question. I set up a function that handles a focus charge ability but it seems to be interrupted when I get hit in-game, after which I have to release the attack button and repress in order to refocus from the impact. Any ideas on how to prevent this from happening?
The idea (for the purpose of context) is that if you focus hard enough, your ranged attack will be wider and more powerful, doing triple damage in the process.
I think i may have found something!
I disabled the camera shaking aspect of the damage code and I havent been able to get a flash, even after reentering the level with the enemies several times
I think that might be it!
Hello! I did a trace line to check if the player hasta the height to get up, the problem is it only check when i press CTRL, is there any way to keep it checking while player trace line is hitting?
I mean ofc there is some way to do it, but im struggling to find it
Start a timer by event if the initial check shows they can't stand up. (0.2 secs) The event would then just call the same check. Make sure you store the timer handle, that way if the player starts crouching again, you can clear and invalidate the timer.
thanks i'll try it
Question - let's say I have a door actor with some variables set to public. Say I attach the door actor to a building BP actor. Is it possible for me to access the door's variables via the building once placed? I don't see them
What do you mean when you say attached? I assume this is editor time. Also are you referring to the child actor component?
what is the "best" way to keep track of an actor's location?
right now i just save the current location to a variable every tick
I have a trace and interaction interface that passes struct data from a targeted item to the player. It then sets that as a data struct within an Inventory Slot struct, along with quantity.
I’m struggling with looping through arrays and dealing with quantity stacking. I followed a guide a while ago that turned out to be full of issues, and ChatGPT’s context/token limit is not helping, nor does it specify node names properly.
Any input specifically for an “AddToInventory” function that handles stacks and such?
tick
That's fine
Although you can just get it when you need it
how often do you need it?
a lot
I didnt know it was already there, how do i get it
the same way you get it when you're saving it
if I want to make a grid and it start at origin (0,0,0) I need 4 coloumns and 10 rows then how do I make it. Like it should be symmetrical.
Like for coloumns coordinate should be
-2, -1, 0,1,2
How can I achieve this with for each loop?
i believe you need x +1 rows so they can be symetrical, otherwise there will be always 1 more on one side, if your center is center of the tile
I mean how do I put that in the blueprint.
Like I use for each loop to get the index and just multiply it with the spacing I get values
0,100,200,300...
But I want values
-300, -200, -100, 0,100,200,300
I don't understand how do I make the for each loop node to put half indexes in negative and other half in positive
What are you actually trying to do?
You're trying to have a grid of some sort, you either want to use an array and indices and math to convert from coords to index and back, or use a hashmap, which is more flexible
my question: I can pickup my weapon just fine, but when i enable 'simulate physics' on the item blueprint, its just NOT working at all anymore, i can no longer pick it up.
i have a line trace -> cast to bp -> set simulate physics FALSE -> attach actor to component.
I also tried with adding a delay between the set simulate physics and the attach actor to component, nothing works.
the only difference is literally this one button i clicked on, why is it just not working anymore?
(second screenshot is my item blueprint)
So I made a BP_Building actor. THen I made a BP_Door actor.
In BP_Building, I've added BP_Door to the components. If I place BP_Building in the world, I can't access variables on the BP_Doors that are components to that actor.
show the item component layout
I bet the thing simulating physics is NOT the root component
Why the heck is this happening every time I close and reload the project and how do I stop it ?!?!?
Hi everyone, What do you think about my first boss, it's for a game jam tomorrow, and i would like to get some feedback. Thanks!!
also i dont know if you can notice some weird ghosting when the player moves to the shadow
Do you still have the "TeleportPlayer" Interface Call in the BPI_Interface itself?
it might be that you accidently removed this Call from the Blueprint Interface itself
at least give it a different material
Hey all , does anyone know if you can Save game while a level transition is happening? like calling both save game and open level.covering the saving time with the loading time.
can anyone help me understand how to calculate direction properly? I've checked dozens of youtube videos, countless forum posts and documentation and even asked a bunch of AIs to no avail, I am about to go insane over this
Velocity is non-zero and printing correctly whenever the enemy moves, but Direction always seems to be zero no matter what
nope
save while level is open
you cant run save logic on actor if they are unloaded
also saving should takes a few seconds MAX
loading can take longer depending on your systems
if you want the direction of your CMC/char why dont use get actor forward vector directly ?
CMC rotates your capsule, which rotates the actor
i see , but all of the information being saved exists on my game instance. so its always loaded. which is why i was curious
depends what you save IG
if you save actors location for example, you cant do that while a new level is loaded
same for anything player related
(if its a absolute level transition)
but anyways i wont care here because .
right , by the time I fire the save game everything in the game is already stored(on the game instance), im mainly just debating if i really need to set up some async save checks before transition or if i can just fire both. as i dont need to do anything after the save. in this instance.
- call async save -> wait for level load -> finished, open level
- async load level -> wait for async save finished -> finished, open level
you could call both async at the same time, and make both wait each other completition
I could try that actually, I havent messed with async level loading yet. ill look into it , thx.
just load a tsoftobject to your UWorld
im doing this in this async open level node i made https://github.com/hzFishy/FishyUtils/blob/a2fc817f473e29ca38d7f8b530f8dbc7652c6ea8/Source/FishyUtils/Private/Utility/FUUtilityLibrary.cpp#L19
have a couple questions regarding proper character class setup.
I'm making a game that has a base class you start off as and can then unlock a few other classes doing class related unlocks during the match, and all of them have counterparts that will be AI controlled on the other team.
I have 2 main questions.
-
how do you decide which code can be put into a component vs which code can be inherited?
-
for the AI classes, would I have to make separate classes so that the AI version of the player class doesn't have the player code?
that kind of worked.. I am now getting non-zero results, although I'm getting a global rotation and not a relative one, so my blendspace is acting up. At least it's a step forward, I'll see what I can do from here, thanks
im trying to recreate an actor after it gets destroyed but it never happens
so on begin play I save location, rotation, scale data of this actor
then here is when it should clone itself ( but it never does ) somehow this 20 sec delay never gets activated or finished somehow
So inside of it I have 3 components :
- my regular static mesh (stone) it just disapears
- my chaos physics fructured geometry, and (3) this is the high mass heavy weight invisible wrecking ball that will come from the sky and hit the fructured geometry and make it splatter & create the illusion that im actually breaking rock_1 aka my regular static mesh which just gets replaced by stuntmen
I know I can use MasterField and stuff like that but for me it was kinda hard when i tried and this option with the invisible ball is easier and looks like Im the one breaking it apart
The stuff after the delay won't happen since the actor destruction would happen before the delay is finished.
You may want to change the collision handling override so it's set to something like always spawn but adjust on the spawn actor node if it indeed is not spawning.
I like making the player's pawn and ai driven pawn literally the same thing
What do you mean by class, give an example of what you'd start with and what you'd unlock
I'm not exactly sure how to phrase this, but I always imagined that AI classes would be different because of the use of behaviour trees
same body, different brain
that's why there's AIControllers
so for example you start as a base class which just has simple functionality, but there are a couple classes. So to unlock a knight class you get x kills, and for the builder class you'd have to stay inside of the main capture point for a certain amount of time.
I saw a video going over basic actor components, but now I'm struggling to understand when you'd use components and when you'd have inherited behaviour. For example in the video I saw it was using health as a system to show how to use components, but health could also be something that can be inherited, so I'm just struggling to understand when you'd use one or the other
So I guess what im doing is trying to run the delay inside the rock thats about to get destroyed like an old man suffering form cancer on his deathbed 🧓🛌
saying 'ill fulfill my dream next year but doctor hasn't told him yet he only has 5 seconds left. ....so instead, he has a kid or a clone👶a perfect little copy of himself and whispers all his detailed unfulfilled plans, " little guy carry out my dream… wait 20 years patiently working for this process to happen… then do this..."
And the kid grows up, waits the full 20 years working on his father's legacy, and fulfills the legacy his father never got to and then the kid also dies & the cycle continues endlesly. Is that possible or will that cause program related issues?
Can there be an AI driven knight?
yeah
I'd probably do it like this:
Base
Knight
Builder
Whatever
that's it
Base would have the most stuff in it, Knight just changes the mesh, changes the animation bp, adds a few mechanics
That's possible. Just move the logic of the delay to an event that you call on the spawned actor rather than on the actor that is being destroyed.
so it's the controller that determines whether or not the class is AI or player controlled?
so when would I create components? Would it be for things that only certain classes that have shared code?
Health / Stats would be in a component most likely
as would Inventory maybe
Doing damage isn't "damage that character" it's "call ApplyDamage on ThingThatIHit's Statscomponent"
I doubt I'm gonna have an inventory system in this tbf but thank you. Can you explain why you'd use components over inheritance for something that seems like it could be inherited?
I'd need a specific example
but Knight will inherit StatsComponent from Base
with different numbers in it
Apart from health and a basic attack system I can't really think of many other examples, mainly because I'm still in the really early stages and haven't fully fleshed the mechanics out yet.
The final class I have is an archer if that helps?
I'm just trying to come at this from a more conceptual angle
Because from my current understanding of components, it seems to me as if you could just make everything a separate component, add them all to the character classes they'd apply to without having to do any writing inside the character class, but I'd be very surprised if that's how things actually worked
This looks like Character with StatsComponent and events StartPrimaryAttack EndPrimaryAttack StartSecondaryAttack EndSecondaryAttack Jump etc.
or you could add abilities as components if you wanted
LMB Down -> PrimaryAbilityComponent.StartAbility
many ways to skin this cat
If it's your first draft I'd probably do abilities and effects as actors or components
it wakes up the event, speaks of his final desires to his son/offspring, but the cycle doesnt continue
nothing after the delay will happen
I'm thinking of adding class specific abilities, knight gets block, archer gets multishot, builder gets an alternate build etc.
So if I've understood this correctly, Components are for common functions that play out differently depending on the class, while inherited functions and values are for things that don't really change?
You could have block be an ability class
or block could just be what the knight does on SecondaryAbilityStart
yeah block is just for the knight, seeing as the knight is like the melee class in this
yeah so you could just "write" the block code directly in the knight
if later you had to hand out block to a bunch of different things it'd be a different story
I'd just start like this:
Class BaseCharacter:
StatsComponent
Event StartPrimary
Event StopPrimary
Event StartSecondary
Event StopSecondary
core movement code like jumping and hooking up inputs to Start/Stop Primary/Secondary
then a knight just fleshes out the start/stop primary/secondary logic and has different stats
and a different mesh
for an archer, StartPrimary draws the bow, StopPrimary fires it
for a knight, StartPrimary swings the sword, StartSecondary raises the shield, StopSecondary lowers it
are the event start/stop primaries what would be inherited, and then edited in the classes themselves?
Sure
It's not the most robust way to do things but it is certainly better than nothing. You could get all crazy about it with GAS or your own version of GAS but get the thing working first. Just hack together something sane that works.
oh right I think I'm starting to get it now.
So inherited functionality is stuff that can be edited between classes whereas components are just blocks of code that don't really change between classes?
a bit yeah
components are code + state
it makes sense to put stats on a component because you might want to put stats on something that's not a character
if you want a door to have health
so you can hit it and break it just like hitting a character
yeah I'm probably gonna have to do that now that I think about it
Haven't touched unreal in nearly half a year and so coming back to it, I feel like I've forgot so much when it comes to planning systems and just general architecture
No plan survives contact with the enemy
you will
several times
but you can't refactor what doesn't exist
just make the thing
Yeah, I guess now I can start getting to work knowing a bit more on how everything relates to each other.
Im using a timer but it still doesn't happen
maybe the my setup is wrong but i've already created in its place a new blueprint here... so it should work
that destroy actor will fire INSTANTLY
carrythetorchofwhatever will return instantly, calling destroy actor, which will destroy the actor instantly, making all delays and timers and whatever go away
but the torch has already been passed to the next bp
read your code literally. Right after setting the timer, the execution will jump to destroy actor
your 20s timer will not happen
What is this thing meant to do
would an interface work different?
what's with the timer then
This code will never run
yes it needs to have a delay, i dont wanna do that instantly
it needs to have a loadign time
im destroying the stone
and then it renews itself after a while
the come back..
What's the actual mechanic, a rock that you destroy that comes back?
then why jump through all these hoops?
Event Whatever -> hide stuff -> delay -> show stuff
hell you can animate it with a timeline
note, there is no destroy actor or spawn actor here
the 1 actor is just moving and changing
it's boolean logic, timeline gives me float
I've never seen anything grow instantly, they usually grow over time
but anyway, just do it like that
WhateverTheTriggerIs -> hide things -> delay -> unhide things
done
no destroy actor, no spawn actor. THe one actor just keeps renewing itself
who gives power to WhateverTheTriggerIs? It needs to be activated by something
thats all you, whatever your trigger to do this is
IDK your game code
it should be automatic
I dont have anything to trigger this thing, I tried to do it through this way.
I cant think of any other ways rn
but it looks simple, but gets interrupted by the destroy of my old actor
it's not as simple because I have a Geometry Collection which I am exploding around by dropping a heavy sphere on top of it to create the illusion that im breaking it in a really powerful way
afaic there's no way to reset the Geometry Collection so I have to recreate it
the other messy way would be to add this component again via code
ok so just put the destroy after the timer
event -> go boom -> hide stuff -> wait -> spawn a new one -> destroy self
and add my geometry collection to this new component & keep destroying & adding geometry collection components via bp which would be kinda messy code i think
try this
Hi, im trying to set an end location offset for a line trace. Anyone knows how to make the offset stays when im rotating? thanks in advance
rotate 0,20,0 by your cameras rotation
it's doing exactly what you are telling it to do
Or just attach a scene component to the camera, offset, to be the thing you trace from and in the forward direction of
how to fix? my cast to skeletal mesh is failing on enemy actor
it's not a skeletalmeshactor then
also why are you casting your locked on actor's PARENT to skeletalmeshactor?
What's the actual rule here, what things should be highlighted when you lock on them?
i tried casting directly on actor it didnt work
and i tried doing parent to get highest level actor (inheritance wise) and hoping skeletal mesh is some child of the parent
thats not what get parent actor does
it's attachment
why not just get components by class skeletal mesh
it'll get any old skeletal mesh on whatever LockedOnActor is
i will try that thank you
i get that, but im gonna make multiple line traces from a single start point, so creating a scene component seems overdoing it. maybe you know how to make the point rotate with my camera?
already told you
rotate the vector
wait im booting up the editor. do i place this right before end node?
End = Start + Forward x SomeNumber + RotateVector(Offset, CameraRotation)
Got it! thank you. took me a while to fully understand that. 🫰
why are you adding there
like this?
why are you adding?
just rotate 0,50,0 by the things rotation
but this one works tho
like this?
not at all
literally just break this link
you're right, it worked.
Hi guys, Im trying to make the character be able to do jump attack. I did manage to do it but I feel there might be a problem later. Especially I am using the EventOnLanded to reset the Do Once node. What if I need the Event On Landed to do something else lateron. I don't know if there has a better way to do it.
You can have the OnLanded do more by using a sequence node or placing that additional logic before it, creating a new event that you call from the OnLanded, or create your own branch and a bool specifically for acting like a DoOnce that you can toggle on and off after you start a jump attack and when you land.
now understand why
Hey, running into an odd issue. I have a Persistance level with nothing in it and two sub-levels which spawn actors into the world. Load Stream Level loads them, but when I try to call Unload, the node gets called by the actors remain around. Anyone know why this migh tbe?
I figured it out - was trying to unload level instances
Hey everybody. I've been trying to figure this out and it just isn't happening for some reason. I currently have a working click & drag hinged door BP that works perfectly. Now I'm trying to modify that to work on a sliding door but I can't figure out how to restrict the door movement between 2 points, full open and full closed. I was messing with a physics constraint to try to limit this but haven't had any luck so far.
I've done the whole thing where it checks for a manually input X value but if I move the mouse fast it will go past that mark and then rubberband back to the point it wasn't supposed to exceed; which is just plain ugly and sloppy looking.
Any insight on how to tackle this would be greatly appreciated!
I am just guessing right now, but what about using collisions that blocks the door from passing beyond those points?
my_item is the thing simulating physics, i did indeed see something online about it having to do with the root component -- but i legit dont know what that means, what is a root component or how do i make something my root compoentn? 😅
okay what the fuck, i got it, i legit never thought about being able to just replace the DefaultSceneRoot by literally hovering over it with the mesh component, wtf.
thx !
the problem you had is when you simulate physics on my_item, it goes and does its thing, but the root scene component sits there
so when you attach the actor, you attach the root scene, but the my_item is still just off doing its own thing
get actor location = get the location of the actors root component
attach actor = attach the actors root component
in your case the root component was just chilling invisibly while my_mesh was off doing physics somewhere
is it possible to call server function from an actor that only exist from client side?
Not through the actor itself. It would have to go through something else such as the player character or controller.
I'm doing that for now, just wondering if I can call through the actor itself
thx for the answer!
Guys,how can i fix my blueprint nodes after rename a cpp structure, i tyied use CoreRedirects but nothing happened
Hi guys, it's ok to use the AI perception simply like this, in the EventGraph? without using behavior tree?
I used that event to set targets for the BT.
Hello. Is it no longer possible to change the anti aliasing method on the fly/runtime anymore in UE5? I migrated my project from 4.27 to 5.4 and in 4.27 I could use a console command to change the AA method, but this command no longer seems to work in 5.4?
I need something like this: I'd use the PawnSensing but I have some issues. Use AI perception like this could it works?
That might just do it! I'll give that a shot. My mind was set on one track so I didn't even think of this. Thanks man
I wouldn't do that.
For me the event is to just set data
started writing some code for a capture point, just realised though that I don't know how I'd decrement the number when a character dies inside the zone. I know it would be possible to do it inside the character blueprint when they die, but it seems counterintuitive to check for the collision both in the character and the capture point blueprints.
Only other way I can think of doing it would be to check it on tick but that's even worse of a solution
A.i moving, chasing etc. Is BT business imo.
thx
I might not understand correctly but my first tought is: In the player, when it dies, call a custom function thats in the capture point and use a bool to check if the variable for being inside the collision is true or not. If its true, do your stuff.
Yeah that’s the best way that I can think of doing it right now, I’m just curious because it feels a little redundant having both blueprints checking the collision. I could be wrong though and that could just legitimately be the best way to do it.
But in that way, both doesn't check for collision? One of them just calls the other, and the other checks?
this looks unsafe opration, can trigger race condition where multiple thread increase and decrease the variable at the same time. Maybe using single custom event will help for increasing and decreasing that specific variable
I want to confirm this also actually if it is unsafe for 2 custom event manipulating same variable, or it will be safe as long as it is within same event graph
Hi guys, how can I have a Timer by Event looping with a different time float for every run? Because in this script I noticed that if you check looping it keeps only first result float, without change the num every time.
Somebody knows how to make it please?
Use an event dispatcher in your character called "OnKilled" or "OnDead" that you call at the same point where you flip the "Dead" boolean to true.
In the capture point, on the begin overlap you want to drag off from the cast and do a "Bind to On Killed" which will give you an event delegate that you can then use to decrement the count for their team.
if you happen to move the actor around rather than full-on respawning them, then In the end overlap, you want to do an "Unbind from On Killed" plugging in the event you used for the bind portion on the Begin Overlap just to make sure it stops listening for the OnKilled dispatcher when the actor leaves the overlap.
hello, i have made a custom skeleton for just a pair of arms and am trying to spawn a projectile from a socket i created on the right index finger. The problem is that with every way i try to pass the rotation to the spawnactor it always points to incorrect directions. any help? (also changing the socket's rotation seems to be mistranslated when playing)
Put the timer on its own event and have it set to not looping. Have the timer's event then call that new event which will then trigger the start of the timer again.
Your Begin Play should also then call that event rather than the timer directly.
The camera forward vector is a direction which will be a range of values between -1.0 and 1.0 on each axis. This gives you a direction but not a location, so using the forward vector multiplied by 10000 won't give you a good spot for the "target" on the find look at rotation. You need to add a location like the camera's location to that multiplied vector.
thank you for the quick reply, so should i just add a get world location after the forward vector?
No. Add the camera's world location to the already multiplied forward vector.
Otherwise you'd be multiplying the location too which will put it in the wrong spot 🙂
that makes a lot of sense, thank you so much for the pointer Datura
Just had to get you going in the right direction 😉
i see what you did there😉
Cool, I have to clear and invalidate the Timer Handle when I recall the event to restart the loop?
Nope, you only need to clear and invalidate timers if you want to forcibly stop it and reset it. When a timer finishes that isn't looping it clears itself.
help
what do i need to do to get help
Hello, Is it possible to provide to a Actor Component, in input, a function to call from the owner?
Let's assume i call dash component.
The dash component know the dash state.
But to be able to be more flexible, i would like to add a boolean to say : Block Owner Input or not.
If yes, Then the AC_Component should call an event or a function from the owner. But the dash doesn't know which function to call.
Can i provide to my component which function to call from the owner?
explain your issue :D?? 😄
So this function returns a bool ?
You want the owner to customise its response ?
I dash interface on the owner would do the job
I want the owner to prepare a way to block the input, but i want to ask to the dash to perform that function from the owner
so the dash will do : owner.CustomEvent
and the owner will provide to the component : CustomEvent = myEvent
i did a blueprint class as an actor for the gun and made a system theat when i press f the gun snap to my hand after i press f the gun get bigger
so the dash will call : myEvent 😄
so one more time to be clear 😄
owner will create a custom event : BlockInput
and will provide to the dash component, to block my imput you need to call owner.BlockInput
so my question is : can we provide in input a function ? 😄
or maybe it will be in unreal engine 7
yes and?
the gun is bigger, what is the issue 😄
the gun get big i want it to be a normal size
i don't know how to fix it
what was your function to update the size of the gun?
i don't know what dose this mean, but did i do something wrong or there is a fix to the size, i'm new to ue
have you following some tutorial to attach actor / mesh to a skeleton socket? if no, better follow 1 tutorial first at least
what is the code you write to update the size of your gun???
You need to show the code affecting the attachment of this weapon. Otherwise all we can advise is not to look at the moon on the third sunday of the month.
ok thx
problem solved 😄
"how to attach actor/mesh to a skeleton socket in unreal" should be more than enough for your case I guess
based on "i did a blueprint class as an actor for the gun and made a system theat when i press f the gun snap to my hand after i press f the gun get bigger"
I assume he was able to put the gun on is hand... but has issue with size of the gun after... because he ask help for the size only... maybe i'm wrong 😄
i mean i understand 2 Actions :
F = gun in the hand
F = big gun
lol
see there are many solutions to solve a problem
and more solutions that create more problems.
can i send screenshot here ?
that was not a screenshot?
i was talking about the code related to the F key
I will get migraine if I assume too much 
and after that part?
change the scale rule to keep world.
thx
did you also notice you are checking distance of an actor location of the same actor?
is worn, i did it with a tutorial
tutorial are amazing in that case 😄
i think you want to check if the distance betwen your actor and the gun is less than 100
75?
You should start with basic comprehension of the function and the engine. indeed
what do i need to do to get help??????
that's right
for what
so one more time to be clear 😄
owner will create a custom event : BlockInput
and will provide to the dash component, to block my imput you need to call owner.BlockInput
so my question is : can we provide in input a function ? 😄
can a component receive a list a function that he needs to call
to stay generic
and replace part of his code by those function
or it will be for UE7
UE77
hmmm, there are many ways to do this, your question is very vague though, maybe give an example
So my component is able to perform a dash of the owner.
The logic and the movement calculation are done inside the component.
But My actor is also able to move.
I want to add an extra feature to the dash component.
Block Input: If yes
The dash component will call on the owner a function, or event to block the movement component.
But because the component doesn't know what will be that function, my question is, is it possible to provide to the component the function to call to be able to block the input of the owner.
So when the owner received the Input:
He call dash from the component.
Dash is performed, but it's not role of the component to block the owner input, because he doesn't know how to block his input. Maybe it's boolean, maybe it's a tag container, maybe it's something else.
so the owner should provide a way to block its input, and communicate that way to the component. When the component know how to block it, he can call it.
I'am in the situation, you buy a component to perform dash, and you want it to be flexible to your game, without rewritting a part of the dash code
let's assume it's a component for noob 🙂
that doesn't know how to modify the blueprint
damn i would have to think on that one for a bit.
so you want the dash component to block the functionality of other components while its doing the dash, and this should be modular so if you have a hyper dash it could block dash and normal movement or if you have some other movement component that need to be blocked it should just work?
yes
without modifying the dash component
just by feeding it? with function?
The first thing my mind is going to is just have a general manager that can handle these ability components
you will lock you into your own system
maybe it's not a common way to work with Component
but i just want to be sure
there is no an UE things for that
so i don't need a solution 😄
i just need to know if it's possible
or not
i don't have made a system yet that blocks other systems sadly
only systems that modify stuff in a modular way.
those systems use very basic stuff just UObjects that i create and manage with functions in them. they are lower level then components
yes when you create the entire system you do it like it, but indeed, if you want to be able to assemble different component and make them work together, they should be able to inject reusable function inside of them (with some condition)
Cough GAS Cough
In all seriousness though, they tackle it by using gameplay tags. When ever an ability goes to run it checks if it's assigned tag is on the block list. Abilities, when they perform, can add tags to the list and removed when the ability is completed.
that is on the level of the owner...?? you will assume the owner will have to use the tags that the component want?
that is what you mean?
A crude way of doing it is using a BPI event that returns a gameplay tag container. When you go to activate an ability, get the container and see if it contains any tags that should block the ability.
Of course, it would be better to just create some sort of ability manager.
you see i have a tags to block the movement. but i don't want to do into the component: owner.getTags.updateTags
because that will lock the component to the management of the movement of the owner.
You can have multiple tag containers. You could have one thats used just for abilities.
mmmm maybe by passing referece that can be modify?
I'd recommend looking through GAS, even if you don't use it, there's a ton of useful bits you can apply to other things.
Gameplay Ability System 😄
Yea.
You will make me cry 😄
i think it's what i'm trying to create...
lol
yesterday with your Animation Wrapper
today with the GAS 😄
When I was looking at it, I set up my move, look and jump as abilities and then added an attack abilities with a combo. It was pretty easy to have the attack not work if you've jumped or preventing the move during an attack.
that is what i was thinking... considering movement like ability
able the dash to block another ability
It uses gameplay tags on gameplay tags on gameplay tags. 😅
let's go for the GAS 🙂
It also allows you to stop other abilities if they are running if another ability starts.
perfect
It's a beefy system but if its what you're wanting it works well, and it handles replication as well.
I need a holiday i think to absorb all of this knowledge :p
Trying to runaway from the knowledge bomb. 😉
😄
If you ever feel like you've not been pushed enough, you should take a look at how the construction script works. 🥲
Hi, this is the follow up of my jump attack question. As @dawn gazelle mentioned that I can set an branch node to do something like DoOnce. I think using the AttackCounter variable that I already has will work. Still need to reset the counter by using the EventOnLand. But as Datura said I can Sequence it if I need. Still I wonder is using a counter variable like this better than using DoOnce for jump attack in this type of situation?
In regular actors I can use scene components as markers or placeholders for vector locations.
In umg, what can I use?
I want to make a umg system where characters appear on screen and depending on the number, they Spawn and move to the left or right but I somehow need to set their relative location...
That's not really a question anyone would be able to answer as it would entirely depend on your desired game design as to whether it makes sense to use the combo attack counter to prevent attacks, and if it makes sense to reset it on landing from a jump. For example, with your setup, I couldn't combo 1 > jump > land > combo 2 > combo 3, nor could I combo 1 > jump > jump attack, but I could potentially do combo 1 > jump > land > combo 1 rapidly.
I want to make a system that spawns enemy actors at the start of a battle. I'm trying to come up with ways to do it, but I can't seen to figure it out. I want to take a number of list/data tables, fill them with multiple types of enemy actors, then spawn them when the battle starts, but I can't find any resources online to help me with this.
Thank you Datura. As long as it does what I want. I guess there has no absolute correct answer. I always thought blueprint has a textbook way to do certain thing.
having some trouble figuring this out
trying to make that triangle rotate on the y axis to point towards a target so for example of the player is faced away from the target the triangle will point downwards if the player looks at the target it points up etc
why cant i find the async load asset? does unreal not have it exposed to bp?
asynchronous things cannot be called in functions, which have to evaluate in one frame.
I think that's sufficiently niche to not be a face palm lol
you mean the block with the triangle or the triangle itself? What is it? a UI widget?
nah its just an actor
im trying to rotate the triangle on the y axis
so it points at the target actor
ok this is good to know, that explains completely why it didnt work. Thanks for the help again!
What is the triangle itself? A mesh?
I would get the vector from triangle to target; then project it onto the plane defined by the triangle's forward vector. Then set rotation based on that
how would i do that
get target location - get triangle location then how do i project
because your scanner could be facing any direction. So the Orange Vector is Target Loc - Triangle Loc. But what you actually want is the Purple Z and Y coordinates in the local space of the Scanner.
something like this I would think
If you want to rotate like that isn't it just Atan(height delta / distance)?
And then maybe convert from rad to degrees
Yes but you need to get the vector from Triangle -> Target in local space.
otherwise it would only work if the triangle happens to be facing forward in global space
I see what you mean
Also I think you would need to calculate the distance without accounting for Z for ATan to work
i think its better to use a dot product
draw a debug line to see what you're actually getting
You're using the up vector right now, not the forward vector as the plane normal
Like you want the plane defined by the FORWARD vector of the scanner.
In this drawing that's the plane that faces in the direction of the green x
Draw a debug line from the triangle to the triangle + the pre-projected vector * 10000 every frame to see if it's getting the right idea.
okay
this points correctly
so now i just need to make it so the arrow points right according to that vector
I doubt that this will point correctly if the scanner is facing a different direction than global forward
well the debug arrow always points towards the target
that arrow will, but your goal is to find the local y rotation for the triangle to point at the target
if you think you're on the right track go for it though. There's many ways to arrive at the answer.
Hey all. I am pausing the game when I open my in-game menu but this causes the timer in my game menu widget to be paused as well. I have tried ticking "Tick Even When Paused" in my player character, where the widget is created but the timer still remains paused when the game is paused. Any way to fix this?
What is the timer for?
Checking for focus to do some things with custom widgets
Should use CommonUI and some navigation blocking.
I don't know anything about CommonUI unfortunately and the thought of learning it and then revamping my whole project UI is a bit much imo
Fair. You can use the widget's tick most likely. That isn't paused
Thanks I'll try that
Hi dose anyone know if u can Enable/Disable Splitscreen via blueprints ?
you can remove a player iirc
does it make what you want?
remove/add player ?
Hi guys. I'm using AIMoveTo, but not using any of the other AI stuff like blackboards, etc. I just want to tell an enmy to "stop moving to" ... how do I clear the AIMoveTo so it stops pathfinding and moving?
yeah i saw that but did not work for me, dosent that just disable ?
I imagine you can use another AI Move To call and just use its current location. I would think that should stop the old one and since they'd already be at the desired location on the new one it wouldn't move them any further.
I have a Human character, and the enemy Characters.
Can the enemy Characters inherit from the Human Character?
Though the Human Character has all the input logic, and the player camera.
Wouldn't it be a better practice for Enemy Characters to inherit from a Class that doesn't have any of this ?
Sure
Or is the camera automatically disabled, and the inputs when the character is not possessed by human player?
Depends where you put the inputs. Camera should work fine if it’s on the char
Ideally you would probably have Human which extends to PlayerHuman and EnemyHuman
I like a flat heirarchy like so:
Character
CharacterA
CharacterB
CharacterC
Set it up right and you can have all of your pawns be the exact same thing, they're all Character
as a bonus, it makes testing dummy easy. You can just play as any character in the game to test out their abilities and such
That works, thanks!
That's not very sensible if there's shared functionality across A/B/C
i have a shared camera for when both players are close when they walk away from eachother i enable the split screen how do i get a camera on each player to follow them ? (my shared camera is a seperate actor)
Use the render target for that camera and then use that render target in widget
Use tricks not rules
Split screens are for multiplayer not what you want
oh ok
i might acctuly rather them not being able to go to far away from eachother any tips on how to bound them inside the camera
hello. i'm getting relative transform but I just realised that it accounts for scale.. and that's not what I want.
I want the actual relative pos and rot according to how it shows up in the level.. how do I get that?
hmm i guess i can do this..
You are saying that it accounts scale when using the relative transform, but here you are not connecting the scale pins to the make relative transform node
does anyone know how to disable AA at runtime. wiki claims setting it to 0 disables the effect. but if you check the node and results in game , 0 just sets it to low.
Use r.antialiasingmethod = 0
does that save/work in build? im experimenting with the console command but I havent built to test if it actually saves the setting for the next launch in build like the node does.
Of course it also works at runtime. Even in shiped build
why is my actor not animating when moving in certain directions?
this is quite confusing, so many variables
😵💫
Because you don't have any animations in the blendspace for that direction
Sure it is, if it's that shared make components
If it's shared across ALL put in the base
But multi-branching heirarchies are a nightmare.
I implemented a slight lag on my camera (via a spring arm). However, turning of my character is very choppy. Any ideas on how to get this smooth?
This is at locked 60fps in Vsync.
so it isnt relative to the character forward direction?
Yes you will put for all four directions, but if you want only for the forward then what is the use of blendspace?
its so you walk and then run as you move more, it also needs to strife left, and strife right
that needs blendspace right?
so after testing in build , the console command works , however it doesnt work with saving so relaunching the game will just have AA on again. Set AA Quality does work and saves as expected but you cant actually use it to Disable AA entirely . so unless there's another node im forgetting about , it seems theres no way to add the option to set AA to off and still be able to use the Set/Get AA Qaulity nodes.
i know but in my scene the distance between objects was 80 and it came out as 200 because the scale of the parent was 0.4
it doesn't make sense in my case
in the "Bind Event to On Clicked", how do I add a parameter to it so I can pass the struct through it?
Create save game object and save any of your game settings there and then when you lunch the game get the values from the saved game obj and apply them
Hi I have a question. Im trying to enable an action on one of my actors, but these are actors placed & created by me, and its possible that I can have more than 1 actor there, and the problem is Im using interface, but even if i was working with cast for example or get actor etc...but I would still be getting the same problem. So how do I make sure Im communicating to the right instance if there's many copies of the same blueprint? ( and they all have the same instructions )
So this is then the scale issue, why your bones are scaled, make their scale to 1 in modeling software
Use tags
then they would all have the same tag
right , can be done ,a bit tedious, but im realizing thats probably why you dont see many UE games with the option to disable AA . appreciate the help eitherway
Because if they do so, then their game will look like pixelated game
I am also giving this option in my game because my game is 100% screen percentage
Call the interface event of that actor if he implements that method, only his logic will run not of any other one
dude
let's say I have 5 furnaces placed on the world
I wanna unlock fire only on one of them
I dont wanna enable fire on all of them
this is the problem
they work with interfaces
bp_furnace1, bp_furnace2, bp_furnace3, bp_furnace4, bp_furnace5 etc. they are all of the same instance, this is what confuses me
they are all instances of the same CLASS
just get the instance you care about, and set bFireEnabled = true on it
you'll have 4 with bFireEnabled = false, and one with bFireEnabled = true
in plain language, which of the multiple furnaces do you care about here?
is it the one you're aiming at?
yes
It is simple using interface
you probably don't necessarily need an interface for this.
What's the rest of the mechanic, what enables fire on this furnace?
why is this one furnace able to have fire and the others not?
He have many of them with same almost same properties
And if that is the case then all of those are separate mechanics
@snow haloWhat's the actual mechanic here? Is it a furnace like Minecraft, where it can burn fuel items to process ore items?
yes kind of
its complicated, so i made a furnace that you can cast iron ores in, and with that you might also use it to make food, or warm yourself up in the cold
cast iron for example can be shaped into other tools.
So a furnace is a thing that can be lit, and when lit, if it has fuel, it can cook other items and provide heat in an area, that about right?
yes
So a furnace would look a bit like this:
Furnace
bool bIsLit
ItemSlot Fuel
ItemSlot Cooking
interface Interact
Interact -> bIsLit = !bIsLit
Tick/Timer -> if bIsLit -> burn item in ItemSlotFuel -> cook item in ItemSlotCooking -> apply a bit of heat to things in area -> if ItemSlotFuel is empty -> bIsLit = false
That's assuming you also have the code and stuff to support putting things in item slots and filtering them etc.
this is the way Im trying to do it
Im not sure if this is the most efficient way to do this. I dont think the way im doing things is very optimal though
ue5 tutorials keep using this node, which doesnt exist in my unreal, i cant find anything about a plugin or setting to find it?
Search in pallet window
oh wow i never seen this lmao, thank you
Nature of functions being required to end on the same frame .
I'm looking to make a small game that has not too difficult mechanics (4 player, imposter concept, tasks to complete) but am a complete beginner, shall I take a blueprints course to learn beforehand?
You've added multiplayer as a requirement, you've already made it much much more complex
Ah right I had a single player version i thought of first, i can stick to that, would I take a blueprints course before beginning?
On the left here as you see I have this little stat group, and here is where I also show the player what kind of item he currently he's holding on his hand. It's a first person game, sometimes some items are lifted up which might edit the blendspace, but I always attach some kind of item to his hand so that the player can see what it is if he turns down his head. But this system alone is really... REALLY becoming so overcomplicated & hard to manage & maintain. And Im not really good at design so this is the best I could come up with and Im not sure how best I could do it so as to show the player what action he's gonna likely be doing based on what item he's holding. Also here's the code for it, it's kinda weird & I feel like im building a space shuttle to deliver a pizza next door or smth
This is the item selection/creation
left mouse button is responsible for ALL the actions in the game
Sometimes you wanna hide it sometimes not. It's a big confusion but I made a new type of variable inside of my data table struct, to categorize items based on whether they are gonna be one use or multiple uses
but it's also complicated because some items don't have any cost in using them
for example with selection of items you have to press the select action ui button many times, lets say you have many berries in your backpack, you wanna press q then click to eat, q then click, q then click, q then click. etc etc etc
Some items will not get unselected, lets say this is a pickaxe, you can use the pickaxe multiple times without running into any issues
and then you have other one use items like placeable items for example, you select them and then you just click somewhere valid, if the ground for placement is valid or the other item to build up on is valid, like placing food or a pan on a furnace or wood inside of the furnace, then its valid
But this kind of valid/invalid debate is realllyyyyy reallyyyyy taking so much time, it's not modular, it's the least modular thing I've seen or made in my entire life.
It feels like building a new IKEA table every time someone wants to put down a coffee cup
Are you AI doing this kind of long answers
what ?
I am saying is you ChatGPT 
Telling the widget what to do instead widget reading and react to changes is peak bad code, period, respectfully imo.
Get into subscriber pattern. Your game should work with or without U.I
this stuff sometimes seem like tidious but it's essential for any project that will scale..
to at least have your own logic within the project
It's actually more easy to implement and debug.
nah i mean it's tidious to take the time to understand and apply a "system" to how your organise your code
i don't use widget much and I've only tested an idea.. how do you make the widget read whenever there's a change?
Just subscribe to delegate
The Mediator Pattern:
Software Design Patterns are like a guide on how to write good code, whether you're using Blueprints or C++, knowing good software practices is a MUST!
This video goes over the mediator pattern to build a "Combat manager" to coordinate actions between multiple enemies and the player.
We will also be combining the mediator ...
Event dispatchers
thx
this is how i've been handling it...
still learning.. i wrote this a while ago.. right off the bat I think i should store the widget variable at construction/begin play rather than casting to all the time
thanks. i needed that
MVVM enters the room... 👀
why cant i rotate my character by key
something is bruteforcing it to stay looking forward
if i use the tick event then it rotates
but without it it never rotates
so weird
Not sure where this would go put I've turned on virtual texture streaming and enabled it on the texture which is used on my landscape however I now have this
which I didn't have before
I am doing some stuff with the DDX and DDY so not sure if thats causing the issue with it not being Virtual texture
Replace SetActorRotation with a SetControlRotation call on it's controller.
How can I get smooth camera movement without using a spring arm/camera boom? I've read about rinterp or lerp etc. can anyone explain?
it seems thats working
but now the camera is also rotating
i tried changing settings in the camera
Spring arm?
thats in the spring arm?
Yeah.
If you set that on the rotation, it'll still follow it's location, but not rotate with the character.
relative right
?
its still rotating
Should look like this
At least in 5.5, that looks like 4.27 or older? But the Rotation property needs to be set to World.
Anyone have any idea on this issue I'm having or which channel may be more suited for this question if not here
🫡
it worked
though it needed also a little check here:
this must be disabled
Ah, yeah. Don't want to rotate that with control rotation. 😄 Forgot about that.
🫡 thanks @maiden wadi
I'd probably check Materials. They would know best about that specifically.
Awsome I've asked question over there, I thought it might be there but then thought it's virtual texture specific or somewhere in there so thought materials might been to specific for the quesrion
Is there a way to say "I know what I'm doing, let me do whatever I want with control rotation and don't hold my hand"?
I've noticed you can't do crazy 6dof stuff with it
Anyone know how to implement a grenade throwing helper mechanic like mgs?
The one that shows a grid where you throw a grenade
hey how do i take control of a pawn in the map somewhere? im trying to think of a way to switch between controlling a ship and walking around / vice versa.
to elaborate, i had to separate the ship interior from the actual flying part of the ship due to....technical limitations, and i need a way to take control of it when i use the pilot seat.
the one tilted vertically has the interior, and stays at the 0,0,0 point on the map and the one tilted horizontally is the one i need to control.
https://dev.epicgames.com/documentation/en-us/unreal-engine/possessing-pawns-in-unreal-engine would be an "ok" starting point, unless you're wondering about the transitioning for the user experience?
its posessing the pawn itself, yeah.
any video on entering vehicles (usually a car, gta style) would also explain the basics.
too bad the videos are so focused and not usually abstracted enough
yeah.
i noticed that. my case is a bit different lol.
i know how to attach and control a car or something, doing what im doing has a bunch of extra steps and wierdness to it
didn't catch that sorry
the technical limitation is just due to optimization or because you couldn't figure out another way?
yeah kinda both lol
it could in theory be always there just not being rendered - the interior
as a child of the ship body
based on the game it could also be a UI overlay for a camera and no actual 3d interior that's up to you
i had to do some wierd workaround shit because id need to write a whole new gravity system for onboard ships, and that was a pain in the ass, so i separated the interior friom the flyable ship and put it at 0,0,0.
haha well do you plan to have a texture rendered on screen based on the true location of the ship and just show this through the cockpit or something?
think of it like taking control of a drone or something lol. thats kinda what i need to do
seems odd but probably doable for the camera portion
flight seat has Render Target screens on it
right
but your ship will always be on 0,0,0 and you'll be a complete liar to the player (understandable)
Im thinking I make a line trace and spawn a circle grid for the first hit
they may want a trajectory pre-calculated though? it's all built in thankfuly.
but you'll end up using splines or niagara ultimately whatever works for you
oh I meant my project lol
well its actually for a baseball like throw
so it goes staight
but I want the helpers since it helps for stealth games
I attached a gun to my character, with a socket. It works very well when you are aiming.
But when you run 🏃♂️➡️ the gun just hangs around weirdly.
How do you solve this?
dont want frustated players lol
This could be a starting point: https://www.youtube.com/watch?v=TAnzmz2AviY you can always tweak it.
Hey guys, in today's video I'm going to be showing you how to create a system where the player can see a predicted path for the trajectory of the grenade that they are throwing.
You may want to experiment with the final delay values for spawning and deleting the trajectory line. Lower-end PCs may need it to be slower as it could cause lag. You'...
hate to link videos but its often faster
The node in question is Predict Projectile Path (Advanced)
(Assuming you are using BPs)
So once we're inside the cockpit your render target has to be set and updated, the camera has to switch to the cockpit but movement must remain on the real ship, what if you just have an internal toggle (a boolean maybe so we know the state) and you simply switch the camera with Set View Target With Blend to begin with?
I would probably have the cockpit a child of the actual spaceship but typically hidden unless I toggle to the cockpit view (if this is single-player all the simpler)
Just to simplify but you must have your reasons not to
well, i mean, in my game, these ships are travelling at insane speeds, and having the interior always at 0,0,0 and not moving means i avoid all of the wierd phyiscs jank, with things falling through the floor, and wierd graphics errors.
true although most "through the floor" issues are solved with proper mesh subdivision a single quad will most likely pass-through and fail but a relatively more complex mesh tends to avoid this (up to a point -- then we start sub-stepping too much and we waste cycles for no reason trying to overcome this)
an alternative would be to implement your own "space physics"
graphics errors due to massive speed and collision "errors" would be attributed to the motion blur mostly I guess... it does look silly unless your scene is "realistic" with regular speeds otherwise it would be the accumulative nature of lumen?
🤷♂️ heh
you could be controlling the actual ship pawn and just have a remote view at 0,0,0 with whatever camera you have in this actor. a simple way to learn the basics of this technique is to look up "surveillance camera" tutorials
setting things up in the level blueprint seems like it could work actually
I'd stay away from that but for testing purposes sure
id need a way to make the system a bit more dynamic, since i plan on having a ton of ships.
if there are screaming wookies and lasers count me in
id need a way to set the player's currently active ship, spawn both the interior and ship itself into the world, as well.
lol wookies and lasers
more like alien space elfs with guns, in space.
works for me
the game's kind of a batshit insane mix of The Expanse, Stalker, SCP, and... loads of other influences.
primarily a reference to whatever spaceship has been selected, could be at the player controller...
all of that, but youre playing as a space-elf wih guns.
can't argue with game ideas
I feel like I'm going through intergalactic cable lately. not complaining though.
maybe what i need to do is have like a spawner blueprint that i put in the world, that gets a reference to the player character and the currently active ship, and do it that way.
Are you using ACharacter?
I kicked around a space prototype for a bit but I needed based navigation and didn't want to program that so just put it on the back burner for a bit
First off, is it important that characters are around when you're in the ship piloting view, or is it effectively JUST the ships, nothing inside of them simulated?
lol, how we navigate in 3d space anyway
Mine was 2d but yeah the problem is in how to pathfind on a moving platform
built in navmesh doesn't support that
will surely need custom nivigation system I guess 
Going to post entire blueprint if someone wants to help 😄
Just post the part you need help with
Thats issue
No idea what all of a sudden started breaking 😄
Client decided it would freeze
Check grid pathfindin plugin on fab
Was good to use for flying AI
Its free
BASIC SETUP VIDEO TUTORIAL | SHORT VIDEO SHOWCASING INCLUDED EXAMPLE LEVELS | ADVANCED TUTORIALBlueprint exposed customization:Setting box-shaped area of the graphAgent shape (simple shapes)Agent dimensionsOctree depth, 0 - grid, 3 - for large open spaces. 2 by default, suitable for most scenarios.Graph resolution (choosing size of the smallest ...
nice, surely someone must already done that. I am also thinking about something like 3d grid or voxel nav system
yeah my game has a character that you control, with an inventory system, and equippable gear and stuff. the ship interiors are in a way your character's "home base" at least for a while. multiple decks, crew quarters, kitchen area etc etc.
and yes i plan on having other characters walking around on board as well
actually one of the other reasons i switched to my wierd setup was so i could have AI pathfinding, since the nav meshes dont work when the level's tilted at wierd angles.
didnt see the last question, the actual flying ship part has no interior, its just the model. like i said, i had to separate the two. im planning on also attaching the character to the pilot seat. forgot to mention that.
Just spawning 3 total rooms. No way this should happen afaik lol
it didn't find it
a failed find returns -1
So I think I know what's happened
When you search an array for an item, you're iterating over the entire array, and you're doing an equality comparison on all of the items, until you reach the item that compares memory identical, yeah
And then that item matches.
The thing is, the Selected Room is a copy of the data that was in the array.
But then you remove an exit from the data that's in the array. So now, the Selected Room variable is storing one set of exits, but the array element is storing a different set of exits.
So, I think what you should do is avoid making the Selected Room copy to begin with
I think you should store Selected Room Index, and whenever you would use Selected Room you should replace that with a Get (by ref) accessor.
To put that another way, the Selected Room and the array element are exactly identical at the moment that you first try to find the array index, but then you remove the exit. And at this point, the Selected Room struct has one extra exit (because you removed the exit from the Array Element).
Structs using copy semantics isn't something you would have easily noticed without trying to avoid using the array index, but this is one of the most annoying aspects of using containers of BP structs haha
My eyes hurt seeing those colors almost identical with those nodes inside
Yee, @carmine palm has a very particular taste in BP themes
lmao
Nah its actually just me randomly selecting color
It's just to seperate areas quickly lol
Doing better. got rid of while statement and changed it to event/bool/if stuff
If I add a socket to a mesh how to get a reference to that socket so that I can get the position? I would like to attach a cable component to a socket at the tip of my rod.
I tried getting the socket by tag but that turns out to be null
I'm not sure about a reference specifically to the socket itself, but for getting the location of the socket, you can definitely use this:
tysm
hello guys
I'm trying to create a reusable component in Unreal Engine 5 that includes up to 6 meshes and encapsulates both logic and animation functions. I'd like to use this component within a Blueprint Actor, allowing me to easily manage multiple instances without cluttering the scene. However, since Actor Components lack a 3D viewport, I'm struggling to set up the meshes and their associated logic within the component. Is there a way to design and implement this component efficiently, or an alternative approach that would achieve my goals?
Ah, no errors now?
in the "Bind Event to On Clicked", how do I add a parameter to it so I can pass the struct through it?
did you add OnClicked event dispatcher?
you can add inputs for your event dispatcher. if it's a c++ delegate, you can't add parameters. but you can still create event dispatcher that passes parameters for you.
Unsure. I know default code makes a lot of assumptions about stuff being a character/pawn in a 2D world due to being able to optimize out roll mostly. But that is multiplayer stuff.
As far as I know for singleplayer, it's all just setters so it should be possible to do whatever. Some of the functions like addyawinput and stuff might derp there because gimbal lock on rotators. And there's also the camera manager clamps as well to consider.
Most of the time people will do this in an actor. It's an actor's job to maintain components. If you need multiple actors consistently placed together and such there are tools like Prefabricator and similar to do that.
What's Prefabricator
What I did was used a child actor component and then get the actor and cast to it
With that I was able arrange the child actor the way I want in my main actor and was able to call it's functions/events using the cast
I have 10 of them in total
But I think I should use event begin play to cast them and store them in an array
The child actor component should only be used for visuals and even then I don't reccomend it.
Prefabricator is a plugin that allows for unity-style prefabs
Hi Everyone,
I making a Garden game currently, so I tried to make the character spawn the seed but nothing is working
The reason why is because you don't have the nodes connected, the flow follows the execution path (the white lines). If there's no white line connected to a node, it'll never get called. And to clarify, generally it flows from left to right triggering the nodes in order.
It might be worth you going through Epics beginner tutorials to more familiarize yourself with how BP works.
yeah you need to connect the "true" output in that branch to the spawn actor node.
wait no you need to go from the input to the is valid node, then from that into the branch, then the branch into the spawn actor node.
basically nothing is connected lol
also noticed the other branch after "can plant here". guessing that should go after the is valid branch.
Hello! I’ve been following this tutorial and every time I pick up the “ball” it teleports back to 0,0,0 , please help thankyou (:
Hello everyone! It’s cooking simulator game tutorial, In this video we will implement the grabbing and dropping of objects...
In this video I use Unreal Engine 5.2.1
creating new blueprint through right mouse click context menu does make it a child blueprint ?
I'm not aware of any differences. There should be a create child option when you right click on a BP in the content browser.
yeah there is option to create a child from selected bp in he content menu, just wonder is created from the context menu, i just dont want to have issues with reference's
Show where you mean.
i just saw on the top is saying parent so i guess is creating child bp
On that menu, you're selecting the class that a child will be created from.
yeah just saw what is saying on the top 😅 thanks for the help
Hey everyone, I am using gasp on 5.5 I've added guns and aimed fire which is working great but m having trouble with hip fire
In the function, UpdateRotation_PreCMC of CBP_SandboxCharacter, I’ve disconnected the whole execution and manually set
UseControllerDesiredRotation = true
OrientRotationToMovement = false
RotationRate = (0,0,-1)
This allows the character to look towards where the camera is facing. However, when the character stops moving, he stops following the direction of the camera and instead the camera starts moving around the character according to the camera input. I’ve searched a lot in the CBP and ABP but I can’t seem to find where this is implemented. When I debug the value of UseControllerDesiredRotation or OrientRotationToMovement or UseControllerRotationYaw, they don’t change based on character velocity.
Any help would be appreciated
Where here can i get help with a issue including a model looking very glossy and wet when it is in the player but fine when it is just the model on the ground?
why is this giving me values outside my navmesh bounds volume
Try GetRandomNavigablePointInRadius
You can also try removing the navdata reference
it gives me compilation error if i do that
and random navigable point just does the same
Seems unprofessional to cast for no reason if the player hasn't click a certain actor. Any tips?
Anyone know a fix for making the Z velocity for the rock always land where the player was?
huh
ah, got it wrong? my bad
I'm not sure what you mean lol
sorry I was hurrying to answer lol
Whats the end goal?
ah okay lol
player is holding item x, with that item, if the player clicks a certain actor, do action x
basicaly I dont wanna use the cast failed XD
coz what if I wanna have more actor types that can be clicked, seems bad if it were a bigger game to do that many casts, y'know
You have the thing you click handle it. Just pass the held item through and the thing you click can decide what happens based on the item.
ah, I think I understand what you mean. hmmm in this situation might just leave as is, lazy to change a lot of code, will keep that in mind, thanks bro
A day of refactoring could save you a week of dodgy work arounds. 😉
I said I'd complete this game in 3 days, meanwhile to day 24 😂
bump
using ai move to would a basic ai be able to navigate down this not nesscacarily do the jump but be able to fall off
Hey all, sorry to drop in like this!
I’m a freelance 3D artist – I do stylized characters, clean rigs, and smooth animations. Game/film ready.
✅ DM me if you need help with a project or want to see my work!
Found out my issue
andd no idea why its breaking all of a sudden
For some reason its considering all the rooms overlapping 😄
Hi there! Hope you don’t mind the message.
I’m a 3D artist specializing in stylized character modeling, rigging, and animation. Just reaching out in case you ever need help with 3D work. if you're interested! Let Chat private
when adding rotation, how would i smoothly rotate from what it currently is to the new rotation i want?
i tried using the finterp to node but it just makes my guy spin
i need to rotate multiple different directions
using timeline means 8 different timelines right?
why
because every time ive tried to rotate my guy smoothly without rotating the camera, it just doesnt work properly
it just spins my guy at rapid speeds
that was one of the more tamer spin speeds lol
like rotating player freely
basically so it rotates the character but not the camera
yea
but you can rotate the camera with the mouse obviously
at the minute, moving the camera moves the guy too
im baffled by something that should be easy as fuck
thats what i have now, but i feel like im overcomplicating it
For a start, there's nothing wrong with casting when it's done correctly. Don't make it an evil thing just because you heard someone say it's terrible or read it somewhere. Casting is essentially free and useful for connecting classes, but should generally only be done to core code only classes to avoid the memory footprint issue that a lot of people run into and automagically solve with interfaces without actually understanding the issue.
There's a lot of back and forth on this issue, a lot of which just simply boils down to encapsulation. Some people say cast to everything and handle the logic in the interactor. Some people say do an interface and make the apple pick itself up into the inventory.
Both are wrong. The general character or pawn shouldn't care what it's interacting with, not directly at least. It shouldn't care about pickups or doors. And likewise your apple shouldn't care about inventories or being eaten.
The only good answer to this question is an ability system that is set up in a data oriented way to filter through what ability to run to interact with what thing. The ability should have the ability to tie everything together. Pick up the apple into the inventory, play an animation montage for it, etc. Or play an animation montage and trigger a door to open.
And if you correctly define things with data, it's very easy to specify an interaction ability to interact with an apple just as easily as you would specify it's name or mesh.
I see, thank you
lol we’ve moved on from “cast is bad” to “cast is unprofessional”. F-ing YT click baiters and their “masterclasses” 😀
do you have any idea how to do that?
my brain is completely fried
I am having this stupid bug where if I make any new event in my interfaces and use it, it gets deleted any time I reopen the project. How do I fix it?
In general, why do you need an interface to trigger a wave of spawning?
Explain what you want to have happen.
You press A, what should the character do? Should they move towards the left of the screen or spin to their left?
You probably just want OrientRotationToMovement turned on but IDK what you're actually after.
Because there are different bullet heaven areas on the map and this interface calls to the one I am currently in. This is also on the PC and I don't want to hard code it because if I did any time the player is loaded then the bullet heaven system would be loaded even if not in use.
But its not just the BH_BPI its all my current interfaces any time I make a new function it just deletes them on the project reopen
only way around it is to make a new interface.... And I don't want to do that!
Check the interface's references. Both what it's referencing and what references it and look for circular dependencies.
Or wait. Is the function missing from the interface itself?
Or just missing on classes implementing the interface?
Ok I'll look. No its not missing on either
It's missing at least on the class implementing the interface based on your screenshot.
That's odd. This class's parents don't implement it, do they?
no
and its useing the three functions above it
but any time I add a new function for any of my current BPIs the new function is deleted and replaced all across the board its SUPPER agitating!!
I can only guess its a side effect of updating the project from 5.2 to 5.5 but I have no clue How to fix
That SendNextWave has no arguments. In or out, right?
Yea
I'm in class so whoever tagged me sorry
I'm minimum spanning some trees
And dynamic programming this dna alignment
I have tryed adding function that have both still same problem they just get deleted and replace the next time I open the project
here is the reference viewer. I is used by the game instance to get the game instance but it has to be and I don't think that's what's causing this because it is something that is happening across the board with all my interfaces.
this is what the OnClicked looks like
Judging by the code that leads to that error...
- There is a function, event or property with that name either in this or some parent class.
- The function has return values, meaning it should be a function and not an event.
- The last point failed, and it is already an event and it failed to convert it to a function for some reason.
none of that is true
it has no ins or out and it is Uniquely name.
I'll even change the name and still have the same problem watch. (give me a minute to change and reoppen)
As an FYI, you'd have a bullet heaven base class with the key vars and function in it. All heavens would then be a child of this and implement or override functions if they need to change the behavior.
This allows you to cast to the base class and call the key functions and access key variables without having to force load a specific bullet heaven.
Interfaces are for when you have different classes that need to have/use the same functions but don't share a common parent.
BP interfaces result in a lot of copy and pasting which makes things difficult to manage as you scale up and can create difficult to manage systems. I also find them to be buggy at times but that might just be me lol.
The Bullet have area is the base class( all changes to it are instance editable) . I don't want to cast to it because Like I said I don't want to load the system every time the player is live because some maps may not have a bullet heaven area at all.
And as a whole I don't like hardcoding any thing
That's why you have base classes, these tend to only be a few kb and for the sake of having something less buggy and more initiative, it just makes sense. Using interfaces to avoid casting is terrible practice in my opinion. 🤷 There are better ways to handle memory management.
Also adding to this, if you're not using hierarchy, it makes using soft references less effective.
I have never heard that theology before... And frankly it sounds wrong. I make base classes for stuff like items and NPC not one offs that are just systems in themselves that have no variation other then instances. Also if you don't use interfaces and hardcode the moment you change one item in your PC then it will want to save changes to the base class of all hardcoded items and then it will want to save changes to all its subs as well. Thats a mess haveing 100+ items that want to be saved because you change one thin in your primary character.
Use interface often and everywhere you can instead of casting
That's just patently false though
I have learnd this the hard way over 4 years
It's not a theology thing, it's just flat out not how you design with oop, anywhere
oop?
Object oriented programming
Object Orientated Programming.
The error you are getting is easy to fix by removing interface references from everyhere, deleting the interface, compiling saving and then adding it once again. It's bugged somehow it detects like you have either Function or Variable withing the same name in that blueprint or even in the project somewhere (maybe you have 2 interfaces with the same events).
Also you can check the error in the console l og when you project loads as well it will tell you what's happening exactly.
So are you saying I am wrong ot pattym is wrong?
They are saying you can have base class instead of interface and it's better.
Yhea deleteing it from every were and making a new one would work because new BPI are not haveing this bug but thats a pain...
And of course it all depends on the use case, because obviously interface will be better if the all actors/object you are trying to implement something ON are DIFFERENT
I am saying you're wrong. Not wrong in the sense of "2+2=5", but wrong in the sense of that's not how the design pattern is supposed to be used.
If one thing, and only one thing share a common base. Think, say doors. Whether it's a garage door, a sliding door, a regular door etc, they all open, close and have the potential to lock. That would be ideal for a common base class. Things that have things in common across those base classes, like retrieving a specific component from unrelated actors (like how GAS does it), or interaction, where you could interact with doors, but also NPC's, loot, vehicles, etc, is what interfaces are for. It's class agnostic behaviour.
Base classes also cut your memory costs down significantly with referencing.
You can see the engine implement the same pattern. ThirdPersonCharacter is subclassed in BP, but the defining characteristics of all characters are in a base class. However, any actor might potentially have a AbilitySystemComponent, so the engine creates an interface to retrieve that from wherever.
You might want an interface to see which faction something belongs to, even though soldiers, items and beds have nothing in common
Ah yes I use base classes all the time but even with that I implant the interfaces into them so I am not casting to them with my player controller or Primary character.
Yes, pass item here, do you have access to Item?
I am of the understanding that hardcoding in general is a bad ideal because If I ever want to use a system without the others it will still load them and if I ever start another project and want something from this project I would have a hard time separating it out.
You'd have a hard time anyway. With this method. You'd need to take the BPI, the system you want, and then reimplement the interfaces.
It's likely easier to just take what you don't need out of what's there already.
I understand building with the future in mind, and interfaces can be useful for decoupling, you just run into some design issues and issues like this when you interface everything
There's nothing worse when an interface breaks. 😢 I've been their in my earlier days.
Uobjects can be great for decoupling. 🙂
I shouldn't pass the item there, that thing is a widget for a button, nothing else
I've been working on an interaction system and an inventory system but wanted to keep them seperate. For this, i have an interaction event object. So I create a pickup interaction event for example which would handle interfacing with the specific inventory. If i migrate the interaction system to a new project, I just create a new pickup object specific for the inventory system I'm using.
For this project I've used 0 interfaces and it's all decoupled (for the most part).
Hell, consider components. If you want ease of use across projects, make components you can put on things. You'll get brownie points with the "Composition over Inheritance" crowd too :P
Compenents and custom uobjects are killer combo in my opinion. Takes a little more thought and time to setup but once it is, it tends to be golden.
Throw in some C++ for the edit in line and instanced flags and you'll be killing it. 
Hi folks. I m trying to understand classes in unreal, especially in State Tree. I have a simple setup here in StateTree with 2 tasks. One is to let the NPC to find a location, 2nd is to move to that location
For the context in StateTree. I've hooked up to a simple blueprint with skeletal mesh manny and its animation blueprint.
For the find location task. for input variable. I've tried both input to get actor location. Both actor type and character type works
but for the move to location task, For content varriable, blueprint type works, Character type works, but not actor type. Seems like Actor type can't get AIController. It does let me to connect it but the character won't move to the location.
Can anyone educate me why is that? I understand Character is a type of Actor with controls. Is that the reason?
Why does this only set the material to the top one not the bottom one ?
flip flop is a macro. It uses a bool inside to track whether it's A or B
when you leave that function you leave the scope of the macro, and thus the variable is destroyed, being remade again when you call it
you can confirm by dragging a print off IsA
Hi, I have a question. Im working on a crafting game. When i merge one item with another I can make a crafting event because I combine two things together. But when i press "e" on something it enables a destruction or destroy actor event that is outside of my item instructions/code. I dont always want to do destroy alone. Maybe sometimes I destroy and then there's 2/3 things spawing etc.. How can I make this so in such a way that for example things get spawned from specific item after I trace it and destroy if the destroying logic is outside of the event and it looks like this.
Thank you what could i use instead because i tried to use a branch but i couldnt get it to work ?
Whats the question?
You could copy paste the contents of the macro into the function and change the variable to be a not local variable, or make a new version of the macro that accepts a bool input, which is a non local variable
for example are you familiar with the Ryan Laley inventory system?
put the code to handle this outside of the items
The code has the items, does logic, destroys and produces items
this is what I thought but it is already kinda messy and im trynna think of how to make it more intuitive
i had been using a local variable and thanks to your previous message i realised that i had to use a normal variable since local variables would get refreshed thank you
But there is a problem
this is the only case which will produce items after I destroy it
Because there is at the moment a pan item on it
so there are 2/3 items merged right now
wood produces fire
pan produces food, and food can also be stored on top of pan
for example you can cook eggs on this pan
what happens if I destroy this furnace? or press "e" on it?
I pick up only furnace
doesn't matter how many things are stored on top of furnace
they all disapear
because of how my outside component works that makes this kind of logic
sounds like a mess
So the question is how to modify Ryan's inventory system so that when crafting, you can specify if items should be destroyed?
yes true but not really because wood will be destroyed by the fire anyways
and wood is a renewable resource so it doesn't really need to be picked up again
This is how I named my item Data
this is the component that makes the destruction and sounds
I named it such so that I know where my sounds are etc.
because it was kinda weird and I had to search a lot of time to finally find where my pick up sounds where stored at
Anyway doesn't matter, here's how it works
The sound is here ✅
Every item needs sounds ✅ (I guess thats good)
Here's where the actual magic happens 🪄
my guy wtf
Pickup sounds should just be an array so you can just get a random array element. Then you just check if its empty or not before playing a sound. With the current setup, if there's no valid sound you'll get an infinite loop. Also, the sound that is check will be different to the one that is played. (due to the random node and the pureness)
I just took the Ryan Laley systema and modified a bit, thats it. It works well at the moment. Whats bad about it?
Noted, that already sounds more intuitive and readable ✅
That's goofy
just make the sounds an array and get random element
that'll have an infinite loop if you ever don't have a valid sound in that struct
I know but all items need to have interaction sound
It's not that it's bad its that it's not right for what people try to use it for. Using structures for complex items/inventories become a mess very quickly and are difficult to work with. I'd only use a structure based inventory system if I need very basic items where there's only 2 or 3 actions with them and they're mainly just visual.
For example some items might only have 2 types of sounds
I really made sure to have a lot of sound variations to not make my sounds really boring, every time things make kind of a slightly different recorded sound variation
just make it an array of sounds and your life will be much easier
array -> get random element -> valid? -> yes -> play it -> continue
-> no -> skip playing -> continue
but my code here is already not very modular or intuitive, it just looks kinda weird
I'm going to assume the furnace has an inventory, (if it doesn't it should) so just before you destroy, loop through all the items in it's inventory and spawn them in the world.
This gets an interface from your "plant" items.
- Begin Play interface 📩
- Plantation/Farming Growth face complete ✅ 🍅 interface
it tells you whether or not a particular crop is harvestable or mature & ready
What's farming/plants got to do with a furnace? I'm confused.
They are all Player items