#blueprint
1 messages ยท Page 181 of 1
given a spline from point 0 to 1, and a repeating mesh along it (the black line representing the external bounds which can be considered 2d) how would i calculate the world locations of a, b, c and d
i thought i could do it using some simple vector maths, location of point on spline, get right vector and knowledge of the mesh width and that works if the spline is in a certain oreientation but not all the time
this is more of a programmar question.
i have items and clothes that my character picks up.
these are jackets, pants, etc...
i have them in a data table, DT_Clothes.
Now i want the same jacket with different color. So it just changes the color using material parameter.
Should i create a row for each different color of the same item?
Then ill have like: blue jacket, black jacker, pink jacket...
and same for pants, blue pants, black pants, etc...
i know there must be a smarter way to do this
yeah I'd create lists of possibilities and then randomly roll a value for each attributes
item: shirt, pants
size: small, large
color: red, blue.
you'd flip a coin for each attribute and pick the result
this way you can have thousands of outcomes and not have input all of them..
Is this what you're after?
well thats a good idea
but not what im doing
i have them in a data table with specific variables
the problem is that they vary mostly in color
so that means having 5 jackets, where only the color changes in the data table
just trying to avoid making a data table of like 6 entries like "red jacket, "pink jacket", "blue jacket"
they are changing only the color and 1 or 2 attributes
but maybe its the only way
If I have settings menu and I want to have it so when they are set they save regards off whether the play session is closed or reopened
What would i use ?
I ended up fixing this by grabbing an earlier version of a uasset and re-running CoreRedirects with additional coverage, something must've fallen through the cracks but I don't know what.
I highly recommend multi-cursor when doing large scale migrations of CoreRedirects, makes it way easier to avoid human errors of accidentally typing something wrong and not being able to hunt it down.
It's also possible it resovled correctly and this was an disjointed/unlinked serialization issue that was going to plague the specific file going onward.
I'm looking to make a minimap system where there's both a HUD map element and a full map screen that you can rotate around. Is a SceneCaptureComponent the right tool for that? Or is there a better way to go from a camera to a UI widget?
Would anyone know what node is used to temporarily block UI button inputs? The "disable inputs" node doesn't stop button inputs from happening. Nor does "disable chatacter movement" node
I'm trying to set up a race. This is to keep the vehicles from jumping the line before the green light comes on
i need a little bit of help, im trying to make a gravity control system for my game that the player can use to alter the strenght of the gravity at runtime, but keep coming upon dead ends for how to implement this, does anyone know a good way to?
you can set the gravity scale
is it possible to set gravity scale on objects in the enviroment without a movement component?
so i have these balloon platforms that pop when the player collides with the sphere collision in the blueprint, i want to make some of them drop an item when the balloon pops, how would i do that?
could add a weighted bool branch, so only when its true it spawns the dropped item
how do i do that?
name your event something relative to what it's doing
i did, its just like that bc i copied it over from another item
well what they mentioned is a random bool with weight node
like this is how i would do it
but i didnt want it to be randomly dropped, i wanted to have a seperate version that drops an item
what you do there is set the spawn class to what you want to drop though
you could expose a variable on spawn
and use that variable to determine if it's the kind to drop or not
im confused
you want that some of the balloons drop an item ?
how do you place the balloons, do you place them in the level or spawn them ?
i wna duplicate the blueprint, so i can place some of them with items, some of them without, all will be manually placed in levels
i have it working to pop and respawn, but i just dont know how to make the duplicate drop the item, bc they wont respawn
so you have a duplicate and it does the same thing as the other balloon ?
is it the spawning part or the drop item part your having trouble with ?
the balloons spawn fine, but idk how to make it drop an item
you can spawn actor like shown without the random bool and branch
then maybe add some physics put some gravity on it
so it drops
lemme try
it spawned the item but it didnt drop, how can i give it gravity in this blueprint? or do i have to add it to the actors themselves?
you can set simulate physics on the mesh @trim matrix
Is there a way to make a scene capture camera ignore objects by filtering IN? (IE, I've got a level with like 10,000 objects and I don't want to see ANY of them in this camera except for the handful I select. But I don't want to manually set some bool flag on 10,000 actors)
God there's a way to add things to a "show-only" list but I can't figure out how to make it use that
but i dont want every placement of the item to fall, some float
FYI it's this
so then you can just do it from bueprint after you spawn it
how do i do that?
where cube is the mesh
if you drag out of the return value of the spawn, and "set simulate physics", then select the one with your mesh (mesh)
how would i make it drop the stars blueprint so it still has the particle, and rotation?
aye why this is causing lag / this log?
LogScript: Warning: FLatentActionManager::ProcessLatentActions: CallbackTarget is None.
I'm trying to build a tool to allow my artists to view their pixel art in-engine without having to open up Unreal.
This requires me to generate sprites at runtime. While I can open files to generate a texture using the Import File as Texture2D node, I can't figure out a way to create a masked, lit sprite from this at runtime.
I can generate a billboard, but that is blurry and doesn't cast shadows or react to changes in lighting.
If you guys have any ideas, it would be really appreciated ๐
To clarify, I don't even necessarily need to create a sprite from scratch. Even just being able to change the source texture to an existing sprite would work
I'm far from an expert but maybe somehow loading your files into a render target and then showing the render target instead. This video shows the second half of the process: https://www.youtube.com/watch?v=wIfovfaf01w if you havent used render targets before. The video might also give enough of a hint as to how to do the first part
I'm trying to create a voxel game where the player is inside a prison and needs to escape. And the level is made out of cubes like in Minecraft and he can break most of those. How should I make this system ?
- Should I use the Voxel Plugin or develop that from scratch and implement all the optimization features because there will be alot of cubes (so I need to not render faces that aren't seen by the player ,greedy meshing, etc...) ?
- Is there some things that Unreal could take care of for me directly out of the box ?
yeah you could use two tables.. one for colors specifically
If this is a small prototype/school project then i would recommend instanced static meshes.
If this is a real game you wanna sell then voxel plugin
Alright, are you familiar with the Voxel Plugin ?
can't say i know much more than a surface level
Because I think there's an issue with the Voxel Plugin for my case as people told me that it can't handle individually placed voxels and it's usually used to generate voxel terrains instead. As in my game I will be the one designing the whole level, so the blocs will be placed manually, and individually textured, etc...
is that true ?
running into an issue with one of my widgets, some of this stuff had been refactored, possibly renamed or reparented. getting this now, any ideas?
Fatal error: [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\BlueprintGeneratedClass.cpp] [Line: 347]
UBlueprintGeneratedClass::GetAuthoritativeClass: ClassGeneratedBy is null. class '/UICore/Blueprints/3DUI/Widgets/WBP_3DWidget.WBP_3DWidget_C'
A breakpoint instruction (__debugbreak() statement or a similar call) was executed in UnrealEditor.exe.
well with voxel plugin I know you can dig/sculpt at runtime, i so I dont see why a single block shouldnt be possible:
https://www.youtube.com/watch?v=cyZYbwdG6gA
Hello guys, in this quick and simple tutorial we are going to learn how to create a procedural interactive voxel world in Unreal Engine 5!
โช๏ธJoin my Discord Server, NOW: https://bit.ly/GorkaGamesYouTubeDiscordServer
Procedural Planet Tutorial ๐ https://youtu.be/RMr2d8DpLUU
Free Voxel Plugin ๐ฅ https://bit.ly/FreeVoxelPlugin_GorkaGames
Check out...
But that's ingame, here I'm talking about designing the level upfront first (in the editor)
I know but you don't understand what I'm saying ๐
xD
do you have any tutorial / documentation showing how to do that ?
So it would probably be a sculpting workflow similar to https://www.youtube.com/watch?v=3MjHEHkjtw4
But with a voxel size of 1x1 meters (like you see in the first video i linked at 3:05)
How do you make it so that when you press a button on one UI widget, it hides that and makes a previously-hidden UI widget visible?
Here's an easy way to control button visibility in Unreal5 with Blueprints-!!
If you enjoyed this video, please consider becoming a Member :)
https://www.youtube.com/@TheRoyalSkies/join
Or joining the Patreon Squad directly:
https://www.patreon.com/RoyalSkies
It makes a huge difference, and really helps ensure I'm able to make the best videos I ...
Thank you for the video, but the question isn't about buttons. It's about widgets.
The assignment says this:
a button is a widget, the set visible part should be the same
Make the progress bar [widget] hidden when the main menu [widget] is visible.
When you click on the "Start Game" button, the main menu disappears and the progress bar appears on the screen.
you should be able to do the same as in the video, but dragging your progress bar into the graph instead of the button
The problem is this is how far I've gotten, and it doesn't seem to work.
Progress Bar is a separate widget blueprint.
How do I turn the widget blueprint into a variable I can drag onto the main menu blueprint?
I'll give it a shot. Thanks!
? You are plugging nothing to the set vissibility
the target needs to be your ACTUAL progress bar, not some dangling cast node without inserted object (Casting is a type check)
if you want to hide your progress bar in seperate widget, you need to pass the reference to the widget where you wants to set the vissibility
Is there a tutorial on how to have the progress bar be visible in the main menu widget?
As in, how to make a variable visible in another widget blueprint.
any basic widget tutorial should show you how to toggle vissibility
more of #umg channel
you should show your designer tab there, you will get more chance to get help
Okay, I posted it there.
Built a utility blueprint actor to add a row of numbered stones meshes in my level using construction script. It adds the stones as a child actor component. I'm having a hard time setting the parameters after I create them...Is this not possible?
ah, and how do i tie them together if thats possible?
I wanna bounce this idea around in terms of performance.
I got a maze generator on a fixed size of 10x10.
My workflow generates the maze by placing room actors, then moving the nav mesh in the center and changing the dimensions and finally reloading the navigation data.
This takes about 5-7 seconds.
Would it be more efficient to go about it through subtraction?
bake the maze 10x10, then when I generate, remove the rooms that aren't needed and NOT reload the nav mesh?
I've created an Actor component that I need to add to potentially hundreds of objects. You can't select multiple and do an add component from everything I could find. Anyone have a trick to this by any chance?
use parenting instead. Either make a base parent you add the actor component to or just add that logic intrinsically.
Problem is I'm adding it to static meshes in the level. They're not BPs.
So they don't have a parent.
Yeah absolutely. You can add them to anything. ๐
Oh, like create a BP to do it? Theoretically could work. Thanks for that.
yeah, or use a manager in general to spawn them, after spawn is done, assign stuff. Or do it as you spawn them
Also I'm using ACs on SMs so I can add animation to some and just house that animation in the components. So if I also need to add it to other things I can. ๐
How can I decide which of the items in the vector array is closest between 2 points BUT in the navigation path?
Is there a way to force a texture to re-load at runtime?
I'm adjusting the texture parameters to a Texture2D variable using the set parameter nodes. The parameter values DO change, but the changes don't take effect unless I click on the texture itself in the editor menu.
Hello guys
Can someone help me with this? This is what I'm trying to do :
Instead of activating component, or spawning component, I created ANiagaraActor class which I spawn as an actor.
hey there
im adding a reference of my spawned AI to a array i add them as Unique
and when that ai dies i try to remove if from the array but it doesn't work
any ideas?
what do you mean by it doesn't work? Are you saying the reference still lives inside Animal?
Also this is a little confusing, why are you running on server for death events?
The server should be the only one that need to call the function.
i want the image to change to different words when damagea is taken
Server RPC is used by client to Run something on server, if you are already the server don't need no RPC
just make sure the logic runs in server side with switch has authority
so only server runs the logic.
When damage is taken -> Set Text or change image or what ever you want really
is there a way i can store different sprites in the same image and have a switch randomly use different word images and locations to add a bit of randomness
i have it working already i just want to know if there is a way to spice it up without creating 10 dif widgets
so this is a ai manager not the ai it self
and yes the reference is still inside it and it returns false when i remove it
the AI manager should only live in the server, client have no business and the call to Server RPC is confusing here
still dont get what you mean
the ai manager work only for the server
What I mean is Server RPC on an AI death event is reek
death should be something that only server handled
hence your server call rpc sound totally like a mistake
so the AI death is only used to remove the reference from the array nothing more in it
that is not the actual ai death event
- Play only as listen server
- Debug
Observe the array in server machine only. What gets added, what is being send, and what is being removed
okay i will see
and get rid of that server RPC since you said AI manager work only for the server. So I am also assuming that the actor should NOT be Replicated so it doesn't exist on client if you spawn it at run time.
it doesn't spawn at runtime
How do you spawn it? are you 100% sure that the client don't have instance of it?
i spawn it on the level
that will exist for everyone then, including the client.
that like a base manager for the ai on the level
AI is server stuff
i use it for spawning and managing the ai
ok but you are running the logic in every one machine, including client
tldr, you don't want it to exist in client machine
okay so what should i do
don't spawn it for clients?
many ways, at begin play if not server, destroy self is one of the method
hmmmm
what's the point of counting all the animals in the world on every single machine?
afterall only the numbers in the server is the one that matters.
i get your point
so that's how i should do it you mean
that is one way
not a fix to your current problem but sure as hell making it easier to debug
I don't know if there's a way to debug only for specific machine in blueprint, I know the cpp people can do that using IDE
i still can see client there
and yep that doesn't fix my problem
print string before destroy actor
if client print it, you are probably fine
I don't know how those debug gets populated, probably before begin play
once you confirm that the client prints before destroy actor, carry on with debugging your references
yep its fired
i did debug my reference and both are the same but still wont remove it
show how you debug it
print string prefered to me, watch and debug is a bit buggy
okay one sec
i need help
now if i go to the desinger and add binding
i dont know what to do here
how i display the Add Currency function to display here
this is the binding of that
thanks mate i got it fixed was a weird bug
If this is all in the same widget, you'd just need to feed in the "Currency" variable to the "Return Value".
A binding will automatically update the display every frame fro you.
you can do set text function for that currency text
@dawn gazelle Do you know how to attach debugger to specific game instance , i.e for one of the client
You need to make sure you're not running under one process (I think), then you should be able to select it from the instance drop down near the play button when looking at the game instance blueprint.
much appriciated
but anyway to do it through IDE?
Ohh.. uh. Not sure on that one.
I c, thanks anyway
Yes, just launch it and attach it. In the debug menu there's an option for "attach to process"
awesome = )
like that?
You've been doing random stuff for a week :S, please just learn references
@remote rapids
wanna jump in a call i can show you
i am trying bro and i am learning us well
i dont know this stuff and i am trying
you know it so that easy for you to say.
i create and learing in the same time.
yes that will help thunks
okay send a dm and call im waiting for you
it's not easy for me, it was hell before and still is now. But what I am saying is instead of randomly do things, it is better if you understand the basic principle that you need which is to reference object.
Once you understand the concept, you can apply it everywhere.
There's a great video pinned here on references and blueprint communication
I can tell you that your core issue is that you don't understand reference
cold summer be right on this take the time to learn the core ideas thats how i learned with 2d pixel based stuff
not trying to be a d*ck, but if you copy paste code or get help but fail to understand what it's doing. You will run into the same problem again.
the answer is literary given already by Datura.
Get the currency where ever it lives -> Connect it to the return value
the time also to see results can take time too
if you can't do that then you will need to know what is reference
It really does help to just break it down into simple terms and see if what you're doing in simple terms fits with that.
For this instance you need a widget to display how much currency you have. So you want to bind the currency to the widget. So you want to know what owns the currency, and ask it how much there is. Nowhere there does adding currency fit into it.
If it doesn't stop at breakpoints, how can I know what it is happening? I have double checked that IMC_Default has been loaded.
I don't see any warning or error message in the output log.
I've solved adding this:
Thanks.
question
You don't have to do this by default unless you have disabled the input somewhere.
when duplicating animation blendspace 1D, and then assigning the duplicated file another skeleton, why is it that the original blendspace also changes its skeleton?
The Blueprint class is an Actor which inherits from a C++. I haven't disabled the input anywhere. Maybe the AActor C++ class has disabled somewhere.
I see, that might explain it. I think by default controller should have input enabled.
So I guess another question is, why are you enabling input on some actor?
Is this your player character? normally you want it to be a pawn or a character class
It's a Tetris like game, and that code is in the class that represents the falling block. To move it left, right and speed up falling.
I personally would just move the input logic in the controller then
but you do what you have to do I am also still learning so take it with a grain of salt
I thought to move it to the controller, but get a reference of the falling block would be hard (or mess up the code). I'm learning also, but if I have to refactor the code it would be easy to do it.
So I'm using an event dispatcher on the player character to tell enemies an integer that's my Player Combat State, 0=nothing, 1=parry, 2=block, 3=dodge, so that I can branch from int when they attack me and have them hit/stagger/ripostable/whiff
anything especially dumb about this approach leap out to anyone? I've no clue what I'm doing.
You don't necessarily need to, you could just broadcast that the input is pressed with a dispatcher
With a dispatcher? This is something I don't know how to do it yet.
An event dispatcher. Basically anything can have a dispatcher, and broadcast something happened. Other things can bind an event to it
For more readable, I suggest you using enum rather than int though.
So in this case your tetris block that's falling would bind to the dispatcher on the controller.
The other method of getting a reference would work fine too mind you, but this let's multiple things listen in without being connected necessarily
Thank you.
The reason the enable the input on an actor is that actors can not receive the player input.
I know, normally you want to enable input on things that you posses (Your character and controller)
but you are doing Tetris so maybe that's okay or like Cuppa suggest , might be better to use dispatcher
OK
How would I go about that? Looking at the enum dropdown in inputs has me completely lost. At a guess, do I set up the enum I want to use somewhere else?
Yeah, you need to create an Enum type first then reference it. You may do it in blueprint or C++, but suggest doing it in c++ if you could.
kk, I'll google the basics. Thanks for the tip!
yeah i can see he had a lot of stuff in the wrong place but he is getting there
i showed him what was his issue and what should be the better way of doing most of what he have
Is it possible the have 2 loops, 1 within the other, where the 2nd loop has a break? I'm finding that the breakpoint seems to exit both loops.
how do I duplicate objects? I have rectlight for my hallway that I made a actor so that I can use Instanced Static Mesh to further optimize it when I have to make a very long hallway. I can't seems to find a way to duplicate the rectlight anywhere so unless it is really not possible or is possible but impractical just let me know
Let's say I have a Hero Selection screen.
Is a good practice to spawn all buttons at PreConstruct to have a preview in Design?
Or is better to use the default construct to do it?
I think you already found the solution
Hello ! my game is crashing with this error : can someone maybe help me <3 thank you so much 
Yes. Thanks!
Fast question. Letter spacing is one thousandth? For example letter spacing = -150 so I must -150/1000 and then i can perform some operation? On the channel UMG nobody reply ๐ฆ
(sorry for repost i put it in the wrong channel)
so I have a character with flipbooks for both left facing and right facing running animations, jumping animations and idle animations, because the character is not symmetrical. I want the flipbook to change to the correct animation depending on the direction the character is facing and what the character is doing, rather than just flipping the flipbook 180 degrees to change direction.
I also want to have the character change appearance to a special power up version when a button is clicked. I have all the flipbooks for this version too, just don't know how to set them up.
how would i do all of this? i am a bit of a noob sorry ._.
What have you tried?
I don't know much about flipbooks, but I'm assuming that somehow somewhere, you have a bit of code where you select which flipbook to show. So that's where you would check if it's facing left or right, and also check if it's the power up version or not.
It shouldn't. Show your code.
that's what im trying to figure out how to do.
I think I fixed it, had a node going off the wrong way, thanks.
i have the default axis rotation for when my character is moving another way, but i havent got it to change flipbooks. it basically just mirrors it
this is a game instance blueprints
and in my main menu i did that
all works good
if now i go to another level the music is keep going all good
the problem is that for example lets say
main menu is A level
and the other level is B level
so i go from A level to B all good the music is good
but i have a return button to A level.
so When i am on B level and i want to go back to A level so the music, its sound like it duplicate it self and that not sound good.
how to fix that?
Check to make sure your "Audio" reference is valid. If it's valid you don't want to create it again and you can then check if it is playing. If it is not, then play it.
@remote rapids ^
you mean to check if i can get him ?
here?
how to check that?
Do a "Get" of your audio component variable. Plug it into an "IsValid" node. Put the IsValid check before Create Sound 2D. Create only if Sound2D is not valid. if it is valid, check if it is playing. If it is not playing then play it.
I am following this tutorial on how to make magic projectiles. This blueprint here is living in a parent actor and all child actors are going to be each ability projectile. However, I set up collison but the project still goes through stuff. I followed this guys blueprint to the T but not sure what's going on. My running guess is that it may be the particle effect I am using that occurs when the projectile detects collision and disperses. Not sure if that is the case.
I'm pulling the impact effect from
Essentially, the projectile isn't detecting collision and initiating the impact effect
Check your collision settings.
Hello. Does this setting do anything? Changing it to 9000000 or 0 gives exactly the same result. Nothing seems different whatsoever. What I tought this would change is the stopping force that counteracts falling into a fluid. Isn't that what terminal velocity means? ๐ค
Google'd: the constant speed that a freely falling object eventually reaches when the resistance of the medium through which it is falling prevents further acceleration.
Yeah indeed. So changing this value should impact how fast you decelerate when falling through the physics volume, no?
But from what I have tested, it does nothing of that sort. In fact, it seems to do nothing at all.
Maybe it's bugged in 5.4?
where to connect the return value?
No. It would impact how fast you're able to move through the physics volume while falling. It works fine for me in a 5.4.2 project. Set terminal velocity to 100 and they slowly drift when falling in it. Outside of it the character falls at normal speed.
The speed change is for all intents and purposes instant.
?
Looks fine on my end to my knowledge.
"Generates Hit Results" on your box collider for example, making sure its set to "blocking" most channels you want to hit?
Hi guys, I'm trying to get The third person character BP cant seem to find the quest dailog holder (this is a small box on the HUD UI). It's variable box is ticked and does appear without problem on the gamemode BP but its just the character BP that i have this problem with.
Yes I believe it's set to BlockAll
Compile the HUD Widget that contains this property and then try compiling the Third Person Character again.
? ?
Your a life saver, my student was on that for like an hour, much appreciated it haha
On Event Dispacthers I added an OnProjectileImpact. Added those inputs.
where would be the best place to call the pause game would people say
would it be better to go from PlayerCharacter -> HUD -> pause game stuff or PlayerCharacter -> GameMode -> HUD
Which node looks for both variables to be false?
Not to be confused with...
I'd only go through Game Mode if there was something speciifc about pausing that the GameMode would need to control.
"and" and "or" are fairly self explanatory, not is just the opposite
well game mode has a pause game function but not sure how deep that runs
if I set it paused will my menu widgets all freeze etc or still work as normal
ah, and how do i tie them together if
thanks
I thought there was a more specific node that outputed the same result
but that should work fine
๐
This is an AND logic gate. Datura explained you how it works
oh this looks useful
how do I know which node performs which 1 of these?
how will this be usefull in unreal?
ofc
you have logical gates like AND, NAND, OR, NOR etc
and nodes are similar in 99% to logic gates
boolean logic is fairly universal
and more
well everything is bits so ofc
๐
would it work the way I would expect if I get the forward vector from a Find Look At Rotation?
actually nvm, forget that question ๐
why not 100%?
Logic nodes in Blueprints are built to mirror the logic used in electronics, allowing you to create simple algorithms. This solution makes programming logic easier to use and apply, especially for people with experience in digital electronics.
If you want to learn more about it : https://en.wikipedia.org/wiki/Logic_gate
A logic gate is a device that performs a Boolean function, a logical operation performed on one or more binary inputs that produces a single binary output. Depending on the context, the term may refer to an ideal logic gate, one that has, for instance, zero rise time and unlimited fan-out, or it may refer to a non-ideal physical device (see idea...
Hey folks, I have a question about flow control in blueprints. I want several gates in my blueprint where, whenever one is opened, all of the others are closed. What is the most efficient way of doing this without generating a ton of spaghetti wiring? Or is the spaghetti inevitable?
I do, thanks ๐
that would be the "Switch On" node
its not technically the same as a gate (multiple ins and outs)
how might you shoot a ray in the direction the left gamepad stick is facing? e.g. if i push the joystick up, it shoots directly above the player and its facing left the ray also shoots left
but its used to execute a blueprint setup depending on the integer or enum value
the problem is i want the functionality of a gate in that I want to send messages through the gate that are unrelated to the ones that open and close it if that makes sense
for example: I press 1 and WASD move a box around, I press 2 and WASD move the camera around
@dawn gazelle My issue is solved: It was a combination of 2 things. The box collision wasn't my root and I had collision on my static mesh that was conflicting
there's also the select node that also accepts any type, but its a function node meaning you cannot connect execution pins to it
it gets a value of multiple ins and shoots only one out with the respective in value
Hey can anyone help me understand why I'm getting an infinite loop here?
Your do once is not wired in
interesting...
it fails to get the data of the reference
its not an infinite loop also
make sure "Game State" or "Default Scene Root" are valid
how would I do that?
how are you trying to get them?
which is which?
like which is the player for example
and which is the actor
the player isn't involved in this script
It is a BP_train, and BP_Station which has a hitbox
I said as an example
So if I set a variable based on the "mode" I want to use then send execution through a switch on based on Getting the "mode" I could get the logic I'm looking for potentially?
yes
there's a lot of flow control methods
btw, when you talk about flow control, some would understand that you're working with loops
is that what you're working with right now?
yeah just trying to avoid 50 wires with sequence nodes
No, not for this particular task
btw, everything is 0 and 1, that's just it
it's 100%
just trying to route execution in the most efficient way possible when receiving OSC messages
osc?
hmm
Open sound control, basically a protocol for sending and receiving messages
like a modern version of MIDI
Your infinite loop is something happening elsewhere.
Open Sound Control (OSC) is a protocol for networking sound synthesizers, computers, and other multimedia devices for purposes such as musical performance or show control. OSC's advantages include interoperability, accuracy, flexibility and enhanced organization and documentation. Its disadvantages include inefficient coding of information, incr...
uhh am I dumb or is this 'do once' executing more than once?
you mean here?
yea thats what i thought too
the error log points you to the location of where the problem happens
Yea that is actually it.
What I noticed is that the instance keeps changing up here giving you the appearance like it keeps executing the do once over and over, but really, you're having a whole lot of instances colliding at the same time.
As for why it's throwing an infinite loop, maybe it's just too many collisions happening all at once? I'm not sure.
bruh lmao
you have a breakpoint, it stops running
I wanted to feel like Einstein for a while ๐
Oh yes you're right. Why is that happening?
You have a whole bunch of them spawned, and they're colliding which is triggering your breakpoint.
WHAT A SPAGHETTI JESUS!!!!
I smell something wrong here
yeah lol
the code eventually spawns more of these stations
which have more hitboxes, so i think somethings wrong the the location of where I'm spawning the stations
the last time I checked your code, it was wrong but was working somehow...
The most real reason why C++ is 10000000000000000000000000% better than BP
whys that?
I love c++ i want to marry with it
then dont come here
i think that is the case with most of my code lol
Blueprints is a child of C++
more readable code and I think that generally you have more options
no, python is a child of C++, bp is just a young young child lol
true
I wanted to see how long it took C++ to run a for loop of 4 billion iterations of setting a bool with a random value from a stream. It took 0.00007 seconds. (I may have had the loop hooked up wrong... but even still, it's faster in C++)
I then tried to do the same thing in blueprint, and even with increasing the infinite loop detection to the max (2.4 billion) it wouldn't even go that high, and testing with 1 million loops, it took a whopping 8 seconds.
BP is handicapped child of c++ and python
this is working great...not sure why i was overcomplicating it
I'm surprised they haven't made more performant for loop yet for BP. The macro version is slow when you get to high interation counts.
further proof that its best to work with c++ than blueprint
Not sure it could be made any more performant sadly D:
the reason for that is cause of all the things they HAD to put in the code for the node to work in blueprint
Depends on what you're doing. You wouldn't choose to use a jumbo jet to travel 5 miles. ๐
yes but still
If I could take a teleporter I would <_<
ya bp just breaks on big loops but you can split it up over ticks
c++ all the way
for loops and probably maths as well
ใใซใผใใชใณใใจC++ใฎใใใฉใผใใณในใฎๆฏ่ผใใใฆใฟใพใใใใใซใผใใชใณใใฎใใคใใฃใๅใใใ็ตๆใๅ็ปใฎๅพๅใซ่ผใใฆใใพใใ
I tried to compare the performance of blueprint and C++. Blueprint Nativization is posted in the latter half of the movie.
its really significant and noticeable
for loops do run faster in standalone and packaged builds though. (around 60%) Granted still not as fast as C++.
yes cause when you build your project, its all binary
making it easier for the computer to read the code
because it has to finish in one tick
if it doesn't it craps out
i tried it with c++ it just haults everything and finishes
yea, because it has origins of python in it xD
it's nice to use bp and c++ together they really compliment each other and having functions available to blueprints is really a huge performance boost in a lot of cases
jus the downfall of going all bp, theres just some things you can't do
not really tho
well the for loop is just one thing
How can i remove an element from array without changing index?
theres more like sort
there's prob a way to enable threading in bp and make it run on multiple thread
it's just that people dont go that far in bp but it's possible
when you remove an element from an array, the size changes and all the indexes refresh, whats the problem ?
I have an inventory
all the index refresh? how do you know that
because thats just how arrays work
no lmao?
Does anyone know an alternative for the Asset Registry, that would work in a packaged project, that would allow me to get a folder's contents
what??? when you delete something from an array, it depends if you are talking about a vector, array, or list or map but all of these are different and in pur C++, it will not change by itself
I'm trying to work out how Make Random Stream works.
When I use the random float in range node, it works well, but when I use Random Float in Range from Stream (so that I can have re-producable, random, results), the return value is always 0.
when you delete from the array the indexes are reset it's how an array works, it's why your not supposed to delete from an array while your looping it
Your Stream needs to be promoted to a variable. The variable then contains the "State" of the stream, allowing you to make further calls using that stream.
@lofty rapids don't even try to argue with cat
This is the problem
also only the indexes after the element you delete change, but well (and the SAME applies to C++ TArray)
i mean i'm not arguing i'm just saying how arrays work and it doesn't matter what kind they are
it's an array is an array
an array at core doesn't do things by itself
shut up
Is there a way to force a texture to re-load at runtime?
I'm adjusting the texture parameters to a Texture2D variable using the set parameter nodes. The parameter values DO change, but the changes don't take effect unless I click on the texture itself in the editor menu.
how am I wrong
oh no, since it's made by the standard library and implemented by them, not automatically doing that.
i kind of see whats going on here, your saying it should of stayed and gone to the first open slot ?
Yep
then go on a discord where they care about C
you're just confusing people with this
Thanks!
when you remove from an array it doesn't just null the index and thats still open, the length changes
Looks like you need a way to store the index for anything still in the inventory before rebuilding it
Ah, ignore me then
I wouldn't use the index of the array to dictate the slot it should be in. You probably want to use an int point to denote the x and y in the inventory grid.
i would create an array of your inventory size maybe ? and when you remove an item just make it empty, then you can search for empty slots
or set the array element to nothing, instead of removing the array index
IDEA ACCEPTEDโ
I make it empty with set array elem?
Yep
Clear it's not a good idea
Damn, too slow ๐
you can do set array elem, what are you storing in the array ?
see, then the array would have empty slots... meaning that if you delete a slot, it shouldn't actually remove it but just set it has empty so when you loop back in it, you know its empty and can add a new object into it
hahaha np
struct w iteminfo
I was sure there was a way to empty an index while keeping it as a valid index
In constructor init an array with for example 36 elements and they are all nullptr
in the struct, just have a bool, IsEmpty
so when you do set array elem , you should be able to just not set the value, then maybe do an isvalid check for it's if empty
i'll try
not actually sure if that will work but it's worth a shot
thx
the isvalid check depends on what you do it...
probably on a proprety of the struct or just use a bool IsEmpty
Dumb question - if I have a data asset class with multiple subclasses, can a field of a pointer to an instance of the superclass be set to one of the subclasses? I know the answer's probably yes I've just never really thought of using data assets in that way
then you would need to have a bunch of structs and alter them you couldn't just add a struct to it
Yes if I understand what you're asking right.
ie if I had a primary data asset reference of type ParentDataAsset, I can store DA_ChildDataAsset in it.
So how can i check for empty slot?
? wut
you have an array of struct, the struct is a custom type which should represents 1 slot
Does anyone know why blueprint code might break if I use draw debug in a line trace? I make use of scene capture components and other stuff like that but still it's weird
i was hoping to be able to put in structs, pull out structs with isvalid
the moment the struct is a correct class, it will be valid
loop through the inventory array and check is valid, if it's not valid it should be empty
what's valid
???
the item because not setting is like null or whatever it defaults to
a struct isn't null, it will be there, just with defaults params
and a struct isn't a pointer, so no it will not be null
--
Just have a bool, IsEmpty, and check if it is... then do wtv you want with that, set it
(what would I do.,..)
i mean whatever works
Engage means the class. If the class is empty, then there should be no item in the slot of the structure.
No need to have a bool to indicate otherwise.
try it
Or even itemID....If that's set to ITEM_EMPTY or something, there ya go.
that's a enum / maccro?
so if you don't pass anything is it empty or there is a structure there ?
It should be empty.
It's not about the array.
It's about the contents of a particular index of the array.
it's like if you have a function and an input, if you don't pass anything its empty
it's how i null interaction actors
IsValid(array[1]), it will be valid in all cases
if it's empty there is a way to check if it so, i'm just not sure what that is i thought isvalid
it's not empty lol, there's an empty struct with defaults params
i think i'll try with invalid class
(except I'm pretty sure you can't check if Array[1] is valid with a structure array.)
well it was worth a shot
the only other way would be like mentioned a boolean, but that means you have to edit each one specifically
when you drag the item off, set it to true, when there's a new item, set it to true to the correct slot... nothing more
check when needed...
I have a bunch of static mesh bottles that I need to destroy/swap out a particle emitter when they are shot. I'm trying to use some type of tag but I want it set on the static meshes themselves, that way. But I don't see a tag item in the details - Is the only other thing to make an array of the materials and do a material check to determine if it is a "Breakable bottle" ?
So with bool on struct, i set true when drop an item, and then when i pickup i set to false
?
I think that it's the best way
Two options with these two variables in a structure.
hey, i have this star door setup, ignore the rocks theyr not apart of the blueprint, but i wanna make it so when the player walks into the collision box, a ui prompt pops up and then the door checks if the player has enough stars to unlock based on their total star count, if they do it lets them press an input to unlock and make the door model itself no longer visible, as im planning to add a level warp trigger behind the door at some point, and if they dont have enough another promt will pop up saying they dont have enough stars. ive tried setting it up like this, but im kinda lost not rly sure where to go from here
No need to complicate it further by adding more variables to your inventory structure.
so i guess i would in this case compare to the defaults like a boolean or something makes sense
well, when picking it up, you loop through the array to find the first empty slot ig, so like this:
for(all slots) {
if(currentSlot.IsEmpty == true) {
currentSlot.IsEmpty = false
Add to inventory
}
}
and you think that an ID system is easier than a bool?
He already has these variables in his structure.
Adding "IsEmpty" is meaningless if he's using these other variables as those variables could potentially tell you if the slot is empty or not.
Depending on his set up.
ofc, but who knows he had a class variable?
as I said, he must validate with something IN the struct...
It's all the way back up there.
@dawn gazelle see here
It's all the way back up there.
so far you got it so the widget pops up when you get the required amount of stars ?
And....? That's what I'm saying.... He already has some things in his structure he can validate against without having to add a bool.
should the find by id, be a hash table function for faster iteration?
the widget dosnt appear idk why
do you get any errors ?
no
you can test if the true branch is firing with a print string
it's kinda preference but it looks cleaner in my opinion to have a bool to use just for that :3
?
I would create a function IsEmpty that valid it for me...

the branch is failing when entering the collision
not use IsValid(and hard code the value here of the class)
struct.IsEmpty()
ez :3
this is #blueprint
it should only be true if the one variable is >= to the other
structs can't have BP methods
the collision is running tho ?
yea, but the ui isnt appearing
try to hard code the class, see if its the variable your using
how do i do that?
btw, in bigger company and in lyra, they use what I explained...
please read a bit more before saying that I'm dumb..
are you using interact and changing it's value around ?
that variable where you get class ?
they use a bool?
its just the widget thats supposed to appear
Which you could still just check if the item class is valid....
some kind of function to know if it's valid, either way, it's a bit,...
i said that your suggestion to use a bool is stupid
should i do it another way?
ok so remake the create widget, and don't use the variable select the class on the node
so don't put words in my mouth
it is here, since it's a simple problem
doesn't justify a stupid solution
but in a bigger system, a bool would be a better way to know how it work and ye
no it wouldn't
its still failing when i enter the collision
it would, sometimes it's hard to follow when you want to avoid using bools...
so your math is not adding up you have the required amount ?
yea the required amount is 5, ive had way more and it still prints when failed
so your values are off, print string them on the screen when you run it because thats how branches work the condition is false so it go to false
but i think >= is what you want
Is it slow to use one Interface in too many actors? Is there a best practice for when to use the same interface for a given function vs make a new one?
?
are you saying it fails off the branch to false ?
yes
then the condition is not true
so check that value comming off your player
print it to the screen so you can see what your matching to required stars
just to be sure you got the right variable and the numbers are correct because branches usually tell the condition
as long as it's going to false it's running
when entering the collision it prints the rquired amount but still prints off the false of the branch
and required stars prints 5 ?
yea
geez thats odd
branches usually work correctly
i would close and open see what happens
thats why i was lost lol
that makes no sense they are both integers, its a >= and a branch
if it's not working as expected somethings f'd
its still not working
still nothing
Not really, but the best path is to build, test, optimize
i'm really at a loss because it's firing, the cast is succeeding, and the values are correct, but it's not true so idk what say about that
is there another way i could set it up?
the problem is if your branches don't work correctly then your f'd
sounds like an engine problem or something
Doubt it
my other branches work fine
well i can only go by what they said, and it doesn't make sense to me
Restart the engine just in case but the more likely scenario is user error
show the print strings of the numbers
this or it actually printing?
yep that variable is zero
not >= 5
so it's false
so maybe you got the wrong variable ?
thats my only star variable
well it's zero thats what the print string says
so thats weird
i c you should have 13, what variable are you using to display them ?
so swap and cast to the instance instead
so you need to get the game instance, cast to it, and use total stars
is there a flip flop node but with memory?
do i need get game instance?
well you still want to cast other actor to player
so you know its the player that overlapped
jus don't use the variable from the player, get the game instance instead of using other actor like you did, other actor will be your player or whatever collides with this thing
But in general would the only reason to make a new interface be for the purposes for categorical hierarchy or if you call get all actors with interface on too many actors does that start to bog you down?
I think they get reset, oh well, I can just use a ~~local ~~member variable no problem
there ya go, give that a go
Per docs, get all actors with Interface is a slow operation, tho that just says donโt use every frame
The flipflop It has its own internal logic for remembering its last state. You may as well use a bool that you flip yourself if you need to save it in some way.
yeah this is for something I need to implement in a turn based game, probably flip flops are not what I need
I never used them before so I thought it made sense, but no
that made the ui appear, how do i make it go away when the player leaves the collision? i tried a set visibility but it still stayed
Show your code for setting the visibility.
well for one thing your widget should be created somewhere like the HUD, or you can do it on begin play, then you can add to vieport, remove from parent
Idk what you mean by categorical hierarchy but if you have a lot of actors that need the same interface I would just use inheritance.
or, well i can do that later, i still need to set it up so the player can only give the input to unlock the door after activating the ui,
That technically should hide it. Only trouble I see there is every time you overlap, you're adding a new widget to the screen.
i dont mind that the doors arent gonna be placed that often
well theres no need to keep creating the widget
Memory leaks are fun ๐
create it on begin play, or in the hud, promote to variable, and use that variable to show/hide it
well, how do i make it so after the doors unlocked it saves, and dosnt try to have the unlock prompt again?
i attempted to just get saving in general working, its still not, idk.
you want it to save, so that when you open up the game it's still unlocked ?
or just save untill the end of the game ?
i would but a bool on the door or actor that is this thing that says unlocked or not most likely
save it in the save game probably done on save
like this?
don't add it to viewport, right click the return value and promote to variable
you don't want it to be added to the viewport untill you overlap
once you have that variable, use it in place of the create widget where you add to viewport on overlap
so then on event overlap from the cast set that variable to visbale
https://blueprintue.com/blueprint/n3ed1yiv/ This is my pickup item, wh i have to check if is empty?
what is that all about ?
can u explain?
your still creating the widget every time ?
Just showing you that it works how you currently have it set up - you mentioned it wasn't hiding, but it does hide and show up again.
what am i to get from this?
you shouldn't cross execution like that
i have one actor set up to make a widget everytime i hit its collision, pretty sure yall helped me w that one too and there wasnt an issue w it then
it's simple you promote to variable
add to viewport on begin, remove from parent on end
so this is on your character ?
yea
and show where you promoted to variable
Does anyone know of any good ways to have collision that the player can't go through but other characters can?
did you drag out of thirrdpersoncharacter to get that value ?
yea
but it says error
ik
so if you drag out of your player and search for that variable it shows up ?
yea
that makes no sense again something is f'd
if you drag out from the player that you cast to, and search for the variable and do a get
it just shows an error ?
yea
I dont understand the ID comparsion part, what does that do? add it if a slot already has it?
after restarting the engine it stopped erroring, but now the ui isnt showing
I'm checking if item to pickup exists on inventory
don't set visibility, add to viewport
why?
I thought it would be if the slot is empty
because if exist i stacked it
okk, you didnt do the logic to add it first ig?
and remove from parent on end overlap?
ig?
yep
What means ig
I guess
now how do i make it so when the ui pops up the player freezes and can input an action to unlock the door, then set the doors model to hidden, set input to ui only? then im lost from there lol, just i dont want the player to be able to unlock the doors unless they activate the trigger
wdym the player freezes ? theres a few ways you can do that, you can pause the game but then all your rotations would stop as well, you can also just put a boolean on the controls that when you switch to false you can't move anymore
a boolean like CanMove or something that you can switch on and off
just the player stops so they can input to unloc the door, but can also hit b to hide the ui and restore control
well i would start with a boolean on the player that is CanMove
I'm not sure I understand the question. You wouldn't need to check if the slot is empty if you're trying to see if the item exists already in your inventory.
then run that through a branch on your movement events
you can do input mode ui only, i'm not sure you can have key events on the widget (tho it's possible you can) i don't think pressing b would work in that case
you can use CanMove or something like InWidget that you can resuse to disable all sorts of stuff
dosnt have to be b per say i just wanted it to be one of the face buttons when playing with controller
im confused
If you wanted to check for an empty slot, you'd do it on the false part here. Rather than add to the array directly, you would first try to find an empty slot, and if you have an empty slot, modify that index.
you know a boolean is true or false right ?
ye
and you know what a branch does ?
yea
if it's true one way, false the other
so if you put a cranch on you movement events
it will only go through true, and only work if that boolean is true
which movement events?
the ones you want to stop
character movement
when you press keys events fire off and thats your movement correct ?
that usually how it works
you press a key it fires an event
And what index i have to check? For each loop index?
so you don't know how your movement works then ?
because you must have events in your character
For Each Loop, check if the contents of your structure in that index is empty, if so, that index is your slot to use.
did you use a template ?
this?
ya there it is
your left/right forward/back
you want to stop that right ?
yea freeze the player for lack of better words, so they can interact w the ui hangon i have a reference
well honestly a simple solution is to pause if the boolean is just too much for you
Just started playing SMG today, itโs a lot of fun, heck every Mario game is fun, that is an irrefutable fact! That Luma ate and grew up to beโฆ a big and strong planet
Share, like, and subscribe or whatever, do as you please :)
essentially this, but not moving the camera
ya you don't want pause ig because you want stuff to still be moving around
yea
so you need to disable all the stuff that can't be used
and the best way to do that is with a branch and a boolean
i don't know how to make it any clearer tho, the branch will run on true and if you flip the boolean to false it won't run
then you just switch it back
i understand a branch and a bool, where am i puttingthem
so the white lines are exec
put them on what you want to disable
for instance that movement that you posted
put it at the beginning of the event
you know the execution flow ? the white lines
in what blueprint are u wanting me to do it in, the movement thing i sent is in my player blueprint
you know what an event is ?
yes
^
^
definately not
as i said im confused
a branch on the event that you want to disable
i can't make it any clearer other than just doing it for you
idk, im trying to figure out where u want it at, im making a branch at the end of that event and making a bool that is the condiditon correct?
bc idk what im doing tell me where to put it
you got pretty far in your game for not knowing how to use a branch
why would you put it at the end of the event tho ?
i said a couple times at the beginning of the event
so im putting it here?
yep
so does that say ui ?
yea didnt know what else to call it
so does that mean if you are in ui it should be true, and if not it will be false ?
run it off of false
this way if UI is false then you can move
and default ui to false
so now when you add the widget to viewport, change that variable to true
and when you remove it, set that variable to false
so when it's in the viewport you can't move
but everything else will work so if you need other things disabled you can just add a branch to that stuff as well
for instances if b does different things depending on if you in the ui
you can just use the branch
at this point i would almost make an enum for state so that things could do multiple stuff but you probably don't need that
ya that should stop your movement while the ui is up
i would clean up those lines a bit
so now i need to add inputs for the ui
will do
?
cast other actor to player on end as well and use that
so that end overlap doesn't trigger if something else overlaps
you want when the character leaves, it'll also clean up some lines
How are you determining that index to begin with?
instead of comming out of the top cast, use the bottom cast on the two nodes, remove from parent and set
kk
So then it'll be whatever the last index is of the array that was executed. That won't do.
If you want to save yourself some processing time, you can check there if the slot is empty.
First create an integer variable called something like "First Empty Slot Index" that has a default value of -1.
Put a sequence on your Loop Body. The first part of the sequence can be used to handle what were going to do now (determine the first empty slot) use the second output to connect back to the rest of your loop logic.
So the first line of the sequence, check if "First Empty Slot Index >= 0". If true, do nothing further. If False, check if the Index is empty - if it is, set the "First Empty Slot Index" to the index of the loop.
What should happen then is that by the time the loop is finished you've either:
A) Found a matching slot to allow the item to stack
or
B) Possibly Found an empty slot.
By the time you get back down to the "Item Found" branch, you can now check if First Empty Slot Index is again > -1. If not, then you don't have any empty slots, otherwise you can use the "First Empty Slot Index" and place your item in there.
Which one runs faster?
a branch or a single equation?
i would also use on remove from parent the bottom cast
ya you need to make the input actions if you share buttons use the boolean to determine what to do
its coming from the game instance not the player
your widget reference, your still pulling from the top cast
ohh
Profile it and find out. This is getting into minutia though. I wouldn't bother unless you are finding that there actually is a performance bottleneck here.
Like this?
how do i setup the inputs to map them to the buttons? i created a back for b and y for unlock the door but theyr not mapped
#enhanced-input-system maybe
i still use the old input system for most of my stuff i just used eis a couple times
i do for most of them but i figure i should learn the new inputs
After this i have to break it? @dawn gazelle
Did you not have more logic you needed on item pickup to check if the item was found in the array?
yep
how can i bind the 0 text on the star door text prompt to the required stars variable?
So what you have right now is good for finding the first "empty" slot in your array.
Now you still want to find out if the item is in the array - this is why I suggested a sequence - use the first part of the sequence to try and find an empty slot, then use the second part of the sequence to see if the item exists in the array - and if you find it in the array, then you can break as you had it before.
Basically, you're looking through the array once for two different things - for the first empty slot and if the item is already existing in the array.
And you only want to break if you found the item in the array.
There we go
Hey, how do you manage the order of the spawn of each element of the map?
I want to get an actor of class (on the event begingplay) but i'm not sure that actor already exist?
instead of doing it in a bind or on tick, why not set it when you overlap ?
if my actor spawn first the target actor will not exist yet
?
I'm trying to create grid and put it on the landscape. I created GridManager that spawns Cells. I even thought about making every cell shot line trace down, so it finds first location and lays itself there. It kinda works, but there must be other way to actually make grid on the landscape that is also working with the Grid Manager? Or should I separate these 2 things and just create visual representation on the landscape material and lay ''cells'' on top of that, but then how can I access each color under every cell tochange when hovering over it for example?
when you overlap before you show the thing, set the text of that thing to the requires stars variable from the bp, this way if you duplicate the code, you can just change the required stars and it will show the updated one
bind runs on tick so it can be less performant than just setting it when you need to
how do i do that
Now when i pickup an item i get two copies. @dawn gazelle
so the first thing you want to do is in that widget make the text that you want to change a variable
so cick on it, and at the top right i think as variable ?
just check the box
ok it is now
ok so name it something you can remember
or name it something
so that you can retrieve it by name
once it has a good name and isvariable
you can pull off the variable you made of the widget
and get variablename
then drag off that and do set text
i would check for a stack, then check for empty slot
right now drag out from that and do set text
which set text tho
I'm having an issue where the station spawns the correct amount away (+6,500 from the current station) the 1st time. However the 2nd time the station just spawns on top of the first station spawned. Not sure if that makes sense, can anyone help?
variables, content, set text
yea i dont see that
yea mine dosnt have that
wtf is wrong w unreal why do i need to keep restarting for things to work?
bc now its showing up
ok i got set text
but for what? because i have empty inventory so
that should work now put the set text before the add to viewport
it should work although you may need to use invisbility it might reset but i don't think it does
what does that mean
try to set it before add to viewport see if it works, it should
it works, but the controls arent set up, so i cant do anything from there
Friends, my 3d math chops are awful, could use some help: I'm trying to determine which direction along a wall a player is looking down. I have the wall normal and an impact point thanks to a line trace, and I have the player's forward vector, now I just need to figure out how to get the xy vector (don't care for z in this case) of the wall along the direction the player is looking in, assuming it's not perfectly perpendicular.
Then I will just apply a -90 or 90 degree rotation on the z axis to that normal wall vector and I should be ok, but I can't quite figure out the sign of that 90 ๐ฆ Any tips?
#game-math might know
nothing? no one?
Perfect, thank you, will post it there.
show more code
weird that this doesnt work, have you tried just using a float or vector variable
oh
float or vector variable?
has to be something in the rest of the blueprint?
yes so make a variable thats a float on the left bottom side
like what exactly?
then add 6500 to it each loop (i assume this is in a loop)
or if it is in a loop you could just multiply the index by 6500
then use that on the x only (right click the location and split)
What's a loop?
I didnt know there was a loop... can you show it?
ok so now i have inputs set up, how do i get them to function with the ui? and the unlocking
hold up, let me clean up some code
what sort of functionality are you going for ?
i want once the ui is triggered if the player presses the button to unlock it makes the actor get destroyed and ill put a warp behind it at a later point, but for the b button i want it to just give the player their movement back and make the ui go away
but only make it do those at the trigger box that way the player cant unlock a door anywhere
when the the event trigger
ok so then you have your inputs and events ?
i have inputs, im not sure how to go about making the events for it
in the b key event, just get the widget and remove from parent and switch the ui variable to false
In another blueprint (BP_Station)
right click and type the name of it
what
what's the problem
oh i did that i mean to make them only work once the box collison is overlapped
does this not throw an error ?
Triggers when BP_back (poor name for BP_Train) overlaps a hitbox in BP_Station
just use a branch and the ui boolean
do the same branch you did on the movement events
not exactly
can you print the value of the vector out of the GetActorLocation?
My goal is to destroy the previous BP in the array of BP's
then after it spawns the new BP it will set that as the new current
like this?
but what doesn't work, is the location not correct?
because you destroy it then try to use it
yeah so the first time it works... spawns a station 6,500 uu behind the current station at (X=0.000000, Y=0.000000, Z=0.000000). But the second time instead of spawning a station infront of the current one, it still spawns the station 6,500 uu ahead of (X=0.000000, Y=0.000000, Z=0.000000). And not 6,5000 ahead of (X=6500.00000, Y=0.000000, Z=0.000000). If that makes sense
anyone have tip how to make easy bullet trail ? when I am shooting that white thing behind bullet
do you mean i would have to get rid of that actor in the array for the node to spawn the next actor in the array?
or am i understanding that wrong
you destroy the actor
then you try to use the variable
ahhh
genius
so i have to get the value before i destroy the actor, and that before i spawn the new one
i have this but when pressing the inputs i set, nothing happens
your trying to use the variable you get it from the cast, put the case before the branch, but are your inputs on your character because they should be, or in the controller
Wait, on ActorBeginOverlap, which of these is which? These both seem to be saying the same thing.
wdym
so yu could get the actor location, store it in a variable, destroy, and then use that variable to add to to get the next one
still doesnt work but i think thats a big step in the right direction, thanks
I've been staring at the same code for too long
i mean it should work if you cache the position before you destroy
and use that to spawn the next one
yup
yeah I didn't plug the new variable in
๐คฆโโ๏ธ
The node isn't executing for some reason, I gotta troubleshoot that now
i did
put a print string see if it's firing when you press b
is this on your player ?
DIDNT PRINT
ew why caps