#blueprint
402296 messages ยท Page 815 of 403
oo interesting, I'll have to check that out
But that said, isn't going to help me with the physmat thing
Hmm I remember doing this, but not how. And I'm not at my pc right now or I'd track it down sorry.
Actually I do have an idea
Create a variable of your class in a random blueprint
And try to assign something to it
Then click on create new
Dang it, I was hoping there would be a create new button next to the copy/clear buttons
Did it work? ๐
not yet, but it is getting closer, now i can see that it is definitely toggling
But whaa
A sec8nd sequence ?
Should just be the true and false from the "IsA" branch shouldnt it
True would zoom in
And false would zoom out
i literally just plugged them in as you said that because it clicked LOL
๐คฃ
and yes that does it, only thing is that you kinda have to double tap the input key
which, is fine for now
dis
Guys i need help i want when the player lose to restart the level he was in but i don't know how can anyone help?
this is what i did but it only restart level 1 i want the same level he lost
GetCurrentLevelName
Use it for the level name.
sorry, yes, it seems that i need to press the input to toggle either in or out and then it does it when i hold it donw
That doesnt make to much sense to me ๐ฆ
OHHHHHHHH, i had setup a custom event from testing earlier, thats why you saw the Zooming In print result, but that was also causing it to toggle, i was seeing if an action mapping would work with timers on press and release since i couldnt get the toggle to work
so its not your code it was mine, mbmbm
just knew it
testing it, this works exactly as expected ^^
this was my testing for another method, but unplugging all this makes it work
sweet
cant thank you enough for your help
No worries!
wouldve taken me a LOT longer to get there myself
My regular work is constantly running on tick, so knowing my way around them comes a long way ๐
i just added a spawn thing: when you pass through the invisible wall an enemy will spawn in, it works, the enemy spawns where i want it to but the only issue is the enemy does not move towards you, it can however die so idk what is up. i moved around it to make sure i wasn't out of its view
In the enemy blueprint do you have it set to possess placed and spawned? Class defaults->details panel
Make sure your AI is being spawned with SpawnAIFromClass, or that you are also spawning and setting up an AI controller for it. Also check that your nav mesh is valid and that your AI is not spawning in a null nav zone.
If the red dot is where it's spawning, then yah it won't work. Need to have the green nav mesh where it currently is so it can calculate where it can move.
so, I want all the players to be using the same camera. Right now it's only set to player 1 and i need it for the second person. How would I do it?
pic for reference
the index is only set for player 1 and I want it to be for every player I put in there to use the same camera
Level blueprint's begin play can run before controller is created. The best way I've found to handle this is to set a cameraactor pointer in GameState make it replicated, OnRep set the local controller's view to the camera and also set it on the controller's Beginplay.
think it's gonna have to be a mix of both the replies lemme see
The server's level blueprint can get the gamestate and set the camera you want in that level to the pointer in gamestate.
No, just one.
Wait, is this local multiplayer or networked multiplayer?
Local is on same machine, like console with two controllers and split screen.
Hmm. Either way, I think that the pointer in gamestate would work.
I should've came more prepared
I know it works for networked multiplayer and it would have the same affect for local.
ok
yeah had to do both solutions @maiden wadi @tawdry surge ty
Basically the idea is that you have a pointer in your gamestate to a camera actor. Level blueprint gets the gamestate in it's own beginplay like you posted above, and sets the GameState pointer. You can make the pointer RepNotify and in the OnRep function get get the player array, iterate over it and get all of the player controllers. Check them for IsLocallyControlled, if true, get the playerstate's owner via GetOwner, cast to PlayerController and SetViewTarget. And then also do the same in the Controller's Beginplay by getting that pointer from GameState and if it's valid, set view target, that'll avoid your race conditions and work on any machine configuration, local or otherwise.
Hi, can someone redirect me or explain me how I can make a zone where different AI spawn in and a limit (like 5 AI in the zone and if one of the AI die it respawn after 5min)
Okay I give up, what's the best way to replace an existing Physical Material with one created from a custom subclass of Physical Material?
Ideally I want PM_CarbonFiber to be replaced in all cases with EPM_CarbonFiber
But Replace References doesn't work because they're different types (or so it thinks), and you can't reparent an Asset as far as I can tell
Here's a cute one... I've got a couple "Accessed None"s from when a cast fails... But it's a checked cast. Why isn't this code resilient to the cast failing, like it's supposed to be?
I bet converting it to an impure cast fixes this but it'll also make my code suck a lil more than it already does
Having an interface problem related to behavior tree. for some reason the CombatInterface/EventMeleeAttack isnt doing anything even though we can see is being called in the first screenshot.
that debug output indicates its executing MeleeAttack task
which is the first screenshot
in that Task it uses the MeleeAttack interface
which is a Function in the CombatInterface
Right on both counts...
It isn't a checked cast. That Select node is evaluating both of those cast returns.
Logic order 4 and 5 run to evaluate that bool. But the select node still needs to pull the value for A into the function for it to decide A or B, so A still has to be ran. So 6,7,8 still get ran.
Shit, I assumed it would lazy eval
You should see my widgets at work. ๐ They're littered with tiny functions returning from checking pointers. Like dropping the pointer and select into a function and resolving it there.
in a way. i just recreated it from scratch and it worked
While I got your attention, any thoughts on this? It's still kicking my ass #blueprint message
hey, what's the difference between gamestatebase and gamestate?
so now now i got 3 guys chasing a girl around on my test level
however, im trying to add a jump animation when they get close, except the interface that makes that happen seems broken
lmao
thank you
i am reading this one
and all it told me was the differences between gamemode and gamestate
thank you
oooooh
appreciate it
that me?
lol
oh
Me over here throwing Character in the trash and starting from Pawn to build all my own movement like a crazy person
I think I will
I'll leave to default
me no smart
oh
for real?
so if I have something that is a child
I can just transfer it to be a parent BP?
I mean you can reparent blueprints... I've had mixed results on that, myself ๐
oh
But I mean, I also have a particular talent for finding the most fucked way to do something, so YMMV
Not sure. Never messed with phys materials.
I guess I gotta find things my own way but still be efficient
problem with that is that everything is alien to me
so I just follow along tutorials
I find with tutorials you wanna view it as a box of tools you get to take away from it and learn to use yourself.
if you follow tutorials verbatim you're in for a bad time
Tutorials often dont build things the right way, but if you see them use a hammer to hit a nail (metaphorically), that's something you can keep and use yourself when you need a nail to be put into something.
research
๐
it's just a bit annoying
because Idk anything about programming and just trying to run things my own way I just fail alot
but
that is apart of life
trial and error
I think like.. go to tutorials when you wanna learn like a specific thing.
look into object oriented programming, specifically inheritance and polymorphism
80% of your problems can be solved by that
If you wanna learn the basics of how to create and manage UMG widgets, an inventory system tutorial will be very helpful. But if you copy them step by step and make the whole inventory system that way, odds are pretty high that it'll be dogshit
A turret AI tutorial taught me how to use timelines. There is literally nothing else from that tutorial in my turret.
so
like
understand the tutorial that teaches you things
but learn to make it your own way
understand it through a lens of getting to know a process
Yeah, it'll have you go through a ton of steps, just like make sure you understand what you're doing in each step, and WHY you're doing it. Dont' just blindly follow a tutorial and use the result
but do you really ๐ค does anyone understand BP
... and things
Seriously any skill I have at blueprints is because I know how to code just in general
Blueprints are a programming language. All the same principles apply. Don't let anyone tell you otherwise
ya not only are BPs a programming language, but they're actually a pretty standard one. They have far more in common with mainline languages like C++ / Java / C# than some weirdo esoteric language like Prolog does
never forget that naughty dog uses lisp as a scripting language ๐
Tutorials are made by three kinds of people. People who genuinely want to teach, people who just learned something and want to show it off, and people who want Youtube subscribers. Order from least to most common. Tutorials will never teach you good practice because they're dumbed down to achieve things quickly. Otherwise people lose interest. No one wants to follow a three hour stream to successfully implement a system well when you can spent fifteen minutes hacking it together and get more short attention spanned viewers. This same issue happens in university courses. Getting four years worth of 8+hour days worth of experience into four years worth of school at 2 hours a day just isn't possible.
uhhh
wow
you hit it on the mark
I fall into that short attention
wow
am I that bad of a human being
Nothing wrong with it, watch the short tutorial, learn a shitty way to solve it, and then use those same tools to solve it the right way on your own time.
if I'm looking at a tutorial I will spend about 30 seconds looking for the exact moment they use the node or method I needed to know about before closing the video
Exactly what I do as well
It wasn't directed at anyone in particular. ๐ It's just a fact that it's the way things work and why tutorials aren't very good. There are so many nuances and topics that literally circle around through other tops and back to themselves. They cannot possibly cram that into such small time, or take care of an audience's different levels of knowledge. So you're pretty much stuck with "If you stick these blocks together like this, it does cool shit."
@maiden wadi
I got home and gave your blueprint tut for a try and it works!! ๐
Thank you so much for the help. It actually worked!
in ancient times as writing was invented it was considered magic
by those who could not read
Player closing door and text returns to Open
Player Opening door text turns to Close Doors, and No Open Doors text behind it
Consider making yourself a couple of library functions of that. I use two. Lets me set a widget pointer by ref via another class input if the widget isn't valid, returns a bool. The next will add the widget to a parent or viewport if it's not already parented. Very nice functions for avoiding that kind of branching.
I will keep it and I also cleaned and organize my codes.
can actor blueprints inherit from character blueprint?
Not sure what you mean by Actor blueprints in this context?
A Character is an Actor. Object>Actor>Pawn>Character
My door is an actor for an example.
when you create a blueprint I have one of parent actor and one of parent character by I cant inherit from character blueprint
oh that's why actors cant inherit from characters because they are child of actors
child is part of parent. Child inherits from Parent
I know
@maiden wadi correct me if I am saying something stupid.
Tobycon needs help in parent and child
I already solved problem
ok ๐
How come I cant inherit in my actor blueprint from my character blueprint ??
Probably a simple question, but why would my Player Character reference seem to break after the Possess node here?
it's not being explicitly set to a null value anywhere or anything
it gets possessed just fine
but after that the Player Character variable somehow becomes NONE
It even does it here. These Set Active functions execute and work properly but I get "Accessed None" errors for the Player Character variable, even though it works regardless
They cannot because an Actor and a Pawn (which Characters inherit from) have different inheritance trees
so how do I get a variable from my character blueprint
Casting, blueprint interface, or event dispatcher/delegate are the main ways
What variable are you getting and for what purpose?
Hi guys, I have a question. I have a blend space for going from idle -> walk -> run.
The axis input when I press W goes instantly to 1, and the animation from idle state to the run state is smooth, however if I hit shift (which is what I use to transition into walking), it doesn't go to the walk state smoothly, it's instant. I'm basically just dividing the input axis value by 0.3, which is roughly 1/3 of the normal speed. I've tried playing around with ground friction and braking deceleration but they don't seem to have any effect. What am I doing wrong?
Set max walk speed instead
can anyone explain why this only works for some instances of the blueprint?
I've tried that as well to the same effect
You could lerp it down I suppose. Feels wrong tho
Yeah it feels wrong to me as well, I've tried using finterp but it acted pretty jank
Does anyone know how from a simple counter going from 0 to MaxValue (in seconds), I have a game with a day and night system and I need the day to be 10 minutes while nights only 5 min.
So I use a loop with a delay of 1 sec between each incrementation but I don't know how from a single variable called "Timer" counting upward until the MaxValue, I can see if it's day or night to decrease the delay for the night to go faster and be 5 minutes.
Does anyone know the logic to guess when it's day and when it's night from a single value ?
first of all you don't have to use a counter for this
you would use the gametime in seconds (the one which is paused on game pause) and modulo divide it by your total length of a day
so gametime % (15 * 60)
I thought about that but as it's a multiplayer game there's no real pausing of the game except at one moment where I need to pause the timer but not the game
ah i see
i dunno about a elegant way for multiplayer
also do you have a hard transition between day/night?
e.g. is it either day or night?
Like in the game I have a 24 hours game cycle but I want the night to be shorter (5min) while day being normal (10 minutes)
you mean visually ?
yes
I didn't think about that yet but it's not the important as the game happens inside a building
so there will be no sun rotating or stuff like that I think
the easiest method is probably to use a curve, but you could also get along with some simple math, like if(time < 5)day() else night()
@tawdry surge I'm just getting a variable from a class that casts a ray and stores the hit position vector in a variable and trying to access from another class
so i can position an object
the thing is my timer doesn't go back to 0 that's the problem so for instance if the timer is at 16 it's the day as the night was from 10 to 15, so doing time < 5 won't work here
You should read up on the usage of game mode and game state (since is mp) https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/Framework/GameMode/
you can still modulo divide on the timer value
that gives you the elapsed minutes/seconds of that day
already did
Then you probably be storing day/night in game state as its not player specific
I tried to use modulo but I don't see what logic to do as for instance doing 9%10 will give 1 but doing 11%10 gives 1 too so I don't see how to do so when it's 11 it understand it's night, and when it's 9 it's the day.
I'm doing this in the gamemode
@pallid axle you wanna use either a dispatcher or an interface, and pass the variable along with the message call
9 mod 10 gives 9
oh yeah my bad but the problem stays the same as 1%10 gives 1 and 11%10 gives 1 too even if the first one is the day and the second one is night
you combine day and night
The first section of that link explains them quite clearly.
the modulo division is to get the elapsed time of the current day
not if it's day or night
that would be the next step
@pallid axle what is the object you wanna send the variable to?
then I struggle on the next step then
the next step depends on what you want, first day or first night?
Game state literally knows game runtime regardless of players
if night first, result <= 5 => night(), else => day()
I don't need that as my game doesn't start immediatly as there's the lobby and other stuff like that, does it count inside the game state runtime ? Or when I open my level it restarts the runtime from the gamestate ?
also like I said I need a modified version of the timer as the night should be only 5 minutes compared to the day being 10 minutes
Cant lead a horse to water....
always starting at 6:00 AM so day
Then lead the water to the horse ๐ค
I keep trying to tug on the reins
@spark steppe Does the runtime from the gamestate reset when you open a new level ?
Because if it's not the case then it will be messed up as I have a menu lobby and depending how much people stay in the lobby before starting the game it will mess the timer really badly
no idea, there's a bunch of different timers within the engine
some maybe affected by level change
the tooltip shows what each timer does represent
that looks like a place to start
world indicates to me that it would reset on world change
@tawdry surge just a sphere which is an actor I think
also diversity i got some homework for you
Let's say it resets, then how would you do to guess the day and night ?
make an excel/google docs sheet, first row (gametime in minutes) add numbers from 0-100
should I use modulo 5, 10 or 15 ?
2nd row add the result of modulo 15 of each number of first row
good idea
3rd row, do your own math to figure out time of that day
at some point you will start to realize a pattern
unless you are a donkey and not a horse
๐
I started doing that on paper but was painfull, but forgot about excel so really good idea
I'm not the horse neither the donkey, I'm the water
Is there any way of making the mouth of a character move around when talking in mic?
...are you gonna elaborate?
3D character
rigged mouth bones?
ok, then i would ask in #audio how to get the audio volume (as im not aware of that part)
then all you gotta do is use it to drive the morph curve in your animation blueprint
Alright, thanks! Ill try that!
@pallid axle ok, is it placed in the level somewhere or spawned?
it's placed in the level
@spark steppe Done, but still don't know what modulo to use to guess the night and day, I tried 5 for now but it's not that ๐ฆ
you use the result of mod15 and check if its below 10, then its day
otherwise it's night
It's that simple ... bruh I'm so stupid ๐คฆโโ๏ธ I was trying to do some more modulo ๐คฆโโ๏ธ
Oh wait there's a case being wrong
@pallid axle Ok. Is there more than one?
the 15th one is night but it's at 0 so it's < 10, in this case it will be considered as day even if it's night, should I go for a %16 ?
no
no just one I'm going to use it to detect parts that collide with it after I position it to ray vector using the inherited variable or whatever it's called in unreal
you start with 0
huh ?
0-14 = 15
oh yeah
15-29 = 15 minutes
thank you so much
Esoteric question: Is there any good way in Blueprints to model a series of "if" statements that don't contain each other?
Now, I gotta clarify, because I know some people are thinking 'Branches!' Branches are great at series like this :
if(condition2) {
//whatever
} else {
//whatever
}
} else {
// etc
}```
*HOWEVER*, I can't think of any good way to do this :
```if(condition1) {
//whatever
}
if(condition2) {
//whatever
}
if(condition3) {
//whatever
}
// etc
sequence => branches
Chaining them is equivalent to nesting, not series
Key point is that Condition2 above executes REGARDLESS of the outcome of Condition1
you want a sequence for sure
Sequence is a thing?
nah, we just made that up
Oh that might be the move
you are lost
Sequence node doesnt exist, its just a myth
You definately cant make one by holding s and clicking
I'm going to die in real life now
Btw, there are also boolean operatora like and, or, xor, etc that might help here
I just got bit by that shit earlier! How do I get some lazy eval in blueprints
I thought a sequence will complete the first output before the next so long as there are no latent calls
lots of branches
and/or kinda the sequence/branch thing that you do now, and early return nodes
and the best way to avoid it is using cpp ๐
I'd sooner accept my own death
@pallid axle Ok I'm not sure if this is the best way cuz I don't really understand your end goal, but I'd do an event dispatcher in the character or whatever is doing the trace.
Then I'd use the level blueprint, assign a delegate event to the dispatcher call. You can use a direct reference to the sphere and move it to the location you pass through the dispatcher
alright thanks I'm using the sphere to detect cubes that collide with it and then levitating the cubes telekinesis style
Why not just do a sphere trace from the character and move the cubes that hits? Using an actual mesh seems overly complicated
Hi! I'm having some issues with collision. I have a spehere collision that detects overlapping actors but everytime I overlap a new actor, i have to recompile the blueprint to see the changed number of overlapping objects. How can I avoid recompiling the code everytime I add an object?
....This makes very little sense I think? Let us see your collider / object counting code?
ah fair enough
Why are you doing it on beginplay, as opposed to tick or some other trigger?
but it shows 9 because there were 9 of them last time i compiled the code
I'm just testing it... But I don't understand why it has to compile everytime I add another object
thats because things spawning inside a collider don't create an overlap event
i'm kinda surprised that you get any overlaps at all nvm, you use get overlapping actors
What if you remove the class filter?
what would be a better way to do it?
i'm curious what happens if you do it few ticks later
using tick resolves the issue
compiling your code may push the initial collider actor down the road to spawn last
you can't really predict in which order all the spheres spawn
I bet it's a race condition of some sort
so your beginplay may fire before all spheres are spawned
Honestly, if you really need this to work on BeginPlay we can keep having this discussion, but if you're binding it to something else it seems like there's no problem?
yea, that looks like a race condition
i bet it also works if you put a artificial delay (0 seconds) in the beginplay of what you had before
I'll not be using begin play... So, this shouldn't be an issue, right?
whats a race condition?
the problem described above, your main sphere spawns and calls beginplay before all other spheres are spawned
In programming, a race condition is a situation in which two parallel code paths have some dependency between them, such that it matters the order they execute. But since they're parallel, they're "racing" and so the order isn't fixed
They're notoriously hard to debug
yes, it does
Not least because they're intermittent. As you just discovered, a race condition can always resolve the same way given a certain set of preconditions. But the conditions change, suddenly the code breaks
Or begins working, in your case
So, how do you debug them? And how do I identify race conditions...
This one's a bit of a bitch because it's not YOUR race condition, it's Unreal's
How can I add custom settings that players can set? Things like custom camera speed or scoped speed or whatever
And actually you figured out one of the best debugging strategies for yourself! If adding a short delay resolves the issue, you've definitely got a race condition
thanks, @flat coral @spark steppe!
Could someone help me?
Never ask to ask for help.
Hi guys is there a way to put the timeline of a video into percentage and control it ? I can't find a solution beside making frames of the video & giving for each frame the accurate percent.
What are you using to play video, just MediaPlayer?
yes as a media texture placed on a widget
I don't know about percentage, but you're looking for the "Seek" command I believe
ALSO you might be looking into the Scub standalone mode https://docs.unrealengine.com/4.26/en-US/BlueprintAPI/Game/Cinematic/Scrub/
Scrub
Google something like "Seek vs scrub" if you don't get the difference between them. I just happened to work with media playback before somewhere else, so I knew the words to look for
could some one help me with a kit i just brought
is the
this
how do i change the main menu
I doubt anyone here specifically knows the ins and outs of that particular template.
Do you know how to make a menu in general?
nohang
wait
i found a wa
no
wai
tno
how do i change this?
how do i change the background to a different picture?
Open up Brush
could you help?
wait so open brush?
Wait on unreal?
I'm just stump. On Inventory Systems. I tried google. I tried the market place. I tried 40 + video tutorials on inventories. and I'm just just flat lined stump. I was hoping for 1 more try. anyone have any ideas.
conrad you wanna help me make this game?
Seems like the whole "set video frame based on percent" thing isn't possible, I will then do it on a rough way : all the frames of the video (125) are gonna be set each 0.008 meaning frame 125 equal 1 on the float variable. Might sounds weird but that's for a project in which the analog input will control the video based on the percent of push on the trigger. Now the only way seems to be a event tick switching the frames based on this percent system & the 0.008 thing that I said earlier. Also the frames are 15kb so no problem to switch them smoothly
Does anybody know how to fix this issue? I have finally encountered it...
https://answers.unrealengine.com/questions/246012/spawnactorfromclass-rotation-not-working-as-expect.html
No, multiplayer
My print statements say that the client control rotation is a solid zero
Spawn actor from class wont influence it at all
The server is handling all this
From player controller -----> gamemode
I want to detect actors along a spline mesh..
Earlier, I set up an actor (detector) that could detect overlapping actors for that, I used the "Get Overlapping Actors"
But when I try to make the spline mesh, i end up having to use an object reference for the mesh to be used to detect actors but the "get overlapping actors" function can only use components to detect overlaps
How do I solve this?
Could anyone tell me why it tells me it detects an infinite loop please ? Even if I set a condition on the variable "Timer" to keep increasing until it it's not smaller than the variable "Max Timer" https://blueprintue.com/blueprint/hqcau3hb/
Using "get overlapping components" help but I need actor references
this is a super beginner question but,
I have a bool on 1 bp but I need to transfer it to another bp, I need to do this multiple times.
is there a way to do this without just creating multiple variables?
I need to be able to bring that bool back to the first screenshot
both of these images are from different blueprints
This is in the Player Controller
This is in the Game Mode
When the player spawns they are always looking 0,0,0 and I cannot fix this...
It works if i run it off of beginplay instead of space bar
you could probably get the output of the 'getactortransform' and change the rotation from there
Nope ive tried
Does jackshit
This forum highlights the issue...
https://answers.unrealengine.com/questions/246012/spawnactorfromclass-rotation-not-working-as-expect.html
have you tried setting the rotation right after you spawn them?
right before you possess
also, how have you gotten ur bp editor to look like that?
An alternative flatter appearance of Unreal Engine 4 Blueprint nodes in a minimalist style. Improves the readability of nodes.Suitable for the latest version of the engine.To install, you need to unpack it into the folder with the engine with the replacement of files.This design pack does not affect the stability or performance of the engine in ...
Yeah setting the control rotating does nothing
This is so fucked
thanks
Yup
so what do you want to happen to the rotation?
hello, Im trying to add a widget in screen space inside the HUD class.
the problem is that the widget never shows.
tried the same widget and setup with other actor and it works.
the hud class is also there and set.
anyone know what is happening?
I want the character to spawn with the same orientation as the player start
But it wants to spawn looking 0,0,0
wrong channel, i believe this belongs in #umg
have you created the widget then added to viewport?
have you tried spliting the 'get actor transform' output, then just excluding the rotation?
yeah
the widget is a component
Event if i set it directly to a hard value it does nothing
thanks
you getting any errors?
A control rotation value of 0,0,0 is overriding everything because of the way unreal split apart the way it handles rotation. Ridiculous
They are dumb
What this means is you can make a working character selection screen for dedicated servers or any type of server. For this to work the player has to be automatically assigned a team then automatically spawned.
They cant linger from the time they join the server to the time they spawn.
It all has to happen immediately for some fucking reason...
Makes lobbies impossible if you want your character to spawn looking the right way...
yea well I know nothing about multiplayer in unreal so Im no help sadly
I wish U luck tho
https://www.youtube.com/watch?v=4Zm_uOjyImI
how, do you, do, this, I've been on a very very unfortunate journey, after seeing this was possible I did a ton of googling and found a project from 4.13,
TLDR: I went to 4.13, attempted to package the plugin that was in the project, and it deleted the entire project that I've been working on for 9 days, so even if I die, I will figure this out, I've lost too much now not to
thankfully, beyond thankfully, I was able to recover a decent chunk of my project with Recuva, but the mental strain and damage has 100% been dealt
Unreal Engine 4.18 now supports Android Camera devices using a native plugin. Using the media framework and this new plugin you can capture video from any supported camera on your device and place it into your scenes.
are you able to make a literal bool then use that same bool on a different bp?
i think what you were looking for, in your request, are functions
if im not mistaken you can store all of that in a function
np
I totalyy forgot return nodes were a thing lol
Hi,. in multiplayer games what really matters most is the player controller
then the player controller posses the character.
if you character has a camera it automatically assigns that as the controller view (the actual view for the player)
I dont know if it's that what youre asking, sorry I didnt read all way through the discussion
hi
can i ask here about this?
i want it to be scrolled i test it on the right side so i dont do anything stupid
I have a wheel that has to turn all the time, how can I do it differently without using EventTick?
to optimize which option would be best
Tick.
If it needs to look smooth.
Alternatively you can do it in a material i think.
there is no other option?
What would you expect?
For something to rotate smoothly, it must be updated at atleast 24fps
I'd say way more but
Depends on your logic
then EventTick would be active
It should only move while visible
Custom Loop or Timer that is only active when relevant
Right, so you need logic to stop that
or Bind and Unbind?
Is it a "driveable" wheel, or just rotating wheel prop?
rotating wheel prop
Then you can make the rotation in material.
Rotating (ambient) meshes in your world adds a dynamic element, but doing this on the CPU and having to pass it to the GPU each frame is a relatively slow operation. Without realizing you may be updating your collision every tick too, causing overlap updates and hurting performance even more.
Why is tick a problem? Rotating something smoothly is literally the type of stuff it's made for.
This is also a great approach if you have enough spinny things that are cosmetic only that its worth the trouble.
"This works... but lets spend another 5 hours optimizing this trivial thing" ๐
"Let's optimize tick out this one actor in this program with literally thousands of objects updating all the time"
I spent 2 weeks trying to reduce the movecost of my ai's, while already having 5x the amount i originally desired.. what more to optimize
I mean don't be dumb, but computers are fast.
Yeah
They definetly can handle a thing or 5 on tick, so i wouldnt worry about rotating anything on tick in thr first place
I run a full drivetrain and physics sim on tick in blueprint, you can spin a mesh.
Another project does over 1,000 line traces on tick in like 1ms
computers are fast as shit
Yepp yepp.
admittedly the trace example is in c++, went from 12ms to .2ms moving it to cpp
Its insane how that helps
When moving the ai to cpp
I gained 8x performance
Identical code otherwise
I would never give up BP tho, it's so much faster to prototype in. I wouldn't have known where to start in some of my projects without it.
and if BP ran exactly as fast I'd probably never fire up Rider again.
Yeah i agree. Theres a reason it started in bp ^^ and further development starts in bp
Moves it to cpp when itw closing up to completion
guys when i enter my stage the camera doesn't follow the player until i press f8. i used to click f8 in the past to get a free camera movement so i can see whats happening but now. i have to click it every time before i start playing
Are you Playing or Simulating?
simulating
F8 is possess/eject
Play instead
simulating starts it up without possessing a pawn
but its not convenient to test in playing every time it takes more time
well then reach for F8 or figure something else out.
Play will play the current level, not from game beginning
Play + F8(eject) = Simulate
Simulate + F8(possess) = Play
assuming you aren't doing anything special in Gamemode regarding player pawn
What's the struggle with just pressing F8 anyway? Unless the keyboard is missing that key, then it's understandable.
Cant you set Spawn Player at Current Camera location?
IDK maybe, isn't it called Play from Here or something?
Right click -> Play From Here
yeah should be where you can select simulate, etc.
starting a game standalone take way too long for testing on it
Testing on a toaster?:p
Just play from current viewport or new window lol
wait till you gotta launch the editor every time. Although startup batch files are great.
whoah didnt mean to take up half the screen dudes
okay okay now i understand i thought that play is same as run a standalone game and simulate is how to usualy test but its play selected viewport
sorry for the misunderstanding
and thank you for the help
Play plays the level, standalone is a bit different.
yeah thank you
Is there a way to get a static mesh array of all the instances from an instanced static mesh component?
Uh
Whats the purpose
What are you trying to do?
Its just one static mesh afaik.
Hello everyone
I have a problem with the GUI widget, I have custom mouse pointers, I set them per hardware in the settings configuration. It works pretty well, I can change the mouse pointer in game... In my widget I have a button, note that I see my custom cursor in game and in UI because in pc, I set the mode for both.
The problem is that when I click on my button in my UI, I want to switch cursor. but by clicking on it, nothing changes as long as the mouse cursor is located in the user interface.
If I click on my map, I can see that my cursor has really changed
maybe it is built-in engien behavior that when UI loses focus it changes cursor back to default?
Anyone knows why all inputs automatically release after a couple of seconds in both UE4 and 5? This happens also with enhanced input. The issue is that if you keep an input hold forever, it would automatically release. Anyone knows anything about it?
does this happen in a new project?
Never experienced such a thing
But it has many instances of that one static mesh
What exactly is your purpose
you can setup lod's for your particle system
What are you trying to do
where?
I'm just wondering if it can be done
It cant
I see
๐ค why can you get everything else but the mesh itself
Yes, just created both a project of ue4 and ue5
I don't fully understand how it works, are the instances their own meshes or you are saying every instance is collectively one mesh
^
Hm
In the gpu
Ah
If you want an array of meshes youd need to use regular sm components
Okay that makes sense now
If you wanted to change some of them, it needs to be part of another ismcompomemt
Thank you I understand now
click Add LOD, then set LOD index to 1.
right click on a module that you want to modify and select Duplicate From Highest/Higher. then you can change its properties.
Never mind, was the fault of my shitty keyboard
you can set it up in such a way that after certain distance it no longer spawns particles or spawns less particles.
sorry for long delay, im back to the problem again, but how can i do it? how can i get a camera in split screen? there are four cameras, and as far as i know, rotating it to one of them will rotate it on all screens, i cant rotate it "locally" to every one of them
I don't know why, but the opposite is true for me, the closer I am to the particle, the worse it is seen, how to change it ๐
can someone help?
#niagara or #visual-fx I also recommend sending pictures otherwise we are left guessing what you mean
For LOD 0 i set 0 distance and i don't know why the smoke completely disappears when I'm closer
it should be the other way around
Random semi related side note. Would recommend using Niagara in the future as Cascade is getting deprecated in 5.0
This is #visual-fx question
ok
so im trying to make a material instance to use for all other 3d meshes, but I dont know which parameter to use, to add textures
I thought material stuff was blueprints? oh well sorry
A quick question. Can I create multiple arrays using the same structure or would they overwrite eachother.
A structure is just a definition of a container of data.
No reason they'd override each other
Like, if they would, why would even an array of structs work..
Just had to check. Thanks for the answer.
^^ Np
hey guys I need to create three different pawns. They're basically the same in the main features and they are only different in things like mesh, materials and a bunch of variables. What's the best way to do it? Do I need to create two child bp or is it possible to spawn three different pawn from just one bp? I would like to avoid extra code/work, thanks!
You cannot do that in local coop as that is one world and there is one object to rotate. The only way to do that with world in a local coop is to have four objects and hide three of them for each player which is not ideal. A real manager for this would be best, but otherwise recommend screen space components.
Id go for a Base Char and Childs if you want the differentiation between to be fixed
If its something like "yeah lets give that guy 10 more health or so" you could just use one actor where you expose your variables and just adjust them slightly
Yeah, really just depends. You can either create Asset styled children of the one class and change stuff in them, or just do it all in one class with a switch of some sort. Just depends on scope.
If its just small stuff, go for it
If every character has its own move set, special abilities or whatever it might be better just to avoid clustering everything in one place
But if you just want another skeletal mesh and everything else stays the same, id use just one
can i delete this stuff or will it cause a problem in the project
You can delete everything in Saved but you'll have to recompile shaders
not all saved file i just want to remove the auto saves file to gain some space its 100 mb
sure go for it
okay thanks
because unreal started to freez from time to time and i found that while copying the game folder there are some files that freez everything idk why
what about the files in source can i delete them
Source has all your C++ code.
๐ค you might need it if its there in the first place
else you would need to manually edit ur uproject to remove the cpp portion
Uncertain about BP only projects, but I semi regularly ditch the following folders and rebuild.
.vs, Binaries, DerivedDataCache, Intermediate, Saved
usually the source folder wont be there on a full bp project
but at anytime of the project you pressed create c++ class
it will be there and .uproject will also be modified to include the module
if you made sure you dont have any c++ thing, you can remove it safely by also editing the uproject to not include the c++ module
Tried it on a different computer and not getting the errors. I suspect reloading the editor would've fixed it 
When using an Interface , does one usually make helper functions with the interface as well to help communication between two entities?
Feels like i'd be better off just ditching the interface, relying on references and a system of inheritance..
Like when hovering a building i'd like to check if the selected actor (stored in playercontroller) meets the requirement for interacting with it in a meaningfull way
But to know this i have to get the data from the selected actor, which may or may not be an NPC
ERh.. this probably doesnt make to much sense
References comes with its own set of problems. IIRC when a BP references another BP it has to load that BP and all its references etc.
it can become very very heavy on memory
https://youtu.be/j6mskTgL7kU This is a good video on the subject
In this presentation from Unreal Fest Europe 2019, Epic's Sjoerd de Jong offers an in-depth look into Blueprints. Best practices, dos and dont's, and recommendations on how to utilize Blueprints to its full potential.
During this advanced class we will go into how to use Blueprints in a future proof and scalable way. We will look into how to c...
I'll give it a look. Perhaps it can give me some insight into how to structure the communication between these classes
Thanks
That whole talk basically boils down to, don't cast unless you have to and always cast from the less persistent object. Aka don't cast from the character to the door, cast from door to character
My scenario is between the npc and the building, interfacing through the controller so to say
Between a selected and a hovered object basically
which may or may not interact together
If you can use an interface or a dispatcher that's the most efficient way, since it won't load the receiver.
Hovering you can get a direct reference at runtime
I want to base the fresnel exponent of a material on a stats value (health) any advice on how to do that? ๐ง
could do a parameter?
then when the stat value changes you update the material parameter
look up material parameter collections
But can I access my actor's stats on-the-fly in a material?
I may get around using dispatcher actually. NPC must as i see it have a reference to the building in any case
the material doesn't look it up
the BP/code looks up the material and sets the parameter's value
Ah I see, so I cannot add that code in the material blueprint but in the actor's blueprint?
correct
think of it as the material reading a variable from a Blueprint (sorta)
Thank you for pointing me into the right direction ๐
@gentle urchin If the ai is gonna interact with the building based on selecting it I'd actually use an interface and get a reference to the building from the selection process.
If the thing you select has the interface implemented it'll do a thing. Otherwise it will ignore it, no specific reference needed
Its gonna display if the selected target (npc) can be assigned to the hovered building. I suppose i could have two more interfaces, one for building and one for npc and do the check that way
Not sure i can keep them away from hard referencing each other anyways but perhaps ..
Actually it should be very possible, nvm
In a city builder type it shouldn't matter. Anything should be able to cast to anything. Only the visuals are the issues if you have multiple meshes for each building and hundreds of citizen looks, but that's different issue that avoiding casting won't solve.
So i should just let my building cast selected actor to npc type with no second thoughts what so ever ?
Sure. Your NPC class shouldn't be that big in a traditional city builder. At most it'll have softrefs to it's visual stuff which will all be static in a datatable or dataasset anyhow.
The only reason to avoid casting or hard referencing is if the objects referencing each other won't always be loaded together. But in the case of buildings and NPCs in a city builder, they pretty much always will be.
Yeah true. Ill go with casting for now then
Converting to bpi would double up alot of the work already done in the npc class
Think ill ditch my original interface aswell
Ty for input
Um, excuse me. May I have any tip how to find a solution?
My "Cast" block failed and I dunno why.
"Shape Factory" is a soft object path variable with blueprint of the "SShapeFactory" class-actor, so i've assumed this "Cast" block should work, but it doesn't.
how do I change the line that connects nodes in blueprints? I don't know what I did but the white lines aren't bold anymore on one blueprint
I have run into that. Its a bug I think. try reopening the blueprint
or if that doesnt work, maybe try reopening the project.
No. I just clicked it and nothing happened
I'm going to guess that the conversion of that structure to a soft object reference is the real problem. A structure is a means of holding data, I don't think converting it to a soft object reference would work.
This node appears to retrieve the path that would be stored in it, but I'm not sure how one would load data from this path.
unreal engine freeze from time to time and when i try to copy the project files some files make the speed reach 0 and freeze what's is wrong with them and how can i fix it
That's more of a #ue4-general question rather than blueprints, but make sure UE is closed, then try copying, as that then rules out that it has anything to do with Unreal Engine. There's literally a hundred different things it could potentially be otherwise, from faulty hardware, to too many read/write operations being performed on your drives, to your CPU being overtaxed, to your virus scanner being a dingus, etc.
how do you alter a material's parameters via blueprint?
You can create dynamic material instances and modify them (put the parameter names in the Parameter Name field, and set the desired value), then you set the mesh to use that instance of the material.
I have this odd issue when making a new level. I have this player controller and these pawns that all work on one level. Then when I create a new level with a new gamemode and assign everything, it doesn't work. For example, the pawn spawns in but isn't animated and doesn't move.
im working on a floating health bar widget and i was wondering what would be the best way to show / hide it, would anyone have advice? the obvious choices would be to use a timer of some sort or a retriggerable delay but somehow those methods feel a little off to me
Are cross-posts allowed here?
"I'm wanting to understand how I can implement the ASD or ASDR concept from Steve Swinks 'Game Feel' book"
#ue4-general message
If you didn't get a satisfactory response it's fine to ask in other channels after waiting for a while (as long as the channel's topic is relevant)
thank you @earnest tangle ! Was actually hoping for a real good lively discussion from my question
anyone got any ideas
How do I change the default character that spawns in when I run my project. We also look at how you might set up per map spawns and manually control characters you place in the world instead of the default spawn.
thats not the issue
I already know how to do that
but the issue is that the player doesn't function
like the player wont move
yes
put a print string in each of your parts( Player Controller, Player Character , Gamemode) so that you know that each one loaded
well I know they all loaded when looking in the level viewer.
My player can turn not move
Check to make sure that your selected game mode and game state are inheriting from the appropriate classes -> ie. If you're using a game mode that inherits from "Game Mode Base" your game state must inherit from "Game State Base"
alright the GameState was not but now it is
nothing works still
but its an issue with the gamestate
oop nvm I got it fixed
that is good to know
I know when I first encountered it, I was struggling trying to figure out why things were just broken in my level for several hours.
I think it has to do with functions that exist within Game Mode Base and Game State Base that need to communicate with each other before allowing players to spawn or perform inputs and the like.
ah
another question I have is are there any good tutorials for game logic. By that I mean picking players and assigning them teams by chance.
Blueprints go in order right? but they do not wait for the nodes to "finish"
There are some latent nodes that do have callbacks and things that can execute later, but anything else will execute in order received and basically instantly for most things.
Yea I wanted to make something like "stages" so like it calls Pre-Exec then exec then post-exec
but it literally just runs at the same time lmao
probably have to call them at the end of each stage
Well, if you have multiple things that you want to do before reaching a stage, you could have booleans set up for each of those things that need to be true before the next stage is called. When any part of the stage finishes, it can set its boolean true and call a "ready" function that checks all the booleans from the things that need to be done in the stage are true, and if so, then proceed to the next stage.
Hmm could have like a success or failure check
Hey all, got a situation where I need two actors to be tethered together. Actor A heavier with free movement, Actor B with restricted movement [Need Actor B to only be able to move so far away from Actor A] Imagine a character attached with a chain to another.
Is physics constraint best for something like this? Or would setting some max distance between work better in BP?
What do you think about this?
hey guys,
anyone have experience working with datatables?
i am stuck importing a JSON file , i wanted some help with it
should be success || proceedWithFailure btw
do call to parent instead but yeah, this way of doing things should be possible though,
just wondering if it might feel "too restrictive" if you plan to use it for many many stuff
Doesn't really matter since the dispatch would still trigger :o
incase you need to change the callback names you would only need to change it once ๐
And I can bind dispatches to something else aswell ^-^
Click Add and then import your json o-o
umm yea about that the JSON data isnt straightforward
"Name":0,
"time": {
"day": 0,
"ms": 815000
},
"imu": {
"lax": 0.12,
"lay": 0,
"laz": 0.36,
"avx": -0.0625,
"avy": -0.1875,
"avz": 0,
"orix": 252.875,
"oriy": 63.6875,
"oriz": 54.1875
},
"bmp": {
"tmp": 23.367091,
"prs": 23.367091,
"alt": 1632.150391
}
]```
me too but JSON file is the one my seniors gave me which is coming from the device they are using
i cant understand how the structure would be made for this
i tried making multiple structures like time,imu,bmp and then get those structure in a structure but no luck with that too
i thought this might work
it gives me this error when i try to get my file into unreal and setting its structure
its where the time:{ starts
so in your case
you need a "master" structure
then only a time structure
then only everything else
i would prefer cleaning up the json first
before importing to unreal
thats what i did ig but it give me that error still?
any idea why?
this one @remote meteor
let me try again
so this was the right way to go right?
[
{
"Name": 0,
"time": {
"day": 0,
"ms": 815000
},
"imu": {
"lax": 0.12,
"lay": 0,
"laz": 0.36,
"avx": -0.0625,
"avy": -0.1875,
"avz": 0,
"orix": 252.875,
"oriy": 63.6875,
"oriz": 54.1875
},
"bmp": {
"tmp": 23.367091,
"prs": 23.367091,
"alt": 1632.150391
}
}
]
this should be the correct json format
urs is missing a braces
hi, what is the best way of detect when there is an object close to the player? there will be several objects scattered around the map
using a collision box on the character be a good choice?
OMG i should jump off a cliff ;-;
thanks for the help @remote meteor
Anybody able to help with my issue? Want to anchor a character to a point so that they can only move so far away from it.
yes, have a collision object type of "interactable" and such, have collision sphere/boxes on each side to detect them accordingly when they overlap
physics constrain is only for within the actor
you can try physics handle but im not very sure
what is your intended behavior when Actor B reaches the boundary?
For them to be unable to continue moving away. I want them to only be able to move within a radius around Actor A.
So they can still move, and move back towards Actor A. Imagine them chained up to a point
But I want Actor A to also be able to move.
Actor B will be dragged by Actor A.
Actor B can move, but only within a certain radius of Actor A.
I've calculated distance between the two. The issue is the constraint method itself.
i imagined a very stupid way of doing this but hear me out
have a hollowed sphere just to block actor B
๐
That is a very stupid way of doing it. And bonked myself on the head for considering the very same thing earlier too ๐คฃ
so stupid it just might work
I mean maybe it'd work. I don't know, seems messy and prone to other issues down the line ๐
yeah
it would work just fine
๐
the actor B's object type would be the issue since it would need to be a unique one
i dont think physics handle can do this
maybe tick to check distance, if too far then set back location
reading other people's(marketplace) BP becomes very hard to understand/read when they implement multiple function as you can't grasp the scope, is there an easy way to make me read, remember or understand other people's code when they implement functions?
first understand the purpose and intention of such, roughly grasp what sorts of nodes/codes/abstract you would need to achieve those, and look for them
What are actors A and B ? Players, AI, Static Meshes?
Hey folks, I'm trying to debug the value of a variable for an animation instance in an animation blueprint. In typical blueprints, you can watch a value and hook the debugger up to an instance, but I don't see any such system for animation bp. What are my options for debugging these?
easier said than done, I'm looking into a function in which 3-4 more functions are implemented into that function and it's sub functions ๐
Two controllable characters
A is heavier and in control of overall movement. B is lighter and cannot move beyond the radius of A.
So player B cant get too far from player A ?
indeed, it does takes some time to be able to scope what to expect when reading codes
Correct.
and if A moves , B gets dragged
ah thanks so I guess no easy way exist and I have to find my way through these matryoshka dolls functions...
B will get dragged by A if it hits the radius, yes.
But that's not so much an issue, it's more the constraint around A that I need whilst controlling B.
And did you mess with Physics Constraint Actor ?
How do i do (AND OR)
AND OR
AND then OR
yes
what is the or for
If you need both to be true, then it's an AND. If it's either or both, then use an OR.
weather waponID = 0 or WidgetInUse? or if both are waponID = 0 or WidgetInUse?. I fell i might be over thinking this.
Ill just use or i might not need and.
This works fine
Hey guys
I wanted to use a "hide bone by name" node, but it's hiding all children with it, Like I hide "Spine_02" My entire upper body goes invisible for some reason, I'm on 4.26 version, I saw some videos my node dosent work the same way, any ideas ?
Hey everyone ! I'm having a hard time finding how to get Audio from my desktop or microphone. Would appreciate any help ^^
Trying to change blueprint parameters depending on what I'm listening to. I know I have to use AudioCapture component, but it auto selects my microphone, and I want to choose the sound coming from my desktop (like the StereoMix)
Why can't I get the viewport tab for blueprints that derive from scene component?
Sorry, didn't see the ping. I don't think it works with movable / player controlled characters. Couldn't get it to work anyway?
Maybe they thought you didn't need one cuz it can't have its own component list, and needs a host actor for full functionality
Can't it have a component list though?
I can have other scene components attached to it
Don't think components can have their own components?
Actors can make a component hierarchy yeah
In C++ I seem to be able to subclass scene component then attach other scene components to it from within that class
So I thought I could maybe do the same in BPs
Anyone have any other ideas? @versed sun ?
can someone help me with this code, i wanna see what I'm doing wrong
im trying to make a system so that when the projectile hits a enemy it'll cast a line trace to a closest enemy and then rinse and repeat
Whats the problem
Well it looks like it's going to be chaining in order, first of all, rather than based off closest but that's not your problem. the linetrace might be hitting something you didn't intend if you haven't set it to ignore that
i see
im not sure , i tried out the Physics Constraint and kind of got it, but it was keeping Actor B exactly X units away, not Less than X units
It is. It's hitting the first hit actor. Need to add that actor to the next trace's array of ignored actors.
Any chance you could share how you got that working?
It just doesn't seem to constrain for me?
sure,
it works now, thanks
hey everyone, im trying to get the amount of ai focused on each individual player, is there a way I can do that?
that bp is not really working well
i dont know off the top of my head, the ActionRPG sample project is built for mp and the AI has to determine which player to attack as far as i recall
hmm that would eb pretty useful to look at is it on the mp?
its been one of the more helpful projects for lots of things for me
to look at is it on the mp yes? it is meant for mp as mentioned
hmmm, you search for it or go through learn tab?
through learn tab its dated 2019
yo its so useful lol
๐ there's BTs, montages, gameplaytags, list goes on, its pretty helpful
Is a good way to do quests is to have an array of quest marker blueprints for NPCS to walk to, and execute dialogue options from those quest markers?
for instance, have arrays of transforms for each npc
i found exactly it in seconds
how many different data bits are there for your quests? can you list them?
there's a struct for dialogue options that contains ways to give and take items from a player's inventory
i already have a functioning dialogue system
well, i'll try that. havent gotten into data tables much but i really should
its flexible enough that you can expand or trim without having to variables
ive been using arrays instead of them so far
they cannot be updated, you can only pull from data tables
you would get the row of the desired quest, that returns a struct of that row's data (store it as a var), then you can call that struct wherever
Any help from others appreciated, still trying to tether one character to another. Physics constraint does not seem to work.
Recap; Need Character A to move freely, whereas Character B is tethered and can only move a certain distance away from Character A
#legacy-physics would be a better place to ask
But it's not necessarily a physics related question. UE's Physics Constraint may not really be the solution?
How can I make my health bar widget disappear if no enemy is in sight (and appear when near to an enemy)? I searched high and low but couldn't find a way to do it ๐ค
pawn sensing would work
Pawn sensing?
Ah that is a way to make enemies sense the player, right? Could this be done for the player, to? So that I can activate his health bar when near the enemy (from the player perspective?)
https://www.youtube.com/watch?v=XUFKEJRTaGg This might help
Hey guys, in today's video, I'm going to be showing you how to create a system in which your AI cannot move when the player is looking at it. Similar to a weeping angel, or stalking statue. You can do the opposite of this, so that the AI can only move when the player is looking at it.
#Ue4 #UnrealEngine4 #Ue4Tutorial
___________________________...
im doing a simple tick check against distance to player - pawn sensing uses tick anyways so its similar performance cost. (less if you consider its just tick and not all the extra pawn sensing stuff)
against every enemy at all times? surely that would create a performance hit
lol, each enemy runs the tick. its not that bad, i usually have 60 AI at a time
technically its on a timer that fires every second, but timers are on tick, so the difference is only running the distance check every second
That would work, too, I guess? If I can pull that off ๐ค
Sounds good, too, but how does that look in blueprint?
I can't make a distance check "distance to actor" for example in my blueprint.
mine is sp so i get reference to player
How are you doing it?
the "get distance to" node works
when the AI spawns I start a looping timer that fires it's delegate every second. I clear the timer when the AI dies. You could also control this timer more accurately (like start it when they detect player for example)
the health bar belongs to the AI, so i hide it or show it based on distance check result. I also use a do once for hide/show and the opposite resets the other
cant says its the most optimal, i threw it together because i thought seeing health bars would be good
what am i supposed to put here
AnimInstance which lives in your skeletal mesh - the mesh that you set the AnimBP on
you could get rid of the bottom half of that and just connect it up to the 'and' node
I guess I'm in the wrong BP for it to work then ๐ค
the player controller?
I like it!
good idea
nope, your character, that's where the skeletal mesh lives
it may not work in functions
Character controller
like i said, didnt care much to optimize it, wanted to test to see if i like it/helped me as aplayer
get self
oh nah I meant @viscid python 's 'get distance to' node
ahhh
eventually ill try to optimize it....
Yes that must be it. Hm, I really can't seem to get that done ๐ค
It sounds quite easy to hide the widget but it seems it is not ๐ค
Doesn't work there ๐ค
what i posted is in a function btw, the Timer calls that function on a 1 second loop
can you post what you've written so far?
Mesh > AnimInstance
I'm on the event graph of my player and I have not written anything because I don't really know where to start. I have an event tick for my foliage interaction and just wanted to add a "get distance to actor" node there but it's not as easy as that it seem ๐
try unticking the box on the top right when you right click, I think it says "show only relevant" may show up
mesh anim instance thing
oof
this is what youre talking about right lol
thank you
Hello guys, im making a spline mesh, everything is working but for some reason the mesh is locked at world origin and does not move when I move the spline it self
Indeed! Now that was helpful... I didn't know that... ๐ฎ
since i opened the editor anyways...
yes, now get anim instance has a cast in it (I'm pretty sure) so you wont need the cast anymore
they need to cast it to the specific anim bp, anim instance is generic
However, I still don't know how to get a reference to my enemy there and how to check if a certain distance is reached etc. I'd probably need a tutorial. If only I could find one ๐ค
Thanks
unless Dieton doesn't need specific variables ๐ค
you have more than one enemy right?
Indeed
something like this would work probably
@viscid python
You'd wanna put this in your AI blueprint so that it can check the distance between itself and the player
This is assuming you are in singleplayer, multiplayer gets more difficult
It's not super efficient, but would work for the time being
Oh great, that looks good, I will see if I get this to work, thank you ๐
https://www.youtube.com/watch?v=4Zm_uOjyImI
how, do you, do, this, I've been on a very very unfortunate journey, after seeing this was possible I did a ton of googling and found a project from 4.13,
TLDR: I went to 4.13, attempted to package the plugin that was in the project, and it deleted the entire project that I've been working on for 9 days, so even if I die, I will figure this out, I've lost too much now not to
thankfully, beyond thankfully, I was able to recover a decent chunk of my project with Recuva, but the mental strain and damage has 100% been dealt
BUMP
Unreal Engine 4.18 now supports Android Camera devices using a native plugin. Using the media framework and this new plugin you can capture video from any supported camera on your device and place it into your scenes.
Why are you guys sending data to anim instance instead of polling the pawn from the animBP
anyone know if there is a way to get a different wildcard type for an input value and a return value? right now the moment i set the input value to something it assumes the return value is the same type
Have the output not as a wildcard is your option
Whats the usecase? Why would they differ?
yea that doesnt really solve the problem, the input is a struct, the output is a different struct, but there different based on the input vs output [its a wrapper for json->struct->http request->json->struct
input is a request, output is a result
Doesnt sound like something youd use a wildcard macro for but what do i know :p
i mean. its not a huge deal, it just means i have to do ONE addional node after the macro that converts the returned string from the request to the result json object->struct, i was just hoping i was missing something because this is like 99% there
Okay this is driving me mad and I have been working on this problem all day. Basically I have a wasp pawn that the player controls. When you sting another wasp, using the Z key, a sound plays on attack and another sound plays if you impact the other wasp. To calculate impact I do a series of sphere traces around a stinger socket. If the z key is also held at time of impact, the stinger lodges in the enemy until the z key is released, dealing increasing damage while the z key is held (and the stinger is in contact).
If players just tap z to attack enemies, everything works fine. If they press and hold z (assuming they hit properly), the logic only works the first time, then always defaults to the 'tap' logic forever more, regardless of how much time I wait or what enemy I hit (it doesn't matter how many 'single tap' attacks I do first, the logic always breaks directly after the first 'press and hold'). I figured this was a boolean getting set once on the first attack then not being correctly reverted. But I can't seem to find the problem.
I've got a timeline to track the progress of the sting. Normally in the 'tap' attack it starts at 0 and ends at about 1.3 before resetting to 0 (manually overriden with 'set playback position' and not triggering updates or events). When I press and hold, I freeze the timeline at whatever point in time I hit the enemy and the timeline stays frozen until I release the z key, at which point it reverses to 0 (ie I set my timeline playrate to -1). This all works well the first time. On further ocassions, even though the timeline freeze goes through, it just doesn't seem to do anything and the timeline continues playing.
Is there something fundamental I'm not understanding about timelines? When I do 'play' on my timeline, am I creating a new instance of the timeline or something? I have it set to not looping, so I assume if I am reversing the timeline and I get to 0 time (my lower bound) it won't go any lower or wrap back around to its maximum time?
There is atleast a play reverse. Not sure if it changes anything but the logic for reverse already exist. Id atleast stick with that
try Play from start , not Play
the secont time you sting , you are playing from the "end" and it cant do anything, so Finished just fires
I don't want finish to fire. The logic after 'finish' is how I end the sting when I do my single tap attack. After 'update' I check how close I am to 0 and once I am below 0.01 I end the sting that way.
I can use 'reverse' but will reverse work if I have already set my play rate to 0? Will it set my play rate to -1, or does it just do (current playrate*(-1))?
Im not sure what it does internally tbh
does anyhting happen in Update if you Play (Not play from start)?
Perhaps it really is just playrate*(-1)
Well doing reverse with playrate 0 just crashed it xd