#blueprint
402296 messages · Page 652 of 403
@inland cargo aesthetic or will it be used?
be used hhopefully
@steady orbit no. It is calculus math.
@inland cargo i would recommend an hism actor with a construction logic to create the islands you want. You will need to use grid logic and vector math
Well thanks I guess
arh that sounds like a plan u think having a center point island and say 2-3 parcels around it could work with that. not used one off them actors before will have to do some research around it. dont think I have used that one but will give it a look
They will most likely be handcrafted islands with a few child pieces in them
atm
I've been trying so solve this for an hour now hahaha
I don't think it's possible to get the exact center in blueprints because the formula for finding medians changes based on whether the number of observations are even or odd, and I can't find a node that tells you whether the population of numbers is even or odd...
Ok I forgot exactly what nodes to place, but i want to make a "press a key a certain number of times" and if done too slow, it resets
How would i do that again?
retriggerable delay
It magically started working
🙃
Does the editor just need ages to index everything?
It didn't tell me it was indexing anything
@trim matrix simplest way is to set a variable (intenger), and everytime the button is pressed then add 1 to the variable you just made, then add a retriggerable delay to the end of your line. If that retriggerable delay ever hits 0 then set the variable back to 0
ue4 works in mysterious ways
any way to "un destroy" an audio component after it's faded out
i keep getting this
so you destroyed it and then tried to access it again?
yeah
but i kinda need it to work infinitely
it works fine, exactly how i want it to, but it gives me that error after stopping the level
Is valid usually works, if it's not valid then maybe recreate it
but why destroy it if you need it?
well i made it so if the character starts moving, the emote audio fades out
i'll try out isvalid, i remembr that fixing an issue like this on another project
I get fading it out, but why are you destroying it ?
oh alright
tysm for the help :)
np
Is there an easy way to calculate movement direction of a pawn?
velocity * actor location then normalize?
Are you trying to figure out the direction you're moving in?
@trim matrix Yes, but not from the forward vector cause the ship is in space and doesn't change its direction immediately when turning.
Unless I'm mistaking what you're trying to do, you're gonna need to get the axis you're moving on.. and it will be either 1 or -1
Yeah the logic i provided earlier did that but its referencing from the world origin
and what's the result
Anyway to quickly convert components in a blueprint to a different child type? I want to convert all these static mesh components to a "MyMeshComponent"
@trim matrix
If I'm flying in the positive X direction then its positive 1.0
If i turn around and fly in the negative X direction then its -1.0 as you would expect.
But as soon as i pass the world origin it reverts back to positive 1.0
if the world origin is a problem, can you just move it somewhere else?
modern problems require modern solutions xd
All i'm trying to do is setup a gforce system. I'm trying to get my acceleration. This guy earler was telling me what i needed to do but he assumed i new calculus and all that.
Moving the world origin would be a help at all.
he told you how to get acceleration
get movement component get acceleration
That's exactly how you get it
@steady orbit https://gyazo.com/671ad35718d88d240e901f7ba9cdc59b
is this not what you're looking for?
I'm using a pawn, not a character. So i don't have the character movement component.
I gotta do the math manually
Im struggling with the math
@steady orbit do you need to get the current acceleration or just the acceleration?
For folks who work on blueprint collaboratively with others: how do you "code review" your BPs? Screen shots? Over the shoulder/screen share? Something else?
Whats the difference?
Because there is a specific blueprint for moving no-gravity, flying style pawns... Maybe it's a good idea to use your current pawn as a parent
and then make the other blueprint the child, and do what you need to do there
The blueprint is called default pawn and it's purpose is for moving pawns, it has an acceleration node that you can get or set
The Pawn is the physical representation of a player within the world.
The only difference with the default pawn and the regular one is the movement component
I could just add the movement component
Need help making a filter system for my level select, I have a bunch of levels all as template UI with instance editable variables. I can get the filter to work but I have no idea how to stack filters (ex. check the filter for unbeaten levels AND Favorited levels) and once
The pic above shows what I just tried, its far from working
Do it, I wanna know if it works, it's a learning experience for us both
I use an AND because I check if the checkbox is clicked AND if the level is true or not
Wish i could just do the math myself
same but I'm not learning no fuckin dx/dy calculus hahaha
lol
@steady orbit calculus aint that hard.
Get position 1 and position 2 every other frame and then calculate the difference between them and that's your speed.
then get the speed at a later position and find the difference and that's your acceleration.
i have the first part of this setup
i have the velocity and then i have the velocity * delta seconds
Ok but velocoty is m/s and if you multuply by seconds you get distance
You need to divide by time to get m/s^2
Argh cannot type on a phone
@zealous moth I respect your ability to understand it this well. I have no idea what you're saying hahaha
Get actor location at t1 and then t2
would time 2 be the actor location * delta seconds
or /
Sorry man
or actor location - delta seconds
@spiral egret an old practice was to push and pull and not work on the same bps.
The other person would do a quick overview and a test. When done push the qa back with feedback if any.
i have an array of checkboxes. How do i only allow 1 to be checked at a time
is there a way to activate/deactivate a checkstatechanged of one checkbox from another checkstatechanged of a different checkbox?
@smoky rivet you can make an array, retain the new checked one's index, do a foreach and uncheck all, and then check again that retained index?
i would use this node, correct?
or is that visual only
erm, I would think maybe get state?
you'd have to play with it, I don't have my editor opened :/
so ive madea first iteration of this function but the first checkbox is always checked no matter what.
ignore the errors
theyre unrelated
hm might be the enum then
Yeah I use the diffing tool locally a lot to sanity check my changes. Workflow with a fully remote distributed team is another thing though. Sometimes I present the diff over a video call via screen share. Not ideal, as most folks need to work through a diff at their own pace to understand things and provide feedback.
Yeah agreed
thinking
is "isChecked" your own function?
loading up editor
@smoky rivet remove your boolean, you won't need it
just straight up uncheck all
so far both nodes to set works for me, it may be your loop is incorrect
is there a way to get rid on of the white ball (Scene component) with 4.26.1 ? Its annoying having to see those balls !
no isChecked is the unreal function
isn't there a visible option under "render"
Lemme look !
there should be a checkbox for visible ingame and visible rendering or something
Ah, its Editor Billboard Scale !!
Thanks @trim matrix
Hmmm .. been a while since i last used UE4, wasnt there a way to hit END key and have the mesh be dropped to the floor ? Maybe the hotkey changed ?
strange, does not want to work for me !!!
Ive had that problem too
does it work on Blueprints ?
ok, must be where i am wrong, thanks
Ive found my self abusing gates and custom events too trigger there open and close a bit much. Is there a better alternatives (for seeing if a movement effect is active)
Anyone know how to find the closest edge of a cube from a specified point?
Like mathematically
hello people, i have a small question
this is a widget blueprint, to count HP of my character
the string conected to "failed cast"
is printing but idk why, can someone help pls
If the pawn that your player is controlling is not of the class BP_jugador, the cast will fail.
it is, cause i have another blueprint widget that counts Pick Ups
with the exact same cast
and that one doesnt give error
put a print string before the cast, then plug in the controlled pawn return into into the print string, then you can see the name of the class that is going into the cast --- it could be returning none somehow.
yep
Maybe untick context sensetiv?
it doesnt show too
from what i know there is no blueprint with that name
so idk why it says its casting to something it does not exist
Hiho, I'm trying to get some server settings.
So the time that passes on a map is set on the map and can be changed and accessed via the server.
If I want different things to start at a certain time, for example:
10 am: spawn server message: "Good Morning", respawn all bosses, reset all daily quests
Where exactly do I enter something like this?
-
Do I have to build this into every boss and daily quest?
-
I have to include this in an extra file like Serversettings_BP and include it in the bosses and daily quests?
-
I have to build it into the game mode?
Thanks for your help ^^
The stock of my gun gets cut off when its too close to the camera, is there any way I could stop that from happening?
Appendix to my question
In my opinion, it should be similar to a global function.
Function: Controll Timeofday -> @ 10AM Branch True -> do xy and Event = success, False -> dont do xy
and this function is then called up by all relevant things
If Event = success -> Change xy
or am I wrong? ^^
What you probably would want to do, is create an event dispatcher in your game mode, it could have parameters if you want to pass along to any other actors. Call the event dispatcher in your game mode whenever you want to trigger the signal that a time of day event should be triggered.
On the begin play of all things that require the time info, have them bind to the event dispatcher in the game mode, and then on the return event they can do whatever function they need to do when the time is changed -- if you pass through parameters, then you can use just one event dispatcher to control multiple execution paths, like have a "Time of Day" value that is passed and you can then check in the actors that need to do certain things at certain times.
@hushed pewter Use a bool that you set to true when starting, then when things are done, set it to false. Would that work for you?
in the project settings change clip plane value
im using isChecked to see if my checkbox is true or false
it only returns true for 1 tick then returns to false
why?
See if there is an "auto-reset" feature ?
Or if you are binding/setting it on tick
Thank you for that info.
event dispatcher in the gamemode nice ^^
Im having an issue with trying to display damage numbers above the enemies head, I am able to display the numbers on their heads but if i copy the enemy, it displays the number widget animation on top of both enemies heads
here it shows the dmg numbers on both enemies even though i only hit the one on the left
I am using a widget component in the enemys BP to display the numbers
How can I move any object align with the another object, like train and railroad
I can't find primitive component in component class. Seems like others are having the same issue. https://www.reddit.com/r/unrealengine/comments/krpq9x/unreal_cant_find_primitive_component_so_i_have_to/ Has it been renamed?
I would like to create a list of weapons for everyone in the game can access. Should I do this in the gamemode?
Imagine it as just an list of ints that gets randomized every match
and every client must be able to access it and it must have the same list
If you want everyone to access the list, then it should be in a gamestate. Also I wouldnt use ints to keep track of the weapons avaliable. You can use an array of classes, or an enumerator with the weapon names.
Thanks, I'm using a map with a struct and an int key
For whatever reason, the blueprint event is not being called.
Here is Blueprints
Here is my code.
FluidNarratorController.cpp
I have custom event with parameters and containing delay to trigger async. I want to have more of these event to play "parallel", but it looks that only one "instance" of event can live in game thread. Is it true that new call will "replace" old state (or something like that)?
@autumn shard What you have looks correct. Have you tried getting a world context object for that print?
If Invoker is valid, you can use that to let Print get the world object.
@verbal jungle In terms of blueprint stuff, not really. Both of those will be the same. You would need hundreds of thousands of this call in the same frame to notice the difference between the two and even then I don't think it'll change in Blueprint. Can't speak for potential nativization changes on that matter, never bothered with it. Just learned C++ when I became worried about performance bottlenecks.
@vagrant dawn If you're running 4.26, it may be intentional or it could be a bug. 4.25.4 can see PrimitiveComponent in the list just fine. 4.26 also had quite a few major issues with stuff not correctly appearing in blueprint lists. C++ based interfaces being a major one until the first patch. So if you're using the latest version of 4.26 it might be bug reportable. If you're using 4.25.4, I'd recommend an engine file check.
Hi, is there a way to set a select drop down input in the details panel of an actor?
When placing the actor in the editor view I would like to use a select drop down based on an array to adjust settings for the actor.
lol yep
You could probably do that using some kinda custom details panel for it
Alternatively, you could perhaps use a data asset - have the data asset actually contain the settings for the actor that you want to adjust. Then, you can create instances of that data asset, and if you have a variable for it in the actor, it'll offer those as the options
Am I dumb or shouldn't two collision boxes that have the response of block/overlap to each other make them appear in an get overlapping actors call?
They should but they might not have "generate overlap events" enabled which iirc affects that
They should be since they generate overlap events to other actors but I'll check just to be sure
I was just thinking if I made some dumb assumption and they have to overlap actual actors or static meshes
static meshes in the world are also actors, their type is StaticMeshActor (which is basically just a simple actor that contains a static mesh component)
oh - and BSP brushes also might not overlap, I forget but I had some issues with them and getting overlaps
The collision boxes are the exact same, just different instances
but they do not want to generate an overlap event towards each other, both have generate overlap events set to true
Wait, changing the response to overlap from block fixed it 🤔
The documentation says that if both are block there should have been a response as well
"All other" that you did not pick explicitly by adding a pin for them
Imagine you switch(int) 0-10 and the actual value is 0 < or > 10, then default will be hit since no other option was implemented
@opaque blade @meager spade
Thank you!
whats causing my widget to not disapear when you leave the collison box?
Looks you you are not referencing the owning player correctly
what node would i plug into owning player to fix that?
Sorry the Cast to Third Person Knight (the node that says “as third person knight”)
Not 100% sure but you could try to store the created widget in a variable and use this as a target for the "remove from parent"
its incompatible with the cast reference
Then have the created widget as a variable like Fele said or drag other actor into interact widget
ok ok ty
right now the lower cast reference doesnt to anything... Just executing but doesn't give any reference
oh i fixed it by just using a remove all widgets since theres only gonna be one
that was easier
and it works
but thanks anyway
but i get why it wasnt working
is there a way to disable speicific player inputs?
You could check the input with a boolean
yeah thats what i did
ok ty
hey i have a question, i have 2 projects
1 is my main game project, and the other is kind of a test
where i followed a very long tutorial to make an inventory system
and i did it in a different project rather than my main one to make sure it will even work
now i want to move all the blueprints into my main project
is there a relatively easy way to do that?
bcuz i cant copy and paste whole bp's into another project
and if i copy whats inside the blueprints ill still have to recreate all the functions/variables and whatnot
i'm trying to draw a white triangle into a render target texture at runtime but it draws a black triangle instead, does anyone know why that is or how to fix that?
here's the blueprint setup
How do you spawn a "WaterBodyCustom" from BP during runtime?
when I try to spawn it or any BP that's the child of it during Runtime (PIE) with "Spawn actor from class" it creates the actor, but the "Water Mesh Override" doesn't render, only the spline
If I chance any option by hand it pops into existence, even very unrelated options, like adding 1 to X, Y or Z translation
But if I change any values with a BP it doesn't fix it, only if I do it by hand
This only happens if a PIE or Simulation is running, if its not runtime it spawns the actor with the mesh working and it continues to work even in PIE
Can someone help me, I am learning blueprints and I do not why it is not working.
You can right click on the folders in your test game and select "Migrate" and then you can specify the folder of the project you want to move it to.
This depends on where you're running it, if it runs on tick or something where it repeats multiple times, it's possible it could toggle between the two
It will not run them both in the same point of execution
If both paths are entered in the same frame, it can look like they're both executing
what is your alpha set to? 1?
either clone your project through the epic games window or create new project and migrate. The reason you have errors is because references are path-related.
@zealous moth it was zero then i tried with one but nothing changed
Yeah so it's probably just getting called multiple times as ImmutableLambda said, where if one call causes it to take a separate path than the other, then it'd look like that
but i am only turning one knob at a time, every knob sends its own CC#
add a print or something before the branch and see how many times it triggers
Yeah, analog input might not be buffered
and maybe it shouldn't be buffered at all, depends on your use case
but you can manually buffer the input
yea I am working on a simplified version to clarify, I was wondering about manual buffering, cause sometimes it seems the data comes too fast
so how do I do that?
count how many times I get the message and just grab ever "n" one?
keep a value that you update every single time it is called, otherwise track the time since the previous event and only run the heavy logic every so often. You can also have a lightweight update that always runs
dont hack it together with a timer, you need to manually track the time
easier to set this up in C++, but you can make it reusable in BP via structs and a function library (maybe a macro library as well).
what is the best way to create a bundle of level assets to spawn programmatically? The equivalent of a prefab in Unity?
Should I be using sub-levels?
For example, I have a main level and a dungeon room which you can enter through a door. Different levels may use different dungeon rooms
Or for procedural generation, a level may be composed of smaller prefabs
Using a single actor BP seems limiting.
You can make a top-level level, so that it is used as a persistent level when you are authoring your content. That level can have many sublevels within it.
You can stream that level in dynamically into other levels.
Basically a level is already a prefab (though you can't spawn an instance of it as an actor)
is the second "Branch" redundant here? Will I just use the False to go straight to next Exec?
I'll have to research more on the level streaming APIs. Is it possible to use this approach for procedural generation as well? e.g. something like re-using a sublevel multiple times in different positions, programmatically?
From the tutorials I've skimmed over, it seems good at breaking up a big level into multiple sub-levels in a hand-created level workflow. But that is something slightly different than what I'm doing.
Can somebody explain why the -- node sets the new value to 0 instead of the initial value -1 (which is what I though it should do)?
If the value of that int is 0 after execution runs on the -- node, then your variable was 1. If your variable was 0, and did not decrement to -1, the node likely didn't get ran.
@maiden wadi Its decrementing 2 instead of 1 for some reason. When it gets called with a value of 2 it goes to 0, then to -2, when it should have gone 2->1->0
And im getting the same issue by manually using minus 1 aswell, I think ive messed up somewhere else
Managed to "fix" it by using a do once node and resetting it after each decrement
Does anyone know how to make it so when my character walks off a box collider so it drops straight down and not slowly go down like steps for a bit then drop because that is what keeps happening at the moment when I walk off the box collider (it is set to block all)
try adjusting the perch settings in the character movement component (they're hidden by default, under character movement: walking)
Okay thank you, I will check that now 🙂
when i try to add socket to my character, why it's scale is too large?
even the scale already set to 1,1,1
No idea tbh, haven't had that issue... but you could always scale it down
(it might just be a preview scene settings issue as well)
Could be possible the character might not be the right scale. But yea might as well just scale down the socket
Yeah if the skeletal mesh's scale is wrong that'd probably cause it, but at least it looks like it's about 150 units tall which seems reasonably correct
does anyone have a clue why this isnt working
it prints the string
i have the exact same setup in a different project and it works perfectly
they are identical
Check the outliner. The object you spawned is probably at the world location you specified if it printed the string
yeah it is sadly no camera shake
I'm not particularly familiar with the camera shake node there, but should both of those radius values be 0?
That was my first thought.
There's some way to jump to an interface implementation? Double click opens the definition but there isn't a simple way to open the implementation?
Implementation would be whatever class you implemented it to. Iirc I think there's a way to check what blueprint it has been implemented in
Visual Studio has a simple "jump to implementation". If there's one it jumps there, if there's more, you select the class in a list. There must be some way because I can't believe there isn't any way.
Right click the interface and click "reference viewer"
That should show every object that currently implements the interface.
Then it's a matter of opening up that object and checking the interface function
I know the object that has the implementation, I just need to quickly jump there, so quicky as you open a macro or function. Thanks for your time anyway.
So if you right click the function in the interface and find references you'll get a find results tab at the bottom. Click the binoculars to open where it's referenced in all blueprints. Then you can double click any of those functions it shows and it opens right up
Thanks, I already know how to search in any/all blueprints, I just wanted to know if something so simple as "jump to implementation" it's in UE4, but I don't think so.
I can't say if there is really. The method I mentioned is basically the quickest way to jump to it though that I know of in particular. It automatically opens the blueprint and navigates to the function right away
Faster than open the BP and go to the implementation sure, but not so fast as go directly. I guess i'm so used to this option that it's Visual Studio's fault.
I have a working popup that becomes visible on my Begin Cursor Over event and becomes hidden when the On End Cursor Over event is triggered. Both work great.
HOWEVER, if i left click on an object (firing the On Click event) -- it seems to be causing the On End Cursor Over event to fire, making the popup go away. Is this standard for On Click?
(This is in regards to a single object with all 3 events. The mouse cursor never leaves being over said object)
Best way to make a system where you finish the level and unlock new items? Data table and structures?
I have a Map of morphtarget names, this is fed into a Slider which adjusts my morphtargets for my character creator. 99% work how I want but I need one slider to effect the value of another. I have a Muscle slider, I need that to decrease "Fat" as the "Muscle" increases. I'm not sure how to do that as currently have all my morphs in the relevant Map Variables. Which I break to Min and Max values. Any ideas how I can pull the Muscle value out and basically say "if this increases, decrease that"?
when i move an actor in editor, does the whole actor reset with all its variables? or will it just reexecute the construction script?
Need help making a filter system for my level select, I have a bunch of levels all as template UI with instance editable variables. I can get the filter to work but I have no idea how to stack filters (ex. check the filter for unbeaten levels AND Favorited levels) and once
The pic below shows what I just tried, its far from working
What's not working about it? Logically it looks sound, so long as the boolean values are set appropriately.
I take it this code exists within a widget, and there are multiple instances of said widget. That said, "Current Level Completed" from the game mode doesn't seem like a valid check, as each level should have its own unique boolean.
Same goes for the "Surf Menu" boolean.
Hello everyone. How do i fix this firing twice? I mean The widgets are added twice.
Does anyone know a fix? Im currently testing it on 2 players. One as listen server and one as client
What blueprint is this in?
On the character blueprint
So what that means in multiplayer:
Player 1 starts the game, he gets a character for himself, the character creates a widget for Player 1 and puts it on screen.
Player 2 joins the game, he gets a character for himself, the character creates a widget for Player 2 and puts it on screen.
As Player 2 has joined, the character is created on Player 1's instance of the game as well (multiplayer!) and the begin play starts, creating another widget for Player 1.
As Player 1 already existed, it spawns into Player 2's instance of the game as well and the begin play starts, creating another widget for Player 2.
You're better off putting the widget creation in the player controller as they exist on server and owning client only so other clients don't know about them.
OH! This makes sense. Wow
Thank you!
And since you're doing multiplayer, you'll want to have the widget creation done after a "has authority" node connected to remote, as the server will also attempt any widget creation which can result in errors or duplication in the case of a listen server.
Thank you so much ^^
It does exist within a widget "parent" and all the levels are sub widget templates. The current level completed works like this, the sub widgets have an instance editable boolean so if the filter is true it checks if the sub widget is also true if so it applies to the filter so its true but if not its hidden
problem is when applying to filters everything goes bad, also have no idea how to unclick 1 filter without showing ALL subwidgets
Can anyone help me setup this loop ? I am new
Hello everyone, when I make a damage to an actor(enemy), the other actors of the same class get damage too.
I was about to ask same question lol
You want each "level widget" to bind to the filter change event.
Each "level widget" should be checking for the values for the specific level on whether or not it should be visible or hiding. Also usually it's better to use collapsed so they take up no room.
How can I subtract damage to a single actor without affecting the other actors of the same class?
Loops are automatic. Whenever the end of the loop body is reached, it'll go to the next iteration of the loop. For loops take a starting and ending index, and will iterate through them eg. (FirstIndex = 0, FirstIndex <= LastIndex, FirstIndex++) --- in your case, you have a first and last of 0, so it'll only do the loop once.
I just want to know when my character is gonna hit the ground
and set it to keep the current gravity if he is not
switch it if he is
can't manage to get it to work
If you're using a character you can use these events to know when a player has landed on the ground, or, you can detect the movement mode itself --- walking typically denotes they are on the ground.
big thanks
but unfortunally
I am using a custom actor
I am not in the character
Not sure about other options as I'm not familiar with Nav Movement Components, but, you could do it on Tick.
Can you show the code you're using to apply damage to the enemy?
Hi, I'm on my phone, I'll try explain it as possible. Subtracting "damage" node from "health" node and adding the result back to "health" node again. The problem is when I put multiple enemies of the same class in the world and when I make a damage to one of them, all of them get damage too
I hope it makes sense
quick question, folks! I am working a little wave game. I want a health pick-up to spawn at certain waves. It currently works when spawning on the 5th wave but I also want it to spawn on the 8th wave. Here is how I currently have it setup. I think the "Do Once" is the problem, but without it it's popping a health at every spawn point on the 5th wave. Any suggestions? I've tried the "Or" and "And" but neither worked
Why not create an event or a function rather than using tick? Whenever you're setting the wave value, you could instead be calling an event.
Sadly that's not enough information to go by. If you store the health value in the blueprint of the enemy itself, then that specific enemy should only be having their value changed so long as how you're referencing the enemy being hit is only that one specific enemy.
Ive been using BPs for a while and to communicate from 1 bp to another I use custom events and event dispatchers. Ive known about BPIs but whats the advantage of using them over custom events?
Is there a way to fire a Line Trace downward and get the TEXTURE im standing on, from the single Material full of textures that ill be standing on?
You don't need to cast, and multiple BP classes can react to an interface and do so in their own way.
Example:
Enemy1 implements an interface "Take Damage" > It does so and directly reduces its health.
Enemy 2 implements the same interface, but it reduces all damage by 10% before reducing its health.
When the player fires (in this case, using a hit-scan type weapon) they get a generic actor reference from the hit result, but then the interface message can take that actor reference and pass it along to the actual object if it implements the interface.
awesome, thank you!
I'm still struggling with trying to get my health spawned
I'm trying to create to custom event
here's my function for Wave 5 and Wave 8 (where I want the health to spawn)
I just don't know how to make it get called by the custom event
Can you show the code where you are setting the "Current Wave" variable?
That's not the setting of it, that looks like it is a UI binding.
Yep, ok so from there, you should be able to call to your "HealthSpawnWave" function.
In your "Health Spawn Wave" function, make it do the checks there and perform the spawn of the health.
Use a set variable for even more ease of use 😛
I think it's working
you angel
I just don't know how to have both wave 5 and 8 in the Heath Spawn Wave function. Am I able to?
Create a set variable like I did in the picture above.
You can then add whatever values to the set you want similar to an array, but only unique values can be added.
This way, you can define all of the waves that should provide health.
And in your function, you can check if the current wave is in the set, and if so, spawn the health.
I am so sorry for not knowing, but I have set it up the same way. How to input the waves into the no new set variable now?
Compile the blueprint and then you can add values to it under the default value section by clicking the + sign to add more values.
it worked. You really are a good person. Thank you
Need help. What would be the object in this instance? Projectile_Laser is an actor blueprint
Casting is a means of converting a generic reference (such as an Actor) to a more specific reference (like a Projectile_Laser) so as to be able to access functions and variables available to the more specific reference's class, it is not a means of getting the reference. You need to somehow get the reference to the Projectile_Laser you're wanting to use.
Ok so i'm new to Blueprints and for some reason i can't find out how to add movement to a cube when i put WASD
I have 2 projects which both have different gamemodes and i want to merge them into one project and want to have only one game mode....can anyone help me with that?
You can merge the project files so you have both game modes in one project, but having only one game mode, you'd have to copy what you want from one to the other / basically merge the two game modes manually.
look into the technical documentation on the input system. Basically you have to manually enable input handling for non-pawns.
I want to setup a keypress, where when I press a button twice, the animation montage plays! How do I setup that
sorry to ask such a siky doubt
silly*
Can anyone recommend / know a tutorial for a first person sprint with animations
@sand shore thank you
do you know how to sprint without animations?
Not 100% but pretty much
@mental pike
https://gyazo.com/0bd44fe9d53c527b50e5ddd89637b2e5
It's really that easy, setting an animation for it is just as easy. Let me know when you're ready
Okay gonna be difficult to get screenshots for this I think but I have a problem with my variable not updating.
It never goes over 1.
Here's the second part, I'm trying to make a kill counter
I couldn't figure out how to cast to the projectile so I just set a variable on the third person character and referenced it from there
Why are the lines so rough 🤔
Yeah I saw this plugin just dont remeber them looking bumpy af
can adjust bubble size
👍
How can i directly get an array of these ? GetComponentsByClass with "Actor Components" returns everything in the blueprint (since they're all children of Actor Component) .
Use get name then see if those match to the name of those components
Then add to the array if so
How the enemies of the same class can have their own health bar? If I duplicate them in the world and attack one of them all get same damage 😕
How would I go about saving my MorphTarget values? Currently I am only saving the last entered value. Any ideas?
while trying to add an action mapping i accidentally deleted all the default ones is there any way to reset the action mapping to default?
Not unless you were using version control
@mental pike DefaultInput.ini in your Config Folder, this is where the input mappings are stored. If you were to copy and paste from a new default project it would give you the original defaults.
^this would work too
(but if you're not using version control you'd save yourself some trouble by learning how to use it now)
Ok thanks alot
You could aways check the <project>\Saved\Backup directory to see if UE4 made a backup file that you want to restore
You have to set your stuff up in an object oriented manner. If your health bars are all changing when you hurt one, then either your health bars are all pulling from the same instance of an object, or your damage code hurts all instances of your enemy.
That is just a confusing awnser
@uncut condor how do you update the health of the enemies?
Not really sure what part of that confused you.
from Y to the last .
I sort of got what you mean, how to make individual object and set health for each one of them
Do I have to bring all actors of the same class to begin with?
Are you casting from the player to the enemy object or are you updating the health from a trigger box inside the enemy object?
Are you using widget components?
And hitting one lowers from the default value, and then hitting another lowers it even more? Is that how you're testing?
i'm updating the health bar from when the capsul of the actor gets hit
can you show the blueprint?
sure , but it's bit messy, i will clean it up a bit
Anyone can explain why timeline functions are running faster in a packaged build? I understand why tick functions do... But why timeline? Are they also dependant on tick?
If you specifically want those three, get them and put them into a make array mode. If you want anything that is not in the top part of that list, do a get actor components array, and just check if it's classischildof against scene component class is false.
is that inside the enemy @uncut condor ?
why are you casting to AllActorsOfClass?
Timeliness run on tick. All they are is an actor component that ticks and calls the function that runs the timelines update if its supposed to be active. Its just a pretty blueprint tick gate.
it was a failure attempt lol
it should just update it self, so taking its own health float should be enough
i did that without casting
isn't index 0 means the first actor has been placed in the world?
@maiden wadi I see, thank you 😀 Then, i guess smooth framerate isn't so great for a project with timeline functions... idk.. there has to be a way to ensure stuff runs in the same speed at different frame rates.. right?
i'm sure there's something obvious i oversee... pls point me in the right direction 😅
@uncut condor this should do it
inside the enemy bp you dont need to care about duplicate placements of that actor object in the world
thanks, will this prevent the other actors(enemies) of the same class getting same damage when I attack one of them?
yes, it only runs inside it own instance
ok i will try it
if you want to do it from the player object and influence the right enemy object, you could do it like this @uncut condor
the hit doesn't get overlape for some reason
probably colision detection settings that are wrong
Would anyone be able to help me with saving several values at once? I have a character customisation menu, I need to save all entered values
but "on component begin overlap" works
@keen terrace structures are your friend
then use that one ^^
@gloomy linden I have them, not set up correctly though and I am just guessing now and after several crashes its getting old
then set it up correctly? add the structures to the the save bp and update them accordingly, or you just want to add all variables one by one in the savegame bp
Its not like I have purposely set it up wrong.
@gloomy linden damn, it worked ... but I have no idea why it worked , the instances thing maybe?
thanks man , i appreciate
@uncut condor hehe magic 😛
What would be the best way to add pitch and roll to a flying character?
@azure fractal
@uncut condor Check this video, https://www.youtube.com/watch?v=EM_HYqQdToE, it will help you understanding the ways to communicate between actor objects
Announce Post: https://forums.unrealengine.com/showthread.php?101051
This Training Stream takes a look at Blueprint Communication. We find that Unreal Developers of all levels can sometimes struggle through the concepts behind moving data between objects. So in this video we'll take a look at the different ways to make Blueprints talk to one an...
i have seen this video but I didn't watch it all because it's too long
@proud mauve Generally for anything that is updated often, you'll modify it via deltaseconds. For instance. Deltaseconds are just the time spent between the times that the gamethread is ran. If you're running at 60 fps, your delta seconds will be 0.01666. If you're running at 30FPS. Your deltaseconds will be 0.033 So if you want to move an object exactly 100 units over the course of one second. You would do (100 * Deltaseconds) This would move your object 1.6 units per frame at 60fps, or 3.3 units at 30fps. The slower the framerate, the more the object will move each frame.
invest the 2,5 hours, it will save you hours by not getting stuck 😄 @uncut condor
Anyone else have any advice for my issue of how to get all my morph target names and values into a save file?
It has good information, well worth the time investment.
@proud mauve It's also worth noting that you rarely use Delta on timelines. Usually you'll have a start point and a stop point, and use a 0-1 alpha inside of the timeline, and use the alpha to drive linear interpolation.
So Add Local Roation (or whatever it's called) would work as well?
also, not necessarily.
it could mean the first actor in the world. It might even be that, experimentally, but there is no strong promise that it will be the first actor in the world.
if you need to know the first spawned, for game rules things, you should either search for the highest current life span or store the reference as it spawns.
@dry valley where is the forward vector? :3
bullet is spawning below body
is the pivot of the bullet set properly? since you changed its scale things might get funky
also its not firing where my character face im guessing thats the problem
pivot?
yes, its the thingy that tells where it should rotate around
ill fix that after this
i think the problem why its spawning from the bottom
is because of this
i thought the position of the skeleton when in play mode
nah it takes the xyz location from the socket transform
how can i fix it?
first check the pivot location of the bullet, just select it and see where the arrows are set, thats the pivot location
what is this node called? doesn't look like vec * vec or cross product
@dry valley Plug the rotation in. You're telling it where to spawn, but not where to face.
thanks that one works now
how about the spawn location any idea?
Set the scale to 1 and see if it goes well then
It's also worth noting that most times you will want a simple shape component like a SphereComponent as the root of your bullet. collision calculations are cheaper, and it also allows you better control over the visuals.
Does your weapon actually have a Muzzle_01 socket?
oke thanks for the tip
The mesh of it. Cause the one you were showing the orientation on is named SMG_Barrel
i dont have a weapon
anyone?
or the left hand 😛
theres nothing on it
if you hover with the mouse on it, it should tell its name
ok it works now
my mistake was adding new skeletal mesh then getting its socket
instead of the socket of my one mesh
create advance session and find advance session node is not showing.
it's from a screenshot 😕
Hey guys, what is the preferred way of creating destructible meshes in 4.26?
how come the + node looks like this as well?
maybe a older version
hey guys I just want my win screen to delay before going to the main menu why doesnt this work?
Right click > Create destructible mesh.
Apex destruction is disabled by default, so I thought maybe they did something else
I guess we just wait till chaos
@maiden wadi Wow, thanks, that's a great explanation. A lot to take in 😅
Enable it in the plugins
Is the actor that creates this widget (and calls delay) being destroyed?
oh maybe, its on a bullet blueprint
ok ill have to use a variable or something then i guess
It is a guess but yeah give it a try
@crude hornet Alternatively, just move that call to someplace that isn't randomly destroyed through gameplay logic.
Put an Event somewhere like the player controller or HUD, and either GetPlayerController0, or GetPlayerController0->GetHUD, and call it there. Then the one that called the event in something else can die, and the one you called it in that will still exist in a second can play it just fine.
@maiden wadi I changed the tick function to one on the right, it works but it's not smooth. What else am i missing?
oh good idea, thanks guys
i just moved it to the players bp and it works perfectly now
@proud mauve Your tick function was better. What is Z rotation? How fast do you want this thing to rotate?
Just at a constant rate, on and off
But how fast? Such as degrees to rotate per second.
Right now i have it at random 2,4 or -2,4
@proud mauve Ignore the widget stuff. But this is the general idea when working with delta time for framerate independence.
FInterp is better to use to code animations, it makes things smooth
@maiden wadi That's great thanks 😀 👍
also multiplying by delta time makes things smooth
FInterp will not work with his case. It doesn't really work for a smoothly rotating object in the same manner.
You'd have to constantly update Current and Target.
nah only when the highest number is reached, just reset it :d
but what would be the point?
@proud mauve Also I messed up, that should be AddActorRotation, not Set.
Tick -> GetActors CurrentRotation -> Get Yaw -> Add Current Yaw to (Rate * DeltaTime) -> SetActorRotation yaw
also an additional tick call, unless you disable the actor from ticking
so if you have many, it could end up costing more
shhhhh Kaos, no optimization talk for people who can't get object to rotate properly
just confuses them 😄
😄
is there some way to get multiple float curves in an object, like it's possible in the timeline editor?
hey guys, wonder if anyone can see where im going wrong, im trying to calculate if an object is getting closer or farther away from the player - so far this "works" but only if the object is facing the player as well.
just get both locations and use vector distance node
a simple yet elegent solution! hehe
just wondering how id then convert that to "true" or "False"
same as above, the distance node returns a float?! (while i'm not sure if its absolute, so check the tooltip, otherwise add an abs node on the result)
and you have to store the distance in some temp variable, so can compare to it against in the next frame/tick
Until you get more familiar with the engine, you should use a similar engine version to the resource you're learning from. If they don't list a version, it might not be a good educational resource (but some good resources don't reference specific versions).
If you're unsure of an engine version, I think 4.16 or so is probably a sweet spot in terms of age.
tip for the compact nodes though - type in the literal argument types and the symbol shown in the old tutorial. "vector x vector" should yield "vector * vector" which is the node in question. You can also try "vector times vector" or what have you.
You can compute the direction vector from the object to the player, and then normalize that object's velocity and then dot product those two vectors together.
direction vector isn't forward vector - if you do it correctly the direction doesn't change as the object rotates.
that sounds like a solution which works without temp variable^^
If the dot product is positive, the object is moving at least partially towards the player
would you mind showing me what that might look like in node form? 🙂
If I have the engine installed ig
Nah I do
I normally don't put nodework together in this way, but your question was well framed and included a concise example.
i'm also curious now 🙂
thankyou very much! 🙂
thankyou so much for your hlps thats fantstic! 🙂
so to double check, this should work? 🙂
hello, can anyone think of a way to have a mesh rotate towards an angle in blueprinting?
@marble echo Plenty, but what is the use case?
sorry, shouldve been more specific, i want a gun mesh to rotate 90 degrees when equipped so it looks as if the player is pulling it out
Like a first person equip animation?
yeah, a bit like goldeneye
animate it
I recommend actor sequences. I mean you can do it in code with math if you want, but sequences are going to be much easier to edit designer wise.
that sounds great, im more familiar with sequences
where would i find that option? not heard of it before
A simple timeline with a 0-1 alpha track and a lerp from -90 - 0 on the pitch for instance is an easy way to do it in math. But it looks very... programmed. Not very smooth or "human".
Well, it's smooth, but not human.
yeah, ideally i wouldn't use maths to 'animate' it but i wasnt sure about how else to do it
It's just a component. ActorSequence. Can add it on the actor's component tab.
Thanks so much, I'll play around with this
@swift pewter Hard to say. A ton of games get away with just randomly selecting an animation to play. Make a few and select one at random.
can anyone tell me how to switch blendspace! I want to change animations when weapon is not in hand and when its in hand
You'd be surprised. I'm not very graphically oriented, but animations are incredibly easy to pull off if you spend an evening messing with them. Even a free program like Blender can do it pretty easy. On the other hand, weapons do only really recoil in one way. It's fair to say that either one animation with some simple offset changes, or even just mathing out the recoil might have similar effects. Bonus of animations though is that they don't affect your gamethread as much.
sorry to bother you again, do you know how i'd be able to get the sequence to play in blueprints?
@marble echo This should be the play call.
ah, thank you!
Does anyone here have any experience with landscapes?
Im having some weird issue that I can figure out in #level-design
Can i ask really basic things i'm so new and need help ?
@torn oriole Sure. Worst that'll happen is you'll get directed to a tutorial or something usually. People around the discord are usually pretty helpful.
Well i just when i hit play i'm moving around the camera , i want is to move this mesh cube
@torn oriole Force is used on Physics Simulating components. So make sure that StaticMeshComponent is set to SimulatePhysics. Also you're going to need a LOT more force than that.
If you just want to move it without physics. Use something like AddWorldOffset
I want to draw a line from a point on screenspace to where ever the cursor is. What's the best way of going about this?
I should mention that I want it to update every tick (so, follow the cursor)
Thanks Authaer
@sharp sigil Is this for testing, or?
HUD actor has a very easy to use screen space drawing function. You use EventReceiveDrawHUD, and call GetMousePositionOnViewport, and DrawLine.
You have to use HUD's ReceiveDrawHUD event.
But the only two ways I know of to draw screen space lines is either that on HUD, or through Widgets. In Widgets you can either use their OnPaint function, or you can do some fun math with an image widget by setting it's location between the two points, and setting it's width/height well enough and then rotating it to face one of the points.
sorry for late reply, yes I did
I meant in the blueprint you were testing in. Your print has no context object.
I don't think UObjects can get world by default. Could be mistaken.
Was just saying since your Invoker is an actor, you could use it as the context to display the print.
Yeah UObjects don't implement GetWorld in any useful way by default
this is also why you can't do stuff like spawn actor in UObject based Blueprints - unless you manually implement GetWorld in the C++ base class
Hey everyone, anyone know how to clamp the rotation when you use the first person template blueprint?
@tawny perch What rotation? The ability to look too far up or down?
Yeah just looking around with the camera.
These are generally useful for that in first person. Alternatively, you're stuck correcting it on the character's tick.
bear with me but whats it called the set node?
Just Set. You can get any of those by dragging off of the ReturnValue from the GetCameraManager and typing SetView
Ahh gotcha let me try that
Using Set View Min, or Set View Max, or Set View Pitch will be a little easier.
and this goes in the even graph of the main bp right?
hmm camera still moves around in a 360 manner. If it helps I did swap out the camera they had with a cinecamera. Copies all the values to make sure it matches unless there is anything else
Those sets should lock any view the player has in those directions. A camera using UseControlRotation, which most FPS setups do, won't be able to look any further because control rotation won't be allowed to go that far.
So I have the use pawn control rotation enabled and just tried disabling it but those values still dont make a difference
Where are you setting them?
Event graph
Beginplay?
Can someone please tell me how to put the MorphName and MorphValue into something that can be saved and loaded later. I just need my Morph Target values to be saved. Spent all day going round in circles
They won't do anything just being in the graph. If they have white triangles, they require execution input to run. If you right click anywhere in the graph and do BeginPlay, you should see this. Should either take you to the current beginplay or add one to the graph. Connect those nodes to that.
Thanks! I'll try it when I get home.
Beginplay will run shortly after the actor spawns. Since this is the pawn, it'll run long after camera manager is valid.
@keen terrace Saved in what way? To load between maps, or survive closing and reopening the application?
Ohhh, why cant I plug all the set nodes to the same begin play? Only one will connect
Just chain them along one after the other.
@maiden wadi Survive closing and re-opening. It is for my character creation morphs
Okay its doing something but now the camera get locked in a random angle
oh wait nvm
I had both min and max same value
@keen terrace Generally you'd utilize SaveGame objects for that. You can create a subclass of SaveGame with your struct type in it.
@maiden wadi I dont know how to update several values. I currently am only able to save my last altered morph target
I dont know how to get the name and value of the morph and update a struct with that information
crashed editor again
Normally if you have several values, you'd store them in an array so you can iterate over each instance when saving or loading, and in your case, you probably want to store them in a Map variable with the Key being set to the Morph Name and the values being the Morph Value.
Hey everyone! I'm working on a ski game project and I'm using 4 line traces around the character to determine where the slope is oriented (blue arrow). It works well however I tried to add a much bigger mountain today and I have a problem when the skier is above approx 190000 units. When above the line traces are not working properly anymore and give me weird results.
bellow 190000 units
@dawn gazelle Hey, it was yourself that heavily helped me with the Sliders 🙂
That was how I was getting the names and populating the Min/Max values for the sliders
@brisk tide Technically you can get away with three traces. But that is irrelevant optimization. It's the exact same function on both? Oddly it doesn't look like it's messing up, but inverting it for some reason. Can I see the triangulation?
Then the top image of course setting the morphs for the relevant slider that is being adjusted. I am having a really hard time picturing what the Map would look like
yes everything is the same even the same terrain i just moved it up
Just cant get my head round it
@brisk tide Actually. Just show the arrow draw.
@maiden wadi do you mean how im setting the arrow rotation? sure ill screenshot it
First major note is that in the messing up one, you've also added a second snow to make it look like deep snow. Could that be getting hit by the traces and causing problems?
oh its the same i jsut forgot to move the bounding box of the texture bp
i have a virtual texture volume
so im getting the longest vector
and then setting the dot product between the pink and blue arrow
and the blue arrow is the longest vector of the 4
Is your world center in that first video back and to the left of the character?
Hey there folks, i am hoping someone can point me to the right direction. I have an enemy NPC that plays an animation if his weapon overlaps with the player character, that part works great. Now if i ALT+drag to copy the npc, or drop another into the level, even a child of the npc, it doesnt work as long as the first NPC i added on the level is not destroyed. If i delete the first npc from the level the second one (that didnt work before) starts working.. Any ideas?
@maiden wadi its right behind the character, could be to the left hard to tell
yea it could be jumping to 000
Might be worth turning trace draws on. Make sure all traces are hitting correctly.
i need something that holds multiple float curves (like a timespan is able to), does that exist?
i want to edit them in the same view, so an array isn't optimal
You basically do the reverse of what already exists for creating the sliders. You would have a Map of Names (this will contain the body morph names) to a structure that contains a map of Names to floats (this will be the slider value Min & Max names and values). OR... You just skip the first map, and just use the map of names to floats, as that is all that is really required if you hook up the outputs of it to your mesh appropriately.
and with the snow as well
@maiden wadi im wondering if there is some sort of optimization happening for stuff on event tick when you get really far from the center of the world
or, you just use a structure that stores all the values you want, regardless of the name all depends on how "automated" you want the recreation of the character.
Unlikely. At worst you'd run into float precision issues from the trace vectors individual floats, but nothing that'll cause that. They would still be accurate enough to get a directional normal.
@dawn gazelle I'm not really sure how to reverse the process. I have my Names to Floats map, how do I set the value?
I have picked the 3 quickest morphs to check, I of course have more
You drag out the map on the to the BP and connected it to an "Add" node which will then have 2 inputs, one for the key, the other for the value.
@keen terrace https://www.youtube.com/watch?v=cf25ekO-AFs watch some tutorial about the basics...
I dunno. Personally I'd have just used a capsule trace the size of the character capsule and used it's normal. Converting that into a rotator and grabbing Yaw will give you the world direction. And the normal itself from the capsule trace can get the steepness.
oh cool ill try that out. That should simplify things. thanks!
@dawn gazelle Thanks very much for all the advice, I feel like I am making progress however need to ask if this makes sense. Would the MorphValue (values) be written to the SavedMorphs within the Savefile if I do this? it doesn't seem to work
Could anyone guide me on how to use a physics handle?
Making an editor bp utility, what's the easiest way to get a world context object for the currently open level inside the bp utility? Or any way, since i currently haven't found one.
Looks like it would work, so long as you're using the Save Game To Slot node with the same name you're using in the Load Save From Slot node.
how does "Launch Character" work without physics being enabled, is it done by adding to your up vector or whatever?
@dawn gazelle Unfortunately isnt working, the names are the same. I just updated the name to be 100% sure, Within the SaveGame Class it is set to "Test" and that is what it is set to on the Load execution too
If I manually change the values of the SavedMorphs (savefil) variable, the morphs are applied correctly when I load
so its something to do with the transfer of MorphValue to SaveMorphs :/
Does anyone know how to add different camera positions to a mini map, so when you click on the positions on the mini it goes to those cameras?
Ok I think I know what's happening... WB CC Feature Slider.... This is a single instance of a slider, right?
Hi, I just want to know if it's good to save in the "persistent level" blueprint ? As this level is constantly here when you play. So I would load the save file from the level blueprint and end up saving always in this blueprint tab.
@dawn gazelle I believe so, the slider is added for every morph target I have. So it is reused over and over for all Morphs, then added to a scroll box. I have this function for all my Morphs, they are split up into groups, Body, Skull,Brow, Eye etc
So the slider looks like so
So in that ^ blueprint is where you want to store the map, and have each of the sliders add their value to it when their value changes.
Any idea why the "deflect" only works on 1 of the enemies? its the same enemy just placed twice.
@dawn gazelle That is my "Main" BP, that is where I currently have my SaveButton
are you using get all actors of class ?
hard to say without seeing any code
This would indicate that only one slider is being saved, if WB CC Feature Slider is only one instance of a slider.
Yes, i am getting all actors of class and checking which one is the closest to the player, if the conditions are correct and the closest enemy is playing RootMotionAnimation it supposed to deflect
Well, i figured out how. had to dig into the engine source. I hate ue4 sometimes:
@dawn gazelle No values are being saved at the moment, shouldn't "MorphValue" be capturing each sliders input and storing it regardless? Or am I missing something? This is at the end of the FeatureSlider BP
I am using an Interface call to trigger the AnimMontage, and it works on only one enemy. If i use a custom event with a timer all enemies on the map play it at the same time though.
Interface messages only affect the parent class?
No. The "Morph Value" map variable exists individually on each slider currently from what I can tell, and that means unless you're somehow joining those values from each of the sliders in this specific reference, you're not going to get any values saved.
@trim matrix print string your nearest target and see if it changes, seems like its not being updated
Like, what is WB CC Feature Slider in this instance? I understand that you have a widget BP called that and it is the widget of the sliders, but this "WB CC Feature Slider" specifically... What is it set to?
i did, it changes
show how you determine which is the closer enemy
one sec
because the get all actors of class + for each loop doesnt seem needed if you already have nearest target reference
Also, just to be sure, make sure in your save game BP you have the "Save Slot" string set appropriately, otherwise this could be passing the wrong or a blank Slot Name.
Basically i am using my target lock system to get the closest enemy and using that variable since its being populated anyway to check for my deflect system.
from what you posted dont see anything major that could break stuff, really hard to tell just from those images where the logic breaks
Thats the frustrating part, it only breaks if i have more than 1 Enemy on the level. If its just 1 it works perfectly. If i add 2 and then kill one, the one that was broken starts working
wouldnt it make more sense to have the deflect logic inside character?
i do, its inside the player character
when character gets hit, you check if the hit actor = nearest enemy
you are calling deflect event inside nearest enemy
so i should try to do the entire thing from the player character? even trigger the enemy montages?
you could try applying damage(inside enemy) despite if the character is blocking or not
and then inside the character use the event on any damage
to check if the character was blocking, if so you check if he was blocking the targeted enemy. true = block, false = update health
@dawn gazelle, so WB_CC_FeatureSlider is a WBP, it is a UI Slider and Text, both populated by this. Both added to the viewport as "WB_CC_FeatureSlider". This is a function within my WW_CC_Main. "Main" is where I trying to save the morphs.
the health part i got working like you said, but moving all the logic inside the character sounds like a good idea, ill do that. Thanks mate.
Yes, I get that... But what is this variable referring to? ie. where is it being set and what is being set in it?
no worries, sorry couldnt be more of a help
Its ok it might be it 🙂
you dont really need an interface as well
because then you would be checking the deflect inside character
I was using a custom event, before the interface but when the conditions were true to deflect all enemies did the animation at the same time. Interface seemed to fix that
to make it easier you can check distance inside character as well
instead doing that for every enemy
short question, why do i have 2 meshes inside of eachother when i add a third spline point?
@dawn gazelle That is WB_CC_FeatureSlider. It is a variable of WB_CC_Main as I pulled it from "UserCreated" in Designer of Widget. I have tested the save file, if I manually put values, and then load it applies the morphs.
Wait
anyone know why this isnt calling my function?
i have a breakpoint set on my function and its never tripping
I don't think you're understanding what I'm getting at.
WB_CC_Feature_Slider is a widget BP.
You are creating multiple widgets of WB_CC_Feature_Slider for each of your morphs.
Each of those widgets are going to have that "MorphValue" map in them.
If you have a single variable of class WB_CC_FeatureSlider, named WB_CC_FeatureSlider, then it contains only 1 widget, therefore, only 1 morph value and the map stored in it would only have the 1 morph value.
What you want, is to have only 1 map, that should exist in whatever is creating the widgets, and when the values change in the widgets, you get them to change the map in whatever is creating the widgets. Doing it this way you will have a map that contains all the values that get changed. And this is the map you want to save in your save game object.
I found the issue and it is completely irrelevant to what we were saying. The second enemy on the map for some reason doesn't generate overlap events with the player. Only the first placed enemy does. weird.
Anyway, thanks again m8
bruh can you not call a timer on a function that has an input
So i have this system set up for sprinting , how would i go around for making the default unreal sprint animation work for this one and a walk one i have be used instead of the one now for walking
@dawn gazelle I get what you mean regarding the 1 morph value etc. How would I go about getting the Name/Value from the WB_CC_FeatureSlider and feeding that into the WB_CC_Main? I would imagine that I would be ADDING, those values to my Map within WB_CC_Main?
You'd probably want to pass in a reference to self (the menu widget where the map is going to reside), to an exposed on spawn variable on your slider widget, then you can drop the reference in to the widget's BP, drag off of it, and do a set MorphValue, which should then let you set the values in the map.
Alternatively, you could create an event dispatcher within the widgets that pass back the morph target and the value and call said dispatcher whenever the value changes. Then when you're creating the widget, from the main widget, you bind an event to the dispatcher from the reference you get when creating the widget, and on that event, you add the morph target name and value to the map.
Example (I have a map stored in a component that I'm getting a reference to, and I can add values to the map like so):
@dawn gazelle Thanks very much again. I'm trying what you said. I'm honestly hopeless at this😫
30 minutes of trying to make sense of it, not that you don't make sense. Just I'm horrid at this.
Would this be correct to get the value into WB_CC_Main? This screenshot is of WB_CC_FeatureSlider
?
@bold charm That would be handled in your AnimBP
Statemachine would be able to check what current pace is and adjust the animation
You feed it information such as CurrentSpeed, the have logic in AnimBP that says "if < 300 then play walk animation" "if > 300 play run animation"
its my first time working with animations i dont really get where i choose the animation
i do the bp code in the event graph right?
and than how do i hook up an animation
That is your characterBP it wouldn't handle animation. There would need to be another BP. which would be an AnimBP.
is it this?
Yes
so do i just do it here or do i need to add new?
At the top you see the "Jump Loop" tab, that is a TransitionRule
have a look at it
you need to make a rule for your speed
Or you would have a blendspace
that does it all in one
AnimationBlendspace, here you can have your Walk and Run animations plotted on a graph, it will blend them according to speed.
where would i click to find this blendspace?
You create a new Blendspace, Rightclick in ContentBrowser
@bold charm https://docs.unrealengine.com/en-US/AnimatingObjects/SkeletalMeshAnimation/Blendspaces/Overview/index.html
Describes how Blend Space assets are used and the different types of Blend Space assets.
Thanks!
nvm got it :)
Not correct... Now that I have a better understanding of what is going on....
- Create a new variable in your WB_CC_FeatureSlider, call it "Main_Widget".
- Check that the newly created "Main_Widget" is set to "Expose on spawn" and "Instance Editable".
- Get rid of the two casts you have in the screenshot above and connect the map "Add" node back up to the Set Morph Target node.
- Get your newly created "Main_Widget" variable and plug it into the target "NEWMORPH" node (screenshot below)
- Compile the WB_CC_FeatureSlider blueprint.
- Go into "WB_CC_Main" and right click on the "Create Widget" node that is creating your sliders, and select "Refresh Node" option.
- You should now see a "Main Widget" pin appear. Get a reference to self and plug it in.
- Run it. It should now work.
@dawn gazelle You've done it again. Honestly my hero. An amazing teacher, do you teach or do tutorials or anything?
Nope.
hi, what is the difference between "GetActorLocation" and "GetWorldLocation"?
getworldlocation returns location of a component
Hi all! I have a weird problem. I've got a child character. All works well with it. I duplicate it, give it a new name, give it a new material. But when I spawn it, the anim blueprint won't play the idle state. It functions otherwise.
look at your code where you are casting to character
maybe you are casting to a different class
did you set the animation blueprint in the actual actor object, or in the actor in world?
Both children are calling the same animation blueprint. The one child works but the other doesn't.
Literally duplicated a functioning character. Spawned the duplicate, but now the idle is broken.
but if you had some logic where you casting to ratonio it wont work with ratonio2
This is on the mesh settings in the character.
The casting and all that happens in the parent blueprint.
im trying to get a variable depending on which one is chosen
they all have the same name
but i cant actually get it because its not compatible
how wouldi get that variable
These guys all function. Ignore the rhino (he's new).
how do i put a mesh on the end of my spline?
Am I pressing Ctrl+W funny? LOL!
try creating a child from the parent instead of duplicating, maybe unreal is playing some tricks on you 😄
Ah. Let's try that.
or sometimes even a simple editor restart even helps, otherwise not rlly sure
same applies with deleting actors from level and adding them again, sometimes it just breaks for no reason
Damn that didn't work.
worth a try, other than debugging not sure what else you could try
Weird! Now the parent character does exactly the same behaviour. The original children are functioning correctly though. Been a while since I opened this project, I must have done something to the children to get them to function. Thanks for helping me think anyway 🙂
Bloody hell. I must apologise, there was in fact a cast going on in the child anim blueprint!!
So, I have a program that spawns enemies, and when the player dies, it deletes all enemies and respawns the player. However, there is a second enemy type that can spawn in the game, and when I try to make a second loop to delete the other enemy type (or for that matter, set the Actor class value of the first loop to LITERALLY ANYTHING ELSE), the program freaks out and makes multiple errors. Does anyone know how I could fix this problem?
example of freak-out
Errors made from said freak-out
nvm found it out
Recreate the For Each Loop dragging a pin from Out Actors
Get All Actors may have contained another class before and you changed it, breaking the For Each ref
you mean like this, or something different?
No
recreate that by dragging from Out Actors
Hey everyone I am possessing this board and it moves very similar to the third person actor but I don't want it to turn on a dime like how you can swing the camera around and turn around quickly with the third person character. How could I force it to turn slowly even if they drag the mouse over alot
that did the trick, thanks!
one final problem, I' trying to make it so that when the player dies, it only revives them if they have enough points. then after the points are deducted, the point cost requirement would double. However, it does not seem to be doubling, costing the same every death. Is there anything wrong with the way I'm changing the value?
(the circled portion is the part where the multiplier is doubled)
Rather than having the actor follow the camera you can have it lerp between its forward position and the target direction the camera is set to, you can also bind pawn rotation to inputs and have it rotate at a set speed based on user input, there also might actually be a setting in the Player Controller or Pawn itself but I'm not 100% sure about that one
These exist in the pawn as a good kick off point
How would that look in blueprints? If it’s to much to show that all good I can try to figure it out 🙂 so I should change the camera lag speed and camera arm or something like that?
Thank you!
I'd experiment with them a bit but the camera lag will actually delay the camera input, its more designed for smooth rotation
I'll try throw something together quickly using the Third Person Template, give me a few
Hey so I'm trying to get the max movement speed of my character but i can't find it
Character Movement in your Character Controller
It should be called Max Walk Speed @long fulcrum
yo quick question, what is this type of node thing?
It's from a blueprint I'm referencing
It converts Type A to Type B
Thank you
so lets say I was adding a sprint function to my game how would i do that
Thanks for the help and your helping a ton of people your a boss haha
@long fulcrum
Thanks 😄
Trying to make the lerp now
Oh wait...
Lol
@long fulcrumRatchet got it exactly the speeds there should be feeding into your blueprint animation
In your CharacterMovement there's a Rotation Setting called RotationRate
set that to your desired rate and it should be good
I was overthinking that lol
That works really well for the third person CH thank you! Unfortunately that option doesn't seem to be on the pawn movement
@long fulcrum You can also put a bool in and toggle it on Press
ok so im paying a cube game would all this work with cubes as well
If they are Character Controllers, yeah it should work
Yeah its a part of the Character Controller 😐
I don't have much time left at the moment so I can't really help sorry but when I get a few I'll try whip something up that shows Lerp a bit better, but basically what you're doing is saying "I want to smoothly interpolate from A to B over X time", in this case being from where your pawn is rotated to where they want to rotate too. Easiest way I can think of doing this is adding/removing from a rotation variable on the Z axis and then lerping from their rotation to that rotation angle
Then yeah this should all be in the Character under the CharacterMovement Component
ok thank you
This is a basic version but it should suffice
I didn't test it and its based on an Actor
so it'll need to be modified heavily @frank nest
Tick is also terrible for Lerp because when you get to .00000 level decimal points the character starts very slowly rotating, so it might be good to write a proper system for handling 0 to 1 lerp
I have this set as the way to double a value every time the event is called, but the value is remaining the same every time. What's the fix for this?
Click it, hit F9, play and let that event run then when it hits the breakpoint hover over it and see what the value is and if its being set anywhere else
I did that, and the value remained unchanged, though it did stop at the set loss multiplier block
so if it stopped there, why didn't it update?
Fences by Stardock
nice thank you so much
Not sure, you'll have to run through the process and make sure you aren't resetting it or it isn't being set elsewhere/overwritten. Just right click it and go Find References and go over all of them to make sure it isn't some accidental reset
I set stops IMMEDIATELY before and after the point, and it stays the same at all times
If its an Int make it a float?
or just multiply it by a float and floor the return value
The only explanation I have (assuming its an int) is that its doing some funky stuff, because I had a var in C++ that was Int a, b, c
a = b*c
which would just return a
so I had to typecast to float to fix it
a = (float)b * (float)c
@iron lodge
I have it hooked up to show on both the server and the client... And yet the client can only see the ragdoll effect, as well as they can still move around.
In Multiplayer btw
May not entirely fix the issue, but disconnect whatever you have in the target on the ragdoll call in the top left of your screenshot. If this is the object that should be ragdolling then a reference to self should be sufficient.
Just another reference to self, just know UE is weird so it might fix the issue but it did not
I will remove it anyways tho no reason to have it
I've got a whole bunch of issues on this project that I have had no luck in fixing if someone wants to send me a DM. Seems like I fix one problem and generate another, which I guess is how game dev works lol
Thank you for this sorry I didn't see it till now your awesome!!
Thank Datura not me lol, but all good 😃
The other issue I see is the branch you have there. What is feeding into it? Normally something like this you would probably want to verify on server before having the client do it, and it probably needs to be done through a multicast to let all clients know what to do.
The branch is there checking whether or not health is less than or equal to zero.
Also, it is running on a sequence off of event tick
Well thank you as well @dawn gazelle 🙂
How can I check if I am hovering over a widget (or my mouse is over a widget) if I'm already holding down click?
If you're setting the health value somehow, then you should be able to do a check if it's <= 0 when you're setting it and then calling the event to ragdoll the character without relying on tick.
So as this is health related, you definitely do not want the client automatically executing the ragdoll, nor should it even be telling the server to do the ragdoll. The server should already know when the health falls below 0 then it would multicast to all clients to perform the ragdoll and whatever else you're looking to do.
If you let the client tell the server to do things, that'll open up avenues for players to exploit.
You can have the client request the server to do something, but then you should always have the server validate it before letting the client do it.
@dawn gazelle Set it to multicast and to check if the health is zero after the health is lowered. Then, it will call the ragdoll event. Still the same outcome.
Did you run the multicast from the server?
Sorry, I'm a bit new to multiplayer so I don't exactly understand. How would I do so? If you don't want to explain you could link me a tutorial or tell me what to search up
Might be the root of my other issues. Usually, call the event (set to run on server) and then route the call into the same one that the event is ran into
You are amazing. Sorry for asking so many questions. I'll try and remember that in the future. @dawn gazelle @north hedge
Do I need to do so for most things I'm trying to execute in multiplayer?
Not always. It depends on what you're trying to communicate and if everyone needs to receive it. (Sorry, had reply hit on wrong message, this was a reply to the question just above this one)
Eg. Spawning a projectile you'd think you may want to do on a multicast, but if the projectile's actor is marked to replicate to begin with it'll end up being spawned twice on all (the server also runs on multicast events, so it'll spawn one that will replicate to everyone, then the multicast itself will tell all clients to spawn one but these ones only exist locally on each client)
FYI using that also fixed my issue with my ammo not depleting! Thank you both so much!
Now, I can't say I've followed any strict multiplayer tutorials -- I'm very much more hands on trying to figure things out, but after quickly looking through this guy's videos, he seems to go at a good pace, speaks fairly clearly and looks like he gives really good examples and tries to explain very clearly what is going on. https://www.youtube.com/watch?v=Gb1zoSZUFdI
Hello guys and welcome back to another tutorial! Today I will teach you guys the basics of Multiplayer. The absolute fundamentals that you need to understand such as Unreal Engine 4's server framework, the two types of servers, and more. In our next tutorials, I will teach you guys replication, RPCs, multicast, repnotify and more!
I'd also recommend this reletively large PDF Cedric Neukirchen made
https://cedric-neukirchen.net/Downloads/Compendium/UE4_Network_Compendium_by_Cedric_eXi_Neukirchen.pdf
You are all wonderful. I will give it a read. Thank you all so much.
Is it better practice to put the show/hide menu stuff in PlayerController or GameInstance?
We run ours through the GameInstance because we need it to load through streaming levels without being destroyed by our Pre-Scene Loading code, so I think its really down to what you need it for.
I'm also writing a SP/MP game that has two char controllers for SP and MP so we write the UI code in each Character for that.
I think its down to what you need it to do?
https://streamable.com/zp5mrk CCDIK lagging behind severely only when looking around and not moving. Why?
It's just a main menu and options menu, everything else in the game is diegetic. Just feels a bit more natural putting it on the PlayerController due to turning on/off the cursor etc.
If its a main menu and its based on a specific level then you can put it in the Level BP code
Level not scene, god danm I need to stop going back to Unity lol
Hit Blueprints > Open level Blueprint
the way I used to do it, and maybe someone has a better way to do it
You can run Create Widget + Add To Viewport in level BP and then disable User Input and set active camera to an in-level camera using Set View Target With Blend
Hi
Can someone help me. I'm new to ue4
i have a archviz scene
it has a lot of UI blueprint
i want to migrate to import it to another level to interact
Bu
I watched this https://www.youtube.com/watch?v=xJQybMSaODc
but when i try to find the blueprint in all the levels present i find nothing
i'm so confused
how did they set the UI up for it to be functioning without the blueprint begin trigger box?
Hello guys welcome back to another video in the Unreal Engine 4 Complete Begginers Guide. In this video we will focus on UMG or Unreal Motion Graphics. UMG is Unreal Engine's user interface system that allows you to create user interface for your game. You can create a wide variety of UI, all with blueprint!
Here when i hit play it still present
Here when i try to run 1 of those UI with blueprint
The blueprint i used to trigger
You can put it in the Level Blueprint on BeginPlay
https://docs.unrealengine.com/en-US/ProgrammingAndScripting/Blueprints/UserGuide/Types/LevelBlueprint/index.html
or you can put it in an actor and run it on BeginPlay
That is if you want your Widgets to pop up when the game/project starts
You can create an actor called UIHandler in BP that just handles the Widgets and showing/hiding them in the levels you want them to be used in. Then you can just put it in each level, otherwise if you want it in every level then you can attach it to the player and run it on BeginPlay @wanton kite
Let me know if I'm wrong but
What you want to do is create a UI element (widget) when the game/project starts that has https://cdn.discordapp.com/attachments/221798862938046464/831023138011086878/unknown.png on it right?
Yes i do
It's in the room there
we can press F to turn up and off the ui
But in the while we can still move and rotate camera
I;m having trouble cause in all the blueprints of all the levels none has any nodes to trigger those UI up
I can only find tutorials like that one above that guide me to use blueprint to trigger the UI
If you YouTube something like "Unreal 4 Blueprint Pause Menu" you'll probably get what you need
basically you just want to create blueprint that allows you to toggle the UI on/off, you'll need to put those in the player controller
Wish I could explain it a bit more but I don't have any time, but the best example is a games pause menu from what I've seen
Hello, Ive been trying for days to figure out a filter system for my level select, the level select uses 3 filters and they can be stacked for instance you can have all 3 ABC or just AB or just B. This has been a headache and this is the only solution I could make
above is the paste bin for my level select filter