#blueprint
1 messages · Page 56 of 1
Anyone got the "Get Data Layer Manager" node to work in 5.3? The old Data Layer Subsystem is deprecated but still works. But Get Data Layer Manager is returning none. Can't really find any docs using it either...
Hi everyone, I was wondering if anyone can help me with a camera issue I have. Basically I need to switch off inherit yaw on a spring arm camera when the player is in mid-air, as they go into a freestyle mode allowing them to do tricks. When doing flips the camera also flips due to the inherit yaw being on. I've tried turning off inherit yaw but the camera snaps pointing towards positive x direction, here's a video showing what I mean. I've also tried turning on set absolute rotation and a number of other things but is still not working. Does anyone have any idea on how to keep the camera facing the players look at rotation when first leaving the ground but then not inheriting any rotation until reaching the ground again?
Its the camera I need help with, I've got the trick part working already
I need it to work like a 'free-cam'
Might wanna try figure out why the camera is snapping to pos x to stop it from happening, otherwise if you don't need the camera to move at all then it might be worth having a second camera that doesn't move on player input and just possess it when in freestyle mode and then re-possess the original camera when out of freestyle mode
No lile make the camera rotate when you do the trick so the problem desnt seem so obvious
Does get all widgets of interface return self if it runs said interface?
And would it be bad to call an interface if it doesn't have the receiving event?
How could I make the spawn Not move with the Projectile Movement? 🙂
Hm, I think there should be some "Absolute Transform" or so setting in the Particle itself (not the Component). But honestly I would suggest instead of having it as a Component, just calling SpawnSystemAtLocation or whatever the node is called on BeginPlay or whenever you want.
I only really use Components for Effects that are in fact supposed to follow the Actor.
It might work, it might not. I still want to prototype the concept. Do you have any insight into how to do it?
Hey Guys- I'm trying to learn tha basics of multiplayer blueprinting. I'm trying to make one of my 3 players print a string saying i'm chosen. It appears on each of the players, three times.. what am i doing wrong?
Multiplayer is quite a bit more complex than normal, go over to the multiplayer channel and read through the pinned messages, especially the network compendium which is a good place to start
Doing all that stuff just to get a ref to the player character is also unnecessary, you want to try avoid using any getters that takes an index (like GetPlayerCharacter) instead use GetController to get a ref to the player controller and you can use GetControlledPawn from a controller to get a ref to the players character
both these nodes remove the static mesh SM_Gun.
How do i restore back the mesh to its default mesh?
Save a reference to the default mesh somewhere and feed it into NewMesh
thats great
thanks
so baiscally a soft object reference right?
Ahh, I didn't see there was a multiplayer channel- will check that out!
Okay sounds good, thanks:D
does anyone know, how to close the gap in my spline?
Looks like you need to fix your mesh
try Add Pin on the multiply, and make it something from .9 to 1.1
How do I get the preview image thats in unreal content browser for the Static Meshes?
This little icon thats all i need for my UI texture
I have like 300 guns, and want to just get that little image preview and use it for my icons.
Is that possible? Or i have to just screenshot every single weapon and import the texture back to unreal?
You’ll probably need to calculate the rotation based on axis changes
Where is this code on?
I don't think there's any way to directly get the image it creates for the thumbnail.
There might be a plugin for it but not possible with standard UE.
It's best to ask in #multiplayer
What you have will trigger on all clients which is why you get the print string 3 times. I'm not too familiar with how to have the server trigger something on a specific client.
Does anybody know why this wont overlap with the player? 🙂
God bless you all! 🙂 Jesus loves you! 🙂 have a great day!!!!! 🙂
Try using on component hit instead of overlap
Or
Thanks, I'll look into that
Iirc there is a node that can calculate the rotation or direction based on two vectors
So you can grab the old and new vectors and compare them
the mesh itself, should be finde. i created it myself. and as you can see, the BP creates the mesh in his original proportion.
anyone knows how I initialize the items in my array without needing to look at them in my scrollbox?
basically I'm putting things in a scrollbox, but they only start executing their BP's when I scroll over them in the list
which is weird
and adding a multiply, doesnt change anything.
anyone know what might cause say my weapon to fall through the world, even though it's set to collider with the world dynamic and static ?
also the weapon does have correct physics stuff etc
Does the weapon actually have collision on the mesh itself? (when you open up the static mesh and show collision)
so it's a skeletal mesh and yeah it has the physics asset
which has the various boxes etc
does the weapon BP have just the skeletal mesh in it or does it have other stuff in it as well?
I have it setup so the skeletal mesh should be colliding with things but doesn't seem to be
it's a scene component to allow me to rotate the weapon if I need to
tbf I can prob just fix the weapon in the model etc so I don't have to and remove the ori component as it doesn't do anything apart from that
Nope I've remove the oriantation scene component thing and it still falls through the floor
Hi all. Basic question.
So I have a map with several door types. I want them all to operate the same way
Currently, I am using a line trace in the character BP to call an open door custom event in the door BP. How would I make this work with my other Door BPs other than "Door1?"
Wouldn't this be more effecient to cast my line trace to the door BPs instead of having all the interactivity in the player BP.
How would you tackle this? Sorry for the phone pics
Hello i want to loop trough an array in blueprint like from index 1 to the last index
you can find that answer easily by just searching in the context menu, come on, dont be lazy.
You would first need an interaction system to handle interacting with stuff. I've done tutorials for both an interaction system and a few different types of doors you might find useful.
Welcome to this tutorial on how to create an interaction system in Unreal Engine 5! In this video, we'll go over a different approach to making an interaction system using Unreal Engine's powerful Blueprint visual scripting language.
Whether you're a beginner to Unreal Engine or an experienced developer looking to add a modular interaction syst...
I can't find an answer or how to figure this out but we are working on trying to connect a camera from OFF WORLD to a VR Pawn actor that will move with the character to the different positions. I'm really new to this but am trying to figure it out and am welcome to any advice. Also if this the wrong channel, please let me know what one I could post in! Thanks!
Why does my BP not allow me to place a teleport node? Other classes allow it, but this one only allows teleport trace.
Try using set actor location.
What do you mean by off world?
set actor location doesn't allow rotation though, right?
Set actor location and rotation.
Yeah sorry, just noticed. Thank you for your help!
It's a plugin to create a NDI connection to OBS, pretty much a camera actor.
If it's an actor, you can just attach it to the character or if needed, a specific bone on the skeletal mesh. When attached, it'll move with what it's attached to.
help...
So that's what I am trying but I don't think I am connecting it to the VRPawn correctly. I've tried find a tutorial somewhere but the connection seems to never work.
But i do appreciate the help!
why does this take the max value for my int in account?
and this doesn't?
thing is that I need to break, else all the int value of the array elements get set +1, I only want them to be increased one after another
How are you doing it?
Not sure it's the proper channel but I'll ask anyway. Is there a way to save a particular setup of the UMG widgets as a blueprint? Let's say I have a Canvas with some elements in a particular arrangement. Can I save it and then add more copies of it at runtime?
Let me see if I can find the guide I tried using. But I had restarted that part so I don't have it now 😅
Create a widget with it how you want. You can spawn/create more copies of the widget at runtime and add them to the viewport.
Also #umg is the best place for these type of questions. 🙂
God, I hate how Discord is now hiding a bunch of channels unless you manually add them
I used the Attach actor to section and selected VRPawn, and I believe that its not working cause the VR Pawn starts from the Player Start Position
Try using get player pawn or get player character. That will get the one the player is currently controlling.
Would that be a Get Player Pawn into a Cast to the SpectatorPawn (name of the Camera Pawn)? Or would I be doing something different?
You shouldn't need to cast just to cast unless you need to get something specific from it.
I fixed it
Why not have camera always point at control rotation and then just don't change control rotation when doing tricks, when landed you can orient control rotation to be behind the car
I guess I am very confused. So I created bp class and just named it Spectator Cam. I added the Get Player Pawn into that as well as the Camera Component. Would I want the Get Player Pawn to Get Actor Location into a teleport if I want it to move with or am I really over thinking this. Sorry just been wrapping my head into this trying to figure it out.
question-
is this stupid? 
idea is-
When my dude attacks, and doesn't find anything to attack within 2 seconds - he goes back to idle
so every time i attack, i invalidate the last timer, and start a new one that'll take 2 seconds 
It can probably be a state machine in the anim BP I'd guess
bp -> abp communication - should i use interfaces or "get anim instance" ?
and then just save the cast on beginplay, and call the events?
What events? Just play montages
I think you can set it up such that you blend in and out of montages etc
yeeah i guess you're right, right now i'm just blending using an enum, but i should probably use montages for the attack, and do "idle - walk - run" with a blendspace 
well... you kinda cant 
Do you want your controls to rotate look direction to rotate camera, or controls -> camera -> look directino?
I'd say the latter
hi guys can someone help how i can get the player index dynamicly in animnotify
I would do:
Input -> controlrotation -> camera
Tick -> Trace out from camera -> AimLocation -> FindLookAt -> Head/Aim Rotation
thats your usual 3rd person approach
Adrielll
can you help me for it
i am new to ue5 and i might be disturbing :((((
how do I make a collider do overlap but not raycasts or physics?
I need to destroy an actor, but this actor needs to be ressurected with all its variables and everything intact in the next 10 seconds.
How do i do this?
Hello everyone, I want to change the animation using control rig, but when I try to bake a mesh to control rig, my control rig is not in the baking list. How can i fix it?
Try #animation
By not destroying it, and just hiding it
Not sure what you mean. Just turn off simulate physics and use an event overlap?
No idea what you mean sorry, but it looks like you need #animation
yup. pretty much it seems thats what im going to do. Hide it and disable collision? So nothing stumbles on it right
I want it to overlap things but not block raycasts
Overlap != block
just set its collision up to only do overlaps
I'm making a bullet spawn to damage the player however I can't seem to get them to collide properly to apply damage to the player as they do collide but the bp doesn't run as I would expect. I have overlapall on the bullet.
overlap is not a hit
also the game is in 2d so that might change stuff
on component begin overlap
ah thx I'll try that
the is valid is redundant
the cast will only succeed if it's valid AND a BP_Player
What do you want to have happen if it overlaps something but it's not a BP_Player?
This is probably what you want
Yh I've got it to work now thx
You can even just skip the cast
just apply damage to whatever you hit no matter what it is
that will do nothing in most cases, but if you implement an event any damage then it'll do something
ok
out of interest is there a way in Behavior tree task to have an Enum be able to be set in like what enum it's for ?
obvs I can do a byte to thing but that won't tell me for that enum what the bytes would be
How come this doesn't change the array? I'm trying to get the first item, and then remove it after. I want to dig through the array, like a list, removing each piece after I use it, but the remove node doesn't seem to remove anything from the array with default values.
There’s no fatal errors wrong with the provided code. Aside from it being super extra, it should work.
You could just remove from the array by index instead of remove by item.
You can convert an enum to bytes and convert a byte back to an enum.
is there a way for me to select the enum though ?
I don’t believe so.
I have this
and what I was hopeing to do was have the enum be selectable etc
You can do that by having an instance editable enum property on your bevaior tree task blueprint.
Both of these do the same thing, if I insert a print node to observe the effect, it just prints "Living Room" ad infinitum.
if I can't fairs I'll just have to leave is as a byte
That’s the point that it does the same thing.
If your intent is to remove the first index, you want to remove it by index and not item
Yea, that's the change I made, but it doesn't change the outcome, I want living room to get removed, so the next time I run the event it'll print Kitchen.
That’s what I said, there’s no errors with the provided code. The only thing I pointed out is that the way you were removing the item from code was “extra” meaning overkill.
The errors lie somewhere else outside the scope of the picture.
Those are the only two references to "universal rooms" I have, in that little function. Is there something that keeps the default values from changing that I'm not aware of?
No there shouldn’t be not right now. I would confirm that this function is being ran when it’s supposed to.
But in the future… yes there will be things that reset your default values.
Blueprints error out all the time and certain property’s will get there default values reset. This isn’t an issue at all right now, don’t worry, but if you keep relying on default values, at some point in your projects lifecycle that default value will get reset.
As a general rule of thumb, don’t rely on default values being correct.
It’s best practice to actually setup the values on some sort of initialization logic for your blueprint.
Yea, I'll construct a temporary array based on the default array, and then use that instead.
Thanks for the guidance.
That’s not what I mean
I mean it’s best to always have the default values of variables mean absolutely nothing, because those get reset all the time by the engine during normal editor operations.
It’s best to leave the default values as nothing, on begin play actually set the value of the array to what it needs to be.
Or on construction even better
so, on refresh, the level isn't spawning in the characters/actors I want it to spawn in, not sure why
There is a misunderstanding about the path of execution here.
The second cast node will never fire.
It has zero chance to ever execute.
Oh sorry your casting to character?
Is teddy cylinder a child of character?
yes
In that case, why would you need to cast to character first?
I assumed it needed to to get a reference to the actor
Ok then I take that back, the second cast node will execute, but casting to character is completely pointless.
The misunderstanding is about the cast node then.
Wait I may be confusing. Myself even more 
Ha! don't worry, any help is good
Anybody ?
Idk, I'm just trying to make it so on day 2, teddy and alice are in the level
to say the least, I barely know anything about coding
Ok sorry, I think I finally wrapped my head around the code.
So firstly, your spawning the Character class
The character class is an empty, invisible, framework class that is never meant to be spawned
You are meant to derive other blueprints from the character class, then spawn in those blueprints.
Instead of spawning character, you would need to spawn Alice, and spawn Teddy.
Also back to those cast nodes, I believe they are completely irrelevant to the code, and like i said before, the second spawn actor node will never have a chance to run. It’s literally impossible with the casting you’re doing.
You should probably just delete the cast nodes entirely.
I see no point to them.
Also it’s only supposed to be on day 2 when teddy and Alice are both in the game? Why is the execution pin hooked from day 1 and 2?
well, that was something I added in to see if it would fix anything, and since it's tied to the refresh event anyway- starting on day 1- it wouldn't matter. since it jumps to day 2
I'll take it out now tho
Casting will not fix anything here, that is not the proper use case at all.
Casting transforms one type of object reference into another type of object reference.
And returns cast failed if it’s unable to.
Ok, I think that fixed it. I've definitely got the components after teddy/alice to spawn in... I think the coordinates for where alice and teddy spawn in are off tho
Yea those locations look off
Hello friends, can someone explain to me why Ai suddenly freezes in the animation?
Nothing is wrong with the provided code. I would imagine this is an issue in your anim graph?
Are you just plug-in a blendspace 1d into the output pose?
First thought is just if the animation is set to loop.
no i dont set something in loop
the default slot is empty i put just for future in
ok now it works with the run animation in loop ok but thanks a lot rappy i think thats it right?
That’s right.
thanks a lot mate!
So with a lot more experimenting, it looks like local variables get reset every time the function is called. This is similar to how every blueprint's variables will be default when instanced. So, my fix is putting the local variable as a blueprint variable, so it no longer resets on each call.
Oh… if it was a local variable then yes 
i m trying to make a ghost car replay and i was just testing it? why does after 20 seconds the actors snaps into the current position of the car? i m indexing every after game start... what m i doing wrong?
try'na get a simple dodge roll goin'... followed Gorka's tut, then some other bloke. both leave me with the same result - an animation and no push. Roots are active, if i remove the montage the player will dodge but... no anim. Any thoughts?
hi guys, quick one, I am creating a cinematic which basically moves the the variable of a sky (5 is almost night and 6 is dawn the second picture). The event in the sequencer works fine as when I run the cinematics I can see how the variable increase from 5 to 6 but the actual sun doesn't move (it will move if I move it manually in the editor only). Am I doing something wrong?
i must say the same occur with other variables (for instance when I change the preset from normal to storm) , it works fine in the editor when I change it manually and in the sequencer I can see how it moves from "normal" to "storm" but there is no visual effect and stays static as first screen
so that the continuation of the text is under the nickname
I'm creating a text chat
Hi there,
I'm trying to add a crouch / slide system into my project and what I have works so far however when I slide the model clips into the ground until the animation finishes and then the next step brings you back above the ground to normal walking height again, Is there somthing im missing here or is the problem located elsewhere?
Def. Lemme show you my crouch - it's not for sliding but you'll see stuff
we're gonna wanna retrieve the location of our character alongside the editing of the capsule height
What the yellow fuck
It's like, uh, like a highlighter y'know?
what am I missing, Im only seeing changes in one value, Y.
ah, wait, right, this is not "angle", this is that weird thing... I just remembered..
bGhostReady is probably false at start. So the if in the tick will fail for 20 seconds (delay node you put) before setting bGhostReady to true.
Send video
I'm currently having an issue in the course i'm trying to complete where 1, When i start play it doesn't remove the monster in the middle of my screen. and 2, when it spawns the 3 monsters and sends them at my player I can shoot them with a fireball and the monster fades out like he's dead but doesn't actually die. just stays invisible.
And the monster in the middle of my screen can get hit and deal damage to me but can't seem to die?
Not sure what i've screwed up
Should be possible
I'm not sure which tutorial you're currently on.
To remove an actor after death, you can use "Destroy Actor" at the end of your Death function.
well the way I have it setup. instead of destroying actors it puts them back in the pool and then calls them back in later? cause theres going to wind up being tons of mobs spawned repeatedly cause it's a 2d bullet hell style game like vampire survivors that i'm working on.
I have a clip from my channel if that would help show you what i'm talking about
basically I hit them. they turn invisible. proceed to continue walking toward my player. and the guy in the middle i'm not sure why he's still there
You can disconnect the AI Controller, teleport them into the pool, then whenever you want them back, set their world location back and Spawn Default Controller back.
you got it boss. on one hand.. whatever happened between then and now, without root both happen.... but the tutorials for dodge seem pretty adimant that root has to be checked
It looks like it worked?
Tutorials aren't always right.
hey - fair enough. It caused major issues for my attacking system - but heck. if it doesn't seem to be here, and the lack of root isn't raising any red flags in your mind... guess i'll keep codin'!
Keep codin' glad it worked out for you
Let me know if disconnecting the AIC and respawning it worked
Using SpawnAIFromClass and passing the vector location of a spawn point. If there is already an object there, should it spawn another right beside it or will it spawn perfectly in place?
No, it'll spawn next to it
ive found this seems to work for keeping me level with the ground now however when the AnimMontage ends theres this odd flicker where it looks like the model drops from a little higher up, Ive experimented with another Set relative location on the other end and that doesnt seem to make a difference with any of the values im using, Could this be some sort of issue with the montage itself?
Unfortunately I wanna say it was when I added the lerps that started to happen - but it appears you're not using them and it's still happening...
I'm not sure. As far as I can tell all my offsets and related have proper coordinates
https://youtu.be/2DcwzltX-zY?si=EHWHUc6fJKzSMjKV&t=118 🌺Hello friends! I'm trying to create an item pickup widget similar to the one in Zelda Tears of the Kingdom (timestamped in link above), when you pick up multiple items, the newest item is added to the top of the list and the others get pushed down, and only 3 show at a time. I haven't found ANY tutorials for something similar, really hoping the bright minds here have some ideas!
This is Zelda tears of the Kingdom device dispenser guide will show you exactly what you need to do to use your Zelda tears of the Kingdom zonai charges in order to get more of those useful Zelda tears of the Kingdom zonai devices.
Socials:
Twitch: https://twitch.tv/kibblesbits
Discord: https://discord.gg/SBQsaQzyM2
Twitter: https://twitter.com...
Currently, I have a list widget that has about 20 items in a set order, collecting items will make that specific row unhidden (see reference) for 5 seconds before hidden again
Thanks for the help so far, Im sure if i tinker with it some more i'll crack it eventually
Definitely let me know if you do!
WHat would be a good (or right) way to handle this. I have a map/level that is a building with multiple floors. I would like to have my spawner react based on the floor you are on. Would that be a good use of tags (based on the actual floor bp/object or something that denotes the floor you are on) or what?
Is that just adding a pickup Item Widget inside a scrollbox widget on screen? Kinda seems like it to me and then it fades out and removes it from the box
perhaps something like this @sharp crane
This is one of my pet peeves, such a weird omission in UMG. it will be added to the bottom. I believe you mean to the ‘top’, seeing how you’re forced to use the array insertion workaround. Not sure why the loop is not iterating (no need to cast, btw) - maybe it is but the children do not appear? Do consider the following alternative, ther...
I have an array, is it common for them to not remove things from itself when I set it?
i meant if i decide to support multiplayer it might be a problem about getting first index directly
if you want to have a empty array you would do a clear on it before adding items to it to prevent left over stuff remaining.. unless I misunderstood your ask
Yea you have to clean it up manually
is it a problem to use index 0 directly, when i add multiplayer
This might be the right spot, I'm trying to get this camera system to work. The idea is there is camera above my VRPawn and I need that camera to teleport above my VRPawn everytime the VRPawn teleports. What would be the best way going about this?
could you not get the player location after you teleport and set the camera to that location (and leaving the camera at whatever height it was before)?
I've probably been building it wrong but I can't figure out how to call the camera to that location.
Would you build that inside the VR Pawn bp or create a new class?
I haven't done things specifically for VR.. do you have a camera attached inside to the VR Pawn BP ?
So I have my HMD camera that gets teleported but need another on that floats above to teleport to that world location.
something silly like this (after you do the teleport)? @eternal spruce
So that' what I had almost to a T but the camera isn't teleporting. it just stays in the world where I place it
where are you doing that ? inside the level blueprint? Player BP?
probably makes a difference where you tell it to update
Inside the VRPawn
Pretty much the player blueprint
but the player doesn't own the camera .. its just in the level correct?
Correct
I put a cube in the level and put this inside the level blueprint
each time I press Z the cube jumps to my character location just fine..
i assume a VR template has a level blueprint same as thirdperson @eternal spruce
is there a way to do a hi-res screenshot of an entire BP?
theres a bp version of pastebin
great thanks
np
ah ok, I think I need smth that actually does hi-res screenshots. This one doesn't handle custom nodes very well
I opened one Blueprint on there and clicked full screen (and you can zoom also) .. does that not work for you? Here is one of the BP's I took a screenshot of @ornate trail
3440x1440 resolution
How can I take this and kind of do a changed thing
so bassically see if something has changed and if so call a dispatcher else don't do anything
I'm sure I've done this before and it's worked like as a check to see if something has changed
Why not just use the AI perception that's already part of the engine?
https://docs.unrealengine.com/5.3/en-US/ai-perception-in-unreal-engine/
never knew you can attach it to like head of the enemy so made my own customer pawn sensing in c++
too far in now to mess with reverting to UE version so just gotta go with it now haha
It's just a component
I'm good I've put the work into a C++ version now so just gonna stick with that
is my BP code right though to see like if something has changed compared to last frame ?
no because it waits 1second which is much more than one frame
if you want just 1 frame you can use delay until next tick
awsome
and is the bool thing right so bassically when the local variable is not equal to the customer pawn sensing
I would think that means something changed ?
Not a good idea to decide to support multiplayer later. If you plan on having multiplayer you should build it towards that from the get go
The #multiplayer crew can help with that
There’s also a compendium in the pins there you should read
anyone know the best way to make an inventory system?
hey quick question for people who used ue4 do you know how to use this node now
this is it on ue5 no dropdown
I don’t need to use ue4 to know how to use it and yes there is a drop-down.
Make sure you picked the right node
it's the only of it's name idk what's wrong
Try restating engine
sure I hope that's it
It usually has a drop-down, if not, double check the event you’re binding to, maybe the signature’s wrong 🤷♂️
you were right all I did is restart the engine and it's back thank you
is there a node for lerping between 2+ things? like
Hi guys! I'm making a spectator camera for each of my players so when a player dies, they have their camera swapped to one of the other player's spectator cameras which are replicated.
Currently the camera does not have a roll, and I'm trying to get the player's mouse input and transfer it into the look rotation of the spectate spring arm but cannot figure out how to do so. Any ideas?
I feel like the answer is obvious but if I use a linetrace, how can I tell if the actor was hit by it?
Id like to make the object that was hit trigger a custom event
But thats only looking for a specific blueprint, so if I had say a chest and a door as 2 different blueprints I wouldnt be able interact with both of them yea?
I have a progress bar object stored on my creature object class. How do you spawn them above your actor?
Moshi make an interact interface
🙂 you didn't give specifics so I just made a way to see if you hit it as you asked... this would print if you hit either things but using an Interface is the way to interact with things for sure
If I have created a class (that is not an actor) in C++, how can make an instance of it from blueprints? The class already has, Blueprintable and BlueprintType, I'm just missing how to do it from the BP editor
screenshot didn't paste sorry..
like a healthbar? using a widget component in the BP?
Yes
Like how to spawn it above their head
Make it yea. Make it visible in world/actually spawn it that I don't know how to do
Whats the best practise for handling functionality between different items? For simplicity, we can have 3 types: base item (bare minimum), weapon and food.
I'm using DataAssets here. How do I make it so only food has water, hunger, etc. but not a weapon? In the picture provided I'm using a struct that has those variables, but you can't set the struct to null. So it looks weird if an AK47 has 0 hunger, when it should be null.
And vice versa. If I have data about guns, e.g. damage, reload, animations (lots of them), I don't want my DataAsset having a bunch of unused variables for food (since they won't use that data).
I know you can reference another class or data asset (like a reference to a material or mesh), but then you have to click it to open it up, and I want all of the item's data in a single tab, in a single place (since its easier to work with).
It would be annoying having to open up "Apple01" and then click on "Apple01FoodData" just to edit how much water/food a player gets from it. And there can be a case that Apple02 has FootData of "Apple01FoodData" (it has the wrong one), so it becomes more confusing. (I kinda wish there was a way to see variables of variables in DataAssets, like a dropdown section)
how about something like this in the enemy BP (from the UE forums)
that is what I asked originally if you used a Widget Component .. but I don't typically do C++ stuff.. sorry
It's fine
I made a spawned object that I can just drop creatureObject class on and set count on the spawner and radius and it spawns them randomly in that area. And my creo class stores their health/attacks/speed/states/etc.
Spawner object*
Oh and appearance (asset ref) and material ref
So I can randomize it between a set of materials if I want diff slimes for example
Figured out how to get proper Pitch but Roll rotates the camera weirdly and Yaw has been connected to X but still turns weird, anyone have a solution to this?
Interface
Refresh my memory pls, this get true if any is true right ?
yes
always use a print string to make sure things go the way you expect
it helps
every
single
time
😄 👍
true
anyone know where I could learn how rule tiling is processed in the code?
so far I'm at the raytrace part where it reads if the hit object is the same
but idk how to make it get which direction is the first object detected
and how each directions are read (N, SW, NE etc)
Hey guys I’m relatively new to unreal engine (about 6months in). I’m working on a project where everything is working fine in the engine until I try to use stand alone or package. Once I do the player character mesh won’t load and some meshes have the same thing. I’ve tried just about anything I can think of and legit can’t find any documentation or similar discussions online. If this is the wrong place to post I apologize please direct me on the proper place. Thank you to anyone who can help in advance 🙏
how can i make an input that can perform two different actions based on how is it pressed: single tap and hold down and release (but being the same button on the gamepad)?
Create your enhanced input option. Once you set it there are option for adding more functions. So for instance if you add to tap X on controller for jump you could and another row, select controller X input and you should see an option that will let you set a condition such as holding and releasing X. I hope that makes sense I’m in bed now but could probably send a screenshot if needed tomorrow. Lmk
Hey! Anyone know why the static meshes in my blueprint adds or retracts very small decimals (only sometimes) when moving/rotating them?
I'm going half mad needing to change it to a whole number half of the time!
Snapping is on.
Just a float being a float
it may be possible to change the transform values into integer, but that would require source code editing
or maybe creating your own tool that lets you transform objects with integer method
but that would take away the possibility of having halfs
Sounds way to complicated. But damn that is just annoying
nothing is perfect 🤷
It's not the end of the world but I spawn in some stuff and just knowing that I imight spawn them in with a very slight rotation irks me 😛
I guess
Hi there, i have this code connected to an event dispatcher where a widget is closed , it's supposed to change the input mode from UI only to UI and game , but it throws this error
btw this code is inside the player controller , and i'm launching the game on client side
just round it?
you can;t have half/decimal in integer
Hello everyone, I'm implementing the node blueprint "Simple Move To Actor" but an error like this appears, and the target character doesn't work.
UNavigationSystemV1::SimpleMoveToActor called for NavSys:None Controller:None controlling Pawn:NULL
Does anyone know the solution?
thank you, please help.
make sure your AI controller is valid
How? could you explain in more detail please.
i'm newbie at this 🥲
You are getting null reference, means u are trying to access something that don't exist
print string the value of ai controller
if u don;'t know how to do that I suggest looking at your first hour in unreal
now if it prints nothing, then you have an issue. You don't have a valid AI controller
though I think with simple move, you don't need AI controller
am I doing something wrong here?
before this for each loop, this actor is set to add 1 in a random available index from the CrossDirection array, so some indexes have 0 and some have 1
now for some reason the output from the switch node always gives the same execution index every loop
It will always Get the 2nd item in the array
try Plug Array Element into Selection
how do I find 1 then?
here's how the result looks zoomed out
with just the find node, it gives only 4 times north or east
connect green
What Type is your CrossDirection array holding?
here's the result with Array Element connected
I just want to make it find the item 1 in the available array indexes
so if it does not find 1, it should fire the Default execution pin
hmm
I seem to have found a solution which does not require the Default execution pin
would anyone know how i can disable controller navigation on widgets? when i press a keypad button on the controller it will go to the next button, i know i can disable is focusable but i need that enabled for somethins else
someone has time to rubber duck with me? it's crazy that it is not returning anything here
Are you sure the array has any elements in it?
yes it has 4
I think I remember not seeing any debug data when working with an array like this, have you tried e.g. printing element display name and seeing if it does?
I have an array of icons that correspond to the actors detected on screen.
its drawing and moving the icons on tick in the widget.
So for that i actually have 2 arrays and one Map.
1 array for the icons, 1 array for the actors, and the Map that is actor -> icon.
Now whenever an actor dies, the actor becomes "None".
And i cant use it to clean/remove the actor from the arrays and the icons, because its None.
So that means the array gets filled with Nones sometimes and the icons get messed up and go to actors that dont belong to.
How can i solve this problem?
Can you not remove the actor from the array right before you kill them?
yup thats one solution
thats what i will do
On Destruction event right?
thanks
but since im asking
is there any way to iterate through a map and clear the Nones ?
solved, but still weird, yes i was not adding new elements but at the same time the number of the elements was changeing every time
perhaps unreal puts empy lements into the array automatically on tick
have no idea
You can remove them one by one as you go I think. After you delete the actor, drag from the map -> Find node, and leave it empty, it should find the none, then just Remove it.
I've not worked with maps, so can't guarantee it, but sounds reasonable imo.
Other than that, I've looked up a way to iterate through maps in a ForEach loop, it's kinda wonky, but it's there if you prefer this approach.
https://www.reddit.com/r/unrealengine/comments/i956wb/is_this_the_only_way_to_iterate_through_a_map_or/
Don't see why it would do that, unless you told it to add an empty entry? Anyway glad you got it!
I am getting an infinite loop here and I don't know why
yeah that i knew, thanks. the issue ius how do you remove the none
because you cant "Find" a none
so ok you iterate through the keys but the key is None so how do you remove it from the map
How do you call Add Floor Tile in the first place?
Firstly, these two nodes are redundant
In fact the Set Next Spawn Point is also redundant because they would be in the same value
When you spawned FloorTile at TransformA, it’s transform will be the same as TransformA, so you are setting it to itself
As for why it is an infinite loop, you will need to look at what is calling this
I understand why it's happening now
If your loop condition is based on SpawnTile1 being true then yes it will continue indefinitely
since this triggers when walking to a location and makes it continue forever
Ah right, cause maps don't have indices if I'm not mistaken, so you can't just remove an index.
If you can't just remove a 'None', maybe you need to switch from using a map to using a custom struct?
You can do a Reverse For loop, then remove element on None
It should trim the array automatically
Otherwise there should be some kind of option to resize the array iirc
but thats the array
an array can remove by index
a map can only remove by key, and if the key is None, then we are in trouble 🐺
yup
hi, could anyone help me with my enemy healthbar not projecting the actual health? death works perfectly fine, damage too but the healthbar isn't visualising that.
when dead hes still 100 on the bar
event graph damage ^^
update health bar function
binding inside widget bp
progress bars have a 0-1 range
your health likely isn't in that range
you need to map it onto there
normally by dividing current health by max health
i fixed it, it was my apply damage section of code needing the update widget
noob question here.This is not continuing to subtract one from "ZombieRound".It decreases on the first itereation and then not again
also just not sure if it even would stop the spawning process in general
it is supposed to constantly spawn enemies until it the var reaches zero
Maybe you could loop over the keys (which sounds like actor references if I read correctly), check if each one is valid, and if it's not remove it from the map
Keep the Begin Play >Set Timer> Set Timer Var
Move the Branch and Invalidate to after the print
so , after you decrement the int, check to see if it is 0
also, don't change to Float, keep it Int
it seems to decrease to 0 but still continues to spawn
i have zombieround set to 1 yet it just continues to spawn more enemies
figured it out lol i needed to use the clear and invalidate node not just invalidate
one more question though.So i have multiple target points I would like to use so how would I put them into an array?I do not want to just do a hundred sequences
What are those target points? Like what will they do?
If you want the zombies to go to the closest target points you can make an get all actores of class to the target points and white a for each loop estimate the lenght between the zombie and the point and just take the integer of the one closest and get a copy to it
After witch you just to AI move to and yea
the target point is just where they spawn from
Ohh.....
could i do something similar but getting the target that is closest to the player?
You basicly do the same think but inside the players blueprints
Blueprints seem so confusing to use after coming from a programming background. Im hoping itll all click soon
They are very use to use but there are a lot of them
If you want you can change the name of the blueprints
If it's that what confuses you most
yea lots of them is a big thing and the whole plugs and pins confuse me
If it'll help you understand the plugs are just the () of UE5, like in C# you will write for(i = ? ; i <? ; i ++) and in unreal you just have the note FOR with the plugs being the ()
Sorry for the poor explanation but I am writing on a phone with the poorest english
It prety much the same think you just don't need to be scared of mising a single ; and your code to stop workinh
lol true
what should i plug into the get all actors though?
everytime one spawns I want it to be a random location
SO on begin play
max is 0?
u got it the other way imo
also you can use last index instead of -1
array starts with index 0, trying to access something lower will result in out of bound crash
rep ur right I always forget to check what pin stuff gets plugged into lol
thank you I got it working
Nice
I suggest using behavior tree for A.I stuff
It is a little advance for first project with blueprints but if he wants to try
how does that work?This is my first project with game dev so I am pretty lost on all the nodes and stuff.Im just tryna make like a super simple black ops zombies mode
well
u gonna end up deleting what u have anyway
is all im saying
black ops zombie? at bare minimum should be done using proper tool
WIth behavior tree you can define states
and abort task
bare blueprint is not the right place to do A.I
if you wanna go simple for first project, perhaps don't do zombie fps shooter
I mean you can do w/e you want, im just giving my 2 cent
What is easier than zombie shooter for a firsts game
platformers too
i already know its gonna suck im just tryna learn the engine by myself without mindlessly following tutorial
shooters are in fact incredibly complex as a first game
animations, weapon mechanics, ai navigation, eqs, etc, procedural animation, melee attacks, special enemies
Unreal have samples that you can look into
with decent (subjective) practices
Is there a way of storing all the positions of certain actors in my level during runtime that is kept after the game ends to copy and use in a blueprint/in editor mode? - I want to retrieve all the positions of a certain actor that is then used in other Blueprints without having to retrieve and input each position from the editor?
If you want to make battlefield like game with realistic recoil yes, but for a simple linetrace i think it's perfect
ill look into it thanks
it still isn't though. it's objectively complex for a first game unless your "zombies" are capsules and you use the template character.
this however would make your game not a zombie fps shooter
in editor mode? you might need to make an editor subsystem
not blueprint territory
its gonna be something super barebones.Whatever you wanna call it idc i am just tryna learn my way around unreal and Blueprints
Yes in editor mode - I want to retrieve all the positions of objects in my editor-level to an array to be used elsewhere
you will need something that lives through the editor life time. Afaik editor subsystem is there but again thats not blueprint territory
To be used elsewhere when? During Editor also, or during Runtime?
You may probably need to do a save game
Then read from the save file
hello, greetings, I have the following problem: I can't put a simple "slide" animation from mixamo "in place" over unreal, so with "root motion" the whole thing doesn't work because the animation then looks very strange
I've already used 2 different tools via blender and also mixamo converter but it doesn't help. Can someone please help me?
I'm trying to make an enemy follow the player when the player is within a sphere collision bounds. I initially used OnComponentBeginOverlap, but realized that only hits once. What should I use instead to ensure it hits every frame as long as it's overlapping? Do I just move it to tick or is there something better?
tick will run every frame
you should ask your self how the enemy damage the player and how often
it can be as simple as a timer that runs as long as the player inside the capsule
and stop the timer on end overlap
I know tick will run every frame, but it seems like good practices in UE is to avoid using tick in favor for other events. I'm just not super familiar with UE yet and wasn't sure if there was another event that would check for overlapping collision objects every frame or not.
You dont need to avoid tick
you use tick where it should
and dont use tick where you shouldnt
If it needs to run every tick then put it there
Is it the right place to run damage logic? hell no!
if u are damaging every tick
A computer with 144 fps will get hit 144 times
idk where you got damage from. I never mentioned anything about damage.
In the following snippet, the GetPlayerCharacter is coming back null. This is in another character class (Enemy) so the enemy will chase the player. What would cause it to be null here?
You can use the Overlap event along with a Boolean flag check on Tick
Yea that's what I decided to go with.
Try connecting the Get Player Charatcer from Get Player Controller?
You don’t need to check if it’s overlapping every frame instead you have two events setup one for begin overlap and one for end overlap then you’ll effectively have a boolean state for player chase.
How do I connect the two animations together, and not just one at a time? I want to properly do it. I got the other ABP from another ABP, and currently intergrating it.
yea that's how I'm doing it now. Thanks. Not sure why I was thinking of doing it the other way. Would be super inefficient. lol.
That did it!
I know that the animations work, for i can switch bewtween the two animations
i have all the states and nodes in one, i am putting two together
intergrating them
but i cant get thise LAST plugin to connect
Actually - just worked out how to do this with Blueprints - Created a Data Asset to store the values outside of gameplay. Created an Editor triggerable event that pulled all the transforms to an array then saved the array to the Data Asset. All values have been stored in the DA and can be copied and pasted out to anywhere I need it. Did not even need to PIE
editor utility?
No just a BP and a data asset
Trying to make my actor move in the direction of its yaw, do I need to do some trigonometry or is there something already cooked up for this?
Is there something like an event On Block
I have an on begin overlap event but it isnt working because the actor just blocks
i need it to actually block, but i also need to know when its blocking
Should i create a separate collision just for this?
OnActorHit if its on AActor level
Get Forward/Up/Right Vector
get actor forward vector?
Yes
there is a moveForward on Pawn, but not on actor
I could use that but, yeah, only for Pawn.
On an overlap event, how would I check that the other actor is the player? I thought I could do "other actor == GetPlayerPawn->RootComponent, but that didn't seem to work.
op jk, got it. just needed to do other actor -> RootComponent
yups that worked. i was about to spawn a new collision at run time, and assign a overlap event on it 🐺 , thanks
that other alternative also worked
its probably just OtherActor == GetPlayerPawn
but you gotta connect the OtherActor first to make sure the compare node is compating AActors
Oh yea that does work. lol
APawn is an AActor, but AActor might not be a APawn
Sorry to bother yall again, it's just that noone is talking about blueprints or ABPs or any of that sort of At #animations, and I jsut want to fix this one code. I'm trying to connect these two nodes together, to work at the same time. I tried to use the Additive Node, but that distorted my character to a high degree. Any advice would be amazing.
It's hard to explained what can go wrong without knowing the full extend of what each node does
but in general you need to cache the pose
and pick which one to use
don't really get how exactly "2 animation" or additive in this context. You can do the additive stuff in the Blend space or w/e. There is also Blend per bone if you want to seperate anim by the bones
The two animations you are you refering two, is when you get two different engines, with two different animations to two different characters, and then you have the mighty task of intergrating those two together, into one. This is the blendspace of the intergration, and the final piece to the puzzle.
How would I cache the pose?
no idea
To cache pose, simply add a new cached pose by right clicking on empty space
animation are usually in a single chain
you're right
a cached posed is then used in a different state machine
I am trying to add a main menu to my game, I have my buttons and in all tutorials there is a events tab in the default tab, I dont have it. How do I add an event?
What are you actually trying to do, have a wounded state machine as well?
Make it a variable
How?
Yes, along with a flight system.
Thanks XD
Just have multiple state machines and blend between them based on is wounded or whatever
You're staring at it. Blend poses by bool
Add another one and blend the result to the first blend with whatever you want the third thing to be
the true isnt working
im confused a littel bit yes
been coding a while and a little fried
You use a boolean to control which pose gets to be played
Your active value is false so it will always be false
i want them to play at the same time
First of all you seem to have misconception on how animation works
you cant can you
It doesn't quite sound like that's what you want. Do you want a blend by bone? What do you actually want here?
thats all you need to say summer
You have different idea of blending
You can blend by a float if you want something halfway between wounded and not wounded
throwing nodes isn't a good idea, start small and try to understand what each does. I have no idea what u are trying to do, animation is not an easy task to tackle for me. I try to keep it as simple as possible
I want to get my blocking to work with my flight system. I might just make it where it has a Is Blocking var, and be done with it
which is why im asking for the simpliest way possible, the easy route
i keep trying to go to big, so i ask for help
I don't know what you are trying to do
if you are trying to blend between 2 posses, well what exactly are you blending?
i can't picture that
Anybody know why my function variables say "out of scope" when I try to view their values while running? Hovering over class level variables works fine, but function level... I can't seem to view.
Cold summer, I'm trying to fix one chain
combine two chains okay?
intergration
it's not easy
Combine two chains in what sense?
omg -w-
combat, and flight system
i do
hope someone else can help
but you are just telling me you don;t know, and i keep telling you im intregratiing flight animation, to combat animations
to where i can block in the air
thats all im trying to do
i think i know how to fix it now
thank you summer and adriel
Blend per bool just mean, on True. Use the true pose, on false use the false pose
you will have to figure out what goes where
flight animation could be a state machine yes, but blocking should probably be a montage
there is also blend by enum
I would probably use states to determine which animation the character should be in
Flying, OnLand, etc
You can have branches on each state too. For example in the Flyign State machine if health is low, use that as a condition to a Blend per bool node where on True Play Flying Wounded and False Play Flying Normal
how do i access blend by enum, i tried from graph, but i think i got the right one
and is any documention of blendspaces i can look into, so i can know some more animation nodes?
I learn from looking at other people anim blueprint, don't know about docs ( I doubt there is any )
by that I don't mean youtube btw
more like market place assets like ALS and DCS
but some of them are too hard to dechiper for me
some take lonnng time
I suggest starting really simple, have some states to drive your anim. I would use enum
Just start with 2 states
1 is flying the other is walking or w/e you want
Then find out how to work with state machine
once you have cached pose for Flying and cached pose for Walking then it's just transitioning between them using enum
Blending is not really Blending animation btw. It's more like transition
i m trying to make a ghost car replay i dont understand why it snaps to my current position
That entire for loop is going to run in one frame
For Loop happend in one frame btw
so what you are doing here is the same as setting the location to the last index
Assuming you have one position recorded per frame which is kind of ridiculous, each tick, you need to increment an index and then just get the vector at that index. It's kind of a goofy way to do it though.
Or you should do instead is save a transform and time for every point, maybe at like 10 times a second, then you need to do some interpolating on playback.
Otherwise, what if you record at 60 FPS but play back at 30?
so i add a delay? and then when seting location i add the same delay?
No 😄
No. Why would you add a delay?
You could maybe have a delay loop but I would use a timer. Just get something that can fire at some certain interval.
Hell go with tick for now.
whats the name of this so i cant try to make one?
Timer
https://www.youtube.com/watch?v=PPrN2-OQTP4&t=3s&ab_channel=DruidMechanics
If you need something to look at
UE4 C++ Reverse Time Tutorial | Part 1 - Theory
We learn about the theory behind time reversal and how it works.
Facebook:
https://www.facebook.com/DruidMech
Twitter:
https://twitter.com/DruidMechanics
UE4 C++ Book:
https://www.amazon.com/Unreal-Engine-Ultimate-Developers-Handbook/dp/B089M2H7J1/ref=sr_1_9?dchild=1&keywords=unreal+engine+C%2...
can translate it with bp pretty sure. Been long time since i checked the content tho
and insteed of a forloop just have a counter to increment and get that location 10 times a second?
You could actually probably do something slick with a spline. If you record the time and position and rotation of the vehicle, you can probably just create a spline with that data and then just plug the lap time into the time coordinate to sample the spline every frame
The spline would basically handle the interpolation for you
Yeah, the more I think about it, the more I'm pretty sure that a spline is exactly what you want.
You could get away with not even recording the lap time for every recorded point, just make sure you start recording right at zero and use a timer to record every 10th of a second or whatever.
To reiterate, when recording, you save the transform every 1/10 of a second into an array. For playback, you create a spline, and feed it the saved points from the array, and set each points time along the spline just the same as when you recorded them. Starting at zero at incrementing by 0.1. that would lay out a spline in 3D space that you could just sample by feeding in a time and it would spit out a transform
what do you mean by this:
Starting at zero at incrementing by 0.1. that would lay out a spline in 3D space that you could just sample by feeding in a time and it would spit out a transform
if you're shooting arrows and having them stick to a mob. How would you then make sure they all get destroyed once the mob is killed?
Add them to an array as they hit the mob and for each destroy when needed
Say you moved at velocity 100,0,0 for 1 second
You'd record your points like this:
0,0,0
10,0,0
20,0,0
30,0,0
40,0,0
50,0,0
60,0,0
70,0,0
80,0,0
90,0,0
100,0,0
Then you'd add all those points to a spline, set its duration to 0.1 * ArraySize, and on tick, you'd sample it like
Tick -> LapTime = CurrentTime - StartTime -> GhostLocation = Spline.GetLocationAtTime(LapTime)
that's pretty much what I have but occasionally getting null pointers when deleting from the arrow array even with checks in place. Wondering if there was another way.
Don't delete from array, destroy the actor
OKTimeToDie -> for each AttachedActor -> destroy actor
-> destroy self
that's what I mean, check if it's a valid pointer, then destroy if yes. Still sometimes crashes
why would it not be valid?
Show how you're adding to the array and how you're destroying
so, we all know that in blueprint its impossible to setup a 2D array list
now the question is, how could I determine the directions using X and Y integer array variables?
like, how do I code in blueprint:
if X has N 1 and S -1 and Y has E 1 and W -1 (-1 means empty space), then the direction is NE (horizontal/vertical direction, not diagonal), and then if its NE, then set that particular mesh
wat
Are you trying to select from an array with 8 entries given some cardinal direction?
What do you have, and what are you trying to get?
2 arrays, 2 indexes each
I'm tryna make myself a rule tiling
and now I'm at the part where I gotta find a way to select the current combination of occupied spaces next to the current tile
Why 2 arrays?
because in blueprint its impossible to have a 2D array variable
why would you need a 2d array for this?
What would the 2d array store?
neighbors?
yes
but there's only always 8 of them right? just the 4 sides and 4 corners
currently I'm doing with sides only
once I get the thing working, I'll go for diagonal
lemme show you the blueprint
Why not just 1 array and use the indexes like:
N, NE, E, SE, S, SW, W, NW
how?
just make that your convention
nah that's the way to go IMO. Thats what I use for WFC
and there's no tutorial about how to do rule tiling in unreal engine
only in unity with its built in 2d tilemap feature
you're talking about this kinda stuff right
2 Arrays for a 2D Array?
Has one every heard of simply using a 1D array and some math
0 1 2 3
4 5 6 7
8 9 10 11
ding
except I'm making it in 3D
its really tiring building the tiles manually
moving, rotating, etc
Is your final tile a cube or cube faces?
because in 3d thats gonna be a lot of cubes
This gives me Minecraft vibes
the outer cube is the grid and the inside cube is the collider for the diagonal detection
Let's just say you already know what the neighbor cells "are", so you're ready to just choose a mesh or whatever
a rule would be an array of cell contents -> this cells mesh
say your convention was:
Top, Front, Back, Left, Right, Bottom
A rule might look like
Air, Dirt, Dirt, Dirt, Dirt, Dirt -> DirtWithGrassOnTop
Dirt, Dirt, Dirt, Dirt, Dirt, Dirt, -> SolidDirt
You'll need functions to do rotations and mirrors unless you want to make all of those by hand, which you probably don't want to do
You can look at my WIP tilemap plugin to see a bit of how I did it for my system, but it doesn't use rulesets, it's an overlapping WFC model.
https://github.com/AdrielKinnunen/SpectrelightPlugins/tree/main/Plugins/SLTilemap/Source/SLTilemap
I just need to know how to properly tell when should the mesh be a Turn, when to be a Straight, when to be a T etc
a stack of rules
go with the last or first rule that it satisfies
i have this, now i just make a spline with this locations? and dont i need the rotation asweel? and the time ? how does the car follow the spline in the currect velocity, i dont get the duration ? whats that?
Record location on timer
Play it back on tick
you can play it back on timer if you want (it'll jump around 10x per second) I guess but name the events better
RecordGhostLocation
PlayBackGhostLocation
I got zero clue what I'm reading there cause I have zero knowledge about c++
but playing 10x a second maintains the velocity if i play it on tick wouldnt it be faster?
You can sample the spline at any point you want IN BETWEEN the actual data points
that's the beauty of a spline
your data points are like keyframes
I don't see a spline anywhere in your code
I am trying to trace box the component box inside an actor, but when the actor is rotated the trace gets the wrong size and rotation. I need to trace the box based on the component bounds (the green boxes) Can someone help me?
AFAIK component bounds are the bounds in world space
i m working on it :x
can't recall if the local component bounds were exposed to BPs
The ones that aren't affected by rotation that is
I know I had to expose them once, but maybe that got exposed by now by default
Would then need to rotate the manually by WorldRotation so they aren't AABB
iirc
Yeah, need to make some transformation. Tried multiple things on the internet and nothing is working
You need to get the local bounds first
And if they aren't exposed to BPs, then not sure
rotating the vector almost makes correct, but the sizes are wrong
cant get the local bounds
only from static mesh
How often do you need to do this?
A quick and dirty might be
Unrotate it
get bounds
rotate it back
now you have local bounds
what I do with local bounds?
I have some custom events in my level bp, I know I can't cast to it, but I'm not quite sure how to trigger them. I'm guessing it's got something to do with the event dispatcher?
I can put them in a different bp, like the game instance, but I'm worried they'll spawn in the wrong level then
What do those events do?
ALMOST THERE
Are they level specific like Battlefield Levelutions?
nah, just spawn in a few actors and change the dialogue they're saying
why not just drop them in the map?
when should they spawn?
I can't think of any other way to define tile shape
so they spawn after a story beat- after an autopsy for one and after talking to a random character for the other- I don't want them to spawn unless the player is in the right map though, and the autopsy event is in another map
my man
ok
first off, how many states can a location be, just 2? Occupied vs Unoccupied?
yes
there's two indexes in those arrays
if an index has integer of 1, its occupied, and if its 0, its unoccupied
So you can think of your entire world as a 3d grid of bools right?
here's my setup to make the tile actor check for occupied spaces
I don't need all that, need to drill down to the fundamentals of the system
At tile 3,5,230, what is there? Is it just Occupied or Unoccupied, or does it have Air or Dirt or Fence or Glass or what?
ok so bools will work for now
so you can represent the neighborhood of a certain tile with an array of bools
3x3x3 if you want to include the tile in question, 1 smaller if you don't
hmm
thats if you're going diagonal, if you're not then it's just 6 or 7 bools
I wouldn't use tracing, unless you have a very small map. I'd use some sort of abstract representation
in 3d it's gonna be real big
that's why Minecraft uses chunks.
Anyway, you'll need functions like these:
bool IsThisTileOccupied(Coords) / TileValue GetTileValue(Coords)
bool DoesSubgridMatchWorld(TArray<TileValue>, Coords)
TArray<TileValue> RotateSubgrid(TArray<TileValue>)
TArray<TileValue> MirrorSubgrid(TArray<TileValue>)
wait, actually I think I've got it
Testing if a filter/rule applies would be checking if the filter/rule (an array of tilevalues) matches the world at the location
should i be drawing the spline while i dive or only when i say soo?
However you want
I'd start out by recording the points and doing a draw debug when you press a button, drawing a point at each one to make sure they look right
Ok. Got a weird question.
Thank you to whomever it was that recommended the blueprint instance video yesterday. It was very informative. I have been using them for a bunch of features now
Ok, so I currently have an icon (billboard) that pops ups
over openable doors via a line trace from the FPS Camera. What I want is to add a bit more dynamics to the icon. I want it to change scale slightly in relation to the player. So that the billboard gets slightly larger the closer the camera gets to it.
So far I have a Get Distance To node comparing the distances between the door and the player, making the result a float variable
How would I take that float variable and have it interact with the billboard scale? Lerp?
map range clamped
lol that was quick. Thanks!
the bounds in some angles are still rotate 90degrees, dont know what to do
probably because no players is controlling and the mouse input go to zero
this might just be what I was looking for
I knew a foreach was needed
now to test it out with print strings
The switches wouldn't be needed unless you only want index 0 and 1 actually proceeding with the incrementing, assuming there's more than 2 elements in your arrays.
well, its an almost
this is the actual test setup
its missing one turn and added one dot
trying this solution i found how can i see it in the editor if its drawing a spline?
Hi everyone!
I have a question and i'm a bit stuck with my project.
I am trying to create a cannon that shoots projectiles towards the player position.
I am spawning projectiles at the location of the cannon actor, and setting the rotation of the spawn based on the player position.
The problem i am facing is that - with location node connected, the projectile rotation is away from me, and following my position as projectiles spawn, but only on X axis. The projectiles are not coming towards me.
Then with location not connected, the projectiles land next to me but they spawn at 0 0 0 so they come up from under the map...
I tried with get location from xy, i tried with get player camera location but i can't seem to find a way around this.
Thanks!
plus this warning witch i thought it was from the mesh but it isnt :x
You don't want to get Rotation from WorldLocation
You simply want to get the "ForwardVector" instead of the WorldLocation for that
Also doesn't need to be on the RootComponent
The Pawn itself should have a GetActorForward or so function
thanks for your reply! I will check that out
this was my initial idea
this is what's happening in game
OK, after trying i think i understand the confusion. The cannon is not player controlled but rather from afar shooting at the player. Via forward vector i will then control the rotation with my camera which is not what i want! I want the rotation to be controlled by my pawn location, and the projectile should spawn on the cannon actor
this is how i implemented your feedback. I might be taking this all backwards, sorry - i am a newbie 🙂
this ship would have multiple of the cannon actor, and each cannon would shoot at the player who is on the beach. So the projectile should target the player
You want the Direction to be Pointing from the Cannon to the Player?
Right, that makes more sense
Direction in Vector Math is Target - Source
And then theoretically normalizing it
So it's of length 1 again
In your case that would be the WorldLocation of the Pawn, minus the SpawnLocation of the Bullet
For the Rotation part you don't have to normalize it though, you can just use the result and get the Rotation from X
i'll have to wrap my mind around that
cheers! thanks for the help!
hm, not sure what to do with that. Sorry. I guess i don't understand vectors well enough.
The problem is when i add get actor location to the location connector, though. IF i don't do that, the projectiles land next to me so i assume are fired towards me from the 0 0 0 spawn location
i don't understand why saying "spawn at the location of current actor" would rotate the direction away from me
I want actor components to ignore components of the parent. I have a setup with actor class that have two moving components on them. I want to have two actors or more to overlap on the scene and when their moving components overlap perform a function. But since I have two moving components on each actor, they have one tag and detect each others collision . Performing function when there is only one actor.
here is what happens if i leave "location" out. This is what i want, but then i can't see the bullet anymore
getting close, last thing is getting the rotation to set properly
You are still using WorldLocation of your Pawn
You are using a Location as a Direction
That doesn't really make sense
That's why your result is also so difficult to understand
You basically tell it
"Spawn at 0,0,0 and Rotate to (X,Y,Z) of my Pawn."
The math I told you for direction is
Target - Source
If Source is (0,0,0) then you would end up with Target of course
Since you spawn at 0,0,0 when you remove the SpawnLocation, it will by conincidence aim at your pawn
I see. Well i guess i just want to know what i can do to these nodes to get what i want
this was the initial design, the rest was just me tinkering trying to find a way around why it spawns the way it does
i understand i need to normalize the vector of get actor location before i link it to the location connector on make transform node?
i see. Thanks for explaining this one, now it makes sense
how would i go about using this?
Let's take this example. Let's remove the third dimension, cause the math is the same.
Your pawn stands at (3,1) for (X,Y).
If you spawn the project at a e.g. (0,1), and give it the WorldLocation of your Pawn as Direction/Rotation, it will point to (3,2).
If you remove the Spawn Location, so the projectile spawns at (0,0), the red line will also move 1 down, and then "magically" aim at your pawn.
If you want it to aim at your Pawn, you need to math out the direction from Projectile to Pawn
Which would be that green line
In the example, that green line is the result of PawnLocation minus ProjectileLocation
So (3,1) - (0, 1), resulting in (3,0)
An actual direction would be normalized to size one (so (1,0)), but that's irrelevant for the general direction it is pointing to
The (3,0) is basically the value you need to add ontop of your Projectile to get to the Pawn
Another example, projectile spawns at (1,3).
To get the Direction, again, Target minus Source: (3,1) - (1,3) = (2, -2)
So to get from Projectile to Pawn, you would need to move (2, -2)
If you push that result into a Rotation (let's ignore the magic of the conversion here), you would have the Projectile point towards the Pawn
One tricky thing about Vectors, if you never worked with them, is that they can be Positions and Directions, and without context you wouldn't know
(2, -2) can totally be a location. Can't draw that on the image cause I have no negative Y axis, but still.
However here it's a direction from Projectile to Pawn. The Context of when it's a location and when it's a direction is usually very straight forward.
Cause you basically define a vector as such. You say "this is a Location" and use it like that. And same for a Direction, but that goes beyond the problem atm
So to get your Project to work, again, you need to Subtract the WorldLocation of the Pawn, from the ActorLocation of the Projectile, so basically of the SpawnLocation
And then use the result for the RotationFromX node
Well dang man, you just earned my respect. Thank you so much for explaining this in depth. I definitely understand now that i don't know enough about vectors, and it sounds like i need to shape all that up before i continue. I didn't understand the distinction between location and direction in a vector either and this is complicated for me at the moment.
I'll be referencing this for now and in the future to get my project to work again.
Thank you so much again!
Does anyone know why my FollowPlayer function is not working? My goal is for the enemy to begin moving towards the player when I am within a certain distance of it, otherwise it should stay still. Currently, when I move close enough, it teleports some distance behind the player and then just stays there with a little bit of shuttering movement. The function in this blueprint is getting hit on tick as long as the player is close enough. https://blueprintue.com/blueprint/6jyfbiyw/
this interface event doesnt get called. Even though i'm implementing the interface.
i have a character bp, holding a weapon, and i'm trying to call the interface on the weapon from the character. I can't find out why it doesn't get called
I have to check in blueprint, on actor begin overlap, if the overlapping actor is one of a series of classes by trying casting to each. Right now i do that if one cast fails I try an other and so on, but it won't scale well once the classes to check for are too many, do you suggest a better way?
success 😄
How would you approach putting a target reticle at the blue circle along the red line at the distance of the cursor (balck triangle)? Reticle could be any distance from player.
Take the mouse location in UI space and place the reticle there
Like, what have you tried and where are you stuck?
Do you want to see a cursor AND a reticle or just a reticle?
I'm guessing you're tracing, hitting the ground, but you want to aim at the point shoulderheight above that
Just reticle, and not too concerned with height, but barrel height is fine. It could literally paint on the surface of what ever is there. Right now I have a projectile firing straight out of barrel and it does its own raytracing for hit and that hit box is a meter high so you can shoot "crawlies".
Note the blue circle is not mouse exact as I want it along the trace from the barrel.
Surely you know how to debug Accessed None after all the time you’ve been here ?
well yeah... but i dont get why 😮
hello
is there a way to reference a interface class in a variable ?
This error is not happening in the code you've shown here. If this is multiplayer as well, what is likely happening is you're running a dedicated server and are attempting to add a widget you're trying to create on the server to the viewport.
because i cant find a way of doing this
Widgets don't replicate, and can't be created on dedicated servers. You probably should multicast the event to display the damage, but make sure you're only creating and adding the widget on clients (do a check if is dedicated server, if false, add the widget)
For what purpose ?
Anyone know how to get rid of this error please
thats what i'm doing when enemy dies but it seems it's still trying to do something
im doing a system using a infinite amount of structures, i need to select a specific interface class to use for "does implement interface", so i would like that in my structure you can select the one to check for
I have a bunch of units fighting.
Then some of them will surrender (randomly).
So for this im doing it on the Take Damage function.
So when the health becomes less than < 20, i make it randomly decide if it will surrender or not. So that now i can capture this unit.
Now the thing is that, the unit will keep taking damage and it will keep on testing if it surrenders.
I thought of the DoOnce node but it doesnt work inside a function.
How do i make it do this only once?
hey guys, how can I see the output value from this?
I cannot find any visual output for math expression
in material blueprint
Infinite amount of structures… what could go wrong? 😀. The beauty of interfaces is that if you send the message and it doesn’t implement the interface, it doesn’t do anything
I don't think you can do this directly in blueprints. You should be able to use an "Object Class Reference" but then someone could potentially select any object. @kind estuary
Anyone know how to get rid of this white text
don't know what it is or why it's ther
i mean i can have tons, you never gona have 9999 interactions system
Press P
It’s navmesh information
@dawn gazelle
Click the little down triangle on the last node.
yeah exactly
yes ik but i still have to know if the actor has the interface
i must have pressed something to have the white text show as I know p does the navmesh thing but I've not noticed the white text before
Upgraded engine recently?
How come?
function has to return if found or not
Cool, now give the rest of the answer
before finding a workaround i prefer knowing if what i a maskign is possible
don't think so not 5.2 anyway
line trace > does implement > yes/no > do something depedning
Attempting to move a fully simulated skeletal mesh /Game/Core/Maps/UEDPIE_0_ThirdPersonMap.ThirdPersonMap:PersistentLevel.BP_Guide_C_UAID_2CF05DE488FD6FC501_1984580743.CharacterMesh0. Please use the Teleport flag
anyone help with this please
when I kill the enemy I get loads of these after leaving PIE
I'm pretty certain I've done everything right
Maybe you should read this part again:
The beauty of interfaces is that if you send the message and it doesn’t implement the interface, it doesn’t do anything
still not answering
Ok
how can i know if it was sent with sucess if nothing is returned
I don’t think interfaces are designed that way
ok ty ill find a workaround
make an interface with a return value
Just call the interface function
If it’s there it’ll do something
If not, it’ll move on
i cant do that for all the interface, would make to much work for the user
Yeah but you may need to know whether or not it's going to do that thing.
so don't and do what Neo said
And you wouldn't necessarily want a return value on all interface calls :/
ty Datura
This is a bad idea to begin with
let the interface do the job of deciding whether it can do it or not
i still need to know if it worked
He’s creating “infinite structures” with apparently hundreds of interfaces
not hundreds
so for that specific interface have a return
a few or dozens is enouugh for interactions system in most games
1 should be enough for interactions.
it still a map of structures, and depending on that its not the same call
what you making the needs a few dozen etc
Trace towards AimPoint, instead of trying to align AimPoint with the trace
ask this to the customer
my goal is to make a modular system, thats why i was asking if you could create a var type of interface from the UDS panel
so your working on a project where their wanting this
?
no
That's a node
Does Implement Interface
@faint pasture