#blueprint
402296 messages ยท Page 811 of 403
this is the backpack
this is BP_ItemObject_Container
that is the class of the backpack and the inventorycomponent is a variable so it can pass along the backpacks inventorycomponent
like that
it is a component too
i figured as much seeing it listed in variables under the pre-made Components category.... so test backpack is an actor?
in any case, you said it was none and now it's not so..........
yeah i had a problem before where it was none
now im getting "variable not in scope"
thats what you were getting before too ๐
I used a timeline and it works great : D
Great good luck then
Hi guys, I currently have 48000 static mesh actor in my level. Will turning them into an actor blueprint (empty with tick disabled) cost any performance?
Anyone havea idea?
Are they equal?
The same mesh?
With same material?
If so swapping for ISM might grant you some performance(atleast in older than 4.25/26 where the engine does that by itself to some degree of success
So this is awkward, because I haven't run across it before, but Unreal has nothing like Unity's prefab system? I need a collection of BPs that behave like a prefab. LevelInstances or BPs don't do the trick, because actors inside of a BP are child actor components and they can't be referenced directly by another actor in the level. The same goes for BPs outside of a particular level instance.
I basically have DoorBP and two PatrolPathBP endpoints for that door to plug into a patrol system. The different BPs have references to one another ( Door needs to know of the endpoints, the endpoints need to know of the door ), and I don't want level designers to have to set those up manually every time, but rather just place what's already there for them.
could they not register to the path_manager themself ?
The problem is the inability to directly reference the child actor components or the actors in the level instance
The level designers would have the agency here, so they'd place the door in a patrol path they're making out of X in the level
but no automatic registration not a thing
No what I posted is an oversimplification of what is going on
The patrol points are BPs for designers to implement. The entire core logic runs in C++, but it's a modular system
how are child actor components broken?
It should've been that easy, instead there's child actor components .. smh
XD
Yeah but there's actually no solution, I was just asking to see if there was and I wasn't aware of it
And I don't have the time budget to make something fancy ๐
I think it's going to have to end up being child actor components. I don't use them in C++, but designers will in BP. Any other words of caution for something to watch out for?
Like problems they may run into and what to be aware of? Because they'll just be adding the various BPs as child actor components to do their thing
Are the patrolpoints staticly placed relative to the door?
just spawn actors and attach them
like what's the big deal
It needs to be usable by level designers without any fuss
and spawning actors and attaching them isn't usable by level designers without any fuss?
The part where it needs to be referenced by other actors in the level at level editing time
you can do the logic inside the actor itself
literally it's no more work than dragging in a specific actor
No I can't do that
well it's possible to do that. so I don't know what you mean by "I can't do that"
sounds more like you want to use child actor components no matter what
which is just not a good solution, short or long term
The actor won't be spawned and attached until play time, so you can't reference it during level editing
Adding some customization to this you could add offsets so they wouldnt be hardcoded like this obv.
Thanks, but I can't spawn them in.
Clearly there's some constraints I'm not getting here
Yes, sorry, but thanks for the help.
I have an exit strategy: commit & run ๐
i have 2 questions:
- is it possible to create a spline from given points? there's a node like
set spline pointswhich gets a vector array input, but as far as i can see I can't make it work - is it possible to animate spline points (moving them according to parameters) during runtime if the spline is generated in the construction script? I tried to use almost every node for the splines but i can't make it work.. i'm stuck
any help? suggestion? blueprints i can "hack" and study? thanks
Anime how?
i'm getting new locations for the points, i just want to move the points as I would do manually in the editor
basically this points array gets updated every n seconds
Dumb question but how did you add that "Spawn Patrol" button and bind it to that event? Is that possible in blueprint only? I run into similar challenge sometimes
Select the custom event , in the details panel theres a checkbox for "call in editor"
The event cannot have inputs directly tho :)
I added it to the Level Transition blueprint and it still didn't work, I must be doing something wrong, was there anything else needed to do in the functions? I really could use more in depth help on this
I created an actor in my character blueprint using add child actor component and made it follow the player.
I tried destroying the actor after a set amount of time but I didn't know how to link the destroy actor to the actor I spawned
Return Value waves at you
Hi dudes! I'm with a little problem in here Can someone help me?
I have a spaceship as character and I'm trying to spawn my projectiles correctly. So what is going wrong is that my shoots are going to the right place when I aim forward, up, and down. But my shots are not going right when i rotate or roll. Here is my code:
This comes from input event
The return value is the reference you're looking for, connect that to destroy actor
Edit: oh Squize was faster
i see, so i need to created add child component again and add destroy component to it when i want to destroy of else it will destroy it before creating it
?!
how...
is that what you got out of this ๐ฆ
Usually you save it by reference
and destroy it at desired time..
i create the actor in run character blue print and the place i destroy it is a function inside that blueprint
adding another child and destroying that will only destroy the new child, not the existing child...
oh okay i ll try it like that thank you
it does destroy but im getting errors at the end
Are you doing this on tick....
If you're flow is ... uncertain... you'd be well off using the IsValid.
Important to always know that your references are valid ๐
Is it somehow possible to accumulate and store kinetic energy into an actor to release it on a separate event? As in kicking a ball while time is paused and then resume time.
Yes
i found it why the error was happening the function was on loop so i made it destroy the actor in the same blueprint
Zelda inspired ? ๐
its working thank you
Maybe ๐
but yes, exactly the way it works in zelda
tehe was a fun mechanic
kinetic energy is just a variable..
so playerBP says "start accumulating"
๐คฏ
Ball says "Ok, im frozen in spot, and accumualte all hits for a fixed duration. Damage = Energy "
After the fixed duration it simply applies the accumulated energy multiplied with a direction vector
thanks, I'll look into it
may this be the parameter i need to enable in order to manipulate spline points at runtime? I don't understand..
Whats the issue ? Im manipulating (or adding) them at runtime just fine
how? this is my spline and its blueprint. from this point on I can't do anything. If manally add spline points in the viewport everything is fine, but i need to generate x points on the constructionscript or eventgraph whatever, and then being able to move these spline points through blueprint aswell. but i'm stuck here. i basically tried everything..
Do you want to add spline points or spline meshes?
If you want to add spline meshes aswell you need to eithe recreate them all each time a point is added, or keep track of which were created (basicly just the delta points between pre and post change of spline
the thing is even if i set a node like this no point is added..
wait a second, what are you feeding in the point input key? like the point index?
dayum! yes! got it working.. so my problem was the input key apparently..
can you explain how to update the splinemesh aswell?
and then i believe it's all!
If you're just adding one point at the time
i would like to do it for a loop
you simply just make a new mesh and set its start and end to last index -1 and last index
gotta destroy all existing components then
if you've made some
ye
i get this loooooooool
i'm almost there.. there's some issue with the start end pos, i will try to debug now
Where the heck do i even start learning this stuff where should i go for the basics
hi, can I blend two animations in blueprint?
My aim is creating a generic bp where I give as input the skeletal mesh, the idle animation and the action animation, so when I press SPACE, it plays action animation: until here everything is fine.
The problem is when action animation is over, it goes to idle with no transition and I don't like that: is there a solution? Thank you
Google, Forums, Blogs, Learn Tab, Youtube, Paid Courses, etc.
this is what I have now:
https://www.unrealengine.com/en-US/onlinelearning-course
It'll lead to the same learn.unrealengine.com, but at least you can glance through the courses before logging in to Epic account
I think you're about to be my best friend ๐๐๐
I appreciate it!
Anyone know why GetOverlappingActors will work with statics meshes but not with a Skeletal Mesh
Hey! about random generation. Is there a way to have a random variable happening in the construct when you begin to play, no need to be based on a stream seed, just noticed that the construct always generates the same random variable, while the begin play doesn't (which is what I need). I guess because the construct happens at the moment you place the actors, but wondering if there is any technique to tell to the construct, pick a different random WHEN you start playing.
skeletal meshs don't have a simple collision unless you have a physics asset
they are usually wrapped with a capsule collision for that reason
Hey Guys if i Saving Arrays of Widgets, gets the Data in the Array saved as well like Structures, ?
to save game? nothing of that will save if you reference an object
you can store structs in savegame slots, tho
but not objects
But Like when i Have Bunch of Generated Widgets, and anyone of them have an Data Information Struct with Information, And im Saving the Current Array of the Widgets, // and after im load then its like all widgets are blank
Means that i need to store everything exactly seperated like, for each Row the Structure Seperatley?
even though it looks like this in physics i still need to add a simple collision? (this is from marketplace so idk how it was setup)
because i Try to Load from Savegame slot, the Array, and than Break the Structures of Each array Item and Expose it to the Widgets, but looks like all are Blank
yea that is a physics asset, you may need to adjust some settings so that it generates events in the physics tab
but i'm not so familiar with this, so i cant give a 100% working solution
aight all good thanks for the help though
you know when you make a new node by dragging from the output pin - is there any way to set it so that you just click once to create, and then click again to place?
@short bramble In Blueprint, there are two basic events to set up an actor. Construct and Beginplay. Construct runs when the actor is placed in the level or when spawned. If an actor is placed in the level, Construct will not run again, ever. Beginplay on the other hand will run again at game start, and also more times through the game if it is multiplayer. So if you need something to happen at game start and not just in editor, put it on Beginplay. If you need it to happen in both for design purposes, put it in a function and call it both on Construct and Beginplay.
SO how u would Save like an Array of Widgets, where are Structs stored in it? , New to that Save/Load thingy
Save as in SaveGame?
Yes But How
You don't. You don't do that for any object. You save state you need and restore the object to where you need it to be after load.
I saved now the Array itself, and hoped that it have the Variables of the Widgets already saved, but they are all Default
You definitely should not be doing that with UI. UI should not have any gameplay state.
Well its more like its an Comment WIndows like if u press + u create more little Windows for Comments etc, thats why directly in UI,
Even if your game is 100% UI. You should still have manager objects that the UI displays data from and interacts with.
that means i should Use Manager, BPS; and there the Vars would stored?
I'm using fullscreen in my game, but when I change the graphics, it exits from fullscreen. help me
https://cdn.discordapp.com/attachments/915658037384081438/932985497406541854/bandicam_2022-01-18_16-39-13-213.mp4
Oh, I really like the last idea. Because actually that was my point, I needed the debug both in editor and run the same script in begin play, a function used twice I guess will work ๐ Thanks!
Random useless fact. You used to be able to spawn actors from the Construction Script by dropping the Spawn Actor node into a function. They have since removed that cheaty workaround. ๐
Yeah, I'm digging into randomization / seed / spawning vs persistent issues. Def some headaches.
hi everyone! i'm new to blueprints and trying to figure out how to switch between paths depending on the items enum value
i have a lives value and a fish value im trying to switch between depending on which one the character picks up but it seems to think everything is lives no matter what even though the item type is set to fish
im thinking i have to set the enum value somewhere in a blueprint to call from but i'm really lost at the moment if anyone has any time to help me out i'd really appreciate it ๐
This might be easier to reply to with gaming context. What is this function intended to be applied towards?
basically the character picks up a fish, it adds +1 to the fish value and updates it on the screen, they pick up a life it adds +1 to the life value and updates that one instead
Where is this code living currently?
so the pick up code is in my third person character, but i have a master pickup blueprint that just references the pick up event and destroys the item
but thats the one that lets me set the item type too
In this case. The Pickup Parent class should have the enum as a default. Set that to the correct value on the Fish and Health. Use that to pass that value through to the character's function when you call it.
you should pass the enum from your pickup to your character so that your character knows what he is picking.
Character shouldn't have the enum as a property.
ohhhh so instead of having it as a variable in the character bp reference it from the pickup bp?
Well, you don't have to reference the pickup. The pickup can call the same function on the character if you just make the enum a parameter in the function.
the pickup is the one that knows what item should be
so the variable can be in your pickup and when you call character pickup function, pickup tells character what item it is
oh ok that's making a lot more sense, i'll give it a go thank you guys ๐
Hey, a quick question. Why doesn't my actor's parent class's BeginPlay and Tick function work?
All blueprint?
Yes
Is it is set up properly?
omggg
LMFAOOO
ok now it should work
thanks i completelty forgot abourt that
i knew i was doing something wrong
Blueprint Beginplay is a BIE. BlueprintImplementableEvent. It completely overrides the parent's logic unless you call it like DSA pointed out.
thanks thanks thanks ๐ค
I have this ShootWeapon function which gets called by a timer and a macro to prevent players from spam-clicking shoot to prevent the fire rate. The issue is that when you press and hold the shoot button during the cooldown, it doesn't start shooting after the fire rate cooldown is over.
Any idea how I can get around this?
hm you can use 2 timer
1 for automatedfire (looped), 1 for recoil (not looped)
then you check if your recoil timer is active or not, before you shoot
For recoil?
To solve the shooting issues, you just need to handle your input. On pressed, run an initial check.
If there is no timer running, start one for the next shot and fire immediately.
If there is a timer, get it's time remaining, if it is NearlyZero = true, clear and invalidate the timer, fire and start a new timer.
If neither of the others are true, just get the timer's remaining time, clear and invalidate the timer and start a new timer with the remaining time of the last timer.
Timer should not be looped.
Timer finishing should check if input is pressed, if pressed, fire and start a new timer, if not pressed, clear the timer.
Hm, if I can't find any other solutions then I'll give the additional timer a go
my "init" event in the game instance BP is not being called, i have changed the game instance class to the correct one in the project settings, any ideas?
nvm, i went into the settings panel, changed to the old one and then back to mine and it worked
or that yeah, it really depends how you want your firearm to behave, if you need variable firerate on the run you dont want to loop the timers.
just unreal being unreal lol
That did the job, thanks
im trying to save widgets into a save game instance, is this even possible?
from what i've tested it looks like u can save them, but i cant seem to find a way to add them to the screen after loading...
save game? i think when you load back the save game, the reference will be null.
usually you dont want object reference in save games
I've a little question, I'm trying to set up a UI where a player can change the settings of the camera, and I see that the event and make post process actually firing, but even though the spawned object's camera is set to apply, nothing actually changes on the camera. Has anyone done something like this that could help me?
u are correct, i had not even noticed those were refs, so i guess i am screwd and i have to remake it all by hand...
you can make a struct containing all the important information that you can obtain from your widgets before closing
then reconstruct the widget with the struct
ye thats what i was thinking, the thing is, these widgets are not just some simple widgets, they all have a children and parents and a bunch of stuff that connects them, its a bit of a mess lol
its gonna be a pain
however, usually important information wont be in widgets ๐ค what are they?
have you ensured its the correct camera and the blend weight is on 1.0? ๐ค
Yup this is the camera object that is spawned! I have it that when we enter photo mode, I spawn this camera bp and we take over it
This is a better view of the blueprint
try turning the scalability settings around and see
it was on epic and tried each setting to medium and nothing happened
you need to adjust a little more settings i think
I'm seeing that I can apply the affect manually to the first person camera, but the one I spawn doesnt update so maybe I have that actor bp set up wrong_
I click on the first person character, I see a little preview which can change post process settings, but the one I spawn theres no preview and no update to settings
I fixed it! my new camera had auto activate turned off!
thanks for the help!
Any idea how I could approach making a rythm game similar to games like muse dash
I'm still kinda new to Unreal
But idk how to design a system for rythm and beats
Hello everyone ! I'm having this really annoying problem where when i spawn a set of stairs on my level, it spawns z = 25 higher than it should
my pivot point is on the first step, and i place my actor like so :
its moving the pivot to the second step when placed :/
is there a way to make sharp turns turn more quickly for a character controller? I wanted to slow down the turn speed to make it easier to maneuver around, but it makes it so that if you do like an 180 degree turn it looks a bit awkward, so is there a way to increase the turn speed if the direction the player inputs is like a certain degree higher than specified?
When player 1 possess player 2 is there a way to let player 1 use all of his functionalities?
How do I get all children of a box (horizontal or vertical) and change the background of all the buttons(children of the box)?
Player1 Cannot Possess Player2. Player1 can possess a character. And if that's what you meant, then it depends on how you set up the functionalities for the character.
Let say player has hot bars and can equip tools and weapons
Call GetAllChildren on the HorizontalBox.
After player 1 possessing a character, you can use references to pass info. Is there any other way?
I heard that casting is bad on resources, is there another way to do it without casting?
Use interface
Tell whoever told you that to give you an explanation on why it's bad. If they don't start with how the Unreal Garbage Collection and asset loading works, don't listen to them.
And do not use Interfaces to avoid casting.
To try to put it briefly, all that a cast does is change a pointer type. The worry with Unreal on top of that is that Unreal always creates a default instance of every class as a template in memory. When you cast or even just have a pointer to that type in the properties list Unreal has the class loaded in the background when something casts to something else. So in this exact case, you have a UserWidget with a UButton in it. You can cast to Button litterally 10k times on tick, and you're not going to see a single change because Unreal already loaded that default button object into the background. What you try to avoid casting to in a lot of places are heavy assets like characters that have a ton of meshes and materials preset.
@maiden wadi any suggestions
There are some settings in the CMC for avoiding allowing walking off of ledges, but invisible walls is a much safer bet.
alright, thanks
This is a difficult question, because there are a lot of nuances as far networking is concerned. At first, I would say simply have the abilities in the Character. Then no matter who is possessing it, they'll be able to populate the same UI the same and be able to use them based on possession. If this is like a way for one player to take over another player's character temporarily, you can keep pointers in like the controller for who "Owns" which actual character despite possession. Which would allow you to revert the possession so that each controller correctly repossesses the correct pawn.
There is an Owner variable, but that'll be set to whoever possesses the pawn, so you'll need another owner variable in the controller to use for your own purposes.
Do you have any vids or example of this implementation
I have what I hope is a very basic question about inheritance: If I have a C++ class of Fuu and I make a BP of that class and add functionality, then make a C++ subclass of KungFuu -> and make a BP of that class - is the BP functionality of Fuu inherited in BP_KungFuu?
Cpp can not inherit from BP classes. It's one way only
That's limiting - thanks for the answer
Does anybody have experienced issues with Collision Presets in 4.27?
I got a new Channel called Projectile -> which is set to Overlap, and its collision presets are Ignore All but "Pawns, World Dynamic and World Static", but when the projectile goes through a Wall (which is a simple Cube) it doesn't trigger the OnBeginOverlap.
what is the cube's collision?
is it possible to press a key for an action in blueprints without editing key mapping in project settings?
there are events exposed for all keyboard keys etc.
there's also the AnyKey event which you can filter all keystrokes on
Hey ! Does anyone knows a way to input a float ( Temperature in Kelvin ) and obtain an RGB or color output ?
Lerp(Color)?
I'm trying to set the temperature of a light using a slider
can you not access it from widgets?
generally inputs are on the player controller or character
ah, gotcha, thanks
I can try that but I'm pretty sure it's not the way it works irl
you can lerp other lerps
otherwise you may need a LUT or something like that
I'd look online, people have probably had the same problem before
FLinearColor FLinearColor::MakeFromColorTemperature( float Temp )
{
Temp = FMath::Clamp( Temp, 1000.0f, 15000.0f );
// Approximate Planckian locus in CIE 1960 UCS
float u = ( 0.860117757f + 1.54118254e-4f * Temp + 1.28641212e-7f * Temp*Temp ) / ( 1.0f + 8.42420235e-4f * Temp + 7.08145163e-7f * Temp*Temp );
float v = ( 0.317398726f + 4.22806245e-5f * Temp + 4.20481691e-8f * Temp*Temp ) / ( 1.0f - 2.89741816e-5f * Temp + 1.61456053e-7f * Temp*Temp );
float x = 3.0f * u / ( 2.0f * u - 8.0f * v + 4.0f );
float y = 2.0f * v / ( 2.0f * u - 8.0f * v + 4.0f );
float z = 1.0f - x - y;
float Y = 1.0f;
float X = Y/y * x;
float Z = Y/y * z;
// XYZ to RGB with BT.709 primaries
float R = 3.2404542f * X + -1.5371385f * Y + -0.4985314f * Z;
float G = -0.9692660f * X + 1.8760108f * Y + 0.0415560f * Z;
float B = 0.0556434f * X + -0.2040259f * Y + 1.0572252f * Z;
return FLinearColor(R,G,B);
}```
@bold phoenix the UE4 implementation
@odd ember that was it, the cube didn't had the generate overlap collision
Yeah this looks great, thanks a lot ! I'll also try the lerp but your second solution might be better
Hey, can somebody help me understand this?
In an Actor Server-side only I do:
GetGameState -> Cast to MY_GameState -> Get PlayerArray > Get Random -> Cast to MY_PlayerState
- Toggle boolean variable
- Print player name
But variable and player name doesn't match
Each blue line coming off of your cast is calling that random node again. You need to temporarily store the random selection in a variable and use that instead.
I've seen both online and was curious... For this, when attacking, do I need to have both the client execute everything while calling the server to execute everything? Or can I just tell the server to do it since it's replicating anyways? I've noticed that it works if I just call the custom event from the inputaction attack and all clients and server see the attack and animation play.
aaaaah, thank you, now it makes sense
Is there pro's and con's to have client and custom event to server running the desired effect? Or is it best just to trigger the event.
@unreal tusk Someone posted this a few days ago, maybe it's helpful to you ๐
You could just run it only on server, but in a real-world scenario you're going to have some form of lag, and the client pressing the attack input may not receive decent feedback.
there's an entire channel for this #multiplayer
Thanks fellas. Much appreciated โค๏ธ
that's for arrays. what you have there is a map
yep
it's a different data structure... you can't assume everything works the same
obv not haha
there's cases where a map is is relevant and there are cases when an array is relevant
beneath the hood they're wildly different
Just out of curiosity, are you trying to get a random element out of the map?
you'd fix it in your animation software
nope just trying to get the actor so i can access its things
why use a map then
Unless you always wanna use the "index" to find the ref, if so you wanna swap key and value in the TMap (?)
๐ค
Yeah.. but how .-.?
that's a good question... for someone who can help you with animation
#animation ? ๐
Hey guys. I'm working on my Aim Offset, and I have my max/min pitch values in my Player Camera Manager class set to 60/-60 respectively. This works fine while standing, but it looks horrible while crouching because the character bends to far down and the rifle goes right through the ground. When I switched the min pitch to -30, it looked good for crouching, but not for standing because the player can look lower than -30 degrees.
So I'm looking for some suggestions or tips on how I can change the min pitch value to -30 while crouching and back to -60 while standing. How were you guy's able to resolve similar cases like this?
a select node perhaps?
is there a way to set the location of a mesh section created by the procedural mesh component?
basically I need the sections to have independent locations
Hello, I plan on having an actor be a sort of Plot manager where it spawns in actors in an array in game and when the player purchases them, they can them place things on it.
Now I saw a video on creating something similar to this where on BeginPlay he runs a functions that has a for loop that spawns the grid for however big he wanted it to be. Is this a safe thing to do in terms of having this grid manager?
sounds reasonable
safe how?
Ok, just didn't know if having the actor doing this each time was safe. Thanks.
Yeah that can work. Thanks
Architecturally, what's the right place for per-level events that need to be responded to? For example, if I wanted a tutorial message to pop the first time the player discovers a certain type of item, but not when they find subsequent instances of it.
level blueprint
alternatively inside the tutorial actor itself
Is there a better way to do this event than to have a delegate on everything that might be needed for level events, and making the level BP bind to ALL of them?
if you use an actor, then you can reuse it for whatever level since its not locked in the level bp. bp communication can be done from cast references, dispatchers, or bpi - all depends on usage
Do you guys use Quixel's megascans, I read some articles which said that it is too big(in terms of size)?
You could have a data table with a list of objects, and if they've been found or not
Then store that in some actor, and modify as needed
A global event system here would be neat, when an item is interacted with, fire off a global even that your actor is listening to
i dont use them, but i hear that they are, like 8k, but you can always reduce file size without much hassle. up ressing is a hassle though.
events bind automatically in the level blueprint
That's true but creating that list is non-trivial if there are many of these objects. Plus not all events I want to respond to are "found object of type" some are like "dropped below 50% hp for first time"
Then if your DT already has that object as discovered, then don't do anything
Tell me more
if you put a delegate in your actor class you can literally use that in the level blueprint without hookup
just select the actor and right click inside the level blueprint and Add Event
try #graphics
isn't that possible to do automatically with something like the Data Asset Manager?
use the level BP if you have level unique events
Quite a few ways to architect it. I guess it depends on the rest of your architecture a bit more
this also works for stuff like if you have a button and you'd like to hook it up to another actor etc.
level unique events go inside the level BP. anything else you're creating systemic elements for one time use
This is super cool but the only problem is that, unless I'm reading this wrong, I'd have to do it for every single actor of this type
so if it's systemic do it inside the actor itself
doesn't really sound level unique, since he wants notifications/awards when something is discovered for the first time
I'd imagine, like most games, you'd want that list of achievements to be consistent across all levels
Just make one parent actor that does this, and all children will automatically do it
something like BP_BaseItem
then all actual items are children of that BP_BaseItem
Then the question becomes how do I prevent this from happening in levels other than the first
keep track of it
Game instance sounds like exactly what I need, how do I edit that?
game instance, a subsystem, a manager class
it will work until the player closes the game
Probably game slot saves
Works for me, saving isn't in-scope for this demo anyways
probably dont want the same tutorial coming up the next time they open the game
yeah but those are two different systems
you can do game instance if you want, but then you'd be tearing that all down for save slots later
Sounds like I need to figure out how to save shit! Appreciate the help
and load it back up ๐
whenever te player is inside i want it to start the event tick. I can just plug a branch in event tick and then whenerv the player is inside it will do the code but i dont want it to do unnecessary checks if the player is not inside. So like if the boolean is false i dont want it to keep "sweeping" i inly want it to start sweeping when the boolean is true is there a way of doing this?
wait i think i know a way, maybe a while loop will work
Hey there, I need help with a simple thing, I wanted to make a simple weapon pickup for my game, I set up only one array with N slots, the slots where you had no weapon would have an actor plugged called "Empty Slot" and the weapon swapping mechanic would ignore those and look for the first available slot in the verse of switching, I made this instead of having 2 arrays and all weapons attached to the player characters because of flexibility: Various campaigns in my game will have different types of weapons and I can't just make a big ass array containing 50 weapons only to use 10 of them at a time. This system is working perfectly, but it's the pickup that doesn't, as you can see, I am spawning a weapon actor when the player picks up the weapon, then I add the weapon to the array at the given slot and attach the weapon to the Grip point, but there's a problem, there's no way of changing the visibility of the actor, whenever the set visibility node is fired the weapon stays always visible no matter what, causing some issues as you can see, so, is there a way I can fix this and make this actor invisible when I need to?
I probably explained it in the worst possible way
I have also tried setting it as hidden, it does not work, any other way to add the weapon to the array results in errors cause the weapon component is pending kill
Are maps serializable in UE? More generally, if I have a data class that isn't serializable in a savegame, at what point does it yell at me?
@feral ice
why are you going to do once after the chcking is fplayer is inside function?
why not just return node?
thats bc it lags and sometimes checks that im inside 3 times so just for "safety"
and maybe pop a delay on that timer too
on tick?
if ever I put anything on tick I am very careful
I see loads recommending it
delays to not prevent other actions, just the ones on the delay
lol, good to know
one things for sure
even a 0.05 can make a game feel laggy
so why are delays on a tick a big no no when many think it;s a good idea?
is it possible to set a jump height for the player character?
in the CMC i think
I will look into that tick and delay thing for sure
thansk for the heads up
lol
I didn't mean to refute you
so it makes more sense to me, lol
but yeah, I will remember timers
Help me?
im feeling like a child trying to understnad einsteins relativity theory. But why doesnt it work? Like
doesnt it work the same as in c++
int x = 1
while(x){
...
}
oh ok i havnt learned abnout threads yet
ok. But how do i fix it you are suggesting a delay?
ok i dont quiet understand but wont event tick work. Like branch and check if player is inside?
bro you should grind you attitude no need to be a smartass
mate
G
general practitioner?
it's 2140, every use of "sir" is just "bruv" by then
48 75 6D 61 6E 0A
hey yall, quick noob question
when spawning an actor via Spawn AIFrom Class what's the best practice for initializing variables in that class?
For example, the Actor has a var for "team". I'm currently doing something like in the attached image
GetGameMode
You can make those variables expose on spawn / instance editable, then on your spawn node it'll allow you to directly feed them into the actor rather than having to do a bunch of sets.
create an input for it
Getting the controller is part of the labor-saving I want to do in the macro
This make sense, but I'm not seeing where I set those on the spawn node
I double checked and made sure that the vars im trying to set on the Actor are exposed/editable
Thanks for the help so far
Refresh the spawn node.
Just tried it, still seems to be the same:
Compile the blueprint of the Minion, then refresh the node.
ohwait
Doesn't work with Spawn AI from class it seems
it's just a matter of what your macro library inherits from, also if you create a macro library that inherits from (lets say) playercontroller you can call all the functions that are on playercontroller and anything playercontroller inherits from; but you can't use the macro library outside of the playercontroller's blueprint (or children of playercontroller)
Gotcha, yeah I see the fields exposed when using SpawnActor - are there any difference between those nodes?
The Spawn AI from Class I believe automatically assigns an AI Controller and starts the behaviour tree.
I'm looking to .. lock a player's view on another actor so that when the actor moves, the player is dragged along with it. I am debating between set view target and attach actor to actor. Not sure if there's a third option I haven't thought of but I'm open to ideas
maybe you could do a look at rotation on tick/timeline/timer
Hmm, well, I care less about the rotation than I do the location. I am using a "find look at rotation" to make the player look at the actor to begin with. But then when the actor moves, I wanna make sure the player's camera stays on it
And I don't just mean turns to stay on it, I mean moves with it
actor moves forward, need player to move forward as well
my mistake, I thought you meant a function library
I don't think you can do that for a macro library, it might be too specific
oh like how a spring arm works?
fuck off
Yeah, exactly. And I know I could add a spring arm to the actor with a camera and use that as a new view target for the player (which very well might be the best approach). But .. it's gonna be weird. Because when I set it as a new view target, the player's view will rotate in yaw to get to the camera. I would much rather the camera didn't rotate in that way at all.
The player is basically just a floating camera by default (think RTS style) and can rotate in pitch and yaw. But I want to have them "focus" on actors, the idea being that their camera would turn towards the actor and "zoom" in to put them in focus.
I know if I use a spring arm with a camera on the end, the spring arm could be at any rotation when the player focuses on it. I feel like I'm typing a lot but not properly conveying what I want to
not you conrad, lol
careful, swearing will get you banned as well
damn spammers
๐ค
really, I have done it tons of times
I don't know any devs that do not swear
at all
we all do, just not in chat
just like real life ... nooooooooooooot
Just try to keep the swearing down to a minimum, there are a ton of younger people here too
I still don't even know where it was directed
I also like the draw a distinction between swearing and swearing at someone.
ah
honestly, I was shocked that mods where here so quickly, lol
next time I will hold the trigger a lil ๐
report them to a mod instead
Just @ the mods if you see it
^ yep
I was perma banned from a 3d modelling discord recently for simply using the word nitro, lol
yep
but you are NOT allowed to get cracky at spammers, lol
but seriously mods, your frustration should be aimed at spammers, not those whom react to them
it's in the rules to be cordial
channel topics are at the top of the discord window
so please and thank you
I'm not mad at anyone or anything, me saying to keep swearing down to a minimum was just a friendly reminder
I was near the line but with reason
I was not the problem, the spammer was
I know blue, your good bud
but sometimes ...
don't ya just wanna vent? lol
this is not the place
omg, let it go
same
oh ffs, lets just move on
I already had ... he is the one that keeps digging
always someone elses fault innit
again?
Cool, then in that case
I'm trying to create a procedural floor for hexagonal tiles, but I can only get two lines to line up - What am I missing to have the 3rd row onwards snap on?
always someone elses fault innit
Real questions time. How is it that this map is empty the SECOND time this function macro gets called
just going by this the cast fails
for whatever reason
I am feeding a vector like 800, 0, 800 into the Launch Velocity pin of a Launch Character node in my character controller BP, but instead of being launched 800 units on the global x axis, I am being launched 800 units on the axis that my character is facing away from - that is, backwards, depending on whichever direction the skeletal mesh is facing. Am I doing something wrong? Do I need to transform?
check with an impure cast node
Here's how it looks with a spring arm and Set View Target. I don't want it to circle around the actor, I just want it to approach the actor and stop at a set distance.
I can't just make sure the spring arm is in the right spot all the time because this is multiplayer and it won't be correct for everyone
I could calculate a location to zoom to, maybe enable camera lag so when the player teleports it looks a bit smoother. But it still doesn't help me "lock" the view to the actor when it moves. Attach Actor to Actor causes some weird behavior when the actor turns
generally though I would also say that I don't recommend macros. there are better ways of handling this type of code
This doesn't print.
Are there? The main thing I wanna avoid is that massive dereference stack at the start
I was encouraged never to use delays earlier too, lol
macros aren't bad per se, but they are meant to be very generic
so like a loop is a good example of a macro that works, because it can be used everywhere
I will see if I can find a pros and cons of them later
I have a tiny macro ... only one in my project
whereas if you start putting variables into them, you're basically trying to make a function for something that isn't meant to be a function
I mean, the variables aren't IN the macro, those local vars are just to clean up the code
is this a safe one @odd ember ?
that's a pretty good macro usage
define "safe"
lol, I don't know ... am too noob
can you comment or deactivate blueprints? for debugging?
yeah
I think CE has something against macros
but I am a huge fan of avoiding future technical debt
and I mean huuuuuuuuuuuuuuuuge
lol
I've gotten some REAL mileage with function macros like this
tech debt is relevant at an architecture level. but macros can factor into that as well if they aren't generic enough
anything I do now that might cause a total hassle in the future makes my head spin
for instance you'll have tech debt for that macro if at some point you'll have more movement modes than the ones listed
๐
every time you add another movement mode, you'll have to add it in the macro as well
that's double work
oooh fair point
yeah I use function libraries
I just very rarely use macros
outside of what is available out of the box
Oh, this is all in a function library
I switched to functions when I couldn't get the ref I need
I see, fair
oh, I made a boo boo
I have my cam tilting when sliding but it won't tilt back, lol
going back to this, I guess it fails to save then? I don't know if you're trying this pre and post save?
show code?
No this is the same instance, doing it twice immediately after the other
strange
so what I would do in this situation is use an alpha value (0..1) for the curve, and hook it into a lerp
I am so not used to lerps, lol
Hey guys quick question. I'm trying to set up some basic interactions between my player character and interactables in the game world. I want my character to pause for a set duration (let's say 3 seconds) while interacting with said item. How would I do that? I know how to set up timelines and delays, but not how to stall my character.
well basically it lets you choose two points and switch between them, with linear values inbetween
so you can do 0 roll for normal mode, then -15 (or whatever) roll for your slide
well, I just learned how to shake my screen by accident ๐
and the lerp handles the transition with the curve you make
and not use the time loop?
so you can make a curve that starts at 0, is 1 at the half way point, then goes back to 0
that way your roll value stays consistent
yeah, I get lerps in materials but not in other code for some reason, lol
aaaaaaaaaaaah
still using the time loop?
use SetMovementMode set to none
tyvm!
you mean timeline?
getting confused with the mention of time loops
too much groundhog day
yeah so inside your timeline you have a curve
if you set it to go between 0 and 1 you can use the timeline value with a lerp
how do you mean?
this bit
my very first time in this interface
well the lerp is just a node
so if you look for Lerp (float)
and hook the alpha value of the lerp into your timeline float
for A and B specify the roll in degrees
cool
then inside your timeline, make a curve that goes from 0 to 1 then back to 0
Hey guys, I'm trying to create a hex grid using Construct Script - I'm able to get the first two sets of tiles in line, but between each 2 tiles I've got a gap, what am I missing?
thanks
Because you're adding something to Stage Map which doesn't populate back to the "Event Stage Table" which every time the function executes, you're pulling from.
Wait lmao I'm fine
my guess is your modulo select node fails
ah okay
My X offset was wrong
enjoy your beehive ๐
So we have a Enum that holds properties that each block could have applied to it and it could have multiple properties from that Enum. So we have the Enum set to bitmask so this is possible. We then have a struct that we want to attach to a DataTable and we have hit the snag of "You can't use a bitmask Enum in a struct" bummer.
So the question is, is it better to just use an integer field in the struct that we have to manually key in the expected integer value or is there a better way to do it? I thought an array of the Enums values and then loop through those and run them through the make bitmask to see if the values are a match. However my Co-Developer and myself come from languages where Arrays and loops combined can be costly to system performance.
So the question is what is the best way to deal with the bitmask in a struct to use in a data table for processing in the blueprint.
how often are you planning to iterate over this array?
Hey uh :o
I've made a sequencer track that moves my camera into a portal.
In preview it's fine but it looks different once I hit play. it stops way above the portal and isn't completly centered. What could be the cause for that?
sounds like #cinematics
what do I need to do to get a random number for each instance of a blueprint?
like a different random number?
yeah for each instance
random seeding I guess?
there's also RandomFloatInRange
so you don't need to clamp your float
how do i do random seeding? and okay ill get that node, thanks
doesn't random float only return a random number between 0 and 1 ? in this case it would always be 10000
basically if you look under random you get a bunch of options
But that does not happen :o
no, random still goes between anything you add to it for that, just double checked
@fair magnet
it's all there
TY ill read up
Likely everytime they interact with a block in the environment
how often is that? though I'd take Lorash's advice in this case
How is it supposed to know the values ? o.o They won't magically appear in that function lol
Think minecraft so basically everytime they dig or hit something or interact with it to get its properties
It returns a random float from the range I specify
if you use Random float in range yes... :o
Oh you meant by istelf, lemme test that too
// FP32 mantissa can only represent 24 bits before losing precision```
this is why
oof
As it stands, your code right now for generating a random number will always generate 10000 on the output as your clamp is taking whatever value between 0-1 was generated and since it is lower than 10000, sets it to 10000. That means every instance would also be 10000.
What node you want to use is "Random Float In Range" which allows you to define the values between which you want to generate. Every instance with this node will have it's own value generated.
๐
.
Hypothetically speaking for a friend. If you deleted your skeleton are you fucked? 
Just tell your friend to roll back to the last commit in their source control, which they totally have set up right?
lol
I think you would probably turn into a mush of fat and muscle
Umm i think my friend is an idiot and didnt do that let me check haha
Its generating random numbers for each instance now, but i have to find a way to get it to spit out negative numbers now too.
set the range to be negative too
oh yeah he did not do that haha
Worst case scenario is that you have to reimport the skeleton skelmesh FBX and make sure the references are still intact, so you're not D.O.N.E. fucked.
Fuck his life 
Yeah its the ue4 skeleton
How does one reattach it is the real question lol
bc it broke the blend spaces and everything
How do I set it to be negative without going between numbers? Example 1000 to 5000 and -1000 to -5000 but not -999 to 999
going to try this
ty, i like that XD
Is it possible to create connections between blueprints that are "Remote"?
like a wireless connection?
Something like this?
Blueprint Interfaces.
A global event system is another way
is sphereTraceByChannel function just a raycast?
Just to be sure, the pins are connected like normal. But to avoid the spaghetti of wires going all over the place, it'll be nice to just have a "toggle" to make it "Wireless".
Hahaha no
It'll be the worst visual scripting if the nodes are wireless
Another question to ask, are Multiline Editable Textboxes not bindable?
If all you want is not to deal with cable management, either do your thing in C++ or any other typed scripting language.
There will still be spaghettis, but at least it's not in your face
I think what you're looking for is #cpp
everything is wireless there
Look into functions, macros and custom events. There's plenty of ways to reduce spaghetti in your BPs
I think they did add "wireless" nodes in ue5 so that is possible afaik, but it kinda defeats the point of the visual scripting
Or asset loading
I have a timer that I want to loop for n seconds. How do I determine if n seconds has passed? I know there's a GetTimerElapsedTimeByHandle that returns a float but I don't know what to compare this against.
Bind an event or use a delegate that gets called every n seconds?
I'm having an issue with multiple Input Actions mapped to the same button. I have input actions for 'glide' and 'jump' both mapped to 'space'. In the base BP, input action 'jump' is triggering the jump in CMC as normal, in my child BP I have the Inputaction 'glide' to do the gliding stuff, so space jumps when on ground and glides when in air, fine.
Weird part is on my team mates project its not fine, it seems like the jump input overrides the glide input. Does anyone know what is the intended behavior? Any idea of what could be different between our projects?
Does anyone know how to change the gravity of an object independent of other objects? (without using tick)
Check these values in the input event details
Seems to me you want both Consume Input and Override Parent Binding false?
Maybe i'm wrong about override parent
hmmm.. Thanks for the pointer! I was unaware of that. However it should be the same in both our projects...
Hey guys,i've added some basic code before the finessesses for firing and fixing some animation problems during the firing,but i've spotted something strange.Whenever i fire my weapon and try with making a check if it hits something,it prints the name of the weapon bp.Here is a video of the problem and screenshot from the code im using for the fire.Can somebody tell me what can be?
your line trace is hitting the wepon, turn off camera collision on the weapon skeletal mesh (set visibility to ignore)
SetTimerByEvent
The return value is the timer handle which can be stored in a variable and can be used to check the elapsed time of the timer using the GetTimerElapsedTimeByHandle node.
If you want to just know an elapsed time since you started the timer, you would just start up that timer with whatever expected duration (or even a huge one if you want it running indefinitely), and then check the handle's elapsed time.
it's already set to ignore as i see there
Weirdly basic question for me, I just noticed "GetAllActorsofClassWithTag" exists... how do I assign tags to actors?
in detail panel there should be a field to type tag in
Sweet, found it. Thanks!
are you sure that's for the gun skeletal mesh?
yes
then you're doing something else wrong. take a screenshot of the whole window please
whatever object you have selected is set to NoCollision, so no collision should work, line traces should ignore it completely
Wait,i've fixed the problem by a mistake
basically the problem was the weapon struct
i will send you 2 ss to explain because im speechless currently.
the second ss is the fix,i really don't know how it fixed
this construct is in the weapon class
btw thank you for trying to help me.I really appreciate it.
๐
so im making a mod for a game and they stripped listen out of it, i cant use plugins and i cant use any c++ would there be any alternative to listen?
Listen?
do u know what listen is?
bruh
There is a node called SetMembersIn(StructName)
It looks like you need this 
like open levelname?listen
What you're asking for is really cryptic
If you wanna test in Editor you can just use the Play options for it, if not Dedicated
Not a mod support channel, so whatever the devs did with their devkit that they distributed, gotta ask them
ok ig
so i have an odd question, just in general terms nothing specific, how could i recreate the dive move in a hat in time to where you slide along the floor, rather than just stopping when you hit the ground
ideally you could slide down hills and such too
i have the dive, just can't figure out the sliding bit for it
Play with Fiction and Deceleration of the CMC and if you want it to behave differently based on the Ground Type look into Physical Materials
how could i get you to move faster down higher inclines? like if i dive and slide down a hill, how would i pick up the momentum of the slope
Hi, I need some help with splines. Can anyone help me out a bit?
I need to get the actors that overlap with my spline. I'm having issues with it..
You could LineTrace and check the Normal Impact Point for the Angle and dynamically have the values change based on that
Never did it myself so just theory
aight, i'll give it a shot, thanks
That way it always checks for an Angle and if it's too steep you could automatically trigger a slide too
Instead of falling stiffly
So basically a forced slide
i will take a look on it-thanks๐
i've fixed it already
try and get a SetMemberIn(TheNameOfWeaponStructure)
yea ik
then if you click on that Set members node
in the details panel
you can change which value of the structure you are setting
i will give it a try-thanks again๐ 

Hi, I need some help with splines. Can anyone help me out a bit?
I need to get the actors that overlap with my spline. I'm having issues with it.. ๐
Here's a (probably dumb) idea, you could add sphere colliders along the spline and set them to overlap with your actor class, and when the actor class overlaps a sphere, add them to a list. Then you can query that list to get the actors?
Hello, I have this actor that manages these plots that are spawned in the world using a for loop to create an array of them. It works fine on begin play but I need to do some testing with them in the editor. I put the function that spawns them in the construction script of the actor but the actors never spawn in the editor when the main actor is placed.
great idea, but I have a really rare use case where I have some objects placed along my spline and I need them inside an array
Try taking that function outside of construction script and instead
toggle the function to be callable in editor
You definitly DO NOT want that function in construction script.
Can I stretch a box collision along the spline just like a mesh in spline meshes?
Ok, so just dont use the construction script. I never knew that that was even a toggle. Thanks. Now is it normal to create a function to only be used for a call in editor use?
Yes you can do that. Great for creating testing actors.
Awesome, thanks for the help.
The function should be callable from the details panel in editor.
is there any way to override player start or some alternate way of spawning the player in? it seems to currently conflict with saving the player position into a .sav and reloading it
In one of the framework classes there is a function to override player start yes.
I cant remeber exactly which one tho.... I think game mode?
Yes, in gamemode, there is a function called ChoosePlayerStart.
Would someone be able to tell me what the difference is between an "Invalidate" and a "Clear and Invalidate" call on a timer?
@trim matrix thank you. I noticed 'Event Handle Starting New Player' seems to achieve a similar result, which one would be better or does it matter? single player project

Capsules are cheaper, you could get the distance between two nodes, half it and set it to the capsule half height, then rotate the capsule so its z axis is pointing at the next spline, and set an arbitrary capsule radius. This might not work well for super wavy splines since capsules are straight it will only be an approximation
Thanks! the problem is, as you've stated... Super wavy splines. But, how about I use a spline mesh that doesn't block the player but generates overlap functionality and would list all of the actors that are placed along it?
could that work?
can't you use a mesh spline with complex collision? @crimson ether
Can you please expand on that a bit?
Complex collision is per-triangle
You can supply a mesh as a collision object, and it'll be deformable
unlike simple/primitive collision shapes
A spline mesh component is a mesh that can deform along a spline. There are tutorials out there for that
@crimson ether
Thanks a lot! I needed just that!
So, I deform a cylinder using a spline mesh along my path and then enable complex collision on that mesh?
In a nutshell yeah. In the mesh asset settings, you set "use complex collision as simple" somewhere.
And then you make your spline mesh component collidable, it'll just work (it never just works, but you know)
got it... Thanks a lot! I'm just starting out with UE4, you guys are keeping me alive!
Thanks!
so i'm trying to rotate the player to match a trace that hits the floor, but this is what happened when i tried, where did i go wrong in my math?
yes, but go with the lowest triangle count possible, because complex collision is kinda expensive compared to simple collision
you can probably use this
noted, thanks a lot! btw... what would be cheaper, a cylinder or a cube?
cube
I am making a portal so that if it's on level one, you get to the next level but if it's on level two, you finish the game
I know I can make a different actor with the required blueprints to make it work separated. But is there a way to make it all work in the same actor ?
well where does the player go after level two? if you make the Level name a variable, you can just change that
Can I create a "Blueprint Function Library" in blueprints?
Something that I can create a few blueprints in and use across my project?
And not have to create these in cpp?
a blueprint function library targets a class, so you would make a library for all actors to be able to use for example
Hey friends, I am trying to make a hex grid that objects snap to. I don't need tiles, just grid snapping.
I have always been bad at geometry. Does anyone know why this doesn't work?
just finishes the game
also yes, you can make them without cpp
yeah but does it return the player back to main menu?
it shows an options in hud to do that , yes
Hi @brazen merlin , what type of object do I need to create for that blueprint library?
if it doesnt load a map, i suppose you could put a branch that you can change when its in the level
you right click and choose to make one, then it will ask you target class, go with actor since its the most common one
I thought, if on level 1 then go to level two;if one level two pause game and show hud
then on a branch you do one or the other - ShouldLoadNextLevel - if true, load the level which you can have a variable for, if false pause game and show hud
make the variables instance editable so you can change its variables when its in the level
seems like when I click and hold my button, it disables line traces from my mouse. Does anyone know a solution for this?
hi , i have this capsule collider whith block all , but i pass through everything , why??
sounds like input is being consumed by another mouse click event, but i really dont know, this is prett vague
when i set the other capsule collider with the same setting that work, but i want juste one capsule collider parent with my mesh
I'll check and make sure it's not being consumed, hopefully just overlooked that, thanks.
?
give your branch a variable so you can turn it off or on when you place it in the level
also, you have a level name variable, but its not plugged in to that load level node
but what about the condition ?
Got a question, hoping to get some advice to get started on the task. I want to have characters with stats that are semi randomly generated, along with their class. And im hoping to store this information somewhere. Ive never delved into storing information much, especially not a series of characters that can gain experience and stuff. Like a kind of TBS game, where the soldiers/ characters stats assumably needed to be loaded up during a fight, and then thier experiances, wounds etc saved somewhere.
ight now I have this
maybe in a game instance blueprint
Game inst? ive heard of a level BP, i havent yet heard of this sorcery
I am using it to store the score and hp data on a project
I'll have to look it up, thankyou!
what's the best way to get relative direction between two actors in a top down game? just X and Y
sorry, what to do you mean? for what reason?
figured it out already, was for a grid placement
okie dokie
someone please check #ue4-general for my query cause i think im not allowed to copy paste it
I summon thee @ Authaer, the great guru of FGameplayTags! Is it possible to import gameplaytags into a DB so each row is empty but pre-generated ?
i'm thinking this is where this belongs, but i had a thirdpersoncharacter set up with FPS camera and I added it to a new level but for some reason when i hit play i spawn in the corner above the landscape and the only time i can move as my thirdperson character is on the aiming input i have set up (with an ADS camera). Any suggestions?
First check, are you actually possessing the pawn you want to possess?
yeah its just pulling the camera to above and to the corner of my landscape
alright well everything indicated that i was but i set it to player 0 again and it works now
I created a system for spawning "chunks" around a player, how could I go about only spawning these chunks when they are in the view frustum?
hey guys, do you know why I get the acceleration as 0 in here ?
even though the character is clearly accelerating, I can also get the proper speed and direction, but somehow, acceleration returns FALSE
Try probing (Print String) on Get Current Acceleration's vector output
Not the Vector Length
no
the "get current accel"
any idea?
truth be told i think I can skip this step and get the same results, but not sure
I mean I skipped it, and it works, so i guess screw it ?
The acceleration value only has a value so long as you are not at your maximum speed. Once you're at maximum speed, you're no longer accelerating. By default the CMC movement speed reaches max pretty quicky.
I see
makes sense, but even if i lower the "max acceleration" like 20 times
oh well I guess it doesnt matter now, i`ll just skip the "is accelerating" part, its just that i've seen it done like that in the blendspace tutorial
Yea I'm doing a print string on event tick right now checking the acceleration with the acceleration pretty low, and the print on the screen shows this while moving (even at max speed):
0.0
0.0
150.0
I'd say it's more like acceleration is applied every 3 frames ๐
or that
so I guess a better question is, why did it work for the blendspace / anim bp tutorial I was watching
Kinda useless in that regard - strange that it wouldn't have an acceleration value every frame.
you can use p.VisualizeMovement 1 and p.VisualizeMovement 0 to see velocity and acceleration vectors
at the end of the race in my game I want to be able to assing a reward and show it with a render. The problem is, they are a lot of textures2D. So how can I sort without loading all the assets at one time? Making an array of soft object can be an idea? Thanks guys
There's also option in character movement component, bRequestedMoveUseAcceleration
if seen that, but ticking/unticking doesnt change anything, also i`m not sure I understand what it does
scratch that
ticking it makes my blendspace not work
๐
well that's the reason why acceleration is 0 I think ๐ maybe try changing the blendspace a bit?
i've been messing with it since yesterday, I used this discord ask a last resort, I like to figure things out myself, but this..
this...
...
Well, the alternative would be to save the last frame's velocity and on the next frame compare it to the now frame's velocity to see if there was any acceleration.
or better yet, i just removed the acceleration bool
and save myself some trouble
so this is one
and this is the other :
they were for these two :
so if speed >0 you can enter the run run mode and if <0 you go idle
who needs acceleration anyway
Hey peeps, I have a thing where- if i have an input key (w) pressed down on pause. After i unpause and set back to game mode.... It resets to using the forward velocity as new still... Tried a few things.. don't think it should be this hard. What node to clear the input? Any help greatly appreciated!
Best practise to ensure variable validity? Timer by event / function to check for ยซis validยป and clear timer if valid?
eh?
Validate on access ?
In which case would you need to check its validity in a looping manner like that ?
Okay, i think i can word it better. After setting input mode to UI only, forward input value button press is force released. Found C++ workaround 'flush inputs' Any ideas on blueprint fix? plssss ๐
Can anyone help me with any tutorial or any idea to how to create a vortex blueprint which attract players
For example to make sure variable is set and not null during initsialization
Some use delay but bad solution cause they stack eventually and you never know really how long to delay.
true, I've seen some delays here and there. I've seldom experienced this issue myself, mostly knowing that things exist before trying to fetch its reference etc ..
Dont like the delay solution either
I'm used to C# & Unity, so I'm having a little trouble getting used to UE / BP.
If this were C# (I'm trying to call an event on a widget), I'd simply make my AlertTrayUI static, and call the event directly. This (pic) works, but I feel like it's not the correct way.
Can I make things static with BP? Trawling Google is just getting me posts to do with static meshes
What are you trying to achieve, in more general terms?
Also general unspoken rule is to defenestrate things specific to Unity.
Trying to work out how to access things that should have only one instance (statics), from anywhere. As opposed to doing some chain of "Okay I need to get a reference to this, then from that a reference to this, so I can call this event / function"
As for the Unity thing, I'm trying to do away with most of the things I'd normally do. But (correct me if I'm wrong) C++ & C# statics work pretty much the same at a base level, no?
I am having issues with a launchCharacter node - I can pass in 0 900 500 or 900 0 500 to the launch velocity, and I get the same result - the player is launched backwards (towards the reverse of their forward vector), as opposed to on the global x or y (the 900). Am I missing something?
OOP is OOP
but it's wise to yeet anything that may be considered unity specific logic or mindset
why does "play animation" override "set material"?
show code?
On left Grux red, because the set material in construction script, then gray with textures in realtime because don't know, and the blueprint in the right.
As soon as I disconnect Play Animation, Set Material works as it should.
I followed Reid's Spatial Inventory tutorial and got that working perfectly
I attempted to branch off from that and make a Container Inventory system BUT I am having trouble getting items to transfer from one widget to the other
I keep getting errors when it handles this function in the Container
just found over internet after a message from the editor: I had to tick "Used with Morph Targets" in the material
Accessed None means you don't have a reference to the thing you're trying to access. The errors seem to indicate your error is originating from your widget, not your component. The widget itself likely doesn't have an appropriate value set in the "Container Component" variable.
are data tables read-only?
They're not modifiable at runtime.
Just a means of storing static data.
Sorry, I don't accept DMs - please keep your messages here.
I'm not sure what would be required to get working what you want, all I can tell you is that whatever "ContainerGrid_Widget" widget is throwing those errors doesn't have the reference set to the "Container Inventory Component" you're trying to modify in the "Container Component" variable that you're calling those functions on.
Well i posted the Function that has all the errors
I just don't know what I am to do to change it to work?
Heres the other Function that it error'd with
It creates both correctly
So that's where the problem likely lies. You are setting the "Component Container" variable there and right now, that variable is being set to "none".
The right one is the original I was modifying from, it gets the items and stores it right
Just because the widget displays correctly, doesn't mean you have an appropriate reference to the actual container. Ie. You're creating the grid without needing anything to do with the container component at all with this bit of code.
Where are you starting the Initialize function from for the one that doesn't work?
Which of those two initializes is the one not working?
The Right one
Where is this variable being set from?
That's the definition of the variable, where are you actually setting the value that goes in that variable?
That Variable just targets the ContainerInventoryComponent
How?
You have expose on spawn there, are you feeding it in on the creation of the widget?
All it is supposed to do is allow me to take items from my Right inventory and just put them in there and take them back out
You're not understanding - a variable of an object reference isn't a reference to the actual object that you're trying to manipulate.
ie. My player can have an inventory component, your player can have an inventory component. One of our inventory components can be stored in that variable.
A variable without any reference set in it returns None like you're seeing.
It gets set during the Initialize function that I posted above
Wait
I think I see it
Can you show a screenshot where you have the create widget node for the widget that has this code?
Ok, now where is that Container Inventory Component coming from?
From the Actor Component that has the Get All Items Function
This code is in the actual "Container Inventory Component"?
ie. You have a component named "Container Inventory Component" and within it you have a variable named "Container Inventory Component"?
So the thirdpersonBP has a variable called "Container Inventory Component" - is this a variable or a component on the ThirdPersonBP?
It is a Component
Can you provide a screenshot of the top left window showing all components of the ThirdPersonBP?
Ok - what happens if you up the delay here for a second or two?
It takes 2 seconds on pressing I for it to spawn both of them in XD
still get the error?
yeah
Messed with some stuff, now I just get a error pertaining to this
Says Resize is throwing None
So it's the container value not being set here too. Where is it being set from?
Dude I have no idea at this point, the Inventory Component is basically setup the EXACT same way but that works
I tried just duplicating the original Component and Widget and then modifying it to get it to work
what is this? i can't find in editor..
That's probably only available to editor utility widgets.
Not meant to be runtime.
thanks!
Hey guys, this might be a stupid question, but I haven't really found a solution, not even on the internet.
I need to set the value of a bool variable inside of this array at the given index, but I don't seem to find a way to do that, unless by referencing the variable directly, is there any "set value of array element" functionor something?
No ^^
a
Isn't a map like a buffed array?
Buffed?
Like, works like an array but has more functions...?
Nah
Its a very different container
Faster ^^
Less practical in bp
But for your case it should be fine
Hmm, will try that out, thanks
It will be the first time for me with maps, but I'll see, thx
Its pretty handy for single entry things that dont need to stay in order
The pair is correct ofc, but the pair isnt "locked" in a fixed position so to speak
Mine is an Unreal Tournament styled weapon roster, where every weapon has a given slot, so I think order is important :/
That box collision is fairly aggressive.
IDK if you have played any Boomer Shooter like Quake or Doom or UT, but if you do, you will know what I am talkin about
@dawn gazelle I think I figured out why part of it is not working
But not what I have to do
LMAO, I coded this with a friend of mine (who also is a developer) and I borrowed an expression of his
If you dont remove entries from the map it will stay in order
Ok then
From what i've seen new entries may be inserted at free positions if a given Pair(key and its value) has been removed
Share whatever ya need to. I can try to help.
The Container Component shouldn't be triggered on begin play, cause it requires the player to open an item. So its not taking the variable columns/rows to resize the Items Array
Cause on begin play, the size isn't set
So that would likely mean you want to initialize it whenever you open that item.
Is what I figured would work but idk what to do to make it so when it is opened
My brain feels like jello D:
Been messing with this for like 5 hours now
Well... Here's what I would do...
I set the size inside the Inventory Widget
Cause its supposed to be a variable amount of slots based on the actual physical container
Well I am using the Container Component to add to my inventory, so i need to make an event that "do once" when the player opens their inventory
To create the area and apply the values AFTER the Inventory_Widget sets them?
... I rescind my here's what I would do statement... As I think about it further I'm making too many assumptions about your setup. XD
Well if you want to thumb through the tutorial i followed...
Support the channel through donations. Crypto accepted!
PayPal: https://paypal.me/reidschannel?locale.x=en_US
Patreon: https://www.patreon.com/reidschannel
Bitcoin: 1JFwWHr4X6uAeoZadukzqKjzFBj3Qjy7Sk
Ethereum: 0x2B2Bc108F1Cc0fF899959dEF3226637787d8C3dE
Dogecoin: DNQ33YnhpWoTBokBNVkZP5ub8KTLkpyjpv
Join our community discord!
Discord: https://dis...
best idea so far