#blueprint
402296 messages · Page 654 of 403
yes they are, and they are working in UE4 Edtior
hmmmm
you have any screenshots?
mmm of what exactly?
o I think I have a solution
I think this may be a cooking error and/or an error with building the game
have you tried restarting your computer?
heh, of course. By now I did 7 different builds trying out different things and nothing seems to be working. Also logs are fine when building game
this looks completely out of my mind as everything is working fine in editor and then boom - not working in game
yep
pawn possessed
it's completely basic, just a level, pawn already spawned, possessed
level just loads and pawn doesn't react to any input
maybe try adding an actor component to the pawn to receive input?
hmm sounds kind of strange
yeah, its weird
some math junk around? easiest way to figure out if VectorX is within the bounds of VectorA/VectorB? nvm. isPointInBox is a thing
¯_(ツ)_/¯
@spark steppe otherwise just check that the elements are between. Easiest way is to check sign on the differences
X.x - A.x and X.x - B.x need to be opposite sign. Same with the Y and Z coords
If all 3 sets are opposite sign it's in box
is there a way to check IF a widget is collapsed/hidden?
GetVisibility
ah, where can I see the bytes value? guessing 1 is visible 2 is hidden?
it's an enumerator, so it'll give you a human-readable thingy
thanks
thanks, i just wanted to avoid some node mess, which the isPointInBox does
Hello, I am trying to add any children actors of this base actor into an array but for some reason it has nothing to add. Anyone know why?
it only works when i put a child actor into the world
Hello I am making a 2d game and I have been trying for hours at this point to make my character deal dmg to an AI and I just don't seem to be able to do it I have set a hp for the AI and a hitbox, a hitbox for the Character but when i press the button to deal dmg it either takes my own health or it doesn't work.
Hello everyone! I'm new here and also to UE4 and I'm trying to do something maybe you guys can help me..
hopefully it can be done simply since I'm just a week in UE4 in general
3rd Person game
So when my Character jumps, he enters JumpStart state, then JumpLoop and finally JumpEnd. When entering JumpEnd I made it so the player cannot move until the animation is done. I would like to keep it that way for my planned gameplay, but I would like to make JumpStart AND JumpLoop go back to Idle/Run state IF the landing occurs very fast (let's say.. when time is smaller than 2 seconds after entering JumpStart).
This is for when the player is jumping up to a platform, he shouldn't be unable to move by the JumpEnd state I made, and same goes for when the player falls off low height ledges.
I'm trying to do that in AnimBluePrint btw
Check and confirm that you're doing these things in order.
- Get a reference to whatever is to be damaged
- Call the damage interface on the target to be damaged
- In the damage reciever actor, use the Event Any Damage to subtract the sage from its own health.
So to reiterate, the three steps are to determine what you are going to damage, pass a message over to it in some way that lets it know it is being damaged and by how much, and then implement the damage modifying health
The animBP should not be modifying actual movement, the communication should be one-way
So any modification to speed etc should be done independent of animation
Basically your game should play the same whether they're even is a character mesh or not. At the high level anyway, obviously there are things like root motion which tie together animation and movement a lot more tightly but that's a different topic
because it's on beginplay, but you may have figured that out already
what would that matter @last abyss ?
@fierce birch test it with a delay. If it works then that's the problem but I'm guessing it's not.
Hey ya'll! When working on large scale projects, do you use Unreal's current event dispatchers or build your own event system?
If it's good enough for Fortnite it's probably good enough for your project.
sorry i am using unreal for line 2 weeks and i dont really know how or understand the steps but i tink i know what you mean at the step 1
currently switching from Unity to Unreal and looking intro translating my setup to an Unreal verison
Wait a second, are you trying to get all enemies? That should just be get actors of class.
Child actors are more like if an actor has another actor as an attached child, I don't think that's what you're doing here
Translate your Unity knowledge into UE4 so you can get up to speed quickly.
For sure ahah As I wrote: I'm switching from Unity to Unreal and currently in the exploring phase'ish and looking into translating my Unity based event system into an Unreal version...but looking at how Unreal is set up...it seems unecessary
Thanks for the link! 😄 Checked it out today 🙂
@dense bough are you talking a global event bus like "hey this thing died"?
A bit more complex. It involves an event manager where you can subscribe and unscubscribe to events with a kay + value pair
Where I'd pull a reference to a single event manager for all occuring events
@dense bough you would probably do that with Dispatchers on a central class like GameState or GameMode
Are you talking like all events or just the ones that need to be broadcast to any number of listeners?
the latter! I have been looking into using a game instance to rely events
But it doesn't seem to be any option in unreal to make a dictionary of events
Does every event have the same signature?
yes! the idea would be to simply pass an object
and rely on casting to get the relevant data 🙂
Hi! I have a dumb question about 3rd person camera rotation that I cant seem to figure out. Basically, I'm getting unwanted roll (x rotation) when trying to orbit my character via modifying a spring arm's pitch and yaw (y and z). I understand this is caused by applying both my rotations to the springarm, but not sure what the fix is
Might be because of gimbal locking. Try using a quaternion
sure, this project is blueprint only so far, are quaternions exposed?
Am I corrected assuming that it only occurs at the very end of this clip where you're looking up the characters butt?
Not sure, new to Unreal as well ahah But quaternions are used to solve for gimbal locking
Because I don't see any roll anywhere else.
yeah, its hard to capture let me try again. i can assure you the camera is rolling when it shouldnt be
Are you using camera lag?
yes
Yeah that's it. Basically when you are lagging in rotation a pitch can become a little bit of roll as you yaw around
So @faint pasture, would one approach be to set up some actor (or game instance / game mode) with custom events that dispatches events?
ah, that makes sense in terms of how lag works. can i disable lag per axis?
That's exactly what a dispatcher is. Although I'm not sure how you would use a dictionary in this context
Basically you call the dispatcher, and it will trigger all bound events on all subscribers
The dictionary would just be a way to organise all my events and just pass a key to call / subscribe / unsubscribe to my desired events
i lied! the horizon is still jittering even with camera lag disabled
I don't fully understand the answer.
Btw I should've mentioned I talk about state machine and I use notifystart and notifyend to remove character's movement and giving it back once out of the JunpEnd state.
With that in mind would you still say the same? If it's a yes, could you please explain what you meant? Thanks a lot!
but it doesn't work
Basically I would do any speed modification in the character BP only, never touching the animBP. The animBP should be driven, not driving anything for gameplay.
Gotta bounce! Thank you so much for your inputs @faint pasture !
@charred moat that is an unfollowable mess. Start with no delays or anything, just click button, do damage.
@charred moat also I would recommend using the damage interface. Every actor has it. Just search damage in the right click menu
Then on the Rabbit you add Event Amy Damage and put your damage handling there.
So your character never directly manipulates the health value of the rabbit, all it does is send the damage number over
Guys should this not turn my pawn left or right? similar to yaw. But when I do it doesn't move. any Help?
How would u suggest to tell the character to disable movement during a specific state through the characterBP?
I would use anim montage notify if its a specific action like attacking or casting you can have a notify that will tell our character BP at the start of the anim montage and at the end to disable and enable movement
Can u use an anim montage with 1 animation in it? I just learned about anim montage today and not too familiar with it
yeah just right click the animation and go up to the top and create anim montage
Oh ok I'll check it out thx u guys
yeah no worries!
i cant seem to figure out how things go and where to put and what else i need
how does the rabbit reference get set?
is there a way to null selected blueprint so I can test other ways but still have the blueprints that worked for me in nulled in the corner so I can activate it again if needed?
Does anybody know what's wrong with this cast command?
the object that i'm impacting is a child of GUPtracked vehicle
and i know the impulse server event works in the GUPtrackedvehicle class
but it just wont fecking execute when i impact it, leading me to believe the cast isn't working
but i can't figure out why and it's driving me nuts
If i drag get , out of an array can i set specific multiple numbers instead of one number?
hello, I was following this tutorial https://docs.unrealengine.com/en-US/InteractiveExperiences/UMG/HowTo/CreateMainMenu/index.html but I'm stuck on step 20 because I use my own player controller and I don't know how to connect that to my thing
How to create and script a main menu for your game.
you would get player controller and plug that into the player controller the set input node requires
look at step 19, it explains it there
yeah this
but I dont understand. Do i not connect set input mode game only to anything?
well when i press play I get the main menu but the game is still running in the background and I thought this was the problem
no, the problem is its set to game only. if you change it to ui only you'd only be able to select ui elements
i don't know what you mean by that, want me to sent how i did the rabbit?
I guess if you continue to step 22 it would actually explain why you were playing the game
Sure, dm me if you would like to
HI all, Im trying to solve this idea I had. Im trying to set the rotation of a mesh by using 2 other rotations to drive it, And I need them to be .05 each so its not 1-1 rotation unless the 2 points are facing the same direction. This Is what I got and its riddled with issues.
Hi guys, I have a game that is like pinball. I have it so that every time the ball hits a cube, a explosion shows up and sound plays while it disappears. I have this blueprint called points and I was wondering how can I make the points show up when the cube gets hit.
is there a noticeable performance difference between standalone game and packaged game? I'm asking because level streaming is blocking in
that was ok
how do you unparent stuff to this, as when I make the capsule component smaller it also changes my mesh size but I don't want it to do that
@shrewd summit you cannot unparent inherited components, as they are inherited from the parent class. When you say you are making the capsule smaller, are you changing the scale? You should be using the radius and half height variables, not touching the scale
Ah, got it
Is it possible to populate a map with keys and then have the values editable in the editor?
When I try to add the keys on construct, any changes to the values I make in the editor reset
Presumably because its setting the default value in the onconstruct function
mother of baby jesus is that a get all actors of class on event tick 
is for testing
i legit just put it there cause i knew tick was running to see if it would work
the one that is supposed to be final is the 2nd one
but it just wont do the custom event?
i'm pretty lost
Dang, I'll try to look it up but I have no idea myself about that event 🥸
i can't see how far the script executes either
cause the 2nd one is a bullet
which auto-destroys itself on impact right after it should do that script
so i can't really put it on the debug view
or at least don't know how
this is legit all the event does
it's, once again, for testing
all this is just me going down the rabbit hole of how to make bullets push objects on impact and have that push be replicated to clients
Is their any way to Tell my Montages/Poses: Only Play Montage A while Montage B is not played? Is their any Blend?
https://answers.unrealengine.com/questions/205787/nav-link-doesnt-update-on-first-opening-editor-if.html
This issue from 2015 is happening to me. Anyone have a fix?
a little help...
Im trying to get my character to possess a Titan without using the world blueprint
target is Self, it should be a controller
anything else im missing?
and which controller? player controller? or make a new one
I have created an actor BP with a single variable called "FloatValue", I named it "BP_TestActor".
I have then created another BP where I build an Array of the "BP_TextActor" instances.
Here is my construction graph for that. I thought I should be able to drag off the return value and Set the "FloatValue" inside the reference BP to a random value. But, when I drag off and type Set or Get neither seem get me the variable... Just typing the variable name didnt' work either. What am I missing?
player controller 0 is generally fine unless you're doing multiplayer stuff
so just use the base Player controller?
ah okay
@last abyss then after that i’ll be able to possess and unpossess with out world blueprint?
yeah with some way of detecting which pawn you're supposed to possess
example?
like a box overlap on the pawn (your titan), on begin overlap you could set a pawn variable in your player as that pawn (titan)
and then whenever you press a specific button it would possess that pawn
okay, ill try to do that after a few hrs of Fallout 4

Can events be triggered while a game is paused? I want to trigger my save/load game events but it seems that at least the input action events are not triggered while the game is set to paused...
Not sure what strategy I can use for loading/saving a game if I can't do it while it's paused, at least it seems (intuitivley) like I should be able to...
It seems that another option for "faking" pause, is to set global time dilation to 0, this does allow input and events to be triggered -- there's a catch: all my physics simulating props are yeeted into space! https://www.youtube.com/watch?v=Tx6qERtX6zU
anyone have any experience using advanced sessions/steam sessions?
@bleak merlin I have a little bit, but not too much
Where should I do this to make players enter the map with no pawn and using that camera as view target?
That doesn't work, but putting it on beginplay in the PlayerController does. I'd just like to have Gamemode handle it
Have you tried these options in PlayerController?
I am just trying to get the steam overlay to open (to make sure that everything is installed and configured properly). This is what I am getting. I am currently using the steam_appid 480 for testing before I use my own games app_id
What guide did you follow?
the ue4 documentation
I'd recommend the guides on Youtube. They're very clear, the same process applies to the advanced plugin
yeah
An overview of Online Subsystem Steam, including how to set up your project for distribution on Valve's Steam platform.
There's a few more detailed guides
@odd roost Hell yes! I just want to play a moving simulator now 😂
This is the first step in a series of guides that will show you how to enable the OnlineSubsystemSteam module for your project. It does not cover session creation, session management, app id association, or anything specific to OnlineSubsystemSteam. These steps are the first part in enabling a Steam integration
also the Steam Overlay only works in buids now, not in Editor
I have but they are able to get steam overlay soon as they start and mine doesn't just throws that error (makes me think somewhere its getting set to 0)
Editor Steam Overlay was a bug that was recently (in the last 2 years) fixed
Ah, thanks, I think the second checkbox did the trick "Should Perform Full Tick when Paused"
I was actually following this last night XD
lol! We can do it!
thank the gods for interfaces lol
excuse me i was hoping someone here could help me out with a lever system, im trying to get multiple levers to open one gate but so far I have only been able to get one lever to open a gate.
Event Dispatcher maybe?
lol thanks I added a section twice which was causing it to disregard due to wrong steam system config thanks XD
I feel like there’s something i’m not getting here...
i’m making this character controller with a capsule collider and setting the physics velocity to move it.
To detect the ground, i trace a sphere that is 0.9x the radius of the capsule, straight down. In no situation should this trace hit a wall.
The BP is set to tick Post Physics, yet sometimes (not always) the sphere trace hits a wall that my character runs into at high speed. I made sure by printing the name of the object hit.
It’s as if the sphere cast is (sometimes) happening while the capsule is inside the wall, but that shouldn’t happen if my BP is doing a post physics tick, right?
I do understand that physics tends to run asynchronously to frame ticks, but i figured Post Physics would kinda wait for everything to be done.
Hey Guys, I have created a render target 2d component in my character class, and I am trying to display my character on my UI. I currently have a texture I dragged my render target on, to create a texture I could use as my image, but is there a way I can dynamically do this in blue prints? (I need a way to do this because currently it is using the same render target for all the players in my game so I need a way to do this at runtime)
I passed in my render target to my inventory screen, and I passed the render target into the material and set the Image to the material, but all players can still see the same character in the inventory screen. Could it be something else that is causing it rather then the material?
is that multiplayer on the same machine?
yeah
then i cant help you, haven't worked that one out myself yet
but theres a create rendertarget method, which might be able to create a new render target
not sure if it does that or only reinit an existing one
ill try another machine and let you know if I have the same issue
no, what i meant is if there are multiple players on the same machine, or if its server based
oh, it is dedicated server based.
and you run the above code client or server side?
weird that it shows the same character then if it points to the local player character
that should work with one render target as it's all client side
where can i change the function of an input, not the keybinding
default template, for example
(D is for moving right, where is that function by default?)
should be in the player controller
first option in the last menu edit blablaplayercontroller
if theres no event for the axis mapping, you would have to open the parent class and edit it there, or override the event
I made my own player controll but its parent class is "player controller". can i make my own controller PARENT
why would you want to do that?
i guess that's not possible
as many things rely on it being a child of player controller
i don't know if its a c++ class for every project, but either in the c++ class, or just override the event in your custom player controller
ah okay, its bp
if you rightclick in it's event graph you should find the axis mapping event
thanks a lot dude
With dispatchers;
Can I bind event to listen for calls from any instance of a class without binding to each instance individually?
Is it possible to see the logic in this function? I'm guessing it's C++ since my project is BP?
top right it shows the parent class
click on it and it should open it, either in code editor or in the unreal editor if its BP
idk if theres a BP equivalent, mine is c++
can i use sublime or must i have visual studio?
no idea
and that's where the logic of this function is stored yeah?
and i can edit it and shit?
idk in detail how it works in the base class, but why not just override the event in your custom controller?
Because I want to learn the engine and the way it works. I want to see the logic behind the default input and go from there
I want to understand what I have control over and what I don't
do timers work within UObject derived classes? the only nodes I can get are the Set Timer nodes and Invalidate, but no "Clear and Invalidate" or remaining time
@spark steppe https://gyazo.com/ca9062d8127cdcf0e257b00632dab2ee
I opened the parent class controller in editor (C++) but the function doesn't exist
MoveRight wouldn't exist as that is a name defined in the input settings of the project. InputAxis is probably want you want to look for.
do you know if it's possible to edit the MoveRight function? I'm trying to find it but I can't
its a default function of the engine/template
It is not a default function. It is an InputAxis, and the name of the InputAxis is MoveRight.
okay, do you know where i can edit it?
Handles a controller axis input
Can anyone think of a reason on why, in editor play mode, my UI shows up and works as expected, but in a packaged build (shipping, debug) there is no UI? I see no issues in the log either. Nothing about not being able to create the Widget.
is it player 0?
Yes. It is only one player (but I don't get the player using that way anyway)
I create the widget in Begin Play on the Player Controller. I then get the controlled pawn and pass them the HUD (because they do need a reference to it for some of the UI stuff) and add it to the viewport.
Works in editor and if I run it as a standalone - but in a packaged build, no UI
that's weird
you pass them the HUD? so you haven't defined it as HUD class?
Huh?
What do you mean
I create the widget and store it in a variable. I then give my controlled pawn that reference
The controller adds it to the viewport
Well, there is some logic inside of the InputAxis, not much, and I don't think you would want to edit it directly. If you're wanting to change bindings and the like, that's within the Input Settings, and you can have certain button presses output certain values on the axis if desired.
That's not going to be the issue though. HUD is an older class. I'm using UMG Widgets.
thank you @dawn gazelle
So I am trying to get the health to display on some UI that I have in the format of current/max but with the blueprints I have here to get the current and max health from the health component on the player it currently sends 100.0 for the current and max health, but in the second blueprint that displays it, it only uses the default values of 1.0 that I set instead of the 100.0 that gets sent in.
Whats the Widget Set function look like?
There's also bindings in Text Widgets that you should use
Click them in the Designer view and you can assign the values to them and it keeps them up to date
https://docs.unrealengine.com/en-US/InteractiveExperiences/UMG/UserGuide/PropertyBinding/index.html @coarse lagoon
A guide to binding properties inside UMG.
So now my render target is the same between both clients when i view the inventory and I am now creating a render target in my character class, and using the following code to try and create them seprately on each client but this doesn't seem to be working. Could someone give me any more advice?
Is it possible to create parallel timers in blueprints? For instance, starting a bunch of timers in 1 second intervals that all last 10 seconds each?
@coarse lagoon I think you want to Normalize it?
the output will be between 0.0 and 1.0 which is what you need for the UI's progress bars.
Tried doing something like this, but it seems like the last time is the only one that takes effect
@crimson bough yep it won't create a new timer each time, it just resets the original one.
How would I create 10 timers in parallel?
I'm a bit of a noob at BP, but I don't think you can do it dynamically.
hmm, I feel like this should be doable haha
Hey I tried to add a seamless travel, but the variables still get reset. Is there a way to fix that
@crimson bough I thought so, but didn't find anything. Let me know if you do.
Otherwise a select switch if you have a fixed number you won't go above. It's tedious, but it'll work.
You can
Make an array of timers
and set them
Timer Handle array
and use the Index to set them
@crimson bough @slender hawk ^
oh nice
Timer Handles are just references to the timers so you can check how much time they have etc and not just lose them to code randomly
Its a nice way to handle them safely
wait, how do you make the array of timers?
Create a timer variable
and then gimme a sec to check you can make them an array 🙂
yep but that's just a timer handle, not an actual timer.
Thats what handles the timer
A way to do it
It shouldn't overwrite them in that case
Even better to use a map if you need to reference a specific one somehow later.
How I believe BP timers work is that if you don't declare a Timer Handle it just goes off and makes one for you, then when you call it again it overwrites that timer, but if you feed them into an array then it stacks them
(Please correct me if I am wrong)
My recommendation when you're working with timers is to use Timer Handles all the time. I use it in my weapon system to handle firing, that way if a user is mashing the Fire button then it checks if the timer is at 0.0f or invalid, if its either then it allows another fire otherwise it just ignores the input
I might have to look again later when my brain is working, for me only the last index returns a value and the rest are null.
I'll check it out when I get some free time to make sure it does work
Otherwise I'll figure out another way to do it and post it here
Also not sure how it would handle the events.
@dawn gazelle Whats that plugin called to make BP look all Cyberpunk again?
I've been looking for it for about 20 minutes and I give up
Electronic Nodes
Thank you
For some reason my character isnt going invisible when i run this chain, did i cast wrong or something?
It works fine in the players own bp but im doing this in the world bp
Is the CompanionAI the player?
because if not then its going to fail to cast unless its a child of the player
Then your Cast To CompanionAI > Get Player Character should fail
What should it be?
It should be a reference to whatever class the CompanionAI is
So if you have it running on a BeginOverlap you'd do something like
Cast to Player (Overlapped Actor) > If Failed > Cast To AI (Overlapped Actor)
Im confused why i need to cast to the player
You dont
You just need to cast to the AI or call the function directly to the AI
Get Player Controller will return the Player Controller not a reference to the AIs controller
I understand what you're trying to say but im stuck on what the object for the Cast to AI would be
You'll have to get a reference to the AI at some point within your projects lifecycle
Easiest way is "GetActorOfClass"
Run that and assign a reference to your AI on BeginPlay
Look up a bit about casts/casting in UE4 and you'll understand why you hit that snag, I don't have much time to explain at the moment
Just a heads up, Get Actor of Class can become a very heavy call if done frequently and you have lots of actors - it effectively grabs all of the actors in the scene and loops through them checking the class against the class you want until it finds one. If it's only done once at begin play, not so bad, if it's done on tick, you're gunna have a bad time.
Hiho i have a little problem with my healthbar. My healthbar widget isnt updating. I have a HealthManaEXP_widget, called Heathbar_widget and a Main Widget to display all widgets.
I have linked all widgets to the ThirdPersonCharacter_BP
Maybe I linked it incorrectly?
My 2nd question is should I replace the main_widget with a BlueprintClass HUD?
Is this better? Better performance or should I continue to work with Main_widget?
How can I set the rotation of a character mesh. from 2 other rotations , Not 1-1 but 0.5 each so the combination of them both is 1-1 ? This Is what I got Im struggling to get it right
Do you have your health bar set up as a bind to a value on your character?
No im dont using bindings
How are you updating it?
This is a function
And you're calling this function any time your character's HP is changed?
I think so ^^
Im not sure my Graph is working correctly
I will not use tick events so i have an custom event
is it possible to load multiple save games together as long as they arent conflicting on something?
so if the thirdPersonChar is changing anything as his life (get Dmg, heal, HP reg) it should update his healthbar. The Char should tell the Server "I get DMG/heal" and the server should update
loading a save game just loads the details of the save into an object, what you do with the data from the object is up to you.
can i also use multiple save game objects?
Ok, so what is calling the Health_bar event?
Don't see any reason why not so long as you're keeping track of what you need.
👍
So i have the Update Function in the Healthbar_Widget this ist linked to the eventgraph and the ThirdPersonChar in the ThirdPersonChar if have an AdjustHP Function there There are the Settingwith a Maximun and minimum Clamp to update the HPBar
And this function is being called on server? If so you're probably getting errors that the widget does not exist. If not, then the HP would not be properly updated as it's a replicated value and should be set on server.
Your HP variable can be set to a RepNotify which will create a function for you that is called whenever the value is changed on the server, which you can then use client side to update your HP bar.
actually i havnt any server, im testing it in ue about play as client
If you're set to "play as client" the editor runs a server in the background which the editor connects to.
witch variable? the Max- and current HP are replicated
Probably would want to do both considering they're used in the HP calculation. Whenever either is changed then your HP bar should be updated.
i havnt testing the HP change now but My start max HP ist 300 and my current HP is only 200. But this will not be viewed an the healthbar
If im starting the game the currentHP ist = maxHP but it shouldnt be 300
ok i have tested by press a key to get dmg AdjustHP -15 but nothing happend
Ok maybe its somthing wrong, my inventory isnt opening if i try i have to controll the widgets
Sadly this doesn't seem to be working 😦
Only one timer at the very end ends up going off
Does this even work though?
Fails in the same way
Hello, I am trying to save and load my camera location and rotation but its not working. Any idea of which nodes should I use?
Between scenes?
You can use the GameInstance, between actual quitting/starting there is a savegame system you can use
I have a vector and rotator on the save game, but I am not sure which nodes should I use to get the camera location / rotation before I saved it to my slot
You should be able to cast to the First/Third/Whatever Character Controller and from there get the Camera Component and get it/the spring arms rotation and location
If you're using a third person character you should get spring-arm rotation and character position
Those nodes should work though
I can't get the camera component from the player character / controller
@boreal ether Maybe I am setting it wrong when I load my slot
Values are correct
Show how you're loading it?
Yeah don't think you can set the transform from the camera manager
You need to get player pawn, then cast to your own character and then set the camera location
I tried it ,but doesn't seem to work
Is your character using a spring arm?
Yes
Okay try setting the spring arm's location and rotation, and also use the spring arm location and rotation where you save the values @turbid shard
Same thing happens :/
What happens when you do that? Nothing?
Yeah, its not loading my camera position
Ok, does anyone know what exactly Datura mean by that? He no longer answers xD
What i have to change?
I´ve tested to press F for getting DMG (AdjustHP -15) but nothing Happened. Does he mean i have to change the Variable Setting from 200 to 250 for example or i have to change the HP ingame, like AdjustHP -15?
It is always very nice when you get an answer, ask and then nothing comes up ... Kappa
I just found out a node that works for me, its called control rotation. Thanks for your help anyways
could someone help me figure out how to make an object become see-thru when it is between the camera and the player? (talking top down type deal similar to how diablo does it with walls) I can't find a good tutorial or anything online that doesn't involve changing the material of everything i need to do this to ( a lot of different types of trees)
A recent post in #work-in-progress may be what your looking for. Makes the player invisible, but probably can adapt that to walls.
I ended up going with this solution (idk how great it will be long-term but i am really just throwing something together right now)
I'm going to have to put it into every material i need it to happen to but i guess that isn't too big of a deal in the grand scheme
hey guys, small question, is there an easy way to calculate the line formed by the intersection of 2 planes?
can anyone help?
My character animation is not sync with the attacker animation to the victim animation
AI Bp and Character Bp are there
just go littile down and left
Hiho i have 2 Questsions, the first question is nearly answered but the last step is missing ^^
I have a Character_Widget and a Main_widget.
In the Character_W is a Health, Mana and EXP-bar + some Images
There are 2 Functions, called UpdateHP and UpdateMP
Character MaxHealth = 300 CurrentHealth = 200 | MaxMana = 100 CurrentMana = 90
My problem is, if im starting the game, the Health and ManaBars are full. Normally they should show 200/300 Health and 90/100 Mana.
So they will not be updated. Im loosing no Health by pressing F (AdjustHP -15).
In The ThirdPersonCharacter i have a Function called AdjustHP and an InputAction -> press F -> AdjustHP -15
So where is my mistake? What i have to change for updating the Healthbar?
UpdateHP
Ref to ThirdPersonChar
ThirdPersonCharater Show Widget
Its only the UpdateHP connected, so MP couldnt work
any idea ?
I add again this time is my panel i want add this icon on my Editor Utility Widgets is possible ?
is it possible without CPP use only BP
?
is it possible to set enum val via a input action (for example, the "Y" key) and have the switch on the tick?
Hi everyone. Can you help me please? I'm looking for a tutorial (could be video or something else) that shows you how to apply good OOP (Object Oriented Programming) practices for Blueprints in Unreal Engine. Do you know any good ones for me to study? I found some sites that talk about OOP but none about applying that to Unreal Engine.
Hello
I’m messing around, and trying to learn the new things, in the new UE4 (new to me), and I was curious if there was some way to have a destructible mesh, actually split, like actor wise. Since, i want to set position of the separate pieces, yet when I set one piece, it sets the entire split apart mesh, as if it’s one full mesh.
How you guys set a single parameter to a PostProccess struct ?
I tried but it replaces my whole struct for whatever reason it is ?
oh with set by ref it seems
You can also use "Set members in" nodes to modify specific fields within the structure. Just select the variables you need using the checkboxes in the details window.
yeah did that, now works
Doing it in selecting only parts of the struct didn't worked
You're creating the "Character W" widget, but you're not adding it to the viewport.
When creating your widgets you should plug in the "New Controller" from the Event Possessed Event into the "Owning Player" on the create widget nodes.
Place some print string nodes around to try and see where things may be failing. Like are you sure that your F key is bound to the "Skilltree" input action?
Hiho
My F key is in the Project setting reserved für the skilltree but actually there isnt any skilltree so i took the F key to test the healthbar.
Do you mean every Create Widget need his own Add to viewport or can i say Create Widget 1 -> Create Widget 2... -> add to viewport?
My new Controller is a Controller object reference and the owning Player is a Player controller
Whenever you create a widget, you either need to add it to the viewport, or if you're wanting the widget to be a child of another widget, you need to add it to some kind of container within the parent that can hold the widget (like a horizontal box, vertical box etc..) Adding to the parent can be done by creating within the parent widget itself, or external to it but then you need to reference the parent's container where you want the widget placed.
Print String of new Controller shoulb be Player controller?
Sorry forget that - Controller is a parent to PlayerController and AIController. It's set as a Controller as both of these types can possess a character/pawn.
But really, you want to get the player controller that is possessing to be set as the owner of said widgets.
Is it possible to change the file path for the ue4stats file that gets generated when you run "Stat startfile"?
how would i make the player be able to walk through objects only when a key is pressed
All my Widgets are in the Main-Widget ->MainCanvas
So i have to link the Owning Player to my Player Controller right?
If it is contained with the main widget, then you don't need to create the character W widget again.
You don't specificially have to, but it's good practice as the widgets have a function within them that lets you reference the owning player but only if the owning player pin is connected.
Now back to if the Character_W widget is contained within the main widget, you don't need to have a separate node to create it like you do in your most recent screenshot. When you want the value to change, you need to reference the main widget, then from there get the character_w widget, then run your update HPBar function.
ok..
It would look something like this...
anyone know why my spline mesh component collision isn't working?
ah a main widget raf no Characater_w Widget ref?
i thought i have to give the reference back to the char widget into the function UpdateHP
That is what this would do:
You're getting the Character_W reference within the Main Widget Ref
And then you're plugging that into the function to update the HP bar.
Did you figure this out? I'm also looking for a spline based out of bounds volume but I can barely find any information about it 🤔
I see other games doing it , I'd assume it would definitely be possible with C++ but BP's its hard I've been told but nothing else
I did, although it's a bit spaghetti. Basically I averaged the position of the spline point world locations to find the average 'center' of the volume, and then compared the distance between the player's world position and the nearest point on the spline, against the distance between the player and the average of all the spline points. If one was bigger than the other they were outside the spline, otherwise inside
Ah ok
But the Healthbar isnt updated xD
I will read the posts again so i will not forgot anything ^^
But it doesn't handle super awkward spline shapes (Like, a C shape, the average would be in the gap of the C, meaning it would report inside even when not)
thats interesting, thanks for explaining Tyler
I'm not genius with blueprints but I can do stuff but this info will be useful
No worries! If you come up with a better solution, definitely let me know 😛
I will , I would even upload it 😄
I would do the same but honestly I don't know which project I would need to look in 😄
Quick question, I'm trying to spawn random health orbs. I'm trying the following approach, based on a video.
- I have Target Points pre-positioned in the level.
- The target points are fed into an Array and I am getting a Random integer in Range to spawn my orbs (Spawn Actor) randomly at one of the target points.
- My Orb BP has a particle emitter, with a collision box around it.
- I'm using the "On Component Begin Overlap" event on my collision box.
The problem I'm having is that if my pawn overlaps ANY of the Target Points, even if the orb isn't spawned at that location, it's firing the Overlap event. Any ideas why or am I misunderstanding how this should work? BP's are below.
how do I make spring arm/camera not rotate with the character they are attached to?
Hey!
So I wanted to get into Gameplay Tags using blueprints, but after a thorough search of the tutorials and so, I'm convinced it's super hard to expose them to blueprints using the gamplay tags container working as a defoult container on EVERY actor. I need to manually make a variable "gampleay tag container structure", and only then it works.
But then I can only access it via the said variable, meaning I need to cast to the actor... And that makes the whole thing way less usefull.
Like, I can't get the gameplay container out of the line trace hit result. And it sucks....
Hey lads, how do i call int vairable value from blueprint to another or display the vaule on the hud
Use a base class for all your pawns/characters would use that you want to use the gameplay tag container in, then make them implement an interface and in that interface return the gameplay tag container. Then you can pass a generic actor reference into the interface and get the gameplay tag container from the actual pawn/character.
Ok, how about I want to have gameplay tags in ALL the actors I use? I have a lot o diffrent clues on my level I want to trace for and on the fly decide what to do with them (scan, not scan, scan from far etc).
just make sure they inherit from whatever base class contains the variable you want, and that the base class implements the interface.
hmmm, so I would be able to call the variable for each actor I want, because it will be true for all the actors right?
so how do I implement it? how do I add this variable for the base class of the actors? basically I need to add it for any actor
It would look something like this on the hit result.
And then like this in the base class:
You may want to create say.. a base actor, base pawn and base character.
and then whenever you need one of them, you just make it a child of one of these.
yes I got that far 🙂 but it simply doesn't work.
it won't see my "GameplayTags" container variable. It only sees it when I ask for the speciffic variable like this
It should be on the right side variables, it won't show on the left in the children.
Hey lads, how do i call int vairable value from blueprint to another or display the vaule on the hud
yeah, im struggling to cast from a blueprint to a hud graph
comuniation between the actors that don't interact in the game is hard. you can get all the actors of the speciffic name and then cast to the right one and then get the proper variable
its the basic points system that are just refusing to display on hud
did you try any tutorials on hud and displaying stuff? ususally you just cast to youtr character from the binding on the widget
like, bind the function on the text box you want to display the points and in that function cast to your character and get the variable
ok, I checked it and it just won;t work
Hello. I have a Pawn that is not possessed by a player controller. I set Auto receive input to Player 0, but the pawn still does not receive input. What can I do?
When I query the variable, I get the tags, but when i use the "get owned gameplay tags" node, they won't show
how would i make the player be able to walk through objects only when a key is pressed
So I can basically limit the functionality of the system by only using that to the speciffic actors that are designed for it, but it's super frustrating to have the node that is not working :<
https://answers.unrealengine.com/questions/574141/gameplay-tag-damage-event-cant-get-tags-from-proje.html i found this. looks like a problem with a long history.... I guess I need to write an interface :<
Ok, so I have 3 blueprints...
- Base Character - has the interface implemented and contains the variable Gameplay Tags. The interface returns this variable.
- BP_MainCharacter which is a child of Base Character. All I've done is defined a tag within it.
- BP_Player which actually inherits from Character, just using as the default testing pawn to generate an event.
Result when overlapping BP_Player with BP_MainCharacter:
Guys i totally forgot the name of component that allowed to select some location. For example i would like to select two locations. I;m pretty sure something like that exist since i did it like 3 years ago
So I need an interface. OK I can do that I think. Thanks!
But one more thing: since I started my project a while ago and I do have some stuff done. Can I make a parent class and then add existing actors as children ?
Yes, you can reparent blueprints as well.
great! and also, if I make an interface, I can add it to any actor I want right?
Uhmm, you mean choose 1 of 2 Vectors based on an Arguement?
I don't need to have parent/children, I just add the interface to any actor I need
Thanks, that question you wrote reminded me that you can enable 3D gizmo on transforms 😄
how would i make the player be able to walk through certain objects only when a key is pressed
Likely changing the character's collision channels to something to does not affeect the objects you want to walk through, but still collides with ground.
is there a node that does that?
try adding a variable bool "CanGoThroughWall?" and toggle it using a key. Then when player colides with it, check if player has this variable true or false and modify the collision based on the bool
you'll have to be carefull not to have the bool set to false when player is inside the wall, so a check if he's in the wall would be needed to get the variable back to false
You'll end up with issues if you make a lot of other things change state. Just change the character's collision channel to a custom one that only your floors, or level boundaries block.
yea, getting stuck inside a wall wouldn't be good
Using that method, you can also set global material parameters to make some objects look ghostly or whatever indicating they can be walked through.
can you toggle between collision channels?
because i want the collision to be active until the player presses a key
is that what Set Collision Response To Channel does
It's what any of those do. Any of these will change your collision settings at runtime. In your case, SetCollisionResponseToChannel might be the way to go.
yea i think i figured it out
I know the question is long and niche, but I'm trying to create a rhythm game that uses a level sequencer with two tracks, an audio track, and an event track with triggers. It works fine but in-game I don't know how to create a visual representation of the beats (being the event triggers). I would want to create a widget that can be clipped to bounds to a canvas panel and slide, but I don't know how to reference or access the triggers. I literally just want to rip the track out and make it a widget with better icons. Is there a way to run a loop that would grab the triggers and their relative location with the track? Or is there a better solution entirely? Or do I need to create it in c++?
This is just an example of the sequencer
@dawn gazelle So i have checked all you Posts to my problem, but my healthbar will not be updated xD
Anyone know a tutorial for stuff that slowly falls apart? Most I can find is it instantly all falling. I want sort of like a destructible mesh, but parts of it fall apart at a time, rather then it all falling apart?
Could someone tell me why my render target is displaying the same scene capture component for all clients? I have this logic in my equipment screen and all players see the same character. I am not too sure what the issue is.
@dawn gazelle i have nur a testkey (L) if i press L ingame i will get this
@stray harness How are you getting the character?
@maiden wadi I am using "Get Owning Player Pawn" from my equipment BP
In a UserWidget?
yeah
How good is the legacy code compatability when moving from an older version to a newer version?
Odd. Should return the same as GetPlayerCharacter0
Maybe it is because I am not setting the render target to my Scene Capture component?
actually I am, nvm
@maiden wadi Do you have any suggestions how to debug this? Originally I had created BP's for my RT and Material but I removed them so I know just this code has an issue but I just dont know how to pin point the issue
Hard to say. I don't have much experience with render target stuff. But it is not replicated as far as I know. It should all be per client. So unless all of your clients are using a pointer to the same character, I dunno.
Like the same static image or when one makes a change it shows on all of them ?
could someone help me change out a health, stamina, and mana bar from DCS pack?
@zenith trout When one changes, they all change. But it shows 1 player, and when that player changes everyone sees it. Once players see this character, they always see this character
I think it has to do with my RT I am setting on the scene capture component. I dont think it is working as expected, but setting the render target on the scene capture i am not sure if I am doing it right
Hi I have a question about "Add Torque in Radians": I want to apply a torque on a ball base on the camera orientation. I use "GetForward Vector" and multiply it by a torque that I pass to "Add Torque in Radians" but the angle is 90 off, how can I correct that?
and all that code is in the widget ?
on begin play ?
or on an event that runs locally only?
on the construction script function
the logic shown in the image runs on the Event On Initialized event
hmmm
Trace it. Put print strings or break points along the path and find out where it is failing. Start from the point where you think the widget should be getting set and work backwards to the point where you're pressing the button.
why not just run that in the construction scrip then disable to scene capture until its needed
then in the widget use the event construct to get a reference to the render target
Is it possible to draw debug lines when editor is not playing? I'm pretty sure it is possible in c++ but Bps?
construction script I believe
or editor exposed events
Thanks, thats working
no worries
Quick question guys, I want to move forward according to my pitch. i.e I am looking down in this image and I should go down into the water, I thought setting inherit control pitch to be true but it didn't. Any Ideas?
Here's what I did to do something like that while in a flying state:
Your Bomb Dude! Thanks a ton 🙂
@zenith trout I updated the code to what you mentioned and I am not able to get it to work that way. Are you available for a quick voice chat so I can screen share the issue?
sure
@dawn gazelle The Get control forward/ right vector, and fix diagonal gamepad values are something you made?
Thanks
Hey so on my computer my game runs really smooth at 120fps but when I move the project over to another computer it literally runs at 24fps which is really frustrating. My pc is an i7, 16gb ram + gtx 1060 3gb and the other pc is an all in one i5, SSD, 8gb of ram. Is there something I’m missing because my game is really simple, it’s just a 2d game! Please can someone help me!
A graphics card?
Run a dxdiag and tell us what the other PC says for Display 1.
If it doesn't have a dedicated GPU then it's going to struggle, you're never going to get the same level of performance from a chipset as you are a dedicated GPU, in that case there's not really much you can do, if youre getting 120 fps on a 3gb 1060 then you dont have any clearly visible performance issues
why does my animation blueprint not have valid access to it's pawn owner?
(During runtime)
I'm not sure how to run a dxdiag but I'm aware that most all in one pcs don't have a dedicated graphics card, does this mean it's okay for me to continue my project, knowing that anyone who is running an all in one pc can't play may game?
Yes, most players will have a dedicated GPU
To run a dxdiag hit the windows key and type in dxdiag then click on dxdiag, it'll launch and give you a few windows to pick from
The best place to gauge average user stats is the Steam Hardware Survey.
If youre going to optimise for systems, this is the best place to get the average to optimise for
https://store.steampowered.com/hwsurvey/Steam-Hardware-Software-Survey-Welcome-to-Steam
anyone have experience with camera bounds changing with resolution and distributable ?
Thanks so much dude I never knew about this!
Yeah I'm going to be optimising for systems so thank you!
Since its inherited, is there no way to have a character, without the capsule component?
I tried to do a pawn, but it just doesn't wanna move.
@flat quartz Most likely culprit is that you didn't choose the correct instance to watch. AnimBP always has a running instance by default and when you start game in editor, it stays on that instance. Have to change it somewhere near the top.
You can add direct force and inputs to a pawn, you'll just need to implement your own physics controller, which is basically what the Character class is
how did you get the connections to be straight like that?
It's a paid plugin on the marketplace called Electronic Nodes
it looks so clean
You can even get it to show the nodes its connected to
Electronic Nodes
People always stand in awe in front of it but I really dislike this kind of plugin :p I'm the party pooper
and it's pretty cheap
tbh after almost 7 years of default blueprint layout, EN is a nice replacement
Plus the bubbles leading to the connected nodes is really handy when I have to debug other peoples BP
i can imagine it would be
Just thinking about having to convert nightmare BP like this
https://preview.redd.it/jpwwukimooc31.png?auto=webp&s=1ca4cf28c5e0d756d439623294290dd0a8aca224
into C++ and having to spend at least an hour going through it
Yeah, that was just one off Reddit, not sure what it does
I have a ball moving around in my scene and whenever it destroys a block, the block respawns at a new location. In this blueprint I have it so that the blocks do not overlap with each other when respawning but I am getting the issue where the block respawns and overlaps with the ball getting the ball stuck. How do I make the blocks not overlap with the ball when respawning?
wouldn't it be a and/or because if it's just a or the block could spawn inside a different block
I'd do a
If (Actor == A OR Actor == B)
Don't do the thing
That would cover all bases
oh wait yea
yep it worked with an OR. TY!
Does anyone know if there's a way to implement a FNAF mechanic in UE4 where you can click a button beside one of the doors to shut the door/turn the light on?
yea you can do that
Get Hit Result Under Cursor
probably cast to hit result and do X function
does the OnTouched event detect things that don't collide with the object?
Let me know if you guys need more pics of the blueprints. I have it to where every time the ball hits a block, points show up over the block then disappear but for some reason the points are not showing up?
I thought OnTouched was just for Mobile?
oh sorry the function not the event
Ah, dunno then 
hmmm, i have a question about making actors with random skeletal meshes as soon as you place them on a map. i've got the random part working, but i want them randomness to be consistent (i.e. actor A always spawns skeletal mesh X all the time) and i want to preview the mesh from the map. any tips or thoughts?
Random in computers aren't random, so if you get the seed that generated that skeletal mesh then you can get consistent generation
can you point me to the right direction on how to grab that seed?
also, i'm currently randomizing in the construction script; i feel like i might have to do it somewhere else in order for the preview to show up correctly
What you want to do is use Random X from Stream nodes after defining a random stream.
Make sure each object gets its own stream set when you're constructing it (eg. don't reference the stream from other BPs, use one you've defined within the BP and use it specifically for whatever you may be trying to generate procedurally).
AND you can't use the other random nodes while constructing it - it must be the from stream nodes.
I always liked editor functions for that stuff.
thanks @dawn gazelle i'll try that out
Is there an event on GameInstance that triggers every time a level/map is loaded by any chance?
It's really frustrating that I can't find online how to change the friction in the vehicle template my car is always sliding around in ue4.. Anyone knows how to change that?
There are only 4 callbacks on GameInstance and one is related to travel error so not directly, what you can do however is write an event dispatcher into a level load system.
We have a level streaming system that uses an event dispatcher in C++ to tell all of our C++/BP that the level has been changed.
What are you trying to use it for?
basically to setup state if the map was loaded from a saved file.
Right now, I just have the level blueprint trigger that check, but I want to have a more universal trigger, since I don't think I can set a parent blueprint class for level blueprints (I would do this for the sake of not having to copy-paste common functionality for each level blueprint).
Set a boolean in the GameInstance so when the player hits the Load Game button it sets it to true, then when you load the level run a script somewhere that checks the GameInstance "LevelWasLoadedFromSave" bool?
Great minds think alike 
The Game Instance is a constant from Startup til Shutdown so it should be a safe way to handle it
yeah, I have all the save functionality there, but thinking of a way to take the level blueprint out of the picture
Throw it into the player?
maybe I should just make custom blueprint actor that you drop in your level that handles that, after its loaded
Yeah
Tbh I need to make more actors/components that exist to handle stuff like that rather than just jamming it into the player
It seems you can't turn off collision on a destructable actor, is there a way to do so?
hah, well whatever works, sometimes you just get it working, and think of how to clean it up later when the dev dust settles
I have a custom C++ class that is put into Hit Result Hit Actor upon mouse-click in the world, but I'm being told it's an "invalid target class" now. Why is this?
how would i get access to methods of a child actor component? can't cast the component directly and getOwner returns the Actor which the childactor is attached to
Hi, I copied a function from an actor to a function library, and now it is not working. What's more is that there's a World Context Object pin on some functions, and I'm not quite sure what to do. Any ideas?
depends on what the function does, the world context is optional
There's quite a bit
lets see
The one's where the pin is located on are:
get player controller
make a line trace
and print string
hmm, not sure if getPlayerController is world related
Think this is how you gotta ref it.
(the first ref is the child actor itself naturally, it itself has a ref to child actor which is of actor type)
yes thank you datura
unreal auto generated an actor component (instead of child actor component) function input -.- so it didnt show up for me
Sounds to me like those should be parameters that you pass into the function, and can't be inside of a function library, as a function library is not aware of its context?
where do you run the function from? if it's from the character which does the line trace, you can pass a self reference as world context
Ok I figured out my issue. One of my bools defaulted to a different value lol
line trace might require the world to trace in
But I'd still like to know when I need to use the world context thing
so if you pass a self reference from the actor thats calling your function that might do the trick
My only inputs are vectors
Yeah weirdly enough the traces are working now
Maybe by default the world context is taken from the actor who is doing the calling?
can't tell for sure
What does the error say?
It's not a C++ error
The actor reference is coming off a line trace hit result
I actually just encountered this, too. I've been using this blueprint in the project for at least a month, I'd say.
🤔
BoatMaster is a child of Actor?
No, BoatMaster is the actor
I'm now realizing this looks kind of convoluted.
Basically I have a debug that I use to click on a rigid body, create an impulse, and then test more from there. Super handy, works fine. Until...now 🤔
But isn't that the way to do it? I get a reference to the actor I've clicked on, then cast to it.
there's two things that could make the cast spit the error, A.) your variable is of some Actor Type that's not a parentClass of BoatMaster, or B.) BoatMaster isn't extending from Actor
Seems right to me.
but most likely the later, as the trace probably spits out pure actor references, so it would fail already there if A is the case
Usually when casting and the input object type doesn't inherit from the casting class, you get a warning indicating it would always fail, not an error.
That is actually exactly what I had. But now it's an error.
And I have no idea how it changed from a warning to an error.
I've "Undone" as far back as I could lol
did you try to recreate the cast? maybe it points to some old class reference which doesn't exist anymore?! (for whatever reason)
Can you hover your mouse over the Hit Actor field and see what the class is of the output?
Actor Object Reference
And what about hovering over the output pin on the HitResultHitActor?
and yeah I'm inclined to say try creating the cast and variable involved (if possible) as Ben has suggested.
Oh, wait, what did you mean by the first question? This is what I have for HitResultHitActor
Sorry, this guy
invalid target class really sounds more like the cast is broken
yeah
remove it and recreate it
ffs unreal.... i spent 4 hours on my landscape just to realize that it crashs on loading it 😭
lul what
Okay, blaming this on hot reload
😄
recreated and we're back in business
well, i can probably redo it within an hour, still...
hope that i can remove that map safely as it's a sublevel of my main map :/
To fix the HOTRELOAD 0 error just close the editor before you compile.
http://wiki.hotreloadsucks.com/
Compiling with the Editor Open Do's and Don'ts
I had that issue for a bit as well
Good call, thanks 🙂
Big problem is it breaks any references to that class if you don't restart, which is where you get those issues
Yeah, the dumb thing was that I almost never compile through the editor and instead run everything through VS. But that one time I mess with a blueprint...
how do i make sure instanced objects are using different seeds?
You can set the seed randomly on the construction script, or begin play I'd imagine.
doesn't that mean the trees aren't consistent anymore between game reloads?
i think i need to store some information on the class
didn't realize you're trying to generate an entire world. If you're doing that, then you need 1 stream for everything
Keep the seed in your save
If you're familiar with Minecraft or other games where you can input a seed and that seed ends up duplicating the world exactly the same for everyone - that's basically what you're wanting to do - the world generates based on the random sets of numbers you receive from the stream created by the seed.
100% ^
yep, got it so far
Randomness is a lie, its all generated
and those random numbers when used with a stream, if requested in the same order from the stream will give you the same numbers each time.
The way I usually get a good random seed is by getting the current time since epoch as milliseconds
Not sure if there's a better way but it gets the epoch value so its never an identical number
to be more clear, what i'm trying to do is slightly vary the rotation of trees and pick randomly between different skeletal meshes. this randomization doesn't affect gameplay and is only for the purpose of variation in visuals. i'm not using randomness anywhere else in my world.
Do you have specific points you want your trees to spawn or are they placed randomly as well?
specific points
You should still be able to randomize the rotation on Start and store the seed
Ok, so just create an actor called something like "Tree Manager".
It should have the variable that you want to store - the "master seed" for the level. This value can be generated once or you can feed in a number, and then should be saved and any further "loading" of the level it should only reference the saved seed.
Inside of it, it should also control the spawning of the trees at the defined points and populating them with seeds that are generated from the stream of the "master seed"
The trees themselves can then generate themselves based on the seeds they are fed in.
it was really fun to learn about doing stuff like this... I made my own Diablo-like item generator using this logic and tried to maximize randomness so that all possible values one could have with my items could theoretically be obtained. ie. using an int32 (4 bytes) only gives you a certain amount of actual randomness - like you can't expect 4 bytes to store a huge amount of variation. I generate 128 bytes and keep track of how many random calls I make to the stream using each set of 4 bytes, and when I've used up close to the maximum amount of randomness, I plug in another 4 bytes. @_@
Then all I need to do to save the item is save the 128 bytes, and I can regenerate the item from it.
life is pain
i hate myself rn... how do i get a static mesh component from BP as mesh in the level
i've figured that out at some point, but forgot how i did it 😭
just thought of something; how do you ensure the seeds are read in the same order each time? for example, if you have 100 trees and delete tree 1, you could potentially mess up the RNG of trees 2-100
yes
boo
But, if you have a tree manager, where you have a master seed, it shouldn't matter too much... You still want to generate the seeds for every single tree that would've originally existed, but because each tree is generating itself, it won't break their generation.
yea, just a slight hiccup as i'd ideally want to keep the same world everytime i move or delete a tree
You should do a resize of the array in the loop from stream as well.
Oooh good idea
I kinda want to run it but I don't want to break my work computer/project
Or you could just use the IEEE standard random number of 4.
Ok so, when you say delete - like you mean removing the tree from the editor kinda deal?
yep
Art...
Is there any way to override the terrain foliage system?
Maybe thats the way to go
wait... cant you put actors into it?
No gewd. The resize needs to be based on a random number from the stream. As stands now, if it ever hit 0 it'll remain 0 forever.
XD
oh my god
i'm surprised you can build these blueprints so quickly lol
also you could collapse 2 nodes by just using != instead
lul
The human eye can't see above 30 fps, so if I don't optimise my game then you'll never know

fpsDisplayValue = Max(30, FpsUserLimit)
Nah, do it manually
Thats not real btw haha
I hope its really clear I don't program that way given the previous screenshots I've linked here
😅 ahh I didn't look
well art is art nonetheless
I wonder if anyone has made any line art in BP
Sorry to derail your discussion @ripe thistle
Wait.. This won't do anything spectacular. RandomInteger Max 0 means the first condition will hit.
This is where it's at.
Min should be Int Max -1 and Max should be Int Max + 1
Teetering on the edge of overflow
oh no problem ratchet
i figured out the solution to my problem
the downside to this solution is that it doesn't allow you to build a world from a single seed, but works for my purposes
what makes it even better is that that may not ever print hello
Pointing it out mostly for the others
If you centralize the stream you can. Just put it as a member of your game instance or something
wouldn't your trees potentially change if you remove one with that solution?
Mmm
If it no longer polls for a location
Actually you'd have to ensure the order of all objects somehow
yea
So you're correct
there's probably a way around that, but it's too powerful for what i need now
I give you, the truly random generator
This is the last one I swear
how do you get the lines so straight?
Electronic Nodes plugin
Always a way around things
But at what point does it stop being handled with a stream (or fixed by centralization) and start being a systemic solve?
Is there any way to get index of 3rd instance of item in array?
well shit
wait
I was joking
bad news though
it'll be awkward to make properly, because you cant use macros
but you just loop manually until you hit the same item 3x
can do that in a function
also it won't work if you have a custom struct unless you make a comparison function
or manually compare every field
this is one of those things that if you could dip into c++ it would be easier
unless you only have BP types
So, yeah, guess you'll be using a ForEach loop
Hey! Does anyone know how to change the default pawn class between levels ? I'm stuck on this issue for one week now and I can't find a proper solution on internet
Thanks in advance 🙂
Create a new game mode and assign it to the new level.
Is it normal for my ads to say "test" even though I'm not using the test ids from Google Admob?
erm why is this failing to cast
Found the problem, apparently, "worldoverride" was set to default game mode... this is new
I need help cause i'm inept in both maths and coding
I have this vector of a bullet's push force
and i'm trying to apply it to an object via "add impulse"
but whenever i hit the object it always pushes it towards the same side
instead of taking into account the direction of the forward vector and pushing it in that direction
what am I doing wrong?
I thought about it too, but I need to change the GameMode according to which button is selected on my Menu Level (which means I can't create a new level and assign the GameMode I want in the World Settings), I need the possibility to change it through blueprint before the level is Open, is it possible ?
I think what you could do is create a blank map that has the game mode you want, but then have it set up to do level streaming and stream in the map you need. I'm not familiar with dynamic game modes and the like myself so I'm not sure if this would work.
Alternatively, you could set the default pawn to none and manually handle the spawning in Game Mode.
Hi! I have ABaseWeapon_BP nativized and all is fine during project packaging. But when I use derived blueprint from this nativized BP in DLC I have package error like Error: Couldn't find parent type for 'DerivedBPClassName' named 'ParentNativizedBPClassName' in current module (Package: /Script/NativizedAssets) or any other module parsed so far.
How to handle it? no way to disable nativization for parent BP. is it possible to use previous generated plugin (Intermediate\Plugins\NativizedAssets...) during nativization for pointing to parent?
The thing is that I have the same map (only one map) and I have to open this map according to the GameMode that the user chose to play in the menu level
What do you mean by that? I'm not sure to understand
This is still pseudo random.
oh i missed that bit 😄
Spawn and Possess actor
Yeah if you go through my screenshots you can see a few terrible examples
a lot of people don't know that computers can not produce truly random, unless using some external influence for generating the random
I have one that randomises an int to 0 and then does an if list checking if its equal to 1 through 6
Yeah
Cloud Flare has a good fix for that
Which is literally just taking a picture of Lava lamps and processing the image as a value to seed a generator
Should I keep item to spawn to the Character in controller class?
what to do when i press a button the game restarts
After re-opening my project, my custom game mode is gone? wtf happened
I did not delete
hey guys, I have my gm with the Option: "Start as spectator" what is the correct way to spawn the Player pawn, can't find a Quit Spectate mode?
Great, an entire day's worth of work, just gone like that
Seriously, what the hell, my project just reverted to 6 hours ago, I lost all progress and even autosave hasn't done anything
I kept pressing Ctrl+S constantly
I know I saved a gazilion times
It saved only some variables but not the rest
I don't get it
Was I supposed to Ctrl+shift+s instead of just ctrl+s?
I'm trying to use AnimNotify to control the collision for damage calculation, but when collision gets enabled when the player is in contact with the enemy, it counts the collision twice, meaning the player takes double the damage he's supposed to. Can anyone help with this?
During one attack animation, the collision seems to be enabled twice. How do I make it so that it's just enabled once?
Hey, can someone help me. Im trying to create
Total score < 3
branch
Total score is from another object. And i always have an error
how to get my test print string to play upon impact at ground along with the condition of a set fall speed beforehand?
i can get the impact without the speed Z factor working but including speed doesn't work for me
https://i.imgur.com/s9mm5Xr.png
@tall pine append string
what is that?
yeah the strings aren't really important to me theyre just there to see if the script works. it's more the falling system for the player
if player is having Z speed of -1000 or more downwards and has the is falling node then it prints falling continously till landing
the initial impact works for me without taking speed in factor
but as soon as i try to get the "is having a speed of z -1000 or more" prior to landing requirement as a boolean combined with is falling false it doesn't want to work as intended
edit: NVM fixed it
How would a Skeletal Mesh be saved within a SaveBP? I have a character customisation screen, the player chooses clothing, I need that choice to be saved and then able to load the clothing to set the skeletal mesh in my character BP
Maybe it's a real dumb question but... how can I create global variable to use it between my blueprint?
@novel ice You cast to the blueprint to access a variable within it https://docs.unrealengine.com/en-US/ProgrammingAndScripting/Blueprints/UserGuide/CastNodes/index.html
Examples of different Casting Nodes and usage cases.
guys
i have a question
is there a way to make a>b where a is variable from another object
ok
i fixed
is there anyway to tell the size of a object? I am trying to cull and its not working because I dont k now how big the thing is
I am trying to cull this building here but i am having a hard time trying to figure out sizes and how to make this work can someone help?
@pine trellis Is it possible that your building is closer to 10 that it is 50000 units. If so then it will never be culled
Your cull distance volume should also encompass the whole level
not just the building or it its only used when you are inside the box (slightly outside your building)
how do i check if this actor has those gameplay tags? i'm not seeing any overrideable functions in actor bp that's related to gameplay tags checking
Hello, iam looking for help for fix couple issues with solution of proper Zooming, for example if iam using FOV for zooming, Cascade Shadows doesnt work properly
And the next question, FOV Doesnt affect Texture Streaming, and thats makes Zooming using FOV looks bad, would appreciate any solutions
@clear ravine make a box and overlap check to see if it has tag and print to screen on true or false
the behavior tree has it's own gameplay tag condition, i was thinking to use that default function instead of making my own
EQSQuery also has a gameplay tag check, but i dont know how they check if that actor has the tags or not
https://twitter.com/freyaholmer/status/1232826293902888960 Just found this
my favorite way to see if a point is inside or outside a path, is using its winding number🍥
traverse the path from the perspective of a point and add up the amount of turning along the way
if it made a full turn, it's inside
if it wound back to 0, it's outside
it's so neat~💖 https://t.co/oDGxq697cI
3164
17279
Dispatcher question.
Can you listen for a dispatch from ANY instance of a BP class, rather than needing to bind to each instance individually?
there is no " stop camera shake " in my unreal engine .. any help how to stop " play world camera shake"
using 4.15 😅
Why does my skeletal mesh choice not set? My "Hair" choice works on load if I manually set it like above, but I am unable to set it from widget selection. How would I do this?
because you can not save object references to a savegame
I use something like a super edited 4.5, on like a daily basis. Lmao
is there any way to add pin with "Option -1" on this select on int?
my character movement is slightly different when I export the game than when i play in the editor. Probably the framerate is slightly different when just running the no editor exe? This is the first time im encountering this and I was wondering if thats normal and how do deal with this issue?
seems like taking things off event tick and putting them on a looped timer by event makes the editor and the exported game run more similarly
hey i am trying to make a health pick up for my project but i'm not sure how to do? can anyone help me
Lots of short videos out there on that
I would try a google or youtube search 1st, then come back hear if you are stuck
anyone know why my spline mesh component collision isn't working?
could anyone tell me what could wrong with this function I put it in my character blueprint and it is supposed to spawn a bullet at the tip of the gun could someone please help me or show a better way to do it
Oh cool thanks! What if I build a game for 60fps and then someone runs it on a lower performance pc and it only runs 30fps?
@trim matrix I see that 🇫...
One of the draw backs to modding a UE4 game that is old, and has its own supported dev kit/ UE4. Lol
Lol
looks like my issue is a known bug woopie but it's just a visibility issue the collision actually works as
Quick question . . . I have Target Points which I'm storing in an Array using "Make Array". I am then using the "Random Integer in Range" to pick one of them to spawn an orb. How to I get the actual name of the Target Point that was chosen (TargetPoint1, TargetPoint2, etc.)? Everything I try keeps return the class object instead of the Target Point name?
I'm using the "Make Array" and wiring the Target Points to pins. It's an array of items.
I only have one of the pins hooked up in this picture, but it should help explain.
So my problem is, I need to keep track of the Target Points that are spawned, so I don't duplicate. I was thinking of stuffing those into an Array using their name, called something like "OrbsInGame", and then checking that before I spawn a new one. I just can't figure out how to get the actual target point name after it selects one randomly.
Ah yes! Brilliant. Thank you very much!
tbh does not even need to be that
could just be a Array, UsedActors, then its just a simple Contains check
@worthy frost That's where I was going, where I was getting hung up is when the player collides with the orb and destroys it, I would need to remove it from the UsedActors array. I need to know how to reference the item to remove from the UsedActors Array when it's destroyed.
or a much better approach would be this
@lean palm when a pickup is used, it should be removed from that array
so it can be used again, not sure how you can access the level script from an external BP (i never use LevelScript BP)
@worthy frost Ok, thanks. This gives me a good direction to go in. Appreciate the help guys.
#work-in-progress
I'm trying to make a health bar for this enemy. I don't know why it's giving me this error since I pretty much did the exact same thing with the player and it worked. Can anyone help me with this?
Here's what I did for the player
Also, here's what's happening in the game
@sharp dew Because you have not set your pointer to anything.
What does that mean?
A blue variable like your KomoHealthBP is called a memory pointer. They are just small address cards that contain the location where the actual object is in memory. They start off blank, not pointing to a specific object, so you're trying to get an object of that type from someplace in memory and it's returning null because an object of that type doesn't exist there.
Hello. I'm trying to implement the gravity of the planet for a 2D platformer, but I can't. Can you tell me how to do it?
@sharp dew The reason that GetPlayerCharacter is valid, is because it's finding an object that is already set and returning you one of those address cards that has been populated.
so how would I get the character like I did for the player character?
Depends. What kind of object is KomoHealthBP supposed to be?
What is your use case with this? Is this like a look in the direction of the AI, and see a health bar pop up?
It's a health bar that's above the AI
In a WidgetComponent?
Yeah, a Widget Blueprint
No, I mean how are you displaying the widget on screen? Is it inside of the AI in a WidgetComponent, or is it being added to the player's viewport somewhere?
I'm putting it above the enemy in the Komodo blueprint so it goes wherever the enemy goes.
Here's how it's shown in the game, as I posted earlier
The Komodo health is the grey bar with 4000, it's supposed to be red though, and it was before I did the binding function
Easiest method will be to populate it from the AI's beginplay I think. On the AI's beginplay event, get the Komohealth component, and call GetUserWidgetObject
You can drag out the return value from that, and cast it to your widget class that you have in the component, drag off of that, and set KomoHealthBP in the widget.
Should work then.
Like this? It's not letting me connect
In this image. Drag the component that you have highlighted, the KomoHealth into the event graph and use it to GetUserWidgetObject
At least I'm assuming that is a WidgetComponent.
Thanks a lot, it's working now
Hello to you all! ❤️
Could someone help me out with a "Ragdoll" situation I`m working on?
After hitting a mesh with my character the ragdoll starts and I want to respawn at a checkpoint after 2 seconds.
The ragdoll is working, but I cannot get it to spawn after the timer. Any help would be lovely 🥳
@late niche Single or multiplayer?
Single
Usual way to handle that is by overriding your GameMode's character spawning functions. You just update what the FindPlayerStart function returns and use that for the checkpoints to return a playerstart at the latest checkpoint. Then all you need to do in the rest of the entire game is call GetGameMode->RestartPlayer
❤️ Let me try somethings
Go home Unreal, you're drunk
What is the usual way you save a Skeletal Mesh for reloading. (clothing selection by the player that can be changed when going into customisation menu again) I have my UI set up for selecting the Skeletal Mesh and can apply it to the character etc. I just don't know how to save that selection to later apply in other BP
That is a very complicated question which heavily relies on your personal design for handling data. Usually you'd find a way to translate your mesh into a gameplaytag or integer. Make a datatable or something out of them and use that as the lookup via key.
Hey guys, what is the go-to way of animating some values? Should I be creating a TimelineComponent every time I want a value to, for example, go from 0 to 5 in 3 seconds?
It gets messy and cumbersome to create a new timeline component every time a value needs to change over time
hi guys! im running in a problem that makes sense but i cant get it fixed, right now im just calling an BP from other class and making it move forward, works well, but if i do it again the BP doesnt move, if i plug the play from start on the timeline and press the key and wait 1 second and press it again the first one stops and the second one moves, can someone help me on this?
@maiden wadi I have Struct for my Hair skeletal meshes. This is used by a variable "Name Map HairStruct". Within that I have listed my possible choices. Which are then populated by the widget. I'm just wondering how would I turn that choice into some sort of identifier to use in another BP
Cant get my head around how to assign it an integer or something like you mention
I know that is the what but not the how if you get me
Doing what you have right now, you could probably make a datatable out of your struct. Then use the names as the datatable keys. Populate the datatable with your meshes and just pull the mesh out of the datatable via that name key.
After the timeline finishes, you can call Set New Time to set it to zero
@burnt berry Really depends on your case. Timelines can make it easy. But they can be hard to work with in other places like widgets. Tick is another easy option with some simple math and gating logic. In widgets, you can replace Timelines with Animations, but making a blank panel, animating it while it's collapsed, and pulling the values from it on tick.
In general, using tick is your only way to animate or update over time. How you do that is largely up to you. Directly on tick, through Timelines, etc.
Timelines are very handy but it feels overkill needing to create a whole component just to change the value of a float over some time