#blueprint
1 messages · Page 161 of 1
I'm a beginner at blueprints so be prepared to lose your eyesight after witnessing this horrendous thing. However I was trying to make the Timer flip the Branch from true to false and vise versa so an image on my widget could pop in and pop out constantly ( a REC camera popup)
Any ideas how I could go about this?
your condition is set to true, so it will always goto true branch
you probably want a boolean
Isnt there a flip function?
yes, there is flip flop
Fair enough, I'm looking into it thanks! I will try the flip flop thingie
Thank you
Shouldn't this be working? It's almost as if the timer isn't doing anything
I'm assuming that every time it ticks (ever 2 seconds) the flip flop should be flipping it, no?
Hello, small question regarding inheritance. I got this function, coming from an interface. Whenever I try to create a child actor, and override this function, the code of the parent doesn't inherit to the child. It's just empty (2nd screenshot). This means that I have to manually change all the child actors' code if i want something to be changed. Does anyone know if there's a way to prevent this?
fixed. Apparently I don't need to call this function at all. The functionality works by creating the child actor without having to call or add anything to the function
Hello friends why the KI is running aways from his patrol system when i hit him in the -x direction?
Here all you need to now
event tick activated my handle movement
Handle movement activated the patrol system
also event begin play activated the patrol system
i think it must something in the "Event AnyDamage" because there i have an select that should be change the rotation of the ai in the direction of the player...
is anyone familiar with sending http requests in unreal? i have a plugin that works for it, but im trying to send audio files to store
What would be the best way to make a one-way collision box ? I tried checking if the player's forward vector was equal to the collider's one, and technically it works, but only when I'm moving through it while looking in front of me, but if I'm walking backwards it doesn't, so I guess forward vectors isn't the way to do that
https://cedric-neukirchen.net/docs/category/multiplayer-network-compendium/
Read this. When you're done, read it again.
how rigidly one-way do you need it to be?
in BP your best bet will be an overlap box with forces or some other mechanism.
Hello! I'm looking for the name of a feature in Unreal where you can click on a helper asset to activate an interactive guide through menus and other elements. I remember using this feature before and found it really helpful, but I can't seem to remember what it's called in the editor. Does anyone happen to know what I'm referring to? It also had the ability to frame the parts it was explaining. Thank you in advance for any help!
I need it to trigger from only one side of the box, no matter where my camera is pointed at (I'm in First Person by the way), even if I'm crossing it while looking behind me, so I guess from any angle between -90 and 90?
This is what I'm looking for
If you wanted to extend the function for some reason, you can add a call to the parent class's version of the function
I mean how rigid
perfectly rigid?
that's not doable without C++
but you can easily make a box that resists any movement in one direction, it'd be more like a 1 way spring
Box:
Tick -> get overlapping actors -> foreachloop -> cast to Character (assuming you're using character) -> DotProduct(Character.Velocity, Box.Forward) -> math -> apply force to Character
you could maybe trim it down with begin and end overlap events etc but that's the idea
Oh, you mean rigid from a physics standpoint, like actually rigid, preventing anything to go through? Then I don't need that at all, it's just a trigger box really
I mean rigid, as in not allowing the thing to go any distance into it
not gonna get that without C++
but something that only lets it get a few cm into it is probably doable
whipping it up, sec
Ah it was this thing. Someone knows what happened to this thing? Its not available anymore as it seems
I don't need it to block any physics, just to not trigger any event linked to the box if I'm walking through the collider from the wrong side x)
oh if its just that then check velocity on overlap
dot product between character.velocity and box.forward
check the sign of that
btw
How can I get player controller from damage causer to give it the widget?
This obviously isnt working
Hi guys, I had a question about setting up an individual timer every time a button is pressed. I want a system where each time a button is used, it's added to an array and then removed from that array after 5 seconds. The issue is that hitting the button multiple times makes it so that the timer is reset, is there a way to make a unique timer for each button press so that it won't get reset?
what is up gamers, I am trying to get a short range teleport ability to work, I was able to get it to instantly teleport you to the location, but I'm trying to have it be a quick smooth transition, kind of like you're dashing really quickly there, as of right now when I press the teleport key my character just jumps up a couple feet
Hey guys, I'm looking for ideas or method on how I can do this thing, the name in the component tab is created automatically based on the array in the widget blueprint. how do I make it so that the text is clickable ("engine") and when I click "engine" or "propeler" or "Nissan" I want it to print something specific according to which name is clicked (for testing purposes).
I found a very silly solution to this that works by spawning an actor on each button press that has it's own timer. I imagine this will effect performance slightly but it's something neccessary for one of my main game mecahnics so at least it's a solution. Feel free to tell me why this is stupid and what I should do instead 👍
Thank you for pointing the way to Dot Product, this is what I did and it works just like I want !
If you have C++, you can copy the function and delete a couple of lines to make a timer that adds a new timer each time instead of updating the old one.
how do I set the text as child to the button? right now the button has no text on it
found it
Very curious as to why you’re doing it dynamically
You know you can just make all this beforehand and just change text values right?
I'm calling the components from firebase
No idea what that is but I believe you
xD its google online database
On a side note. I strongly advise you not to use ConstructObject for widgets of any kind. You'll end up with runtime crashes. If you need a dynamic textblock then wrap it in a UserWidget and either use the internal textblock in it or make getter and setter functions.
Never ConstructObject, always CreateWidget.
Not to mention Remove from Parent does not work on constructed widgets, only created ones iirc @outer quail
Took me three days to track down a semi rare crash from a combobox dynamically constructing textblocks. Still annoyed you can't really do that to this day with as annoyingly big UserWidgets are getting. Bit overkill but. 🤷♂️
Any reasons that my set visiblity isn't working when calling the event but works on event begin play?
I can confirm the event is called properly runtime
No reason it shouldn't work unless something is setting it back to false for some reason. Given this is looking at code, I assume this is ticked? Have you checked the false part of this to see if it's setting it back off?
yeah its technically ticked, it's called within my rayTrace Interaction component, but I haven't code anything to turn it back off yet which is why I'm a little flabergasted here ^^'
I'm wondering if it might have anything to do with the fact that it's a server object with no owner until someone start interacting with it, but since my widget isnt replicating, I don't think this should have any impact right?
I tried using createwidget, so the button will be create dynamically but how can I add specific event when the button is clicked? If I create button normally I can set the event on clicked, etc
Maybe. Out of curiosity can you swap this to set HiddenInGame instead? You should prefer HiddenInGame for local stuff. HiddenInGame is non replicated. Visibility is replicated.
Will try that
You make your own delegates. Even Dispatcher area in BP. Call them from the internal button's OnClick.
How do I get the job done on target sdk 33? Google Play requires a minimum of 33 SDKs. With target sdk 28, storage permission is granted
Storage permission does not work with target sdk 33
Geez, found the issue, I had set tick mode to automatic, to prevent it from running for no reason when not visible, thing is, it seems like that is preventing it from updating back to visible 🙃
from here?
Yeah
since the button is being created dynamically, can it recognize which button is clicked and assign event specifically to each button?
Hey all! New to the channel. I have a series of cylinder static meshes that I'm applying a tag to and using a button with an event and a timeline to try and raise the tagged meshes up 35 degrees on the Zed axis. I'm having a hard time figuring out the best way to get the initial location for each and apply the change to the Zed axis. What is the standard way of getting the location of the mesh and adjusting it between the two Lerp values?
what is the difference between macro and function in blueprint ? it seem like " for each loop" being made by macro ?
Macros are expanded at compile time, so using a macro is a shortcut to get behavior as if you placed and connected all those nodes yourself into the graph. Functions are external pieces of logic that are linked against and reused - they can even be written in languages other than blueprint.
Are you sure you are not calling the timeline on tick?
yes
I am sure
100%
no matter how many Timelines I add, each one is called once and it is 0.0
only in this actor
Can you do Do Once node before the start of timeline just to be 101% sure that you are not restarting it from anywhere? Honestly the setup looks basic enough that in the screenshots I don't see the issue
calls this timeline with the E button, Do Once really won't help here, as if something in the actor was set up
Tick disabled?
enabled
What is the condition for triggering it?
Hey guys, I'm tryna do this tutorial from some dude to create a bullet that tracks the mouse position in a side scroller shooter but I'm having some trouble with the errors, any ideas as to why this is happening?
Basic tutorial on shooting a projectile at the mouse.
Works with sidescroller isometric 3d shooting and is done completely in blueprints.
The error tells you
yeah but what should I do instead
because it should be able to launch itself in its direction
Something else (probaly your pawn or playercontroller) should just be telling the bullet what direction to fly in
the pawn or playercontroller cares where the mouse is
gotchu but in this case the pawn is creating an error
should I cast to the actual main character?
Start with the thing that will be caring about the mouse, either the pawn or PC. Probably the pawn
start there, draw a debug point on tick where the mouse is
That code looks fine-ish, it just shouldn't be in the bullet bp
it should be in the pawn or playercontroller
why would a bullet spawn a bullet?
the code is still goofy, the entering a gate into a delay on tick is super sus
I'm creating the button dynamically, the problem is when testing, if the button is pressed, it prints the last index (which is Nissan), how do I make it print its own name? I want to use the button for specific event later
start with getting the thing to shoot one bullet when you click
If I share git hub link could you help us out?
about this
You can figure it out
I'm at work anyway
Start by drawing a debug thing at the mouse position when you click.
Then draw a line from firing point to mouse position when you click.
Then spawn a bullet that flies along that path when you click.
Then do the automatic firing.
You need to get the name from the button clicked, not the for each loop. Which means you probably need to pass Self through the OnClicked of the button.
also that screenshot is kind of a disgrace xD
https://miro.medium.com/v2/format:webp/1*7v_75ZGg1CTmWAw1rEgMHQ.jpeg can someone help me find waldo?
this?
does any one of you guys actually using break point ??
Yeah. Your button needs to pass that back through it's OnClicked delegate from your userwidget you wrapped it in. Then you can pull that String you passed into it.
as an alternative you could make the string an parameter
and pass it to the delegate
Either way, yeah. Just used to CommonUI's version.
mannn this is hard xDDD
are you searching waldo or what? xD
actually later on when the button is pressed, I want to make it open another tab that display information about "engine" or something, so It needs to display information according to which button pressed
should I connect it like this or no?
no
you open your custom combo button widget, then select the delegate and in the details you add a parameter to the delegate
it's a smol + button in the top right corner of the details panel
then set the variable type either to FString and pass the text, or to CustomComboButtonWidget object reference and pass the self reference in the call
you'll have to recreate the event binding which is on your screenshots in the bottom right corner...
so that they get correct variable
now where you bind the event in the other widget, delete the button clicked event, and recreate it
it should show the variable then (given that you compiled and saved the CustomComboButtonWidget before)
sheet did I do it wrong
the print string is in the wrong place
Hey folks
Not sure if I remember right.
If I do a "Select Float" node in my graph. Will the engine spend resources calculating the option it does not need?
Or even worse calculate both if the "Set" node is never needed (meaning the output of Select Float might never be needed)
It will. Nodes need to calculate every possible input before they start to process.
but only if the Set is called, too
Even if the "Set" node is not called?
so you always get both calculations done if you set the value
I don't follow the question? This only applies for executed nodes that get executed. Each execution runs every connected pure node every time it's executed.
If you don't execute the node, nothing to pull.
Okay. Then I don't need to worry about it.
I'm asking because I do a switch on Enum earlier so there is a low chance the Set Current Damage node would be called. Could be one of the other 30
Holy mother of enum switch. 👀
Just figured if it meant it had to calculate two options for all 30 options then I would set it up different.
Yeah. No you're fine. 😄 That is the general rule though. Every pure node gets ran ONCE per executed node it's connected to. This is one reason why randomization nodes are super fucky to work with in BP.
Like RandomFloatInRange.
Connect two of these nodes to the same executed node and you'll get two different floats.
Connect one of these to two different places on the same executed node and you'll get one single float.
Connect one of these to two different executed nodes and you'll get two different floats.
wait... is this true? Connect one of these to two different places on the same executed node and you'll get one single float.
did you test this? i thought even that would yield 2 different results
Yep. The randomization node runs once per executed node. Any pull after that reads a cached value.
So you get two pulls but one execution of the pure node. So one float value twice.
is that specific to the random method? or does BP VM cache all pure results per execution?
It's like that for all pure nodes.
thanks, TIL
Note that this is a reason that for loops are so fucking costly in BP. Because it's a macro. So it'll read back through all of those internal nodes and anything connected to the loop node every iteration for anything reading from the outputs. Hence why you should try to drop loops into a function with cached inputs.
my man
that is not the way to do that
But ONCE per executed node downstream right?
So it won't calculate outputs for "Tower range" for example, if the Switch on Enum went to Damage?
Correct
That setup is perfect for your stats being just name/tag/whatever, value pairs
Too much of a newbie to even understand what you mean.
Pairs = sets?
naw just a structure or tuple or map of statname to float
if the math is different for different stats you can easily encode that as well:
FinalStat = (BaseStat + AdditiveModifier)*MultiplicitiveMultiplier clamped between MinStat and MaxStat or whatever
What I'm saying is instead of your stats storage looking like:
float HP
float FireRate
float This
float That
it can instead be:
Map<StatName, float> Stats
or in your case:
Map<StatAffix, float> Stats
Or do 20 lines of C++ and use GAS. 😄 Cause despite what people say, I wish I had learned GAS sooner when I didn't know better. Makes life easy.
I love the idea of GAS but I've found so many weird edge cases where it doesn't work for me
like, how would you do a replicated out of ammo click?
Cues
assuming ammo as an attribute
does the ability succeed but just take the Can'tFire path?
Possibly. Could defintiely work. Also interested to see GAS with only instanced abilities. Gonna love the lack of CDO calls.
What about GAS for a modular building game a-la SpaceEngineers
Ah, so your main point is to have a Map that holds all the variables?
Say a Map with 20 variables instead of 20 individual float variables?
would you even consider that? Everything has health.
How do you get this Blueprint style with the straight lines?
Yes, then querying for hp would be finding the value corrosponding to the HP or HP enum or HP tag or HP name key
then adding stats is trivial
Electronic Nodes Plugin
I don't like it at all, might just be too many hours with the stock lines but I find it much worse to follow
Right. But other than the 20 individual variables there is nothing wrong with my approach?
(Would set it up like you described for future games, but it is a big task at this point)
I mean your approach will work, I just find it easier to parametrize whether something is additive or multiplicative rather than copy pasting the same code over and over just setting a different variable
A midpoint might be switch on enum -> take additive path or multiplicitive path
In a single player game, what's the best place to store things like player money, ammo, etc?
Playerstate for money
ammo I'd keep on pawn unless it's meant to survive the pawn dying or whatever
Yeah, should have thought of your approach earlier. 😄
I have a bunch of different weapons but they're "global" in the fact the player either has them or doesn't in a given level
so it can stick to the weapon actor (they're persistent)
I'm not even Italian
Haha
What happens when you die?
i can't even eat this fricking spaghetti because there's knots everywhere...
to your ammo, money, any of that stuff
You'll retain it, or it'll be altered by some rules
I probably don't need to destroy the character on death which makes things a bit easier
How do i get this node?
split a vector by right clicking on its output pin
which vector?
the vector you want to split into xyz
I am having a issue where the grid is not being animated
Hey all I have...something bad to show you...
Image 1: Sets up an array to keep track of whether we have "used up" all of our trials of a particular type (calling a trial type in the previous level adds to to the trial count, and the total trials are set for the game instance based on what you want.
Image 2: The trial picking logic based on whether or not trials of a certain type are available or not.
My question - is there a less offensive and horrible way to do this?
Basically what I want is for there to be a set number of visual, auditory, and multisensory trials you define ahead of time. Each time the level is loaded, it checks to see how many have been "used".
Based on which ones are still available, it randomly picks from the available types. So for instance if you already used your quota of 3 visual, it would randomly pick between auditory and multisensory. That's the idea at least.
It seems like there must be an easier way to do this though?
I'd have a map of trial to bool
then pull out all trails where completed = false, stick them in an array, shuffle it, run the first one
Hi! Im making a top down project (multiplayer.) And I got a little confused. I have a current health and max health for a character that is currently sitting in playerstate. the issue is that i also plan to have NPCs roaming around that im able to click on and start attacking. my question is, If NPCs don't have playerstate, and I'd like to be able to attack the npc the same way as other players, how do i handle the health? should the NPC one be in NPC character blueprint and the player one in playerstate and then branch the attack based on if its an NPC or player to deal damage to their respective variables? Am i thinking of this completely wrong?
put it in the pawn
HP in pawn makes way more sense
the player has a name and a score, the pawn has hp and weapons
The map of trial to bool is what I have in the first image, right?
i mean an actual map
map variable type
what IS a trial?
you might need TrialType or TrialName to int if you want to store
Visual:3
You can either have your data set up like:
VisualTrial1 : false
VisualTrial2 : false
VisualTrial3 : false
AuditoryTrial1 : false
AuditoryTrial2 : true
to represent someone who's done one of the auditory trials
OR
Visual : 3
Auditory : 1
to represent someone who has 3 visual and 1 auditory left to do.
I don't know how you're defining these trials
Ah got it okay. So in my game instance I have variables like "total auditory trials" or "total visual trials." You manually set those based on how many you want to have of each out of a total pool (which is calculated by summing all of those.)
I also in my game instance have a variable "auditory trial count" or "visual trial count". Those initialize at 0. When a trial gets called of a specific type, it casts to and increments that visual or auditory trial count variable in the game instance; trial completes and it reopens the level.
I want the "trial picker" to randomly pick from those trial types that still don't have a trial count = the total trials you defined. Does that make sense?
do you have a list of trials to do somewhere or is it just a count?
There's no list of trials to do currently, no. Would that make it easier?
Probably, I have no clue what your actual design is about. Is every visual trial the same thing?
Yes, for these purposes all of the trials of the same type are the same thing. The blueprint randomly selects an object to "play" the trial on, and that's working fine.
I just need to keep track of the number of each type that's been done and only pick from those that still have trials "left" if that makes sense. It's a simple operation that I implemented in way too complicated and bad a fashion I think.
It can be as simple as storing an array of trial types called TrialsLeft
it might look like
Visual
Visual
Visual
Auditory
Auditory
Auditory
Auditory
when you start the game
Then when you want to choose one, shuffle it, choose the first one, remove it
I see okay, that definitely would be easier. Thank you very much!
Like this?
as long as remove doesn't remove ALL of that type
and what's the point of the total trial int
It worked, thank you. This is WAY better. The total trial int tells the experiment when its reached the max trial number and stops the experiment / exports the data.
remove the one at index 0
not the one with string "0"
and you can just check size of TrialBank before all this, when it's 0 you're done
This seems to be removing the one at index 0, I think. I tested it a few times and it worked as expected. Is there a way I can pass a more secure input to that to be sure its an index? That input is Item String (by ref)
blueprints supports ranged based for loop?
How will looks like in blueprints?
for (int32 i = 0; i < array.Num(); i++)
May as well just use a foreach loop in blueprint as you can hook the array to it and it'll iterate over each element in the array.
There is a for loop as well which can loop based on a value.
hmm, got it thanks )
will that for each loop works for this purpose?
for (int32 i = 0; i < LandscapeVertices.Num(); i++)
{
FVector LandscapeVertex = LandscapeVertices[i];
HOLY SHIIIT roflbbq
Deep questions here on Unreal Source.
yes
i'm confused how to get that vertex by index and set it
Use the array element.
The array element is the current iteration of the array.
It's basically giving you LandscapeVertices[i]
is this correct?
ah, so i don't need to use that index?
Correct
great thanks )
Hey guys Im trying to get a canvas panel size after adding many child into that, but the size returns always the original size like no child was added, any idea how to get the updated size ?
Can we set a float like this in bp?
float MinDistance = TNumericLimits<float>::Max();
i can set 9999999.0 but not sure if this is correct 😛
No, there's nothing like that exposed to blueprints.
so i need to expose it from cpp
Thanks so much )
How could I make it, to prevent players from standing on small objects like that? Is it possible to do that in a global/generic way?
I dunno where to ask this since it's a BP and CPP question at the same time, but I'm trying to set up enhanced input using BP but the BP class I am using is parented to a C++ class but is not the parent of the BP actor I am trying to apply the enhanced input to.
To visualize it, I have:
Pawn->PawnClass1.cpp->PawnClass2.cpp->BP_Class2
and
Pawn->PawnClass1.cpp->BP_Class1 (the BP of the class I'm using to contain basic functions and inputs)
Is there a way for me to move BP_Class1 into the parenting chain at the top or do I have to figure out setting up the enhanced input mapping in CPP?
do we have any alternative to LandscapeMeshComponent->GetStaticMesh()->SetVertices(LandscapeVertices); in bp?
tried and it seems i don't see any of setvertices
Does anyone know if there is a way to disable culling for taking a screenshot in the editor?
Is there an alternative to this that is pre-built?
This thing doesn't seem to work that well.
I have idea for my own method, but wasn't sure if maybe theres a better/ new one?
There is not really. That is the only thing for selecting actors via screen space. And it's largely bad because you can't pick the component types or filter, so you get even crazy stuff like particle bounds messing with it.
Yeah, even basic pawn actors, are crap with it.
But, thanks.
I'll do my own method.
Does anyone have ''Building Placement'' or any object/actor placement logic with use of cursor and would share more or less how it works? I have some prototype from tutorial but it's in shit state. I need some better approach as this is outdated for sure. Can be on on private too. For context, I'm trying to click button, button is asigned to the actor/building class which can be placed, I change materials of the building for the time it's at the cursor, after placement I set materials back to default. I use event tick and get hit by cursor for location until I place building, which I'm not so sure about. Any references? Or any good tutorial? Can be even with objects, I guess it's popular concept?
Is it possible to have a notify event for a variable, without multiplayer setup ?
There's a free asset on the marketplace that covers building things. Could probably learn from that.
https://www.unrealengine.com/marketplace/en-US/product/easy-building-system
Use a setter function and have that call whatever functions or dispatchers you want, and never directly set that variable except in that setter function.
If you have trouble with that, mark the variable as private and also create a getter function
Ohh, thank you, looks good!!
HI guys! I'm trying to get the math for this correct but I'm kind of struggling.
How do I set this up so that when the player is holding CTRL, the object they're moving is only able to move on the Z axis, still saving the object's X and Y location?
for extra context;
Do it in the base class where the pawn share. In this case do it in cpp
Don't use the X and Y values from the mouse hit location, only the Z.
Thanks you haha, the simplest solutions are the best
Only using the Z sets the object's location to 0,0,x
split the structs and use the current location x, y ?
Hi! I'm trying this: when the player presses a key (C) it switches to the camera which is placed in the level and when he releases it returns to the character's camera. But nothing happens, the camera doesn't change. Can u help me?
It gets glitchy for some reason when i do it like that, ill have to do more testing around
i would of left the function alone and done that on the other part
You need to call SetViewTargetWithBlend from the player's PlayerController.
Somebody experienced with splines:
I have a spline, basically when you get near the end of the spline, it creates a new spline point in a random location in front of it. and that is endless.
However, I can't seem to change that points location after creation? I looked online and it seems other people have this issue. Even using Set Location at Spline Point doesn't work.
I have procedurally generated terrain. before creating the point, I'm raycasting downwards to get the impact point of the terrain which then becomes the new Z coord of the point, then it's created. It loosely follows the terrain, but the segment between points goes through the terrain obvi, so I am then further subdividing the spline and attempting to move THEIR Z but they just aren't moving
You'd need to use the current values of the object + whatever value you want on Z.
Thanks! Now it's work, but when i release, it tells me I can't connect the camera to new view target
Because it takes an actor. The thing you have on the level is a CameraActor with a CameraComponent in it. TLDR plug the GetPlayerCharacter into the view target on release.
Thanks!!!
Hey folks, I'm having some trouble with the basics here.. I have a blueprint inside my player that connects to a plugin that makes AI talks to the character, inside the player there is the input "T" to talk, works fine. Problem is that I want that input to be executed inside an outside widget via a button, since the game will be touchscreen. Any ideas?
so if you have a widget blueprint and a player blueprint, then essentially you want the player blueprint to contain a function (can name it whatever "AI push to talk" etc) but just put the logic inside the widget blueprint. Then call the function inside the player blueprint
hmm question... I have some data layers that aren't loaded... Get All Actors of Class will still get these actors. Is that expected?
I'm trying to make something so when I shoot this Rectangle it will be destroyed and then Spawn an NPC that will Chase the Player, Everything works as expected except when the NPC spawns it doesnt move or fall to the Ground at all.
However when I Drop the NPC into the world manually it chases the Player as expected.
This is what the Rectangles code is looking like.
Any Help would be appreciated.
Don't destroy the actor before doing what it needs to do. The Spawn Actor node should be before Destroy Actor.
I actually tried that too, I just now tested with the Destroy Actor Before the Spawning.
It may also work when placed in the level as it's automatically being possessed by an AI. Usually if you're spawning an AI, you'd use "Spawn AI From Class"
Okay I'll give that a try thanks.
Is there any way to make user-created variables appear first in the details panel of the blueprint editor?
Is it possible to create a map system where you have to draw your map on a grid and with multiple layers (for multiple maps) using only BP ? I'm writing down a few ideas for a game and I don't want to look at C++ right now, I'm really not there yet x) And what about a "modular playground" ? Like a maze with moving walls that follows predetermined patterns
I'm a fool I just forgot to have it Possess on Placement AND Spawn.
probably could do that with widgets
can anyone help me. i am getting blueprint runtime error in weapon type but its working and i dont see anything wrong '
Hey all, I'm debugging something in my menu system by adding Print String to my For Loop. When I Play in Editor and go to the menu I'm testing, I get a list of values - great! The problem though, is when I go back to the main menu and return to the menu I was testing, the list gets printed twice. If I repeat the process, it prints three times and so on. I've tried implementing 'Do Once' nodes pretty much everywhere to no avail. The custom event that drives all this is only called once and should only fire once.
Any help on this would be hugely appreciated 🙏
Thanks!
seems like you are not refreshing an array. could be a reference being to high in scope or a method not clearing the array before remaking.
pretty vague, is that cast failing?
Much appreciated, I'll look into it
No
It's not valid it's working but I get a blueprint runtime error
Anyone have any idea why data traveling through interfaces would get lost?
Guy, what’s the error? Show a screenshot
I have a blueprint querying an interface on my weapon. The function runs and gets data and then shoots it out but what ends up on the other side of the interface is 0
User error usually. Following data through interfaces is difficult
Hm
It shows blueprint runtime error for this blend pose by enumeration
Blueprint runtime error is like saying error, the important bit is Accessed None and which property it’s pointing to
Click the magnifying glass to see where it is exactly
I would prly be able to tell you but I can’t read that resolution
Why is a function querying an interface tho?
What are you doing exactly
Gameplay Ability System GA blueprint is querying the ammo percentage from the source weapon
I am running "getters" to access my variables that are privated in C++
The individual getters are getting correct numbers
The division is returning 0
so actually the issue isn't with the output of the interface
omg
Not convert after the fact
Sorry, still having this issue.
I've also discovered that the list of values is printed when I return to the main menu, even though the event isn't in the blueprints for that operation
I'm working on setting an initial transform variable to get a reference to the starting point of something I'm moving along a track. For some reason, the CheckTrack function that I'm calling with a "Set Timer by Function Name" node just isn't recognizing that the location it's getting from "Get Actor Location" is no longer equal to the Track Start variable that gets set on Begin play. Anyone have any idea why this might be the case?
Plasma, would the Delay node be useful to you here?
Lemme try that
does the loop body execute at all? maybe the array is empty?
I manged to fix it, thank you two for the support.
The issue is that at the body of my loop I had a async node
Ah, makes sense, glad you got it fixed
Guys is there a quick way to make draw distance of light not snap away? like when i am out of distance i want it to fade away, not to just turn off. Any ideas?
Oh that’s good to know
so im working with an asset pack that seems kind of good... except that there is too much code concentrated in the main character BP of the project.
im trying to disentangle it and slowly move functions to a parent ive created but it keeps freezing and forcing me to reboot unreal is this normal if a blueprint is just too overloaded with code or could there be something else wrong
i dont necessarily have issues navigating blueprints in any other project
Hey guys, I'm creating chess game, when I tried to add rotate view using SpringArm it's just work like this. How can I prevent this situation?
Depends on the reason. Freezes can just be something processing. But usually it isn't an entire freeze without some sort of progress bar.
Disable collision testing on the spring arm
how can I disdable collision on the spring arm?
At the bottom
can a blueprint take 30 mins to process if its very heavy
wow that works fine thank uu
I dunno. Normally I'd say no. What are you specifically doing when it freezes?
I would think that if you have a blueprint that is being referenced in lots of other blueprints, then it could take a while for it to update all those references with its updated data. Depending on if the actor is placed in the editor then the construction script may also fire doing even further processing.
I've had legitimate crashes from people referencing widgets in over a dozen level blueprints. Loading the referencers to delete a widget that wasn't even used. 🤮
this character blueprint has all the widget logic in it
which i personally detest
and some other things that could have been made into components and whatnot. my guess is that its a combination of all the references and the blueprint itself being really heavy
is there some way to measure this sort of thing i remember there being some tools
well its a side project, i didnt want to reinvent the wheel so to speak
so i got a 'template'
Now you get to reinvent the template. 😄
but it does make me want to question my life choices
But check the reference viewer and sizemaps. 🤷♂️
well i am still absoltuely terrible when it comes to animation blueprints so i do need help with that and the templates sometimes come with smooth enough movemetn until i realise its all based on 1000 booleans

That... is a lot of gigs for a base character.
well what amazes me is how these asset packs can look good on the surface. the guys making these are like savants
how do you have the ram in your brain to keep track of all the booleans and references in your project
but at the same time make the worst mistakes
Above is the general reason people don't like casting. 😄
i might as well scrap this and just learn how to connect ALS to my character
he does have interfaces
"Base" class should be like max 400mb if it's referencing some static game data. Mannequin, weapons data asset that probably has hard refs, Ugh
yeah big oof. im loading up conan exiles devkit to see what an official triple a game has it at
is conan exiles triple a or double a, i dont even know
I dunno. I'm iffy on that too, but I was an ARK player. The file sizes for that game were just fucking unnecessary.
funcoms conan exiles player character
still slimmer in many ways to a bare minimum marketplace template tho
wonder whats their dune character goin to be like
So I want to call the component button clicked array (customcomboboxbutton) to my other widget blueprint and its not working, I'm so confused and idk what I'm doing xD, any help really appreciated
Is it possible to record a video and export it as MP4 ?
A lot of the code looks totally wrong here.
Give context what you are trying to do.
Also the cast is redundant here as you are passing the object of the same type
I want to pass the name of the button when it is clicked, lets say engine is clicked, then another tab will pull up displaying engine information
there's no problem if I do it like this, but I had to do the "pulling up the information tab" in other blueprint. that's why I tried to send it in an array so that I can call it in other blueprint
Where did you bind the callback?
in the component_wbp, previously I used get actor of class to get an array from other blueprint. but since the array that I want to get now is from widget, I can't use the get actor of class, that's why I'm trying to cast
@outer quail nothing here bind to the call back
Have you gone thru what event dispatcher does?
You need to assign delegates to an event, so when you broadcast (call) anything that listen to the delegate will fire.
"assigning delegates to an event" do I do that in the customcomboboxbutton bp?
I will suggest to start empty project and follow along event dispatcher tutorial
got it, I will look up tutorials, thank you!
did I do it correctly?
looks much better, do you get the result you expect?
Hello everyone, I have a problem. I created an event in the UI User Widget, and I need it to trigger a "Custom Event" located in my Actor. How can I make it so that when I click a button in the UI, it activates the event in my Actor?
Did it work? I don't have enough info to see if you are doing it correctly or not.
but in a nutshell, upon button creation -> Bind the delegate to an event
it is my understanding that the widget should dispatch the event and the actor listen for it
Whenever it get broadcasted, the event should fire along with any parametre that get passed
You will need a ref to the actor
yup it works, so simple xD thank you
maybe @frosty heron will agree, that having coupled references in events is not always a good idea, because sometimes a reference might not exist and breakyour work, it is better to decouple interface and game actors and use an event system for this
Imo, it really depends on the purpose. You don't need to make something ambigious when you want a button or certain element to do specific things.
If the button may behaves differently depending on the context, then sure you can make use of composition or interface.
But if you want the button to make a character jump for example, I would just get a ref to the character.
that is a very sensible approach
having said that, I am self taught and not really educated so take it with a grain of salt
Yes, but I don't see it working
you need to add the widget to viewport
Hi!
How can add a static mesh to my Blueprint Actor at runtime?
Is there a node to create a Static Mesh?
maybe promoting to variable could be enough but if the widget is not shown is not triggering any event, check that first
There's an add component node, after which you'll be able to select the class.
"Static Mesh Component" would be the class.
Yep. Then from the return value you can promote it to a variable so you can access it later, and change settings about it, like what mesh to use, materials, etc.
Great! Thanks a lot!
Okay, I had made a version like this earlier, but it wasn't calling the print on output.
In C++ I use SetupAttachment, but what do I have to use in Blueprint to attach the created mesh to the root component? AttachTo node?
Thanks.
Or Maybe I don't need to do that because Manual Attachment is disabled.
When you're creating a widget, this return value is the reference to that specific instance that you created.
If you create other instances of your widget in different places, they won't be the same reference, and anything that you trigger in them won't trigger on other instances.
Yeah I don't think you do. Adding the component should automatically make the root component the parent I believe.
OK. I'll check it later on.
If I just need to take the UI reference, do I do the same as here?
Assuming the begin play is part of CC Camilla, yes, however, the begin play will likely fire before the UI Test value is set.
the cast is redundant here. Read the warning for more info.
someone can solve this issue?
I have the set variable of bp Interaction area
is set, okay? stored in player character blueprint
a little down, in the same blueprint
I call the variable of bp interaction area
You are no where in a level where you should touch multiplayer
I must finish this, unfortunately
Get actor of class on tick, so wasteful 🙂
on tick?
Triggered ticks away
it's F button pressed
More like F you should’ve read the docs 😀
You need to learn how to properly reference, how to get and set them.
Get actor of class isn't something you want to do here.
thanks
but this is not even the main problem, the problem is that the set variable in the same document isn't working
it's correlated?
Use Started pin for your code unless you want it to execute constantly the entire time the F key is down
it try access none
The main problem is the code looks aweful even for single player. Add multiplayer and you need to make sure that all is well in all Machines
so really, my only advice is to start doing Single Player first.
you are trying to sprint before you can crawl.
You are trying to strore multiple actors in single variable
not really, get actor of class return a single value not an array.
Setting a variable only sets it for the local machine.
Setting a replicated variable still only sets it for the local machine, if it happens to be the server, then it replicates it to everyone else.
You're setting the value on an input, which are local only.
it just get a random actor (sort of) of the type in the world.
Oh, it's one actor, right.
yeah it's not get ALL actor of class
But it’s also the first actor of that class the game finds
So if there’s more than one, you have problems
On top of the other problems 😀
it's the only actor
Good stuff
But anyways, multiplayer is almost like an engine within the engine, may want to head the warnings and come back to it once you’ve gained some more xp/knowledge of the engine
I know that this seems ridiculous cause I still learn about it, but the fact is that I god a 3d asset commission and they wanna try ( cause of my fairly superficial knowledge of blueprint) to do the basic of the game, so I am trying it.
so don't be so mean sometimes, the fact can be different from perspective
Why do you need to use multiplayer to make an asset I’m confused
the advice is given with the best intention.
I am not trying to sit on a high horse
this is a way for me to push me forward in a field that isn't mine
I also initially started with a multiplayer project and had to table it for now
I accept your considerations and thanks you all for the help
I'm a professional and formerly 3d artist, so xD
ok that's got nothing to do with your multiplayer project. You can ask for feedback in #multiplayer where the experts reside.
Aye, best of luck
again the issue with multiplayer is that you have to make sure that the values in each machine, are set.
If you can't use reference for Single player, you are making it harder to learn by doing multiplayer as you may wonder why you get accessed none.
they commissioned assets, but want to try from me to make the basics of blueprint
at the beginning I wasn't expecting that difficulties
That’s understandable, designers need to learn bp
But the point is it doesn’t have to be multiplayer
It’s pretty good but is there a blueprint issue? 😀
No lol, is there a different channel for showing stuff off?
my b
Good stuff tho
ty
I love resident evil Inspect system
ye, just figured out how to do that today
Yeah it’s pretty neat
In component_detail_bp, I tried to use the "bind event to option clicked" since its function normally in widget blueprint, where when I pressed the button it prints out string. But in component_detail_bp it should print hello, but its not working. Error: Blueprint Runtime Error: "Accessed None trying to read property Component_Button_Clicked". Node: Bind Event to Option Clicked Graph: EventGraph Function: Execute Ubergraph Component Details BP Blueprint: Component_Details_BP
How do you set the ref for 'component button clicked'?
What is the best way to setup an achievement system? For example I want to have collectables scattered across the map and you get an achievement when you collect all of them in a single session.
Good morning! My question for today:
Is there a way I can modify the blueprint in the image (which is spawning stars within "squares" in a 10x10 grid) so that it is using the volume of a cube placed in the world as the "volume" within which it can spawn the stars, if that makes sense? If I put an invisible cube in my world, I would like to spawn all of my stars within that cube. I'd like to get the boundaries of that cube as I have placed it in the world, then spawn all of my stars into that cube with a certain minimum distance between them being enforced. Is there a way that I can automatically create an array that is bounded by the vertices of this cube in the world, then fill it in according to a certain resolution? Thank you!
how do i change cornering stiffness in chaos vehicles through blueprints?
in customcomboboxbutton
That doesn't really answer the question. Where you attempt to create the binding, you have a ref. How is the reference set? It will be empty unless you set it.
What are the differences between Event and Function on Blueprints?
Beginner here.... Making a character blueprint for a model enemy to rotate following me and then shoot at me. I did it in class with a cube but using a low poly model doesn't want to work now. I also did it in first person in class and am doing it in third person. Do I have to have the static mesh be fully inside the capsule component? Reason I ask is that I made another enemy just follow me (AI move to) and when I scaled it up it wouldn't move at all. How would I go about making the enemy bigger and still be able to move
An event can handle latent calls (as they can only be placed in the event graph), as well as being able to handle replication.
Functions can have local variables as well has having outputs. In addition to this, functions can be considered pure which can be useful in same cases.
Yes, how do you set the ref to the relevant button?
ty:D ❤️
!
sorry I'm not sure, maybe I haven't set the ref? Those pictures was all I did
That would be the reason for your error message then. When you create an object based variable, it's just an empty box. You have to set it so it knows which object it should be pointing to. In this case your button widget.
because this is what I did, this works fine as when the button is click, it print the button name
do I have to set it in customcomboboxbutton bp?
The reason this works is because the ref you are using is what is provided by the 'create' node.
I'm trying to pass the "option name" from customcombobox to the other blueprint
owh I see
How can I get BuildingMesh from class in other blueprint?
From a class reference you can't. The thing you're wanting to get would only exist when the actor is spawned. When spawned, get a ref to it and you can get the component from it.
I did something fun for that. But it requires C++. 😄 I made a building preview actor that just copies every scene component from the original actor's CDO. Makes new instances on the building preview actor and then sets a preview material on them.
I think this is what I'm trying to do xD
I want to make it the most simple because my head hurts
There is some built in event OnSpawned or something like that?
or can I just treat EventBegin play as it?
If you don't want to delve into C++ you could always spawn the thing you want to preview somewhere in the world where the player cant see it then use the get component by class to get all the relevant static meshes and skeletal meshes to add to the preview blueprint.
That is next level big brain haha
Oh and to add, if the player confirms placement (or something along those lines) just move the building you spawned to where the preview mesh is. If not, destroy it.
Guess it get complicated when its multiplayer xD
Not really, spawning and moving actors is pretty straight forward. Generally, if its done on the server, it'll replicate to the clients.
Hmm so do Iget it right? I create 1 blueprint, component for every building mesh and then I put that actor somewhere far away, and then I can get Component by class for example BPC_MainBuilding ?
So I would end upwith 1 BP and like 20 components? 😄
Or did you mean not component, but just to get actor of class but it has to be placed somewhere?
so something like that:
Actually, you could create a blueprint that pulls the static mesh and transfrom data from a building blueprint and populates an array/map. You can then copy this data into a data table or something that can be used at runtime to get the relevant display meshes to preview.
And use enumeration to switch depending on which building class was sent?
I would use a map of a map. The main map would be a soft class ref for your building base class (im assuming you're using a base class) and the value would be a structure which would be a map where the key is a static mesh (probally soft ref again) and the value being the transform. If you want to handle skeletal meshes as well you could add an addition map to the structure where the skeletal mesh is the key and the value is the transform.
When selecting the data, it would be a case of using the building class (as a soft ref) to get the other data from it.
Hmm, maybe then in the BP_BuildingPreview I will make array with all the meshes of all buildings, create variable avaliable on spawn that will take class and based on that class I will choose the mesh and this will all happen in the BuildingPreview?
how can i reference the level blueprint?
Yes, you would need to populate the data in the editor though.
Makes sense?
Not so scalable tho when there is 40 buildings, doable but lots of copy paste work 😄
You can have a level you place all your building blueprints in and have the preview actor pull and update all the data. You just have to remember to repull when you make changes to the buildings or make new ones.
So the data would look something like this.
quick question, im trying to make a mission objective system, im following a youtube tutorial and in the video he connects the neccessary blueprint with event beginplay node, in thirdperson character, but in my case i already have a blueprint connected to the said event beginplay node( as im working on a project with multiple people) and it wont let me do 2 connections from the eventbeginplay node, no idea if yall get what im asking 😄
use a seqence node or add it to the end.
Fck. I wish I could do it with a simple reference it makes everything easier. I have project that does that but i dont know how to use this properly. He made variable of Static Mesh with struct? and that is all I need to then use that and populate it from other blueprint?
If your buildings are just a single mesh at 0,0,0 local space, that would work.
tysm got it working
Just remember though that if your building start to become separate meshes, it wouldn't scale very well.
does anyone have any good tutorials on how to create different traps?
with blueprints 🙂
Need way more requirements then that, it's so vague
wym?
You can make traps 1000 different ways and it's kinda game logic specific. So it depends
oh, well i got this old ancient egypt dungeon that im working on and id like to make few traps for the said dungeon, maybe something with destruction mesh that u walk over and it crumbles, with damagezone/spikes below
2 walls that start moving together when u enter a triggerzone and u need to run fast before they close
maybe fire/poision damage trap
I'm out of idea T_T, its not printing anything
That's much more helpful. You'll probably want to make a Blueprint Actor. You can add components to that actor, like a static mesh, maybe a chaos/destruction mesh. You can add trigger boxes for collisions with those things. Then on the collision events that call Damage Actor. Then you'll have to implement what to do with that damage.
The 2 walls moving in sounds like maybe an actor with 2 meshes, maybe have them move in with a Timeline. You can have different Damage Types too.
You should read more documentation on these concepts and start watching YouTube on introductory topics as well.
is this a widget child actor cast?
out of the object reference, try "Get Widget" and cast it
Are you calling a UserWidget from a BP? Is the reference assigned and valid? What happens when you set a breakpoint?
yup user widget customcomboboxbutton
Have you the reference to your widget yet? If so, how have you do it?
using interface?
Why not just adding your event on the code of the widget itself? Why complicate with a binding through a BP?
Binding are a way to create reusable components such as buttons. Having to create a new button widget for every button is a terrible idea.
create a parent button
because I'm using a firebase plugin for the bp, I'm not sure it this code for the plugin can be used in the widget bp
As I've mentioned, the issue is you haven't set the reference to the widget you want to bind too. Its as simple as that. Set the ref and what you had already setup will work.
got it, I'll look up about setting reference
Hey guys, I'm tryna do this tutorial from some dude to create a bullet that tracks the mouse position in a side scroller shooter but I'm having some trouble with the errors, any ideas as to why this is happening?
https://www.youtube.com/watch?v=Ov3wAkVIlZM
I'm posting for the second time cuz trying to do it within the main character BP has been a failure with me as well, with no projectile being launched
Basic tutorial on shooting a projectile at the mouse.
Works with sidescroller isometric 3d shooting and is done completely in blueprints.
in the video i believe the code is in the controller ?
i couldn't get a good view but self says mycontroller ?
I would say the error message is pretty self explanatory. You're using functions that require the player controller. As the logic is placed on an actor, you can't use 'self' and will have to connect a reference to the player controller. (most likely for the player that created the bullet)
yeah I then moved all these code to my main character and used the get player controller nodes
i don't see where you used the get player controller and plugged it in ?
that might fix the problem
its an old screenshot so thats why its not there, sorry for the confusion, i just dont have access to my laptop atm
hope that clears it
i mean i can only go by what you posted which is missing the player controller
if you have that now, idk what could be the problem because i can't see
I also work in same project as him
this is the github repository
if you guys have time
you can pull and make necesarry changes
or just look and point out the problem
i don't download things from the internet very often
but maybe someone can find the problem, but usually you post the problem and the relevant code, someone can help
Understood I can send screenshots
I dont know much about blueprints I am the 3d artist
but I can send screenshots
it doesnt shoot any projectile
well for one thing it looks like you set the velocity to 0,0,0 ?
but your saying it doesn't even spawn ?
so when do you actually call the customevent that goes into enter ?
pressing the button will open the gate, releasing will close it
but you want to call that custom event at some point to actually go through the gate
Currently having an issue with my UI. When I'm trying to click on a certain button (they all run off a similar piece of code to the one in the image), it just doesn't register. They have an On Clicked event attached to them and they're all definitely buttons. Any idea why it may not be working?
you set the velocity to 0,0,0 ?
that might have an effect on it
right after you spawn it you set the velocity to zer0s
maybe something with your maths ?
When I unload brushes using data layers it won't unload. Please enlighten me.
if I'm trying to bind values from a data table to text on a Widget...is this really the best way to do it or am I massively overlooking something?
Please
Do mouse events not work with Niagara components?
Good Morning. Hope everyone is good. I have component. Sadly I cant afford the Component timelines plugin so I am having to find a workaround. I want the player to move along a certain path by following the vector 2d locations for them. Thing is, this one bugs out sometimes, because the value sometimes never reaches close enough therefore it goes back and does the same path. Is there a better way of doing this by any chance?
(Checking if it the current location is equal to the recalculated location doesnt work without an error margin because it resets before it can reach that point)
This is replicated by the way
and its a component
How do I add values to the same Bitmask variable? without resetting it with "Set"
I have multiple local players, each one has it's own index. I want that they spawn on the Player Start Actors which have their Tag the same as the players index. So if Player with Index "0" is created, he should only spawn on the Player Start Actor with Tag "0". For some reason i get this error message, and i have no idea where the infinite loop is happening so i don't know what to fix here.
I'm so close to finish this logic prototype and I'm not sure if I'm using Loop Break right? The problem right now is, that after this preview get's ''Disabled'' after overlapping, it never goes back to green and is not printing ''Allowed'' so clearly whole branch isn't updated. Any ideas?
is placeable a variable on the bp or local ?
i would set the variable to true, then if you hit the false condition break
or vice versa
ig it should work either way but if it's not working you could try something different
Added Set boolean at the start and it started working
also I changed name because I was using this boolean in 2 places
one thing is interesting, why is Allowed not beeing printed? I can see colour changing to green, but it only prints Not Allowed when it changed color to red
is this because of break?
I think I found it, so when I try to print what object was hit, it will print Unknow when it's hitting something, but when it's on the ''ground'' it's not printing anything at all. Something is wrong with this BPC interactable
If my ''floor'' is not blueprint, then it's not going to work with actor overlapping?
hey can anyone help me with making first person vaulting like simple no animations
Hi, how can i cast to player control rig of my player? What do i need to use as "Object"?
A reference to the thing you want to cast to.
A cast is merely a type check
Your control rig should be a component on the player bp no?
You're saying "is this reference of a more specific type"
And it's either gonna say yes, which is a success, and now your ref is more specific, or it's gonna say no, which is cast failed
It is different bp
So your player character’s control rig is not on the player character?
Like i have anim bp, and there i have CR
It is anim bp
Where is the CR mister doctor ?
Wdym?
Did you add it as a component to any bp ?
I don't think so
Like i have it here
And in player i have this Anim Bp as Anim class
If you want to communicate with it, it has time be somewhere reachable
Try adding it as a component to the player char bp
Where did that bool come from
From CR
I have a bit of a doozy of a question, I want to have momentum based movement in an fps game I'm making (doing certain actions adds some speed to the player, and they keep this momentum until it decays) but I have not found a ton of help from google. I'm not great at math or physics so I'm not even sure where I would start
You should watch the pin on blueprint communication, you need to understand referencing better I think
I need to change this bool from player bp, is there a better way?
Did you add it as a component yet ?
Nope
The CR
Do i need to?
As far as I know, yeah
Yeah, i know
You left Class as None in the screenshot
Nope
Ugh ok give me a few I’ll test on mine
Okey
Ah yeah that’s looking for an object not a component. Who made these bools btw? And why are they there ?
I made it, so i just need to tell my CR from players that i have 1 thing in player hand, and i need to turn on anim
I’d prly keep that in the animBP to begin with
But I’ll look into accessing the CR just in case
Yeah, but how to trigger it from anim, it needs to detect keypress, because if i make it in player and cast every time, it will be no good
Can i make it so it will only check something on change?
Like in player, if this bool changes, it ill notify CR
A State Machine tends to do that pretty well
no it won't
Yeah, i see
I've tested but I'm not sure you can access it as an object from the ABP
you can however have branches on the forward solve of the control rig graph, idk if that helps you
way I see it, you're trying to change a bool from outside of it tho
how should I go about getting help in this discord? I've posted a few times and haven't gotten a response
Hm, btw i have this variable in ABP
Is there a way to just use it in CR from ABP
ah found it
so you don't need to cast
if you have it as a component, you get the owner, get the control rig component and then you can get and set controls
you can have a control bool for example
Can you show an example?
Just ask the question. If someone is able to help they normally will. If you don't get a response its usually because no one really knows the answer the question you're asking.
turret owner is set with try get pawn owner and cast to the actual character in my case @gray ingot
I forgot to actually type the ctrl name in the screenshot but get the jist
Ahh, i am a bit confused xD, give me a few mins
So the bool is in the CR?
What is the "Script name "
It’s a control set to bool
Ah
yes, something like set cursor location. I believe it's on the player controller.
How do i create this?
Same way you create a normal control
What is control xD
Then see second screenshot
You’re joking lol
You’re using control rig
Who made the controls
it looks like the one that comes with the template projects.
understood, I just couldn't find anything online really
I think you need to actually read the docs on control rig, seems like you’re just using it without understanding how it works 🙂
So, in my CR, i don't use Variable
Makes sense
Nope
All my game uses only my bp, i made all of em
well you didn't make that CR that's for sure 😄
I made it
It just uses the ik for legs
And i need to make it so on event, it will use ik for arm
Thats all
it kinda looks like you're using control rig without actually using control rig 😄
which kinda defeats the purpose
hey can anyone help me with making first person vaulting like simple no animations
Idk really where it used usually, i use it just to ik legs
read the docs on control rig, they're fairly decent
I have seen this use
and also what cuppa said about bp comms pin when you have time
Yeah, but i don't really want to waste time now on it, bc i have other more important things to do and i am short on time, otherwise i have just made this decision myself
Like i know i can read all docs and other stuff, but i don't think this small issue needs this much stuff, that's why i asked more knowledgeable people
I am sorry for wasting your time
You have no idea what a control is and you’re using control rig, I don’t think learning the tool you’re using is a waste of time
Not exactly sending you to learn something random
Good news! There is a work-around which allows you to see the spline updates in editor. All you have to do is move a point, then undo and redo and then the spline will update itself.
As far as I could gather that’s the only way to set a bool from outside the CR itself but I could be wrong
Yes, but also no, at this time i don't really need it, and before i have never even heard of it, so that's what i am telling you
Maybe there’s more knowledgeable people here or in #animation
It is just my first game
Yeah, okey, i just asked, ty a lot for helping, sorry for bothering with this stuff
@lunar sleet so i have figured i can do this
I already have "Gps" variable in ABP and i just use it
To pass value to CR
How do I get the number of gamepad controllers that are currently plugged in?
I can get the active players to figure that out but once I unplug a controller the value stays the same and doesnt update
nvm i got it. i found the "get all connected input devices" node
hi guys, I'm trying to get a really simple momentum system working, basically when the game receives directional input I'm trying to get it to ad a little to the max walk speed, but make sure it doesn't go over my max speed variable with the clamp, however the clamp does not currently seem to be yk, clamping cause I can still go way over
The clamp will be clamping, there's no way it cannot
you'll either be modifying that max speed somewhere, or modifying max walk speed elswehere
There's also the issue where you'll pretty much instantly max that out
since it runs once a frame
I figured out the issue but now I have a new one
the issue above was I was incrementing my start speed, but also using start speed as the minimum for the clamp
so the minimum was constantly going up
the new issue is that I want it to take speed away when not moving
with my current setup it only decreases when I hold "S"
You'll want to put something that subtracts from speed into the Tick event.
but only subtract from speed if movement has stopped
think there's a bool for it on the cmc
so this would not work?
Triggered is never calling through to that if you arent moving
No, because when you let go, that event stops being called.
you're right I didn't even think of that
I'm in school for game design rn and I've heard many times that running most things on tick is bad
is this one of the cases where it's not bad?
i like me some good tick
Everything that happens in a game, happens on the tick.
So it's not that ticking is bad, it's that doing too much stuff is bad.
And it's easy to do too much stuff if you use the tick event for most things.
you may want to avoid heavy ops on tick, but it's there to be used
Mmmhm
so just use tick for things that are necessary
Which are often things that need to change over time, like this.
you could also use a timer
I'm not sure about that, but I don't think you want to directly subtract a specific value per frame.
See that 'delta seconds' value on the Tick?
That's the time, in seconds, since the last time the Tick was called.
You almost always want to multiply values that change over time by the Delta.
So that way, when your frame-rate changes, things still happen at the right speed.
(I think your acceleration code also has this problem)
yes it probably does, that's kinda why I'm in here
you would think there would be a lot more information on the internet about how to implement momentum in games but yeah
there is not
this is kind of what I've been going off
Unreal is missing a lot of introductory tutorial material that things like Godot and Unity have in abundance.
I like unreal though, the visual coding is a lot more appealing than looking at lines of text for ages trying to figure out what's wrong
I don't know how people do it
first time visual scripting, i really like it
anyway what do you suggest I do? cause I could multiply by delta seconds or whatever you said but that doesn't change the fact that my speed is not decreasing
I believe right now it's always reporting that it's true, because your character is moving.
What kind of movement system are you building? It kind of looks like Resident Evil style tank controls?
But I'm a bit uncertain about that.
What are you trying to do here?
I have no idea what you mean by resident evil tank controls and I'm a big fan of the series lol
but I want to have a game with like building momentum and stuff, kind of like titanfall but a little more deliberate
idk if you've played titanfall but building momentum in that game can be difficult
So in the early Resident Evil games, you couldn't strafe, you could only move forward or backwards, and turn.
This was to work with the fixed cameras, because all your controls were relative to character, they could switch the camera angles around without being too disorienting.
OK, this is movement for a first person character?
correct yeah
OK, so your speed value can't be a float. It has to be a vector.
If it's a float, it means that you don't remember which direction you're moving, you just remember how fast you're moving, so if you turn - you're immediately going to moving full speed in the new direction.
so I should change all 3 of my speed variables to vectors or specific ones?
You can keep max speed as a float, and min speed should probably just be zero, so you don't need to worry about that.
You also need an acceleration vector. It's the acceleration vector that you modify with your controls, and then you accumulate the acceleration vector onto your velocity and add that to your position.
(hurray for basic calculus)
this is why I hate math
why can't there just be an "add momentum" check box that a bunch of smart individuals at unreal made for me
I think there might be!
I haven't built a basic movement system in years, sorry. I know how to do the math part, but if there's a shortcut - I don't know it.
I would guess it involves the Character Movement component.
so there's quite a few options with acceleration
from what I understand I need to have an acceleration variable, meaning I would need to set it somewhere, add that to velocity, and add that somehow, and then clamp it between miniumum speed and max speed?
Yep!
The CMC already provides acceleration
I thought so!
yeah I just don't know where to use it and why, I've messed around with it and it modifies how fast/slow you reach your max walk speed
i feel like a slow acceleration would build momentum ?
For cartoony kinds of movement like Titan Fall, you'd probably have two, or you'd scale it by a curve or something.
kind of? but not really, it's not as straight foward as you think, cause if your max speed is pretty high it takes a while to get there, and then it's extremely frustrating when you hit a wall or something
Because you want some instant acceleration, and then for it to gradually accumulate from there.
makes sense
I think they do also keep some kind of momentum scalar, because it's not real momentum, as you hold onto it when changing directions in specific movement modes - like, you don't lose momentum while wall running at shallow angles.
I can't clamp two vectors and a float apparently
there's gotta be something I'm missing
You can compare the length of a vector to a float.
That's probably not going to work.
it did not
Because you're reading the characters current acceleration and then storing the length in a float as your Max Walk Speed, which isn't what you'd want it to be anyways, because the current acceleration is not a maximum.
OK, so I opened a basic unreal project.
so not current acceleration something else
The movement system you probably want to use is 'add movement input'.
so instead of the set I have add movement input or?
If we look at a basic example, we can see how the third person character is setup.
mine is basically the same thing minus the control rotation, probably cause you can't control the camera seperately in first person
OK, so what are you doing with all your values, if you're controlling your character with the Add Movement Input node?
i'm not sure you want to use max speed like that to control momentum
Yeah, you definitely don't.
Even if you're using a scalar for some arcadey physics shenanigans later.
when I launch my project to windows 64x the rotation of main character changes. and it is different than standalone version. how can i fix it?
this is in viewport
dw about the blink stuff that's something else
then start speed is set to 865, max speed is set to 1400, that should be everything I have going on in regards to this movement stuff
OK, but do those... do... anything?
So - the character movement component already has momentum and acceleration inside of it.
(I haven't worked with this in years, I'm looking at stuff now)
they are in the clamp so it's meant to prevent the game from decreasing my speed under 865 and over 1400
i would try to set your rotations on beginplay see if that fixes it, is it always the same direction ?
i will now try
Yeah, oxi, are you setting the rotation relative to something? This might be a loading order problem, where a target or reference isn't loaded by the time the character is created.
Could be, yeah. Do you only do that once?
So does it correct itself when you get the mouse in the compiled game?
its always correct in the editor. but when I make it exe
launch it as a exe
the problem starts
it also is normal in standalone
OK, taking more of a look at the character controller, I think you probably want to look more into the character controller, how it works, its max speed values, it's acceleration values. I wouldn't immediately start forcing a minimum speed or anything. Just play around with those values and see what they do to the character.
After disconnecting all of your code.
So when you say 'the problem starts' do you mean 'the problem exists only on the first frame, but it immediately corrected when I move the mouse' or do you mean 'the problem is persistent, and the character ignores the mouse entirely' or do you mean 'the character reacts to the mouse, but in a way that is different than in the PIE'?
this is my entire first person character controller
so I have no idea what you mean
do you mean movement component?
the character reacts to the mouse, but in a way that is different than in the PIE' this
Yes, I do. Sorry.
What happens if you print out the rotation values? I imagine they might be illuminating.
I've been trying to get this working for days, I've been through the entire movement component quite a few times testing out different values. I'm sure there is a way to do it, maybe I'm not smart enough for this but knowing what individual dials do is not helping me put it together in a way that works
What would you consider to be 'working' though?
Because I believe, if you just turned the Maximum Walk Speed value on the character movement component (not your float value, the one on the component) to considerable higher than the 500 base, and set the max acceleration to considerably lower than the 1500 base, you would get a character who can build up speed, but it takes a while to do so.
So just those two values seem like they would get you really close to your goal.
there's a few issues with this I'm not sure how to solve, at base acceleration my air control value works pretty well, it's set to 0.9 which is close to full control in the air but not quite, when I significantly lower acceleration I do get a build up of speed but it also affects other things (like air control) I also plan on adding wall running and sliding and stuff that increases your speed, so I'm not sure how that would interact with that
I essentially want what this guy was able to do https://www.youtube.com/watch?v=Y5XUyhgP9M8&t=1161s&ab_channel=RaymondCripps but he doesn't really go into detail about how he did it
MERCH (available until 19 Nov): https://projectfeline.com/shop
Support these videos on Patreon: https://patreon.com/raymondcripps
PLAY THE BUILD: https://projectfeline.com
Follow on Twitch: https://twitch.tv/raymondcripps
Subreddit: https://reddit.com/r/projectfeline
So I tried building a momentum-based movement system like in Titanfall 2 and A...
Me neither, what's why I asked what you consider 'working' to be. Something like the Titanfall 2 movement system was, I'm fairly certain - very complex, with many edge cases, and fudges to decrease realism to increase control.
yeah.... how I had it working before was wall running and sliding would set your max speed to something higher and that obviously was not great
cause then as soon as you land you're back to normal walk speed
so I gutted that system
You have a scalar value on your Add Movement Input node - that scalar value could be modified based on what state the character is in.
But the big thing is - you cannot build a system like Project Feline or Titanfall 2 in an afternoon. Titanfall 2's movement system took probably a dozen people several years to perfect.
Funny enough that could maybe even work in multiplayer
it's hacky and trivially cheated
but it'd work
That's where fun stuff like skiing in tribes comes from!
I don't really get the add movement input node, the scalar value makes sense but like, it has no outputs so I don't understand how it would actually increase speed
That's where your movement inputs go to the movement component
It's a Pawn function that is directly interacting with the Character Movement component, which is talking to the physics system.
that's how the movement component knows anything about your desired movement
It is, literally, the function you were asking for.
'Go this direction, and have it mostly make sense'
Character.AddMovementInput or whatever probably just wraps "If we have a movement component, pass this vector to it"
so if I'm following I want an enum with my different movement modes, and depending on the movement mode I scale something with the input movement node?
Are custom movement modes a thing in BP yet, at least for single player?
