#blueprint
1 messages Β· Page 164 of 1
ok. i thought you were just about to call a funciton with an argument
oh yea then id use the hit result itself
how often do you have penetrating hits and how fast are your projectiles going and are they in straight lines?
no projectiles, just line traces
hitscan weapons
Why not just have the clients rerun the trace and generate all that other data clientside?
it's just for cosmetics
then you can send 2 vectors instead of a bunch of data
Plus what would you rather have, hit FX floating in space or traces that visually miss or hit, disagreeing with the server?
you're gonna have one of those if you have prediction
Can anyone tell me what im doing wrong? Thank you in advance π
You might want to specify what you're trying to do. π
What is that meant to do?
PassRef doesn't pass anything
On checkbox changed set static mesh on 3rd person character
looks like you're passing nothing and then setting the new mesh to nothing
is that what you want to have happen?
Yeah, i dont need to pass anything, i just need it to change static mesh on checked box
hi
yea probably should do that, I guess its better to have effects that visually make sense even if they sometimes disagree with the server. Though some of the weapons would be off quite a bit since I have beam weapons interpolate up to 25 traces per frame so the client side calculation would delay the effect from the true server side hit quite a bit.
A more correct way of doing this would be to have an event dispatcher on the widget this is called when the combo box is changed. When you then create the widget (while you have easy access to the widget that is created) then bind to this event dispatcher that will call a function on your player character to update the static mesh.
I don't remember what talk it was but it feels a lot better to hit something you see yourself hitting then it feels bad to get hit when you didn't see yourself get hit. So favor the shooter, trust but verify their hits, and sell it on the other clients
Empty or anything, doesnt matter, just need the check box to use the interface to send a message
Why do you need to use an interface?
what BP is the implementation of Pass Ref on?
Its how the tutorial showed to do it
I currently have it implemented on both the 3rd person character BP and the Widget BP but I think you only need it on one. Did that when I couldnt get it to work
In all honest it sounds like a bad tutorial. I personally wouldn't use an interface for this as that would require the widget to have a reference to the player character.
so where does something tell the 3rd person BP anything?
yea makes sense. Thanks for the help and advice (:
so far I see some widget telling a button "Hey, pass ref"
not telling the character, telling the button
button talking to itself it looks like
What BP do you create the widget from?
BP_ThirdPersonCharacter creates the widget
Widget BP checkbox on checked state changed then use interface
I would use an event dispatcher then. Add one to the widget and when its created, have it bind to the event dispatcher and specify the delegate (function) you want it to call when the event dispatcher is called on the widget.
Then it's just a case of having the widget call the event dispatcher when the state is changed on the checkbox.
No need to worry about getting a ref of the player character to the widget, (which it shouldn't need to know about) just to call an interface. (which also shouldn't be needed in this use case)
Okay, ill try that. Never used an event dispatcher so ill google some how tos
Why is it when i test for server / client, in the game instance i return "isDedicated" "IsClient" and in the game mode i return "isClientAndServer"?
1: Add event dispatcher to widget and call it 'OnStateChanged' (or something along though lines)
2: When the check box changes it state, have it call the 'OnStateChanged' event dispatcher.
3: In you player character where you spawn the widget, pull from the return value on the create widget node and call the bind to 'OnStateChanged' event dispatcher.
4: Pull from the red square (delegate) on the bind node, and add a 'Create Event' node.
5: On the create event node, have it create a matching function.
6: Add logic for updating mesh.
Done. π
just getting player pawn and calling that interface on it will work for now
not great, dirty and gross, but it'll work
right now you're making that interface call on the button itself, not very useful I don't think
This actually worked Thank you! I do want to get in the habbit of doing things the right way though, so im going to try to do it the event dispatcher way now
Hello,
I'm trying to turn some blueprint stuff I have written into a component, as I realized those exist after I wrote it lol.
What I am trying to do is take the current transforms of whatever I attach the component to, store them in an array, and then play them in reverse. I stopped before completing it as I realized the component exists and it would be way more efficient, but this array would then theoretically takes those transforms and if X seconds have passed clear the first indices at the same rate it adds them saving ram.
However, upon trying to turn this code into a component I am left with a few questions
-
How can I access the current thing (Static Mesh, Skeletal Mesh, Particle, ECT) within the component?
-
How can I get that components transforms, I cannot access Get Actor Transform for some reason?
-
What would be the best way to determine if X seconds have passed? Is there a blueprint that counts IRL time?
-
Is it possible to access the animations of the thing the component is attached to, if so how?
Thanks!
sorry for the paragraph lol
attach the component and you can get the data from owner
does anyone have a good tutorial on how to make an inventory system for 4.26
so do I need to individually set the data from owner for each thing I attach it to?
You don't need a tutorial. Start by thinking about what a stored item should be in your system.
Is it just a struct?
just a row entry into a datatable?
an actual actor that's hidden?
itd probably be an entry in an array, easier to access from the code
ur component should go there, then its just usable?
Then make an actorcomponent which contains an array of those, and add events for AddItem and RemoveItem etc
oh im dumb AF LMAO thanks
sorry, i started using ue in february, do you think in maybe 2 hours you could help me make this
;p
not sure about the time thing though
Still, thank you for your help!
I can probs do something with delta time if I search google hard enough lol
https://www.youtube.com/watch?v=vHT4MhmwacE
No but he can. Not vouching for if this is any good or not but it's a start.
We are revisiting one of my first series on the channel; the inventory system series, this time with different implementations, improvements, and now in Unreal Engine 5.
In Part 1 we set up the inventory component and some of its core functions and variables that will be in use.
SUPPORT ME
Patreon I https://www.patreon.com/ryanlaley
Buy Me a ...
ive tried that one lol, not sure if i messed up or not but it broke
do you only have 2hrs to make it, or 2hrs until you can start to make it?
Theres a rule of thumb with most videos and guides. If you followed it and it didn't work, it's nearly always you missed something :P
Trying to follow your steps, what do I hook up to this?
i meant 3
also until i start
BRUH
the arrows symbolise execution path
you hook up whatever event you want to run the bind (usually BeginPlay or if a widget, Construct)
Usually begin play. The earliest you want the thing to listen for the event, which, to reiterate is normally begin play, but does have other fringe cases
Got it, it had to go right after the widget was created, Thanks everyone who helped
mainly the thing i need help with is figuring out the mechanics on an inventory so i can code it myself
Thats what im working on right now XD
The inventory is really the easiest part. its just an array of items. the mechanics of item interaction can be done in stages, where id say selecting what object to interact with is step 1. What an "item" is can vary quite a bit game to game so that all depends on what you have in mind.
do you think maybe around 10 PM est you could hop on vc and help me
@cyan berry i dont mind helping, but i dont know if ill have the time left in the day or still be around then.
I got the event dispatcher to work however, when i call the event dispatcher a second time and use a flip flop. It wont change the static mesh back
https://streamable.com/00g7ud
Does anyone have any insight or tutorial recommendations for making a melee weapon system when it comes to equipping and unequipping? I have no problem with traces and the function of a prototype melee weapon in and of itself, but I don't want it all on the player BP with a spawned actor.
Thats what im also working on, I can do it from the thirdpersoncharacter BP but if you want to do it from a widget, thats what im working on learning right now
Guys, I have a BP with a box collision. I want to spawn there inside that Collision box some blocks which are other blueprints. I want it to place blocks randomly inside that volume. Here is what i have. But For some reason it works weird. Please help
how can i take coordinates from that node "set actor location" to feed them to "spawn actor" in a new loop?
instead of the get world location?
could someone help me code an inventory system at around 10 pm est? ill be on till 1 so if you won't be getting on until later just lmk
add a check to see if it's touching and/or within a certain radius of another one
I tried this and got a mess. I just need to tell that node in the end to store its location and in the next cicle just add some value to Z input
Man i have no idea how to do that
when it chooses where to spawn check if there's another box within a certain range on the x and y and if it is retry the spawn
i just want to bring coordinates from here to there
variable setting and custom events, maybe a return value and if it gets it right do another, else retry?
idk im fairly new
where u set the variable, ur on the right track. im assuming it just overlaps them though
i dont want to go that way with checking range. Its too complicated for me. I dont know how to do that. So i just want to take last coordinates, add some value to Z axis and that way i will make every next platform higher that previous one
make a variable for the z that gets higher each time
yeah
i made almost the same just it adds random from 50 to 150 for example every cicle
but it doesnt look like it stores the location of that previous platform at all
i cant even bind these two guys
set it to the location of the actor no connection needed
That data type is transform not location i think (not sure if this is useful to your solution)
@somber elbow you need some math, or it will just place the 2nd object onto the first
something weird is happening
it makes too many blocks
it should be only 5 in each area
make it only do 5 per area
maybe it's not doing the areas right
here it worked the best way
5 platform per tiled piece
just for some reason now its flooding me with platforms
you don't have anything connected on the completed do you have loops in loops?
Not sure if this is the solution but the first time you posted you had an initial world location, in the new version it isnt assinged until the end of the loop
You can also right click on that world transform and click split structure pin, then use world location instead of world transform, and change the data type to world location
im trying this one
just somehow i should tell it to grab that transforms from that SET node and use them in the beginning
let me know what that does, looks like thats something iw ould try XD
Use the set, then loop, then change the set
ill be back in 2 hours
so try Event BeginPlay > set world location > loop > spawn actor > Set world location
are you still get to many?
doeble check your math if it's still acting weird, draw 500 debug points with that randomization math
btw there's a get random point in bounding box
thats the best result i have. I feel im kinda close, but it doesnt work as it should. It doesnt take in consideration the last coordinates from "spawn"actor
it just adds some to Z axis. But it adds not to the last bosition
becaues ur iterating over the same math each loop
this needs to be re-set to the new platform.
no
its X value
its fine
i should add those values to z somehow
how can i do this?
all u need is z?
no
i have errors
i just dont understand
i have 4 cicles. Every cicle new spawned platform should be higher than previous one.
u need some sort of variable like 'n' which increases each loop. right?
kind of
this part should do that
but now get actror is not connected to anything
i pick wrong nodes and it doesnt work as it supposed to
thats not good ;p
what should be in the beginning of the chain to feed the result location on the end of the chain so the next spawn platform will be higher than previous one?
i cant understand it
Quick question, what node is this?
If you are spawning the new platform from the platform actor class, the new actor will have its begin play fire and its spawn platforms function executed.
type converter? im guessing
that would make sense, ty!
Hello ! How can I set the intensity of my directional light through a widget ? I'm a beginner with blueprints π
my issue is I dont know how to "fetch" the directional light in the scene
i think its because its more than 1 . and ur are trying to cast 1 to 0
I have to go and toch some grass. I m casting an actor from another bp. I say you cast in Z axis = 0 . Then i need to loop that cast so every next actot will be Z axis + 100
i dont understand what im doing wrong and why is it so rocket science
that 3rd sentence makes about 0 sense
i think @somber elbow is trying to spawn the actor from within itself. but utimitally hes trying to spawn each actor at like a 2x height.
where does this mentioned cast come into play?
I have seen no screenshots of a cast node either. Are you using the wrong terminology @somber elbow ?
where is the cast you were talking about?
should it be there? i just trying various options here
no
if you're using spawn actor, you don't need to cast
just drag from the return value
a cast takes a reference and checks its type against a class. If successful, it allows you to access its insides. If you're spawning something from a specific class you don't need to check if it's the right type, it's obvious that it is, you selected that class
the loop is only 0-4 how do you have so many?
because it is tiled blueprint and it takes all the platform from all the tiled blueprints and place them into one spot
is it really such complicated task?
as for your actual issue, if you're just trying to spawn a platform higher than the last one, get current location, split the vector, get Z, plug current X and Y into new set location, take Z, add 20 (or w/e) to it, plug it into new Z
no, you just need to understand the math/logic
are you just trying to change the Z or also Y?
and what is the current result of this code? what happens?
also idk what the value of your platform position range integer is, but unless it's a negative value to begin with, multiplying it by -1 and feeding that into the Max of the range will prly not do what you want
this way it works
and the platforms arranges as they should be
but when i switch back my tiling (which worked perfect before) it became a mess and it spawns all thes platforms from other tiles into one tile
as soon as i activate that lower line Tile platform
i got this
it seems its repeatingely calling the event begin play on the spawner
hmm
you demonstrated the loop working byitself right?
not quite sure what it means
should i change begin play on something else?
Basically, that's what's happening.
so somehow i should tell the bueprints that loop1 should spawn in tile 01, loop 2 in loop 2 etc
@somber elbow im just saying that when u tested #blueprint message this it worked right?, so it doesnt seem to be how the platforms are raising.
yep there it works perfectly
but it doesnt works well with lower blueprints which make thes tiles
yea, maybe put the platform spawner logic inside the tile spawner logic.
or no?
then when the tile gets destroyed so should all the platforms
well, everytime a tile is spawned, your function to spawn 4 platforms would fire too.
thats what im trying to make
Thank you guys for your help. I will try to finish it tomorrow. Looks like i should work more on the lower blueprints
when i pass the Customcharacter into node, but set the reference type to Character, why cant i use the Customcharacters member functions when using the character reference
Two questions
-
I am just about to setup a test for a component I have been coding, however for the component to work I need to set the parameters in the (first image) so it knows what to reference in the object, yet it comes up completely blank. Any ideas as to why?
-
How can I access a Boolean variable from a component, as per the second image it does not exist lol.
Thank you!
i believe you need to create the Ucomponent.
AMyActor::AMyActor()
{
// Set this actor to call Tick() every frame
PrimaryActorTick.bCanEverTick = true;
// Create and attach the component
MyNewComponent = CreateDefaultSubobject<UMyComponent>(TEXT("MyNewComponent"));
MyNewComponent->SetupAttachment(RootComponent); // Assuming RootComponent exists
}
any way to do that in blueprint?
it is added as a component
in ur ucomponent .h file. UCLASS(DefaultToInstanced, BlueprintType, EditInlineNew, Blueprintable)
@simple apex Pinging myself to save this for later, I just realized it has been 6 hours since I started and I am starving π
Thank you for your help!
If I am not using tick on my actors, should I go back and set "start with tick" = false; or is non-use the equal performance as disabled?
Is there a way to get a reference to a flashlight component on a character from within an actor component without directly casting to said character? Like going down the heirachy and casting to the character node? Or would I be better off just building it into the character blueprint (which I am trying to avoid)
i use get component of class against the owner to get a ref to other components
is there anyway to use this node without disabling the "I" key?
What's that got to do with an I key?
I have an Input Action for the I key that opens a widget. When I use that to open the widget, it disables the ability to use the keyboard
K but that node got nothing to do with any input keys, you just happend to run it after you press an input.
You can call the node, how ever you want
When ever you want
The node it self has nothing to do with keyboard what so ever
When I run that node, it disables the keyboard
U call it when you want your UI to consume your input. Period
Yes because you set the input mode to UI
It consume your game input
Right, but I want the I key to still work while in ui input
I don't want to be able to walk or move camera while its up though
You can add extra check for that. I would make a macro that checks if the character is in cinematic, inventory etc
And just add a branch on your movement logic
The workaround worked, thanks
Anyone know why "Find in All Blueprints" just hangs sometimes returning no results, forcing an editor restart to be able to search again?
Havenβt had that, are you low on RAM or something ?
No, plenty of ram, I just do a handful of searches and then eventually the search just hangs with the progress bar at 90%-ish. Just spins forever, not blocking. I have to restart the editor to get it to work again. Has been like this for many engine versions for me.
how can i make an enldess game so that it doesnt reach world end
That's a big question, but the short version is you use some kind of generated world. You generate the space near the player and as the player moves around you clear away where they left and generate more where they are headed. You'll want to use some kind of seeded noise function that is based on actor location to decide what to generate. You'll sometimes see this reffered to as a "spatial hash" that ensures that given a specific seed and a specific location you will always see the same result.
I'll also add that every so often you will need to "rebase" the players location back to the origin in Unreal or you will start seeing issues as unreals world is only(?) 88million km cube so eventually you will hit the edge. This can be tricky if you have a lot of dynamic actors and want to do it seamlessly. It helps if you can have some gameplay excuse for hiding the transition, like a magic portal, or going to sleep, or load/save or something.
Again, really big topic and lots to learn there but the above phrases should get you started google searching.
i was looking for reposition assets but implmeneting it and it should be seamless and etc
Hello, I want to spawn some loot when this trash is picked up. What action do I use to spawn another actor once something is destroyed? (I'm using the Nice Interaction system)
wherever the sound is being played from you could just spawn actor of class (class being your loot)
I have this actor that when he spawns, he follows the player based on if the players is looking at him or not.. when this actor dies or gets despawned, the next same actors who gets spawned don't follow the player unless I look at it for the first time. Why is this happening? (I can provide screenshots)
always provide screenshot/recordings, its hard to understand without context
@pastel garnet
Bind event on destroyed
Or you can just run the code required and then destroy the actor
got it, thank you!
you said the actor only follows when the player is looking at it which means when the actor is spawned, if the player isn't looking at the actor then it wont move
the Spawn Actor has transform but not location- how do I get it to spawn where the destroyed actor was?
No.. the opposite. The first time it spawns is okay, but when the first gets destroyed and a new one spawns for some reason to be "activated" it needs to be looked at at least once
Right click on transform pin and click on "split struct pin"
Anyone know why the gamepad face buttons trigger both pressed and released when you hold the button? This is happening when using Enhanced Input on 5.3.2
The keyboard equivalent button for this same enhanced input, which is setup the exact same way, doesn't display this strange behaviour
show a recording of the first actor being spawned and then when it dies to respawn another one
Bad gamepad button?
You could try #enhanced-input-system , maybe you need to use diff triggers for gamepads
You need the proof? Trust issues π€£π€£
Yea I checked that, but all gamepad face buttons behave the same. And when I don't use Enhanced Input the gamepad input is registered properly.
What trigger are you using ?
The actor just stands there menacingly till I give him a glance. The first one instead, just does its job as soon as spawned
But they're both the same BP
Let me move into #enhanced-input-system
like i said, its hard to help without context and seeing it somebody might be able to pointout something
ok I'm able to spawn an emitter at location but not an actor BP. Any ideas?
Probably because at the time event destroyed is called, the get actor location won't be able to return a valid result anymore.
ok, I tried a sequence and that didn't work either. So maybe only one thing can be called?
nevermind, I switched the order and the emitter still spawns, but not the BP
add a break point and inspect the value being returned or print to the screen
it's not breaking anywhere, just not spawning the actor BP
oh I see... I'm trying to spawn an actor BP that it doesn't like. I was able to spawn other stuff
But with a video you would just see the actor standing there.. there's nothing helpful in a recording
hey so i got this code, its sapust to play a foot step loop while moving but when i move once it jsut loops forever even when im not moving, its wierd becouse it works fine in me previus project (the previus one was in 5.1 this one is in 5.3)
anyone know how to fix it?
Your previous project was likely not using Enhanced Input then. EnhancedInput stops triggering when you stop pressing the key unlike the old input system that would constantly tick every axis style input. Move everything from the Branch onwards to a Tick event and it'll probably work fine.
Hi guys stupid question; Can anyone tell me how I disable this tooltip I get when I hover the output nodes pin? thk you
Starting the timer should happen on the 'Started' pin on the input action and clearing and invalidating the timer should happen on the 'Completed' pin. You can probaly remove the do once node.
can someone write me this bracket > my keyboard doesnt have the opposite facing one
gottta love budget tesco keyboards
Hi!
What do I have to do to rotate an actor's forward vector to point to -Y?
Thanks.
I have two tasks for my project that I don't know how to implement. I am focusing on the game Phasmaphobia, it has a camera and a flashlight.
Task 1: Make a camera that can be held in your hands via RenderTarget, but how to display objects in this camera that will not be visible in the player's camera?
Task 2. UV flashlight that illuminates objects that are not visible without it (ghost handprints).
guys does anyone know why my struct pins are keep converting to something called "fallback struct" every time is restart my project?
< >
hey, i hope this is the right channel for the following question regarding control rig scripting:
i just want to increment a value (cpp equivalent to +=). i tried to do it like in the picture but the result is, that "TestFloat" seems to reset to its default value of 10 and then the subtraction happens, so that "TestFloat"s value is never less then 9.84...
this line of code gets called in the forward solve. does anyone know why that happens / how i can properly increment values in control rig or should this actually work what i am doing?
Hi fellow blueprinters, I am having an issue replicating a certain variable from my player controller class to the server, I am trying to set an enum i made for a vehicle selection thing i am making, and for some reason, the server doesnt get the updated variable from the player controller, it just goes to the default value (whatever is set in the player controller within the blueprint) I have put the thing in a custom event to run on server but it doesn't work?
The script is located within my widget btw
Don't use multicast for stateful entities (95% of your code)
- Widget don't replicate
what should i aim to do instead?
If you are not comfortable with Object Oriented Programming, I do start with Single Player.
If you are already comfortale with that and have made single player games, I do start with #multiplayer compedium.
Once you read through them, try to attempt syncing a variable accross all machines.
If you fail doing that, read the compedium 4 more times and repeat.
okay then, thanks for the help π
Try to avoid youtube blueprint tutorials especially for multiplayer. A lot of them are just straight up wrong.
Don't use multicast unless you know what you are doing with it. TLDR, if you need something to be sync, Multi cast is not the way.
Exi's compedium and Wizards tips and trick.
You will find this in compendium, but a good rule of thumb is limit what the client tells the server to do
I may need to redo the project, its so messy and terrible D:
So in your example there, rather than the client telling the server what vehicle to spawn
The server should keep track of which vehicles the players have access too and as a basic example the client can request an index of the vehicles they have access too
If you want to spawn something that will get spawned on every machine, you should spawn on Server side anyway.
If a client spawn something, it will only be available in that client machine
Indeed
and often with bad codes and the wrong way (multi cast) people end up making copies
We all start somewhere haha
Most of my code is just run on server multicast garbage that would probably just self ddos a server lol
Multicast has its uses but itβs not your only option when a server needs to pass information to a client
That's not even the issue that you need to be aware off
Multicast just mean, run this event/code in every connecting machine
so what happed when a player has yet to join the game or outside relevancy?
they don't execute the code and you have de-sync
It's only used for something that won't matter if it doesn't get run.
Eg, a chat system where you don't really care previous history. So when a player join, they can read incoming chats, but they don't need to know the previous chat other people have commited.
Or Special effects, where if u don't see the blood, who cares?
If something has to be in Sync, don't use multicast
Alright then, im probably just gonna make a copy of my project, remove all the junk and then replace it with better code using the compendium as a guide. Thanks for the help π
Also I donβt know what your expectations are. But if you want to learn something donβt let someone tell you not too. Lot of people will say make a single player game donβt touch multiplayer. All fine and dandy if you have to release a game. But if you want to learn multiplayer networking do it.
Itβs harder, there are more considerations, but thatβs how ya learn
Learn from mistakes
Yep and test and iterate
You will find out pretty quick if itβs not running well π
Yeah lol
I don't agree with that, if one still struggling with references and OOP, they will end up shooting them self in the foot and wonder why their code isn't working because they now have to worry about more than one instance of the game and that will just confuses them way more.
At the end of the day, you do what you want. But imo, skipping the steps never end well.
And thatβs fine but I donβt really agree with the make a single player game first then multiplayer
okay, i better go off and sort my project out then, see you later
Best of luck!
Yes a general understanding of concepts is important. But if your end goal is make a multilayer game, you arenβt learning how to do that making single player
and if you arenβt under any pressure to release a game itβs alright if it takes you longer cause you donβt know what your doing yet
you most definitely do. I can't imagine a working multiplayer game without knowing OOP.
Yeah but thatβs not what Iβm arguing
Yes you learn skills that can transition. But you can also learn that starting with multilayer. If you already have a background of programming you may not need to relearn OOP
Oh well, it's just my opinion and I can only offer opinion that I will give to my old self
No I hear ya and it is a good talking point of not biting off more than you can chew
Yeah and unfortunately people find multiplayer gate keeping rather very early.
But if your game is small you MAY be able to get away without C++ , lot of variables
But yeah it all expectation management
Sure, I think turn based game/ card game are doable in multiplayer
Hence why βmy first project is gonna be an mmoβ isnβt a great starting point XD
but competetive shooting, MMO, etc. That will remain a distant dream if they don't want to learn what it takes, imo.
no matter how much they wish, the tool is just not cut for it.
Yes there are more considerations with that yep
an MMO has an entire backend you have to worry about π
Competitive shooters are simple on the surface but get dicey fast
hi everyone, im making a 2d game and im trying to connect my two levels but when i teleport to the other level, my character doesnt spawn. can someone please help?
define connect?
are you just opening another level
like when you finish one level and wanna move to another level
Another level (world) another entity.
it doesn't care about your previous old world.
if you don't spawn in that specific level, check your game mode (if you are spawning via game mode) in the problematic level.
Just using open level? Do you have the basics of a game mode set and a player start?
yes yes i do
show pictures of it
it takes me to the other level but it doesnt spawn my character
open the level where you don't spawn and show your world setting.
this has nothing to do wether your new Level spawn your player or not.
Cast doesnβt seem needed but fine so far
Also use Open Level by soft ref. Don't hard code a level name.
What if a projectile overlap the trigger? π
or anything really.
Im focusing on his question
Not immediately saying something he isnβt asking is wrong Iβll get there later
Thatβs also fine for prototyping
Which is likely where the project is at
@night pollen #blueprint message btw
it opens the new world like this but thats where the character is supposed to spawn
im a girl
Ah apologies π
lol nw
Well first of all, you got a bad size there. That can cause the player to not spawn depending on the Spawn Rule.
you need to give enough room for the player to spawn. In your picture the capsule overlap with the wall/roof.
Something you can also double check, try playing directly from your level 2 and see if itβs otherwise normal/spawning you
Could help narrow it down
probably not, right now try to give enough room for the capsule until the bad size text dissapear.
when i use the gate the issue still happens
anyone knows the reason why the mesh is distorted at the end of the spline?
the same things happens when i try playing directly on the second level
Show picture, check if you give enough room, then check the World Setting of the level.
here is the blueprint where I'm setting the start and tangent
oh my god im actually brain dead
thanks dude
also one more i hope you dont mind
how do you start the game from the main menu? like i have a seperate world where the main menu is set but idk how to start the actual game from main menu
do you get what im saying?
Maps and modes in project settings
There is a field for defining the level for game start
And if you really want
One to determine what level the editor starts up with
thank you!
this is my first game and its for a uni application π
i really need it to be functional
very nice!
May your compiler be error free and only contain warnings π
(Which can safely be ignored I assure you π)
amen
@worthy jasper @frosty heron would either of you be interested in playtesting this in a couple of hours?
Hello hello, I've been struggling for a few hours on an issue that felt obvious but after trying again and again I think it's not that obvious...
So my goal is to rotate an array of actors around the last item in the array... I had found a solution on the forums but it only works in world space or if the actor doesn't have any rotation, I'll post a screenshot of my current solution below.
So I figured if the code works in world space I just need to convert the rotator to the local space of the last item and it should work, but I haven't found any way to do that...
For the details, my delta is in world space and is controlled by a rotation gizmo, when one axis is dragged it outputs the axis delta which is the input of the function
I will be a sleep in a couple of hours (night shift) but Iβm happy to give it a try when I wake up if you wanna DM it
okay sure ill see if i have enough time
What are you plugging into the last index of the for loop? Might be accidentally be adding too many spline meshes
number of spline points added by 1
That's probably it. You want to add one spline mesh per segment of the spline, so that would be one less than the number of spline points. However, the first spline point will be index 0 instead of 1, so that's another one less. So you likely need to do number of spline points minus 2
yep! that fixed the problem!
funny enough, I followed the blueprint setup from a tutorial
one sec
Hi everyone! Welcome to Part 02 of the Spline Mesh tutorial. In this part of the tutorial, I will be going over how we can create the Spline Mesh Blueprint, and also how to have some parameters to appear in the details of the viewport for us to edit. Hope everyone can learn something new from this tutorial and thank you for watching!
#unrealeng...
and they're using ue5
and they had no issue
At 2:20 in that tutorial he does do the subtract 2 for the for loop, and even takes a minute to explains why
oh for crying out loud, I saw it as an add instead of subtract
cause I wasn't viewing the video at full quality
How do I add a convex collider to a Dynamic Mesh?
I need it to be movable with physics
I'm using enhanced input for press and release. If I press and hold then move quickly to the left/right, then release the button, it doesn't execute completed node.
my dynamic mesh just falls through the level with a simple collider enabled
in terms of shooting system, which one is better both visually and functionally, by using projectile or hitscan?
Helloπ
I'm struggling to add components via blueprint in editor for a tool I'm building. The tool uses Instanced Static Meshes and places rocks. Up until now I just added one ISM component to the blueprint with the 'Add' button in the components tab. Now I want to place different rocks, so I used the node 'Add Instanced Static Mesh Component' to add as much instances as I need. The problem is that if I add the ISM's via this node they will disappear after a project restart unless I recalculate them each time which I don't want. Is there a way to add components via blueprint the same way the 'Add' button in the components tab does?
Guys I need tip I have AI plane, which is chasing me , I am his target point he flies like this he use find look at rotation his location and my location and he flies to me, but I need somehow get distance between his vector and my vector in 2D , in monitor so if he will aim right at me it will be 0 when he will aim somewhere else than on me it will be more like 0 because there will be distance, i cant compute this any tips?
It would be something a long the lines of getting the forward vector of the plane, convert to a rotator, the get the look at rotation from the plane to the target and compare the two rotators. (forward vector and look at rot)
hey guys, how to get and set Material instance parameters in the another BP?
like opacity and color
tried something liket this but doesnt work π
Is it possible to see where in a blueprint a reference (seen in the reference viewer) is located?
u cant convert it to rotator directly hmm
You can get the x vector but probably wont be useful in this instance.
yea
i want this distance between rotation 1 and 2 π to easy explain will try something else
I'm not sure what you mean by the distance between two rotations. Wouldn't it be the distance between two locations?
yea locations but in 2d
while they are in 3d world
but it should be just X Y
not depth
that would still just be a location, you just leave out the Z coord
?
tried it but propably vector convertion to 2d was wrong
i got false output
Why does it work? is it the same as a foreach loop? if i put all of them into an array?
sometimes you can plug an array in as well
how are you converting it?
lol
so i guess it's the same as a for each?
I have created a BP with a single cube mesh and a Dynamic Material Instance. I change the color of the instance with a Timeline + a Lerp. It was ok. I put 6 of them on my game i didn't have any issue.
I try to improve the code.
I create a BP with 6 cubes. and all of them an Material Instance Dynamic. I change the color of all instance in the timeline + a Lerp. But now, i have performance issue.
Why? Should i understand that the TimeLine create a new thread? and to have 6 BP doing the same same thing but with their own timeline is better than having 1BP doing the 6 update inside 1 Timeline??
With the profile tool i can only see that i have a peak when i activate the function with the BP and the 6 cubes.
But for me it doesn't make any sens. How could i confirm that "thΓ©orie" that 1 BP instancied 6 times is better than 1 BP with 6 instance of a cube?
Is there an easier way? then this.
Maybe you could use interfaces instead for interaction
can interact var is for check if the player overlaps with this actor
am already using interfaces
oh
I don't want to make it in the player collision to check if the player overlaps with something that have the interact interface
Hi, I've been trying to stop a dart after entering a collision volume of a dartboard. I am stopping it by disabling physics and gravity once the tip of the dart enters the collider BP. It works, but the moment the dart stops is different for each dart and it looks bad and will impact my implementation of actually scoring the points... I actually kinda understand why that happens, but I've enabled all things that could help (that I know of) and it still persists. I have enabled all the "precision" collision settings that I know of. Is there any other way to make it more precise? Dart is not flying all that fast, all things are close to real life (dart and dartboard size, dart speed etc.).
You don't need to. Each object shouldn't be checking the player
What you can do is just fire off a sphere trace from the player and attempt to interact whatever it hits. Much faster, cleaner and more performant
how can I do this, Can you give me an example
it's as simple as on interact key pressed, fire a sphere trace forwards, for however long your interact distance, then checking if the hit actor is valid and implements the interface, then calling the interface message on it
there are other ways you can go, say for showing interact UI.
They mainly involve firing said trace on tick, storing the actor, and then just doing the part of checking and interacting on the interaction key press
Is there a way to get the new image to persist even after removing from parent or setting visibility? (Save Widget Image change)
- currently it just reverts to default if you remove from parent or set visibility to not visible.
EDIT : Solution : Sequence then Do Once so you don't create a new widget every time.
I understand it now. Thanks for the help.
Anyone know how to remove an overlay material? Doesn't seem like I can set it to none
You could make a material based on what you want none to be
accidentally X'd out my blueprint panel on the left in graphs. How do I get it back?
Window>My Blueprint
thank you both.
You can set it to None. You did it in the bottom one.
Does anyone know if there's a more general way I could handle this? I was hopping to find an event dispatcher I could bind on the enhanced subsystem but I can't find anything useful.
My goal is not having to actually add the input action events to the character and instead just denote the input actions in a list and have it handle everything automatically if the list is changed.
For some reason that doesn't work
I'm relatively sure it does. If it's not unsetting it, make sure you have the correct component and that you're not setting it back to the old one at the same time somehow.
Hello All, When it comes to making asset libraries/inventories, what is the typical format/structure that one would use to create such a system? I'm having a tough time building a mental picture of all the required elements and their relations to one another and how they're implemented
I understand that typically you would use structs and datatables? but how is the information pulled from them?
Are you using collision volumes to detect contact with the dart board? If so i'd switch to a trace system instead, it looks to me that the inconsistency in the stopping position is coming from the distance that the dart travels between ticks. I.E: you have a tick rate of 1 second and a time to impact of 1 second, you throw a dart at 0 seconds, it lands at 1, you throw it at 0.2, it lands at 1.2, meaning it continues traveling for 0.8 seconds before the contact is registered.
Exactly what I thought is happening, but don't really know how to fix this. And yes, I am using a collision volume which the dart enters. What should I trace exactly? Thanks for the answer!
Is it possible to find where a reference is in a blueprint from the reference viewer? Because reference viewer says there is one, but I can't find and it doesnt show when searching.
you can use a trace by sphere node to replicate what the collision sphere is doing, i had a similar issue with a game i was making a few months ago, also found a plugin which creates a trace by sphere event action which was super useful, i'll see if i can find it
give this a go
alternatively you can get the same result using a sphere trace, just requires a bit more setup
Thanks, this plugin looks like exactly the thing I'm looking for. And I already have it, must have been given for free or in a bundle π Great! And as for tracing with a sphere, because I'm not sure that I understand, if I add a sphere trace to my dart and test the hits with it, it will be more "responsive" then collision volume?
When I put a breakpoint in my widget blueprint and it gets hit, I'm hitting a debug_break in FSlateApplication::EnterDebuggingMode(). I've never experienced this at work. At home I'm using 5.4 binaries. Thoughts?
Yes thats exactly it, not 100% sure on the voodoo behind it, but it solved the problem for me π
Great, two possible solutions, thank you for taking your time to help me.
I'd do a line trace each tick. and check for distance with the board. once distance is < threshold, stick the dart in the board
you could also simulate the launch. and just have the dart go down a spline
Hey guys, I have an urgent question here, why can't my BPI call event?
(solved)
I can only call function or send message
I already searched everywhere
tried all the keywords
If anyone know about it, please, I really need help
That is also a very good idea, definitely will try it out. Spline sounds interesting, but wanted the throw to be kind of physics based, at least to some degree. Thanks!
you can simulate a launch
and make a spline along the trajectory
which returns this:
Predicted projectile path. Ordered series of positions from StartPos to the end. Includes location at point of impact if it hit something.
Omg I didnβt know this, that actually could be even better since I could score the points earlier and with less variance. Thank you!
you're welcome π always a pleasure to help
dont score the points too soon. else the players will know you "cheated" π
Can I store Sensed Actors in the array, create interface, Get Sensed Actors, and then send message to AiController of the owned pawn to get these? Will this work?
I want to do it from BT Task
Hi, I have a blueprint which I feel is getting out of hand as its quite a mess now and am wondering if some of the things should not be inside it. I have the following (I wont post the BP here coz its a bit big and messy, If anyone wants the BP I,ll post it into BlueprintUE if asked)
1 : Player Presses 1
2 : Player Spawns Projectiles
3 : Projectile has OnHit Event Despatcher (Player is subscribed to and has Custom Event for it)
4 : Player Updates HUD with Spell Mana Cost
5 : Player Updates HUD with Spell Damage
I kind of feel this is too much for the "player" but im not sure.
I,ve just realised that I am almost writing a whole system loop inside of player, When I think the Player should have an Event called Fire Projectile and pass a value to a function to decide what ability to perform... IE... 1 = Fireball, 2 = Firecone... etc... then it should be handled within the Projectile BP
Projectile should be for sure bp on it's own as a base class, and then you can do special projectiles (fire, ice, dark matter or anything) from it.
you might even want to have it like bp_spells into 2 bp projectiles and aoe, and then from these you would have individual ending spells
The Player shouldn't care about updating the HUD. The HUD should subscribe to event dispatchers on the player that are called when these values change so the HUD can update itself, with the bonus that you can change out or add more to your UI and not have to make changes to your player (other than maybe add more dispatchers)
The projectile itself should likely handle whatever logic it can handle. You can pass along the player's pawn or playerstate as the owner so if you need to, you can still get a reference back to the player within the projectile. I'm not sure what your usecase is for having the player subscribe to the projectile's OnHit event, but unless your player actually needs to specifically know about something getting hit it may not be necessary at all.
Is there a more efficient way to add a bunch of individual float variables into an array? Or do I have to just drag them all out and connect them with "Add" nodes like this
"make array"
oh thank christ
ty
do i have to right click -> add node or is there some kinda way to set the amount I want
make array has pins, so you just add pins and connect all the numbers
yeah i just mean it has 1 input pin to start
so i gotta right click -> add pin to add more
was hoping i could just drag em onto it lol
That only works for function and node events iirc
Parent's variables are already available in child BPs.
Does someone know why this isnt working?
Character is from BP Third Person and this is my Animation Blueprint.
Try increasing the multiplier.
I think 25 might be a bit too low.
Oh wow thank you that did the Trick. π
Im just confused why i have to cranck it up to 1000 in ABP, but in BP3P it worked with 25
I'm not sure I follow. When you define a variable on the parent, the child will also have those variables present.
Again, they are already available to use in the child.
They should be listed in the default values even.
@dawn gazelle i got my message to replicate properly π
I'm unsure if I should put this in #gameplay-ai or not, given its not directly behavior tree stuff, or something to that effect.
I'm wondering if theres a way to do either:
- Make an AI avoid an actor as if it has no nav mesh around it (else it just rams its face into the actor, because it thinks it can path there)
- Edit base like ai handling, or some obscure
project settingso that AI can/ will still navigate to the closest possible point when navigating?
My issue is that I have an actor that AI will go to, but that actor also has to block the nav mesh.
Else, my AI will just ram there faces into the actor when moving around.
Or, since the nav mesh is gone, it won't navigate there at all.
Isn't there an acceptance radius somewhere?
I saw that, but it seems to just be a like I will mark myself as success when I reach this radius
Not a I will path if its within this radius
Because, yeah the AI MoveTo does have that radius
My character keeps moving after not being given any input and the enhanced input action mapping event keeps triggering. This is resulting in my player moving when nothing is being pressed. Any ideas?
It only happens after sliding
like this is just getting perma triggered if i slide, wait for the slide to finish and then let go of the directional input
figured my bug out, needed to check for character instead of componenet
Hey everyone, i'm trying to add a day/night cycle, but i can't figure out how to add a different texture to the night sky, because right now it's just pitch black. Any suggestions? Code for the cycle and method i was trying for the texture in screenshot.
I have two directional lights, one for the day and one for the night
use one and change its properties at night to begin with
unless you're enable/disabling the other one
With the new sky system no longer using a sky sphere how are we supposed to get stars in our scenes? (Yes, I could still add one and blend it in and out, but that feels like a step back.). Does epic plan to add a star option to the βsky atmosphereβ at any point? Iβm hoping Iβve just missed something, but if not, does anyone have any interestin...
You'll need a sky sphere I'm pretty sure
then just drive its material by time of day as well and you're in business. You want a material parameter collection for this
just set time on the material parameter collection and anything can respond to it
thank u! i'll try this!
A bit too much ss but just to be clear. My issue is i made a bullet pool using those functions in the screens . after fetching few time from the pool and returining to it the bullet collision is still set to no collision despite that all the other paramters got changed whyy is this happening . iam not changning anything else where
Hey guys! Our level designers want to have multiple PlayerStarts in a level that we could select in a main menu to chose where to load in on level load. It's more of a debug thing atm but down the line, it would be used as checkpoints.
Is there a way to get all actors in a level that isn't loaded yet? :\
No, but rather than reading your start positions on the level itself, it could be contained within a data table and then you can place an actor that displays and handles the start positions for you, including updating the data table values for the particular level - you'd probably also want a custom start position actor so it can register itself to such an actor. Doing something like this should then allow you to read the data table and have a reference to the specific start position you may want to use within a level without the level needing to be loaded.
Hi everyone, so I am having an issue where when multiple controllers are plugged in and I try to play in viewport, only player one focuses on the viewport. The others focus on the editor itself i guess as when I click buttons it opens menus in the editor. I see a blue highlight for what is selected but even if the viewport is selected it never seems to focus the input on it. However if i play in a standalone game multiple controllers work fine. Any insight to why this is the case would be much appreciated thank you!
how do i move the anchor of this object to be in the corner so it can open like a normal door?
add a scene component as the thing you rotate, or modify the mesh's origin
Select Modelling and then Edit Pivot and you,ll be able to move the pivot point , Or you can do what Adriel said. π
Do you know of any tutorials for this?
You don't need a tutorial, just set up the actor so it's like
SceneComponent
DoorMesh
or edit the mesh to move the pivot point. Drib just showed you how
I have two Actors, Actor "Parent" and Actor "Child"
Actor "Parent" has a ChildActorComponent of the class "Child".
Is it possible in the Parent Actor to influence the appearence of the "Child" Actor inside the Construction script.
For example set a variable of the child actor which would edit its appearence?
If I do that it does not work
You should be able too. Child actor comp is not recommended as it is quiet buggy from reputable account and the veterans here pretty much have 0 of them in their project.
Hey!
Looking for a bit of architecting help
I want to make a checkpoint system local to a level / game mode
eg. updates the players spawn location, and on death resets the level to where it was at the last checkpoint, ammo, enemies guns etc
the complication is that we are making an anthology game so the game instance and save data architecture may not be the best place to do this
additionally the "save" system only needs to persist with the session, if the player leaves and loads back in later we don't need to preserve any of the checkpoints etc
what is the best way to go about this?
I would Pair the save game object with the level.
You can do that with a map. But for some reason World can't be declared in bp.
uhhh where do i adjust the far plane distance? dont see it on SpectatorPawn, or PlayerCameraManager, or PlayerController, or ... this is what im seeing here right?
I have a variety of actors in my outline that derive from different 3D sources:
- An alien from Mizuno
- A hippo from turbosquid
- A cube mesh from the place actors menu.
Essentially when raycast , I want a callback for each object:
- the hippo audio plays
- the alien animal animation plays
- the cubeβs material changes
What is the easiest and fastest way to implement this with blueprint?
I was hoping that from the ray trace function I could call callback for each actor , but wasnβt sure how to implement said callbacks.
What is the best way to implement this
is this 'raycast' actually the cursor? because it would then be as easy as hooking into handling cursor events that already exist
Variable in GameState or GameMode will work
Make an actor class for each and implement OnMouseOver or give them an interface ChangeStuff or have them inherit from a base class and implement a ChangeStuff event
Does anyone know if there's a way to store a function callback as a variable in Blueprints? I would like to set up dynamic callback functions
I donβt believe so
Womp. I would like to do this the easy way but it looks like I'm going to have to manually make a buttload of functions
Are you familiar with Dispatchers?
Yeah, but that doesn't exactly do what I'm looking for in this instance. I guess I could set up a generic dispatch and pass a whole bunch of variables
Ideally I would just pass a callback function and then I do basically no additional work
maybe the messaging system from Lyra?
Oh...maybe. I already yoinked that from Lyra and slapped it in my project, but I mainly use it for UI stuff
Hey which logic gate do i need that will make the Branch true only if the top variable is True, and the bottom is False
Hi guys, I wanted to make this work using an enhanced interact input instead of a begin overlap but it just doesn't work, is there a way to make this work?
Just NOT one of the variables and use an AND
you don't see the difference?
And can I make it so that an execution can Open a gate but Not execute the Exit?
top one you're destroying hit actor
Bottom one you're destroying self
what class is this code in?
Also top one will fire multiple times if trigger is Down or no trigger
open doesn't go to exit
oh nvm then
I was doing it inside the object I want to get the battery from, should I make it it the player blueprint?
what does OR do again?
returns true if either OR both inputs are true.
thanks for the help, seems like the right spot
if you could help i have a few follow up questions
what is the persistence of the game state vs the level vs the game mode?
i've seen that game mode resets on load
When / how is game state reset?
and
what would be the best way to reset/reload the level on player respawn in this implementation?
I don't understand the different between these two functions, one of from the BPI and the other is from the BPI but after being implemented in the game state?
not sure if that makes sense
it's implemented in both game state and this actor
Level loads GameMode. GameMode loads GameState. If you open a new level, then you're wiping out both the GameMode and GameState.
One is a function call, the other is an Interface call.
The function call requires a reference to the correct gamestate type of "MyGameState". The interface call can take any actor as the target and only those that implement the "Station Info" function from the interface will call it.
ok thats what i thought, then in that case game state won't really help my problem
i just need a way to persist data and level state between respawns for the player in a limited level scope
No. The difference is that one is calling a function defined on MyGameState. The other is calling an implementable function on any actor that won't execute if the actor doesn't implement it.
@dawn gazelle is there a way to do this without writing and loading save game data? - as it would also make testing this system a bit annoying
Those are 2 different functions that happen to have the same name
GameInstance is the only thing that normally persists.
(This is in the Game State), doesn't it originate from the interface?
show the event list
why are the signatures different?
the Is Anamoly? bool
yeah you have 2 functions here
why do you have an interface for this anyway?
Does anything besides your GameState need to implement StationInfo?
StationInfo is a bad function name anyway
Nope
Then why is there an interface
It's probably not the most efficient way, but It works for me*
ok
i see how to solve this now thanks
Ohh, no I just had to recompile
Because I was adding new variables to the inferance while sending screenshots
ok so what you're seeing is probably that you are calling the same function 2 different ways.
One is "call StationInfo on GameState, which is a MyGameState, so you know what functions it has"
and the other is "call StationInfo on this thing which presumably implements it"
you could hook a random actor up to the bottom one but not to the top
Yes, I understand that
So you could think about it this way, by calling the function directly on GameState, it calls directly to the Game State. While calling it to the Interface, calls it to any actor that implements the interface
Is that right?
What exactly do you mean by probably? Is this a feature that you've never heard of, or something I shouldn't be doing..?
You shouldn't have this be an interface anyway
but since the implementation of an interface is a function on the object, if you know the objects class, then you know it has that function
so you have 2 ways to call the same function
Dog implements MakeSoundInterface.MakeSound
You can call Dog.MakeSound, it'll bark
or
You can call Thing.MakeSound on something that's actually a dog, it'll bark
2 ways to end up in the same place
but if you don't know it's a dog, you can't do the 1st one
it doesn't matter for this, this should not be an interface
YourGameState should just have a function or event called StationInfo or with a better name, and that's the end of it
Yeah I understand that
Hello,
I created this timer, and I am currently having some issues
Any reason as to why this timer isn't working? It should be started at event begin play, but upon testing it acts like it never starts?
Anyone know annother way of making a timer?
Set Timer By Event
@dawn gazelle
last set of quetstions
what events in gameintance
would be best to tie to for loading an re-initializing a level
and know of anywhere i can find more robust documention on how levels are loaded
If I remember right, there's only 4 events in the default game instance you can implement in blueprints
Init - Called when the game loads up for the first time.
Shutdown - Called just before the game exits (not necessarily during a crash)
TravelError - Called when the game detects a problem with moving to a server.
NetworkError - Called when the game gets disconnected from a server.
Re-initializing a level would just require you to re-open the level - everything would be restarted from scratch.
If there was details you wanted to save, then you'd have to store it in the game instance or in a save game object, and on begin play of the relevant actors read the values from game instance or that save game object.
yeah
in that case i'll just have the leve/game mode itself store and move the data onto the instance
just need to see if game mode has an initialize function that i can properly tap
There's Begin Play on GameMode, but that still might not be the right place to do what you may be trying to do.
yeah i need something a bit earlier
any thoughts?
or is there more i can do on the level object
idealy the system can work on any level with this game mode
Not really. While Begin Play of the level does happen before Begin Play of the GameMode, using that would make it less modular as you'd have to duplicate the code for the begin play in each level.
What is it you're wanting to do before GameMode's begin play?
basically esuring the player is spawning in the correct location and that all the states of the doors and enemies are persisted
so then if they progress, and then die before a checkpoint,
resets to that point
notthing too complicated
Override the choose player start function in the game mode.
makes sense/ already did lol
just felt liek there should be a better call in there
That's the right spot. The alternative is to not use the game mode's own systems for spawning by setting the default pawn to none, and then spawning and possessing their pawn when you're ready.
though. spawn actors is pretty far down the chain
say i want to persist if x/y enemies, alive and dead etc
Why restart the level?
thought it was the simplest way
but maybe it isn't
what other things could be done
creates an inverse issue of how do i respawn an enemy that was destroyed since the previous checkpoint
If all you need is the player to be moved back to the last check point, you can just determine what the last checkpoint was, spawn them there and reset them as needed.
Ah
depending on how you spawn the enemies you can keep track of id's and not spawn if they are dead
as is they are just placed in the level
i would give them id's and keep a removed array if your trying not to spawn them again and using the same logic
sounds good
i'm following
what id system would you recomend?
Use Guid if you need a unique number
rand()
are you destroying them when they die ?
currently, though that may not be required
do i need a plugin or anyting?
New GUID
(It's a node)
You can promote that to a variable, and it'll give you a random unique value.
If you check if the GUID variable is valid on the construction script of your actor, and if not, you can set a new guid - this will then allow your actor to be assigned a GUID when it gets added to the scene.
and you want to load this up from a save ? so your reloading the level ?
i don't want to use a save hence the questions
ideally its just on the game instance
ya just give the ids and check all the id when load remove the ones that are dead
probably not the most efficient, but easy to do
if they're placed in the level can't you just remove them on restart?
thats what i'm asking for advice on how to do / where & when
you can probably just fill up an array of actors to destroy
eg
game mode and instance don't seem to have an event that is after the actors are loaded but before playher start
they should be stably named and able to be referenced, i think
not 100% sure but I'd try it
This is why I never load or unload levels
lol
1 level from boot up to shut down
how do you like to handle player death and respawning in those cases then
are there multiple enemy bps ? and is there a parent ?
all share a class right nows
and game mode has a list of all of them in the level
so they have a shared parent class ?
Hello,
Quick question,
How can you apply a pose to something outside of the anim bp?
Thanks!
What would be the best way to trigger this sound every loop of the timer ?
if they all have the same parent thats good because you can put the id variable on the parent
just play it
where's your SetDayNight function?
I thought I was being clever...but it turns out CallHelperCommonEventStatusChanged always gets the last tag in the array, not the tag that is being listened to... You have any idea how to get this behavior to fire properly?
I think you're using a timer where you want a timeline
unless you want it to snap from day to night
That's what I want actually ^^
Just a simple on/off
just play the sound here then
how long is alert timer usually?
a timer is just a thing that fires at some interval
It's set 10sec before the end of the timer
you need 2 timers
or one that goes 50s, 10s, 50s, 10s, etc
I mean you can check on tick how much time is left but that's a bit goofy
Yeah I want to avoid ticks as much as possible, not a fan of a check being made every frames like that
Can I have a timer within that Set Day Night function ?
how do you handle checkpoints and respawning enemies in those cases?
A timer is a whole component
you can have a timer feed a thing with a delay though
so timer is for alert, and delay output is for the actual thing
delay has to be in event graph though, can't be in function
The same way they're spawned to begin with, at runtime
enemies aren't placed on map
@faint pasture sorry dumb question but how do you associate an existing actor in the outline with the interface change stuff or actor class?
You can reparent it or just modify the class, if that's what your'e talkign about
@steel star ahh no itβs actually the line trace channel call from an obj in the world π«£
if it's just a StaticMeshActor then you don't
??
hello all
i have a blueprint problem
and im kinda desperate
if i open or right click this BP and some others (not all)
actually
nvm
as i was gonna take screenshots to post here it suddenly magically opened
uh... server has the magic touch i guess
been trying to fix it for 3 hours and now it decided to work
Hey I'm trying to make a really simple walljump with no inputs, how do I get the launch to launch me in the opposite direction of my facing direction
- -1
isn't that what I'm doing
You need forward vector
FacingRotation.Forward * -1
ah like that okay
you can get the forward, up, right vector of anything with a rotation, or of a rotation itself
thanks!
i asked in the general chat but i feel like i should ask here too. im trying to get procedural caves working. the code shown here gives a cave-like output, but its far too chaotic and cramped to work for my game. one of many issues with this code is the infinite loop error i get when i set the gridsize above 18. this error is fixed by adding a delay next tick component after the completed part of the 2nd for each loop node, but adds the issue of the mesh only generating one polygon. how can i fix this issue? i understand that my code is horrible, but this is the only way i know how to make a procedural mesh with 3d noise (other than using a plugin i cant afford)
You cannot have delays in a regular for loop
They run in one tick
what should i do instead?
you can make a for loop with delay
or use a timer
Also a bad idea to use vectors as a key for a map. Each axis is stored as a float, and floats aren't always 100% ==
should i use set timer by event? or is there a better one to use
I would
Event DoJustSomeOfTheWorkSoFramerateIsn'tZero
what else could i use?
what does that map represent?
it's a mapping of locations to what
cube corners?
are you reinventing a bitmask?
i think? i got this from a video that barely explained it so im not sure how it all works
im gonna find the vid real quick maybe i just forgot something
does anyone know where actor object name is derived from
it doesn't seem to match the outliner name
It's based on teh class and the number of that class already existing in a level.
The outliner name is the actor "label".
It's me again sorry, it doesn't seem to work either
it's a 2d game to clarify
https://www.youtube.com/watch?v=dN_LNrwSr5U&t=1114s this is the video i got the code from. as shown in the vid, it makes a random mess of polygons unless you tell it to make a very specific shape. i tried shoving a perlin noise component onto it, which is where im at now as i havent made much progress since doing that
This is a fully Blueprint implementation of the marching cubes algorithm that I figured out recently. It's not optimized and is mostly just for learning purposes. Also I apologize for being quiet and sniffly. This was take 3 and I decided to cut it here.
CSV download:
https://drive.google.com/file/d/1lViyb4hWHVCLH3_poIxWNShCRHQ5K5q2/view?usp=sha...
Hello,
Quick question,
How can you apply a pose to a Skeletal Mesh outside of the anim bp? As seen above, I am kinda stuck for what to apply so that I can
A send the pose to whatever anim BP and
B after the pose is send go traverse the PoseArray in reverse
The seccond image is an example of what I am trying to achieve with world transforms instead
Thanks!
why am i getting this? my pathfinding is not working anymore and i have this
try promoting the path to a variable then run
how do you null check in blueprints?
'not equal' node with only one pin?
into a branch?
can i somehow use "get forward vector" and add a certain value to it in a way it always adds it into the forward vector? im trying to make a grenade system for a topdown game.
id pick a toss vector, assuming an identity rotation, then rotate it by the real rotation
IsValid
you can always just add some Z to it
@dawn gazelle got it all working
just needed to save it on game instance
and yeah turns out object name was enough for the system i needed
or if its top down use the yaw and set pitch as you want
got a hard one
so i have my checkpoint system properly overriding the choose player start
but now i dont have a way to start game at location
*in editor / pie
i can* do the grenade itself (by spawning a projectile actor with gravity). sorry i shouldve been more specific. so while holding down the button i want it to draw the area where it will explode once thrown. i already have a system of drawing things on the ground from another thing i did. but now i need to set the location in which to draw it in. using the coordinates doesnt work because if i add lets say 100 to Y, it will always be in one direction, not where you are facing
theres a separately bindable key in editor to start at 'current' versus a spawn point. i never looked into it farther than that, but maybe relavent
disregarding projectile motion, you don't add 0,100,0 you add 100 * FacingDirection
that will get you the point 100 in front of you
how do i get the facing direction? is there something other than "get forward vector"?
can you be more specific? or have any leads on where i could find this info
like i just need to find out how the super choose player start function works but i can't find it documented
nope
just that
There's some shortcuts you can define to make it so you start at the current camera location.
Otherwise choose player start you just return the actor you want to use as the location that the player should start at.
yea those are what i was remembering
editor preferences
so i get forward vector + 100, 0, 0 and then multiply with forward vector? sorry, im so confused. what did you mean by "add 100 * FacingDirection"?
Location100unitsinfrontofyou = WhereYouAre + 100 x GetForwardVector
@dawn gazelle what settings are these in
Editor Preferences
can;t seem to get the binding to work
alt p still functions
it even lists the binding as correct
but it doesn't do anything
i think its because i overwrote the root choose player start
like this? doesnt seem work. i think im misunderstanding something
i just want to reimplement part of it now though
and i don't know where to start
hi guys i have a material texture that id like to change in my player characters blueprint. Anyone know how i can change it? I can change the parameters but not the texture itself
What you wrote:
(Location + (100,0,0)) x Forward
What you should write:
Location + 100 x Forward
100 x Forward is a float times a vector
but you can only add 3 numbers, oh wait so i need to split it into x y z?
right click pin, change type to float
for the multiply
my dumbass didnt take mathematical order in an equation into account.. i was reading it left to right : D
is there any way to get the super of an overridden function in blueprints?
what
Late reply, but in the end i just went back to my last update on github, unreal randomly just exploded today and it cascaded into a bunch if errors like this
like not call the super?
But thank you for the help regardless
or to at least look at it
thank you so much for your time and effort. i really appreciate it, its working now
@faint pasture
so i've overidden Gamemode.ChoosePlayerStart
works great for my game logic
but it is also preventing me from spawning the player at camera location
even with a direct hotkey
i need to re-enable that part of its functionality for the level designers
even if i can just have a branch on the first iteration
so
i can also solve this if i can just call the base function in here
cant seem to
Do a check if you're playing in editor, if so, do a Get Actor of Class > PlayerStartPIE return that actor.
Though I'm not sure how one does check if they're in editor in blueprints
Maybe check if PlayerStartPIE is valid?
also i still don't know how to call the super function so even if i can i can't access the base logic of
spawn player at camera pos
Seems like it only spawns PlayerStartPIE if you choose to use the camera as the location
This seems to work just fine.
These dishes simulate physics, and I saw a video mentioning that pressing 'K' saves their state during simulation, which only worked when I used static meshes. How can I apply this same method to actors?
you're right i forgot about that, but that only works if i drag the static mesh itself to the scene
You have to select the thing that is simulating in the scene and press K with it selected.
Yea
Doesn't work for me, I'm not sure if I'm doing it wrong or what.
After starting the simulation and pressing the key, a message pops up saying it saved the state. However, the actor resets its state afterward.
Guys i wanna blending animation with AnimMontage using layered blend per bone how to fix this bug in video?
this is my actor and the main mesh is set to simulate physics
I tried a different approach, I added the same mesh to the scene, let it finish simulating, then right-clicked and chose 'Replace with Selected Actor.' This worked fine.
Scenario:
I am shooting a car. The car is not moving. when the car health become zero due to shooting of bullets I am blasting the car and when blast happens the car should jump upwards in z axis so I am applying impulse in z axis. The weight of car is 1000 kg. I don't want how much impulse I should apply?
I am using Add Impulse Node.
If you want to change texture then you have to assign material instance dynamic after that you can change texture parameter
Hello, I am trying to procedurally generate objects (actors I believe is the correct term) in a container, and I am coming across a bug. I followed a guide online, https://www.youtube.com/watch?v=bR9ukEQdM2w, but I am getting an error that wasn't discussed in the video. I am able to create a container and specify how many actors I want to spawn inside of it, but for some reason whenever the actor gets rotated closer to 90 degrees, it becomes stretched thin. I do not believe it is transformed anywhere so I do not know how this is happening... I apologize if my terminology or explanation isn't the greatest, I have only been working with unreal for a couple days. Any advice or help is appreciated.
SUPPORT THE CHANNEL
π§§ Become a Patron - https://www.patreon.com/gamedevandcoding
β Buy me a coffee - https://www.buymeacoffee.com/gamedevcoding
In this video I am going to show to all of you guys how to make an optimized procedural spawn system, and how to spawn objects on the ground automatically.
PS: This spawn method is very useful for in...
Try moving the DefaultSlot to the upper body section of the Layered blend per bone (after the AimOffset cached pose).
Hey Guys, for some reason this blueprint makes my actor move from the world origin as starting location? Any idea on a fix?
I must be missing something
I have sphere collisions with instance editable integers. I casted the BP to the player character and made promoted it to a variable. But when I walk from one collision to the other, each of them having a different instance editted variable, nothing changes. it sticks to the default variable. How can I get this instance based Variable?
Hi, is anyone in a scenario when the Level Sequence is changed runtime to a Level Sequence Actor in UE5.4? Iβm having crash in built game
Can you check if you are setting the transform to relative?
it is
it would say absolute scale if it was world
Show pictured of each boxes, the integer value, and show the box blueprint
The root comp is the root
Show the hierachy
If it's the root then it will be the world space
You set relative but relative to what?
It doesn't have a parent
Your root comp is the top of hierachy, w.e value you set will be relative to the world.
If you want to move the actor forward by x unit.
Starting location is current world location , end location is starting location plus the distance in cm.
Aaaaah okay that makes sense!
Thanks!
Question regarding graphics settings. So we use the Game User Settings to set resolution, fullscreen, etc. But whenever a new level is loaded these settings change again (when launching in Standalone from editor). Any idea why this would be the case? Afaik the settings are never changed during this transition.
Hey
is it possible with the Event Begin overlap / End Overlap. To check if The component (Collision Box) of a specific actor is beggining or ending the overlap? and not the entire actor?
GUS are ini settings. Meaning they're initialized once into console variables when the application is opened. And they're saved to the Ini when you call apply settings on GUS.
When you open a new Standalone instance, this reads the current values in the Ini for that instance.
Okay. But when I go fullscreen and then the game loads into a new level, it goes back to the old res. Does that mean it doesn't get properly saved to the ini? But I do apply the settings so it should be?
You mean OpenLevel is causing your game to go non fullscreen?
Yea seems like it
Sounds like you might not have called ApplySettings?
IIRC there's a special one for resolution stuff.
Yea there is
HI guys busy with a project that use mainly widgets, I'm at a cross roads that the project is getting too big and I would like to organize. currently all my functions to switch between widgets are located on player controller. I would like to move them onto an object problem is I cant seem to figure out how to get player controller reference on the function on objects, keeps telling me its unsafe. Mean while I have been trying to learn interfaces but still struggling there as well. So I guess my question is is the right place for these functions on the player controller or move it somewhere else?
Image
IMO widget organization can go in the AHUD class. Which is an actor that is spawned once per player on their local machine. It's a good place to house UI related stuff. Controller is too busy with networking and other things.
thanks will try that and test
It already has functions to get the correct controller based on the hud. I think GetOwningPlayer or GetOwningPlayerController or something.
I'm trying to preserve the rotation of the camera relative to the player character when teleporting them, but running into weird issues where the camera ends up with its up vector pointing sideways. First screenshot is before teleport, and second screenshot is after teleport. Any idea what's going wrong?
Let's go in voice chat
You probaly need to use delta instead of the combine rotators in your 2nd screenshot.
UserWidgets? You could create a "parent" widget that all your other widgets inherit from. All those functions you're created can be shared to children if they're public or proteted access. In the parent, create your controller reference so that all children widgets can use it. UWs have a GetOwningPlayer which is the controller of the widget.
If you're going a blueprint function library approach you could pass the controller as a reference directly, or use the same function.
Is it possible to trigger a event from an Animation Blueprint Transition?
That gets me the difference between two rotators though. I need world rotation to apply to the controller (i.e. I need to apply the relative rotation from the first screenshot to the new world rotation of the pawn after teleport)
even if I use delta via inverting the local rotation, the same issue with the camera being rotated sideways still happens
Okay, this works instead
I'd rather not, sorry. Did it not work, or was there something that didn't make sense? I can explain it differently if something is unclear.
Ok
Is it possible to see where in a blueprint a reference (seen in the reference viewer) is located?
I have read through my blueprint like 20 times and yet I can't find this supposed reference to another class.
there is that funcion
but it's retunr a list
that's ok, but what if from all those Overlapping components, i know the one i want because i can only have one of that component
Hey everyone, newbie here trying to learn unreal engine for archviz,
but unfortunately i am facing this situation where, my forward shooting ray couldn't recognise the Couch. (but able to recognise the cube) which is weird.
it would be very much appreciate if you can help me understand what is happening here, and how can i overcome this situation?
is there a way to only get the one i want? on that case
When you use AddCableComponent and add the cable with other objects. Can I simple destroy the component to remove all the connected cables?
you can attach the interface to the cube and in the trace line check if this hit actor does implements the cube interface if true do something
Hmm, when hitting the cube, the function works, but when hitting the couch, nothing happens under the same blue print. something wrong with the mesh?
check if you got a blocking hit, and check if the couch implements the interface
Is it possible to check whether an asset is marked as dirty in blueprints?
The coach mesh probably has no collision on the mesh.
Question: in Character Blueprints, the skeletal mesh should face the x-axis (or else the character walk/run sideways), but in Control Rig, y-axis is front.
Here' comes the problem with that... when I "get relative transfom" from the character's HMD and Motion Controllers (VR) and try to do anything with that value inside Control Rig, the outcome is all messed up (e.g. let's say the head moves 50cm in the x-axis, it moves 50cm in the y-axis instead, and the rotation is already 90 degrees off from the very start).
How do I solve this problem? Can anyone at least suggest a keyword so that I can know what I should search for?
the couch neither
Hey guys, I'm trying to smoothly rotate a selected object with the mouse wheel, clockwise with the wheel down and the opposite with the wheel up. I did it like this but it works only the first time. With the value in the timeline being set to 90 it's a problem. How can i do it that it keeps rotating smoothly every time i scroll the mouse wheel? i know it should be simple but i'm still learning
I tried it like this too with a timeline and it works but only the first time. Any suggestion?
Does anyone know how to delete a folder (and it's contents) in the save game folder at runtime?
bp file utils plugin should have what you need
That's the one, thank you.
when using rinterp you usually do it on tick, and just set the target when you move the mouse wheel
thank you. i tried but it doesn't work
your probably not doing it right, based on your image you posted it doesn't look correct
Do you know the root directory the 'Delete Directory' node searches in?
you set the target value on mouse wheel, and just interp from current rotation to target on tick
i don't think i set the target value on mouse wheel
i want to rotate 90 degress whenever i scroll with the mouse wheel
it works without lerp but not with it
it works smoothly with timeline but only the first time
rinterp on tick
Not off the top of my head, no.
You should just be able to use BP exposed FPaths to get to the saved directory though, and append your folder onto it
it will be smooth, you can even use rinterp to const
i connected delta time to the tick, is that the way?
i appreciate your help by the way
in rotator you put how much you want the object to rotate?
you put the target, and when you do the add like i did when you press 2, it will add 90
you could do that, and also go backwards or use x,y
but you want to rotate z
isn't that expensive to do it with the event tick? i'm noob so i ask
so what i did was take the current target rotator split the struct, and just added to z
i mean it's the smoothest way to do what your looking for, my example you shouldn't get actor of class you should use a reference
but don't be scared of tick
just don't put too much on there
isn't there a way to make it work using the timeline like this too? just out of curiosity. i'll try implementing your method now, thanks
you could use a timeline, but what about if you turn it multiple times ? you want it to keep waiting ? or will it skip idk ?
I have been looking up posts to get basic client movement working, but a lot of posts show this method. Though for me my character does not move anymore when using this.
Does anyone know what I could be doing wrong. (I have the Character and Controller both set to replicate)
do u guys have a clue on what could be going on wrong here after dropping items? It only happens when I drop by amount
yeah that's my problem, it works the first time but not after
you can use the 'Set Timer by Function Name' and connect it on the begin play make it loop and set the timer by 0.01
that way is better then event tick
and you can play with timer value if you want to make it more smooth
i wouldn't worry about a interp on tick
it should be fine
tick is not exactly "bad"
just don't misuse it with a bunch of crap in it
No, it isn't