#blueprint
402296 messages Β· Page 807 of 403
also frame rate seems to change how height the character jumps
by a few decimal places
yeah
like at 60fps its exactly 125 units. at 90fps, it's 125.000012 , at 35fps, it's 124.xxx
maybe you can use the delta seconds to correct that ?
sure if you make your own jump system
although i don't know why you need it to be that exact anyways
I need to replicate some minecraft mechanic to feel exactly the same
like the jump height, speed,...
What the unit used to calculate speed in unreal ?
Hello! I am working on a game and I would like help with a dynamic gun system. I am trying to make it where when I pick up a gun in scans for a texture with the same name, but with 'img' after it. I am trying to find out how to get the string and have the game search for a texture with that same name then add that to the UI.
that is the code and all that happens is the ui updates the opacity
Does anyone know if the "While loop" node Executes at least Once if i pass "Flase" on the condition?
double click the macro and see for yourself
Why not just add the texture as a variable in the base gun class and then get the texture instead of doing the file search?
well im trying to make it dynamic so i dont have casts
If it is in the base gun class where each gun derives from you don't have to have casts. If the gun slot 1 is of that base gun type then you can just call get texture
oh thank you π
How are you guys handling your jumping in the anim graph?
Try using a delay node
Maybe you dont have TurnRate and Turn axis in Project-Engine-Input?
dose anyone what this warning message is as I'm confused how I got it AttachTo: '/Game/ThirdPersonBP/Maps/UEDPIE_0_ThirdPersonExampleMap.ThirdPersonExampleMap:PersistentLevel.Weaponmaster_C_0.DefaultSceneRoot' root component cannot be attached to other components in the same actor. Aborting.
Are you using any "Attach to Actor" type nodes involving your Weaponmaster object?
yes
You might have one of them hooked up incorrectly. Like you're trying to attach the root component of the Weaponmaster to something within the Weaponmaster itself.
found it and fixed it, thanks
my layer blend per bone worked fine yesterday but now it doesn't want to work , the character can move sideways and backwards but forward it jitters than plays the sideways animation
How would I do a (wait until this condition is true then continue)
Need more context for that. What is the condition and the use case?
My character turns invisible then it will wait until the velocity is over a certain amount then turns visible again
I currently have so in the event tick it's always checking with a boolean but that has just created more problems down the line
any help would be appreciated
Does anyone know how I can start scene capture manually?
Right now I have tick disable and enable when want to start capture, but doesn't work.
Should just be a node for it
Realistically, this would be best done in a different object that can be disabled or thrown away when done. What you're trying to do is usually called a gameplay ability. There's a whole plugin for it, but to do it on your own is fairly simple if you put in some small framework. All you would need to start is an ActorComponent and a UObject. UObject can have some basic logic in it on an event that the actor component can call each tick. When it satisfies it's condition(IsAbilityOwnerMoving?) it can do something(SetAbilityOwnerVisible) and remove itself from the actor component's ticked objects which removes it's entire line of logic from play after that.
But if you're just looking for a quick throw together, you should be able to handle it on tick just fine in the character by setting some state. You just need to check if the character is invisible first. If yes, check if moving, if yes, set visible. If invisible no, don't care.
Thank you @maiden wadi I didn't know of the gameplay abilities plugin
silly question but I have a pawn(not defualt pawn), where i 've set up movement, but only the camera moves and my sphere mesh stays alike, with physics enabled, any ideas? moving with add movement input with floating pawn movement compoennet added
Yea this works actually.
Something else was disabling it.
is there anyway i can get the list of layer materials that are used in my material?
i want to get all these materials
but i only can get scaler, texture and vector, other than base material and parameter infromation
even i use get parameter info what's parameter name?
This is one way I know how to...
hmm... what's virtual texture?
Dunno
Hello Guys, I am trying to set the current aperture of cinecamera via bp. I am getting the value changed in the editor but its not getting reflected on the display. Any idea?
What do you mean by getting the value changed in the editor?
At runtime, I am changing the value with slider. slider changes the value of aperture . So at runtime if i select the cinecamera value is getting changed in the editor but not on the display(see image).
Hello, Iβm looking for a solution to get the highest value in an array, I found max of int array node, itβs working but I have another issue now : how to check if there are twice or more the same highest value ? I need to know this because right now if I have twice the same high value it just gives me 1 of those;
if >= "max int" * 2 ?
@gaunt ferry get alll actors with tag doesn't care what type they are, just that they have the same tag https://docs.unrealengine.com/4.27/en-US/BlueprintAPI/Utilities/GetAllActorswithTag/. As it says it is a slow operation, but so is GetAllActorsOfClass
Get All Actors with Tag
times 2
thank you; what I want to check if is there are two identical max value in the arraway
Hey can anybody help me how to fix some error like camera and the ai player is not changing the lane plz help
get max, loop through and check
How would i get the RPM of an actor that's NOT using physics?
because probably theres no identical max value in array
mmm
yes there are
if i print the boolean
it gives me 1 time hello on true when there are not twice the max value
and 2 times when there is twice the same highset valu
you want 2 hellos on true?
no
I want to make a code that would understand if I have duplicated max values , and then be able to know which index it is that are the same
(CurrentTickRotation - LastTickRotation) / (DeltaSeconds * 60)
Didnβt I answer this a few weeks ago π€
This would be the actual rotation in degrees per minute btw, but you can go from here π
Hello Guys, I am trying to set the current aperture of cinecamera via bp. I am getting the value changed in the editor but its not getting reflected on the display. At runtime, I am changing the value with slider. slider changes the value of aperture . So at runtime if i select the cinecamera value is getting changed in the editor but not on the display
your image was very unclear
so value on slider changes but actual camera dont change aperture?
Would anyone know why my listview is infinite loop rendering components?!
When we click on a any camera at runtime weβll see a small window on the bottom right. So at runtime if I change the value of aperture via slider in the game, then it changes the value(text) in the editor but on the small window nothing happens
how are you connecting slider value and aperture in bp?
Using this function, target is Cinecamera and the slider value is newaperture.
No itβs not
Set Current Aperture
It means I used the wrong function
Ok. Any idea what am I missing?
Sorry, but can anyone help w/ this?
I am setting the correct value as it is setting in the editor(text) I mean valid aperture value
how you convert 0 1 to aperture?
map range?
because normal aperture is 50 , and you changing its value from 0 1 otherwise
Set aperture function takes float value so I bounded slider to give valid value
it changes the aperture but has no visible effect in game
Yes you're right
You've added Map Range Clamped. Is that the solution?
no just showing that i tried
ok. Is that working in the game?
no
ok. Its working in case of Set Focal length
no effect even when youre really close to something?
yes
yes its on the Universal zoom
then idk
ok. Thank you
Hi, I'm looking at a tutorial for Implement Custom Movement into the Advanced Locomotion System and in the tutorial the person rereads the BP_CustomMovementComponent to "is locally controlled" but when I do the same I can't find the "is locally controlled" "the tutorial dates from 2019 there was an update on that?
Can anyone help with this yet or
hard to know without context
@trim matrix Is that creating a widget?
Says it in the function name
And then that function is running on tick
But even tho that is unorthodox: that shouldnβt be causing the problem
Many people have asked why π
Still, you should really use the correct call for that. A bunch of things do not initialize correctly in UserWidgets if you don't use CreateWidget for them.
Ok
It worked like this before
When I didnβt use a custom data object to pass things to
And that worked perfectly fine. No joke. Now it is just infinitely rendering things π
So would you know how to stop it infinitely rendering the stuff?
I'm not entirely certain. I haven't used Listview too often, but as far as I'm aware, nothing in that image would cause an infinite loop. Not unless the widget itself has something going on on construct that can cause this to reupdate somehow.
No nothing is happening on construct
Literally it is just that screenshot which I posted, and then it is executed like this:
Which, I donβt see an issue whatsoever
And it worked last time I did it in a different project using this logic
You're getting an actual infinite loop error detection though?
No not at all
It just constantly creates and renders the objects
Which, should not be happening π
It's on tick though. So it'll run that creation once a frame.
Yeah but that shouldnβt matter
That has nothing to do with the issue at hand
Would it work if I changed this in my screenshot to addunique instead?
I Tried that but does't work. I have an Andreno512 so in device profiles i edited Adreno5XX. I put that in android high and is still with all settings in low in the game exported.
I edited even Adreno5xx_Low and put all the settings on medium and that dosen't work as well.
I don't know what to do anymore
Is that a local array?
I see in your other project's image that the array you're adding to looks like a local function array or am I mistaken?
Cause if it's local to the function, it'd overwrite, but if it's local to the entire object it'll just keep adding.
Right. And here where you said it works fine, I'm semi sure that the array is local to this function. I don't see it in the variables list and there's a dropdown in the local variables part implying there's something there.
Hmmm, interesting π€π€
Well, thanks for the input Authaer, will try it later as am not at my PC rn lol - but will update you if it works π
Anyone implemented 'hitstop'? It's when you damage something and the game momentarily slows down or stops to really sell the hit. I attempted it - https://blueprintue.com/blueprint/15zjt1ol/
The only issue is .03 is basically no time, and I think it gets rounded down to 0, or it feels like it. Anything over it, like .5 is way too long π€
IDK if my issue is the Delay node, as that's global time scale dependant
anything below frame time will be rounded to frame time
if you have a delay set to 0.0 it'll update next frame
if you have a timer that loops with a lower value than frame time you'll get multiple updates the next frame
Personally, I'd make a component for it on the controller or something. Use it's tick to get RealTime float and base your time on that. Much cleaner than translating from current time dilation.
Tick still runs at same interval, so you can still check the value of real time each frame.
am I being trolled?
"deprecated (use myself)" like wtf
π which one?
looks like the replacement is ToText
then there's one without (float) which takes integers and no other parameter xD
well ToText has all the parameters I needed, but it's awkward to get a text, cast to string, append measurement unit, cast back to text
Funny enough they changed the name but it isn't actually marked as deprecated.
No deprecation warning. Just a name change. And you can't get the AsCurrency in BP. It's an FText static.
so they deprecated the old one, replaced it in c++, and forgot to add it back to bp
except you should let one have the freedom of deciding the multiplier for the fixed point
make your own wrapper for that
yeah i'm going to, I was just confused by that deprecated message
Seems they missed a word in the deprecation message. Pretty sure this is the new target function.
On a side note. If you really want the decimal control, you can still use FloatToText with your own currency format.
Hi. I currently have this problem wherein my mesh(charactermesh) became mesh(charactermesh0) and its making errors referencing to this mesh. I tried finding answers in the chats but nothing specific. I was previously fixing errors and integrating stuff then this showed up. Thank you
if you have a charactermesh in your parent class and reparent a subclass with a charactermesh to the parent class, this will happen
I can't get inputaction events to work in other actors or pawns outside the player, is there anything I could do to get it working?
IK, that's how I arrived at that number. It seemed FPS dependant, in that if I went under the frame duration it would never pause, but otherwise it would. There was a fine threshold for the pause to apply at all, is odd.
(hit result) how do I use this information if there's no reference to the hit mesh data?
Is having timers and early returning the tick function if there is nothing to be done the best way, either in BP or CPP? No such thing as adding temporarily to a processing queue, which then gets removed after?
I can think of a way to make this with like a delegate processing actor maybe, but that's kinda ECS-y at that point. Not sure if such ticks would be expensive, otherwise.
I work in FinTech and we use decimal types for currency of course, but the next best thing is a big int, 10 ^ - (precision + 1), IE for 2 decimals you'd store $5.99 as 5990, and then parse that big int into your string thing.
This is of course the stupid way of doing things, or rather the caveman way. Sometimes you just have to though, like in temporary scripts or whatever.
The amount of headaches floats cause when used as currency... Good to just deprecate and remove that function π
it'd be nice to just have a fixed point type (UFixed or whatever)
fair enough, I tend to think too much generic rather than specific
been making utility apps with Game Maker and Unreal for ages, and actual games with raw C++ π
Looking for advice on how to make it so a player cannot abuse a wall jump to infinitely scale a wall. I'm not sure if this is a bad way to go about it but I'm thinking if maybe there is a way I can tag the component I just wall jumped off of and make it have a cool down timer or something
right now I have it set up so player can do a little jump after wall jumping so they can figure out their landing but it's too easy to just jump back against the wall and then continue to scale upwards
give me your best HFT algo
I'm not sure what you're asking here or what you're trying to do? tick doesn't return anything. it's a function akin to the general concept of an update() function
trade.profit() > 0 ? trade.complete() : thread.sleep(1000) :)
Different FinTech though, customer facing app
as for things like processing queues, pooling etc: none of that is exposed to blueprint in any way that matters
I suspect his best HFT algo assumes you are hardlinked to the exchange with minimal ping 
#cpp is where you will want to go for that
I mean it sounds inefficient to be processing the tick constantly. There's no way to dynamically switch ticking on and off right? Or is it not even worth worrying about?
#cpp has bCanEverTick, in blueprint you can turn off tick in the general details panel of your bp actor/component
By dynamically I mean at runtime, EG turn tick on while a value is keeping for 5 seconds
The BP tick enabled is mildly confusing for components because they start with bCanEverTick = false
been more than once where I was wondering why my comp isn't ticking :P
I don't think that's true?
Brilliant, will look into that! Gotta figure out profiling tools too, it's kinda primitive compared to Unity, at least in terms of UX
every UComponent derivative class I've had has always had bCanEverTick enabled
tbh I'm not 100% on it, but just last week I was helping my friend with a C++ based ActorComponent which refused to tick unless we manually set it to bCanEverTick = true
to be fair
the template class you get through adding a cpp class in editor sets it up so bCanEverTick = true in the code
so you may be onto something
PrimaryActorTick.bCanEverTick != PrimaryActorTick.SetTickFunctionEnable(true)
Stop them from playing, or stop them as they're playing?
Stop them as they're playing
Which function are you calling to play them?
There should be a Stop function for that. You can call it on the pointer that function returns.
Ok so I might need to stream this because it's a bit complex
Basically I have a button on another level setup so it sets "has diffuser" to true
But because it's in a different level i don't think it's setting the variable
Different level as in different map entirely?
Yep
You need to check out SaveGame objects. It's the only sensible way to save game related data between map loads.
how could I do this?
That is a pretty long discussion. I would just look up some information on SaveGame objects. It is basically the way that you save data to disk. It allows you to load that data back up after loading into a new world.
How you organize that is up to you and your game design.
So would it be easier just to move the character select screen to the level lol
Sure, as long as those actors have that tag.
its not working, im sending from widget to blueprint actor
i can get it to work in reverse
just not this way
Possibly. Still highly recommend checking out SaveGame objects at some point though regardless of the decision. They're a massive requirement to any form of game design.
Ok thanks
is it not possible to send from widget to another blueprint with interface?
Is there a way to easily reset a specific variable on all the children of a class? So I have a couple of variables, I have changed it on multiple children, but I want all of them to reset to default again. Would I need to go through each child and set each variable on them to default or could I do it from the parent class somehow?
If you can select them in the ContentBrowser there is. Edit Shared Defaults
Cheers
hey guys im new to blueprints and game development in overal,... but im stuck with something and cant find the solution... as you can see my "Health Ref" variable isnt compatible with the "clear and invalidate timer by handle". does anyone know why that is so? thanks!!! π
i hope im in the right channel to ask questions to π
Is there a way to create an event that triggers as soon as a variable changes? Example: Spikes deal damage to character's health component. I want the thirdpersoncharacter to update the Hud everytime the variable within the health component changes.
I don't want to cast if possible
i made a health bar that updates if i gain or lose health
ok how does it work? please send me a screenshot in DMs
You have to do this explicitly. What you're looking for is an event dispatcher. This should be a property on the same object that the changing value is on. You change the value and then call that event dispatcher. And then elsewhere you can get that object or even do it in that object itself, and get the dispatcher, and bind an event to it. That event will run whenever you call the dispatcher.
I think I'm bringing up that average. π
I'm still trying to learn how to properly use event dispatchers, but that sounds exactly what I was looking for, thanks
Think of binding as a subscription. You get a pointer to that object, and subscribe to the call that it'll make.
One of those is a memory pointer to a particle system and the other is a function that takes in a struct. You can't pass a pointer as a struct. What are you trying to do exactly?
i made a health regen pool. when my character enters he gains health. but now i need to end the regen when my character leaves the pool
Are you using a timer to increment the health?
From the SetTimerByEvent node, there is the blue pin on the right. RightClick that and PromoteToVariable. That variable will act as a handle that will let you later stop the timer. You use that where you were trying to plug in the particle system.
Get used to searching for 2 hours or more for things. π Part of the job.
hahaha yeah well it is rewarding when you finnaly find the solution tho ^^
Wait until you're on a problem for days to weeks π
nice encouragment guys! xD
Can someone help me out with a stupid math question I have? I'm following a tutorial to implement a compass bar at the top of the screen like in Skyrim. It uses the control rotation of the player. In the tutorial the guy gets a number from 0 - 360 when going "Get player controller -> Get control rotation". However I'm getting a number from -180 to 180. Does anyone have an idea how I can convert this into a value from 0 - 1? (0 being the compass turned one way, 1 means its turned all the other way). Unfortunately this is where the little math skill I have leaves my body like a cow in a tractor beam
Just add 180 to your number to convert -180-180 to 0-360.
^^^ then divide by 360 for your scalar
Perfect, thanks guys π
Hello guys , im trying to set an adjust brightness slider , how can i set the same value that exist in level to the value for the brightness slider without binding
Can you think of anything worse that this?
yes... NewBlueprint
https://www.screencast.com/t/YCK2crLuJv5 you can click on the Break PostProcessSetting and get a list in details to show what pins you want to get
got it!
πͺπ½
For future reference there's also the map range nodes which can do any sort of linear scaling like that and also clamp
It does the add and divide internally
a lot of node have settings on the details tab that you can change
Is that new? I've been doing unreal for 7 years and never thought to look at the details tab for a node.
@maiden wadi Hey man! I tried out the thing which you suggested about the local variable - and it totally worksβ’οΈ! The caveat now being that I cant actually click on any of the buttons because I believe that it is refreshing too much?
So when I press on any of the buttons in the list view, it doesn't even register the selection
yeah, they installed the detail tabs a few months ago
Which I believe is a problem I have had before
(ref)
I believe it doesn't register any clicks because it is like resetting the whole list view like onTick - meaning as soon as I select the damn button, it just resets lol
Does anyone know how I would be able to update the player list without doing it on tick?
or only when the number of players changes
but then is there an on player come alive?
nah I have things that depend on it being updated when a player dies and comes back to life
nvm, found this one :D
Hey!
I and my friend are about to start prototyping our first game.
I think we should make a mind map and iterate there so that we can avoid mistakes as much as possible and get the dependencies right.
But my friend thinks we should jump right in and solve problems as they appear. What do you think would be the better approach for us?
you can control the player spawning by overriding OnSpawnDefaultPawnFor in game mode
Don't worry - I did it, but thank you very much :)
think your stuff through
like, really
have small, very accomplishable goals
make a viable mechanic > make a viable core game loop > make a viable level > take it from there
that's enough work for a year btw
thanks for the suggestion.
May I know, what are the first steps when you're about to start coding your game?
that answer will depend on what the core mechanics and systems are. but in broad terms, the architecture necessary for the game to stay iterative and modular. the biggest risk with a making any software product is painting yourself into a corner. so everything needs to be light and easy to accommodate for htis
I don't understand what you mean by "painting yourself into a corner".
making decisions now that will hurt your project in the future
so, I need to maintain some room for iteration during production?
your production is iteration
How do i identify decisions that're going to cause pitfalls?
you don't
you make your architecture in such a way that any decision will not impact the structure greatly
you have to be prepared for anything
how do I design such an architechture so that I can solve problems without messing everything up?
study software engineering and OOP for many years, get a job, trial and error it for a few years until you become grizzled and jaded enough by the pain that it becomes second nature
Thanks for your insight @odd ember
If I wanted to update a list view when a player joins (that event is in the game logic), how would I then cast to the widget with the list view (which also contains the event to update it in it's event graph) to update it?
Event dispatcher
I'm brand new to UR4 and im trying to make a menu but my text is all inverted in game but when im editing it, its fine, I think it has to do with how its positioned but i've tried changing stuff to no avail. Wonder if its just something I missed?
If it changes anything its in VR
is the widget in world?
its attached to the VR hand
it might be rotated 180
yeah spawned in world
oh sorry, was answering Flowenol
Thing is
its like its showing the wrong side of the widget
like the back side is transparent
Can you rotate the Widget Component 180 on the Z ?
or set scale to -1
Might be an answer , might be a janky fix
However i have another noobish question π
In the widget bind an event to a dispatcher that fires anytime someone joins
So I have a settings button and I want it to reset the player score back to 0. However I am lost in how to be able to call that function that's in another BP when this is a widget.
Im not sure if this is "right" but i like useing the Game Instance to communicat from Widgets and Actors
this is my bullets code, however when it collides with a wall or box it just bounces away but if i run into a bullet the code works? any ideas why this may be?
Thats what i was able to find online but i wasn't sure if it was the right thing to use, il look into it
a dispatcher?!
I am so confused
Why not have your widget constantly update the players score a few times a second
An event dispatcher
Event Dispatcher are also useful for you too
I am so confused lol π
I cant really sit here and explain the whole process of an event dispatcher sadly, it would be too confusing. I'll shoot you a good video though
But its what you want
For those completely new to Unreal, follow these short explanation videos to get a better grasp of blueprints and making games. This episode we take a look at event dispatchers and how do you use them.
Support me on Patreon and get access to videos early, join our developer community on Discord, get exclusive behind the scenes videos on my proj...
your wall is not an actor
Cool, thank you very much π
How do I use Event Dispatchers in Unreal Engine 4?
Source Files: https://github.com/MWadstein/wtf-hdi-files
Both of these guys are great
OOo yeah I like Mathew - makes really good BP tutorials ποΈπποΈ
tomatoes
I don't know if anyone else gets this bug with widgets , but often child widgets don't work right until after project is restarted
Take your pick both legends lol
because I want it not to be performance heavy, so i just update it when the player get in game to set it to 0, when the player score, and I want to give the choice to reset the score to 0
But actually I might just make it a reset level button
as more score = more doors opened so when you reset you would need to be tped back to the starting zone
those 2 are my go-to for any question on how something works
Checking an integer and setting it even on tick wouldn't put a dent in performance
Is fine if you check it 3 times a second
i just did this "Collision Presets: Physics Actor" and it still does not work? is there any way to make it an actor?
Have you seen the ALSv4 code? It runs a million things on tick and every 0.1 second delay
And again it doesn't effect performance in the slightest
create actor and put wall in it π
You'll be perfectly safe updating small variables a few time a second bud
Alsv4 isn't a full game with any real art work. Checking things on tick is a bad practice in general and I wouldn't get into that habit
The point is checking things a few times a second isn't bad for performance
And full game or not a game that properly uses event tick poses no threats to performance
But I agree to not put things on tick for no reason, that wasn't what I suggested
managed to figure that out but the balls just ricochete off of it?
add a collision box and make it just a little bigger than the wall
in the same actor ofc
i have it set larger than the box and still nothing
hello! i have a question about timelines and the curve float asset
this is not a great explanation
event dispatchers are subscription services
when a dispatcher gets called, anyone subscribed gets notified
switch these
Do they pay for the subscription though?
"binding" an event dispatcher is the same as subscribing
you destroying the bullet first so the code after will not shoot
what's the question?
when apply cubic interpolation like it says in the ue4 example, it doesnt reflect that at all lol
where do you find cubic interpolation? just right click on the point and pick the interpolation of choice
Yup, just like in my snapshot. So isnt there supposed to be a curve?
if you right click on your points, you can choose interpolation type
Considering the AND checks every condition even if the first was false, would that justify using a branch per condition or would the additional branch make the performance gain negligible?
another branch is going to cost you more
if you care this much about optimization, move to #cpp
I meant the language, not the channel
got it, so would only make sense if one of the conditions is checking complex math or w/e
just trying to squeeze out as much optimization as possible
it rarely would make sense to have two branches next to each other
then move to cpp. blueprint is going to be slow regardless of this type of optimization
so you're wasting time
I'm aware blueprints is going to be slower, doesn't mean I can't try to make efficient bp's
this is not the way
I would prioritize making readable bp's that's the hardest thing imo
making efficient blueprints means reducing node usage, turning off tick on everything, not using nodes like GetAllActors*
and even so
you can optimize if you find that it's an issue for the game
premature optimization is the root of all evil
- At the beggining -- 2) When i move the slide this apply the effect but , then i close the widget , but when re-open , the position isn't save, any hints?
I agree I'm most definitely sometimes overthinking it but I still find it informative to ask and find out such deatils
try to focus on finishing the project as a prototype first, then consider detouring down the procrastination rabbithole of optimization
A simple mathmatical operation will be done tens of thousands of times faster than you imagine. Overoptimizing for something so unimportant is definitely overthinking it π
I have a similar issue, its probably because you need to set the value for the slider each time you render it back on the viewport.
the issue is as well that you don't know what part of your code will need optimization and what part of your code works OK as is
not every piece of code is subject to the same level of optimization
so you're really just wasting time trying to optimize
thanks for the help. i did it over and it worked
This is where the profiler comes into play π
yes, when you've made your prototype
yup yup
I already have a prototype and have actual concerns over the performance hence why I'm looking into it in such detail, although I'd definitely agree I should spend more time on things like assets & textures then how much 1 branch costs
yeah, start looking at the profiler then, rather than arbitrary code you think is not performant
don't look at things like assets and textures without knowing that you actually need to look at them
really if performance IS an issue, it's definitely worth considering move your non performant objects to cpp
you don't go changing out the motor on your car because the tires are making a funny sound
Yeah learning the profiler was the next thing on my list after "cleaning up code" so I appreciate the reality check that I'm probably wasting my time looking at such miniscule details
look at expensive functions if anything
if you're tracing per tick
that can probably be optimized
but use the profiler
yeah the amount of abomination code that I had written months ago that I've ended up replacing with more efficient event driven code is unbelivable
will do, thanks for the help
I was wondering if there was a way to reset the whole level, putting everything back to where they were before?
open level
how do u solve it? xD
yes
Ok
Save the user settings, then use that stored value when you are displaying it again.
If i wanted to import a map my friend made i can just drop the folder over + the mesh/objects?
wat
ah ok ty
this makes me have 2 instances of the game
and open level crashes my playtest
[SM5] SceneTexture expressions cannot be used in opaque materials
is it more expensive than making a linetrace at some location? π
most likely
but unless you do it per tick it's nothing to worry about
this just overlapped my current map with the same map
is it possible to then just delete the old map?
dunno, i think it worked for me
im in vr idk if you knew
maybe make a blank map, change to blank map then to map you want
game mode has functions to reset the game afaik
i also tried restart game
however i think bc the player has pawn as its parent i cannot use the restart game thing
and im afraid of switching to the gamemode parent might break everything
the player has a pawn as its parent?
cuz im in VR yes
game mode you can call on any class by using GetGameMode
do you have a custom game mode?
cast it ?
GetGameMode starts as GameModeBase
yes but if their custom class derives from GameModeBase it's all the same
so it's more than just casting
im brand new to ue4 im doing it for a school projet so im a bit lost in all of this ;-;
make a new game mode
an actor
as its parent, make sure that you pick GameMode, not GameModeBase
Not fully sure why OpenLevel doesn't work?
That sounds like a rather important problem to solve. OpenLevel is how you enter maps.
You load into the level automatically because that is the default map or you're playing from PIE with the level open. Having the pawn in it just allows you to auto possess that pawn long after the level is opened.
Are you testing in PIE? If so this could be a PIE issue with the level name. I have a vague memory about this.
Play In Editor
Let me test something really quick. I swear I remember something about PIE world names being different.
Because I mean my game is almost done all I need is to be able to manually restart the game, change maps and limit the navmesh
Hmm. GetCurrentLevelName removes that PIE prefix.
Are you always loading the same single map?
Which engine version?
4.25.4
for a fps what is better? line traces or a physical projectile
if you click the arrow down on GetCurrentLevelName there should be a boolean. try ticking it
@tacit briar
ok
well first let me fix cuz i changed the parent and somehow now i can't play the lvl
how fast are your projectiles?
i cloned vrpawn before i changed it but still bugged everything
i want them to be instant like in destiny 2 or serious sam
You could probably have about 1 physics bullet for the cost of 500 traces.
but i also want them to have a visual element to them is like in destiny when you shoot there are coloured traces with most weapons
So a trace with a niagara effect. 1 physics bullet/20 traces with effects
the main thing that is confusing me tho is if i wanted multiple guns like a pistol and assault rifle how would i make them different if the bullet is being casted from the character? i haven't got a physical gun yet but when i do add one how would it affect what i currently have and how would wanting different guns also effect that
yeah idk what i did now the player cam spawns at 0 and the hands are floating where the camera should be
Make a gun base class for starters. You'll have a lot of similarities with weapons. Base classes help reduce code copying. For instance, you don't need much in a gun past reload, and start/stop fire. That can be called on the base class. All of the heavy visuals and more complex differing logic can go in child classes. Eventually you'll learn about SoftObjectPtrs and why that's important. You can even have multiple base classes so that you don't have to repeat too much logic. Such as a pistol base and a rifle base. Weapon or the projectile that the weapon shoots should simply call a damage event on the thing it wants to damage. And now the only thing you ever have to actually cast to is the original weapon base class to call reload, or start/stop firing.
im going to load the maps i was going to import
and move my blueprints over to that instead
maybe start fresh from a new VR template instead?
wait one sec
If I bind the event dispatcher in my widget's event graph like this
And call it like that in somewhere else
Will that fire off the event?
does the class where you call it spawn the widget?
Is the cast succeeding?
promote your widget to a variable and use that variable to use the SetInputModeOnly function
that wont fix it, the beginplay event isn't running
well there's your problem π
in which class is this?
is tick enabled?
I think?
actually
go to your project settings
check Maps&Modes that your default playercontroller is correctly setup
that might be the issue then
check that your player controller is setup correctly regardless
it is
in the override or in the project settings
which template is this?
try not having the game mode override and see if it works
yep
can you show the functions panel in your game mode?
its all correct
and all the events?
in the gamemode?
yes
none
try using a print node on the game mode begin play
doesn't print
make a new game mode class and use that instead
so once i have made my GunBase blueprint where would i go from there? should i get the basic assault rifle model and when it comes to the shooting code would i copt paste it from my character to the gun itself?
doesn't work
idk what the hell is goin on
so how did this work?
I changed it to one of my other gamemodes and it worked
make a new class based on that class and see if it works
ah
the pawn shouldn't have impact on your game mode though
although it could be that for some reason in your game mode it stayed zero'd out
the player controlled doesn't work still
I can't see your setup so I don't know why
what do you need to see
the game mode overrides of the game mode that works versus the one that doesn't work
oh
Im trying to save the current ammo if i switch from weapon with a weaponmaster and the weapons are child actors of it
show code
of what
whatever it is your question is
the code from the weapon switch
my weapon switch if i switch or drop the weapon the ammo count reset back to the begin value
store ammo count on character, not on weapon?
ok
@odd ember@maiden wadi so i tried different things
the remove prefix does not let me run the restart button in PIE
however it works find when i launch it to my VR headset
just that the background of my menu and the interaction widget do not exist in the "launch" game but do in the PIE game
its just i need to click as if it was there
but thanks a lot even if i can't run it in PIE
Exist some variable to change the brightness and affect all the entire game?(level, widget), in general , screen
When i am shooting my trace for some reason starts from the middle of the ground at a wall
Have you checked out the FPS template?
show code
look to see how it handles shooting
Okay so using line traces i mixed some old and new code ive done and it works just gotta see what happens when i add the gun model itself
ok this is gonna be a really stupid question but how do i call my trigger box from persistent level?
is it possible to change the precision of the nav mesh in real time from blueprint or is it fixed when you set it in editor?
if so how
it's not stupid. there is a way
is your trigger box a volume or a brush?
its a capsule
Ooooo
add event > pick OnBeginOverlap
thats how it was
i tried that but in the blueprint of the capsule
instead of in the world
thanks
Am I able to call it in another blueprint as well?
no
the level blueprint has special properties for that kind of stuff
but
you can handle blueprint communication
Because i want to unhide it when the goal is met
but i can just create a custom event in the level blueprint and call it when goal is met?
watch that video
ok
I tried to follow this but I'm not getting a plane. I was able to make a triangle.
https://80.lv/articles/building-procedural-art-tools-in-unreal-engine-4/
i imported it for the models and the gun just never came across?
Hey, how would you do runtime surface snapping? Think of The Sims, where you can place objects on the floor and it automatically detects and snaps the object to it.
Do you guys know of any plugins which contains just this functionality or something?
Is there any way to hide gizmos in the blueprint viewport? I can't see anything π¦
The "Show" dropdown doesn't exist in the blueprint viewport
g
Thanks for the response. I'm pressing G and nothing happens
g worked for me if clicked in the preview window
Go to the drop down menu in the preview editor window and press show gameview
It will also say which shortcut
In case you have a different keyboard layout
Which dropdown menu?
if you don't start with the third person template, then I don't believe importing the first person later on gets you the gun
either start with the first person template to begin with, or create a new first person template project, then migrate the files over to your current project
Yes, you will get the template gun, if you adding the template with Add Feature or Content Pack
I've done it before, and all it included was the first person BP without the gun
I had to migrate over the gun from a regular first person template
(whoops, wrong reply to)
Hi i know that probably is a stupid question but right now we are working on source control with a development team and there are some programmers that pref cpp and some that preff blueprints there is a way to code things on cpp and others on blueprints?
In the preview editor window
Quick and Possible easy problem. Im Trying to detect what My held weapon is facing up In the world. I used actor up vector and forwards vector of the weapon mesh and did a DOT product . But Its not working because I think I really need the World up vector . and not the actors up vector. How can I get that?
Expose to spawn
Basically this is not working . How can I tell when my weapon is pointing up
think isolve it
Vector up
Is there a way to set a key value inside a timeline with parameters inside the event graph? Trying to have this exposed to user so he can set how long the timeline will play instead of hardcoded to one value
I think this might solve as a workaround if anyone is interested
I figured it out. you half to put a value in
What is this?
Hi! does anyone know how to add a widget to viewport at the center point? (i'm not editing the widget, but rather creating a new widget and adding it to viewport)
get screen resolution * .5?
That's a Vector+Vector node with the second vector split. Any pin on a node for a struct, or data type with multiple values, can be right-clicked and split into its parts. Once split, you can right-click to recombine. It's like a shortcut over using BreakVector or MakeVector.
thanks
You can absolutely do that. For example, you can make C++ functions that are callable in BPs and you can make a BP out of a C++ class. I think this stuff only works in one direction, C++ -> BP, but I'm not certain
SnapToGrid can help you there. Doesn't literally implement the snapping, instead returning the snapped result of an input value
It is only one way. C++ -> BP
Why doesn't this work?
Just did it with set anchors (0.5 all) and set aligment in viewport (0.5 on all)
you can't call the construction script manually like that
how do you test stuff?
click play in editor?
formulate your question in a way that makes sense
or suffer the consequences of banter π
I would like to be able to make changes to the Blue print actor class script while the game is play like adding and subtracting 1 from an integer variable that is set to 3. Using a key stroke
what is the particular class you're doing this in?
Actor class
that's not telling me anything. I would suggest you start with learn.unrealengine.com
thanks π
Is it posable to use this without assigning it to Engine - Input in an actor class BP.
What can i not use keys or button press actions in actor classes because it need to be in a passed player character controller.
i have animated my character to move his entire body depending on where i look however this is rigged to the premade 3rd person controller, how would i translate this to my main character?
Whenever i use Load level to open a 2nd VR level, it won't let me teleport in it, i just have a glowing blue stick going out of my hand instead
Is there something im missing?
okay i was dumb
i was loading the game starting on the 2nd map which somehow didn't let me tp when i was loading the 1st map from it
this is a reference to the 3rd person character how do i get these nodes to work with my fps controller?
Would there be a reason why i wonuldn't let me open a level, unless i started on that level before?
For example, I have a teleporter that takes me from Map1 to Map2
However if I launch the game on Map1 and try to teleport I get teleported back to Map1
But if i launch from Map2 and try and teleport to Map1 it works
then if I again try to launch from Map1 and teleport to Map2 it works
Does the FPS Controller have the booleans "Jump Button Down" or "Crouch Button Down"?
i have created animations, when running he runs and jump he jumps but when i look around he stays looking forawrd... anyone know why
I'm very new to blueprint and am trying to possess pawns based on the number pressed by a player. I followed this https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/HowTo/PossessPawns/, then wanted to implement it in a way where I could add n pawns to an array and automatically assign the numbers. The possession appears to work as the camera switches, but the pawns are unable to be controlled, where have I gone wrong? The pawns are the default SideScrollerCharacter
maybe you need to unpossess the previous pawn
that doesnt look wrong... but im not too sure
when you swap, do any pawns response to input?
Can you elaborate, I'm not sure I understood the question? When I swap, the camera changes to the relevant pawn, but no input does anything, nor does the pawn perform any action
Pawns are also inactive before I've pressed any keys right on the start & don't respond to input
If I disconnect the 'Any Key' to make it run as normal, the default pawn moves as expected
alright, so it sounds like you can control a pawn when you dont run this code, and i was wondering if after switching pawns (assuming the first pawn is controlled when you start) that any pawn responds to input
maybe the any key even is consuming the input, meaning its firing and not allowing other inputs
it is Any Key afterall
what about testing it with a different input?
I think that might be it, that makes a lot of sense
That was the issue, changing the input to 2 allows me to move and switch to the 2nd pawn as expected
Do you have any suggestions for how to handle input in a way that won't block other inputs? & if not, tysm for the help. I really appreciate it
select the event, there are some checkboxs in its details
Deselecting 'consume the input' allows me to move, but also stops the possession from functioning
ah ok, so i think i have an idea - because you want to press any Number key right?
Correct
im thinking you make an input action in the project settings, you've done this before?
There's a first time for everything :p
lol ok, well, its good to learn anyways. In your project settings is a section called Input
there are some Input Axis and Input Actions mapped there
MoveForward for example
so you can make inputs here and then define which keys would call this input event
Create an action mapping 'Numbers' then add number keys to it, then instead of using anykey use the numbers input action?
for example, you make a new Action called Sprint and then call that so that whatever the input is can be changed there - essentially avoids hardcoding inputs
yes, thats what im thinking because you should still be able to get the input name
and since its just the numbers, your other inputs should work as normal
Will give that a go, thanks again, it would have taken me ages to figure that issue out on my own :p
lol, saves you from making 10 input events
All working π
requesting a quick sanity check for best practice:
- I have a mechanic where player [does something], and that something is expected to function the same way no matter what level they're on in the game.
- The thing that's being modified is the world (spawn rate, enemy types, etc), it'd be best to do that in the Game Mode BP, as opposed to each individual Level BP, right?
Has anyone gotten scenecapture2d additive composite mode to work in Ue5?
Is there a command to disable all Slate UI?
believe so, game mode data does get cleared between level loads, so if you're keeping track of something that needs to be known between levels, store it in game instance
cool; I'm still learning the absolute basics, so just trying to fix those practices in my mind.
if thats the case, i would recommend not using level bp, but if you have stuff in there already dont worry about. Maybe better to think that if you are finding it hard/annoying to work in level bp its because its not great to π
Nah I haven't even started messing with the implementation of the mechanic yet
i'm like at design-doc/pseudo-code/doing tutorials level
ah
how would I make sure my health dosent go beyond zero
Clamp
how can i append string "0" everytime I make tick.?
wha?
oh shit i meant how can i append a break line on string
i have bunch of zeroes and every ten zero i would like to break the string to a new line
these are generated 0s?
i think you'd be making a new line by measuring the length since it is on tick
havent tested
why doesnt it work?
you did shift+enter in the append?
Is there a way to bind events to an event dispatcher from inside a blueprint function? I want to have 2 functions which bind events to different dispatchers so that other classes don't have to deal with the underlying events and can just use the corresponding dispatchers
yes, use CreateEvent
Okay, that might work.
But is there a way to bind events which I've created beforehand without creating new ones?
what do you mean? CreateEvent lets you point at existing events
It does?
It's just badly named. Should be read as "Create Binding For Event"
yes. drag off from your bind event delegate and search for CreateEvent
or as "create delegate"
anyways, it gives you a dropdown to choose the event
Ahhh alright
if the event passes any data, then only matching events will show up
Thank you
It's literally named "Create Delegate" if you hover over the Create Event node
lol
How that got lost in translation will forever be a mystery
bp noobs dunno what a delegate is i guess
then i wont suggest bp interfaces
Interfaces are the devil.
disagree
People misuse them far too much rather than creating correct hierarchy for things.
oh for that reason...
i dunno, let em, even if its wrong, at least they're learning
π€·ββοΈ It's about as sensible as starting a 0.0001 timer to avoid ticking.
you got me there
wait. I do this. . . . for things that will only need to tick for a few seconds at a time. . . should I stop?????????
also delay of 0.0 just executes next frame.
When you create a timer that is 0.0001, you're saying you need this to run 10,000 times a second. So if you have 60 fps, you're ticking 60 times a second and that timer will evaluate 60 times a second, and every time it evaluates, it'll run your function 166/167 times each tick.
I'm not certain about the lower numbers like this, but I do know that 0.005, which is 200 times a second will run 200 times in a second even limited to 20 fps. It runs the function 10 times every frame.
sounds like the math is basically 1/fps
casting to crosshair widget but its not showing on my screen
oh. okay i should be fine then. idk about the really low numbers but 0.0 only runs once per frame, so thats my tick replacement
So what exactly did you gain from it π
weird, ive always used get delta time
Personally. If you really want to tick something sometimes, and don't want to put in the infrastructure for creating temporary objects like a customizable UObject, just use a gate or boolean on tick. Or Timeline it.
its too late, i already have delta timers everywhere
If you've done good and wrapped delta time in a function, its a one place fix π
Hi. How can I make the game ignore this warning? I have intentionally set the root component's mobility to static so that it can't move. But everytime the game ends the message log comes up and uk its irritating. So, any idea?
stop trying to move it if its not ment to moveπ
its meant to move until it hits the box
There are other ways to stop something from moving besides setting it's mobility.
^
like?
Mobility is largely an optimization setting for level designers. Affects lighting and networking code in places.
i see
The ball seems to have a ProjectileMovementComponent?
yeah
Try StopSimulating on the PMC
Damn. Worked well without any warnings. Thanks.
damn i hate when things work without more issues
lol, the joke would be that i like it when it happens to me but not others, but i think the better one is that im too accustomed to the feeling that it shouldnt just work without another problem creeping up π at least a few times
at least. Very common in my programming currently π Atleast 2-3 times before i get it right
Underestimating the issue, quickfixing it instead of thinking it through, then ending up using more time than the actual fix would've taken if i just stopped for 2 seconds
thats what im cracking up at
Does anyone know how to stop a delay with an input?
use a timer lol?
you ever use a timer before?
i have not
check out some vids on it
will do thank you
why isn't ai move to working
you got navmesh in your level?
yes
dunno, show code?
try it on begin play instead of tick?
wait hang on, some else is wrong
i mean, you shouldnt call it on tick, but theres something else
you gotta plug in the pawn that you are telling to move
that one is a little weird because there's no controller reference though, but it exists so..
A reference to self doesn't work
still didn't work
yeah i would think you need controller, but im not familiar with that specific version
yeah timer isnt what i needed
im trying to stop a delay with an input not start something with input
id suggest using Move to Actor but you need to disable context sensitive
like say a teleport takes 5 seconds how do i cancel the 5 second
if i move or sprint
well you start a timer like you would start a delay. what comes after the delay would be tied to an event instead. The return value on a timer is its handle, which you can get and check to see its remaining time as well as pause or clear it before it first the event, therefore aborting the code that would fire if the timer expires
so if you move or sprint, you check to see if that timer handle exists, and if it does, clear it
alright il look more into it i may be using the wrong timer
timers are a bit different to setup than a delay
didn't work
hmm weird, i use that all the time, works just fine
damn
might be when its called, or the class its called in, or maybe the thing it should move to doesnt exist at the time it is called
Is Ball an AI controlled Pawn?
Can we add data into an array like this.
Nope.
You copied a struct, and added an index to that copied struct's array.
I mean, technically you added it to an array, but not the one you wanted.
Can you tell how can I get the reference of the original array?
Altering a TMap in blueprint is a nightmare. Your best choice is to copy the original struct, delete it from the map, create a new struct with the changed values and add it back to the Map with the same key.
@chrome fractal i would create a new bp type "object" where i can store these arrays and add simple functions that i need to access my data.
conststruct object of class "datathingy" -> promote to variable -> use my simple functions to controll all my data
object oriented programming, your bp stays a lot cleaner and you do not have to use structs
https://www.youtube.com/watch?v=HpUhfnHCENQ&t=599s
In this video we look at using objects in Blueprints to store and manage data instead of using structs.
Structs can be useful in Unreal to quickly store large amounts of data in a single variable, but they become increasingly difficult to work with the more data you have in that struct, especially if you have nested structs.
In this video I sh...
The issue there had nothing to do with Structs. The issue is TMap in blueprint.
You can alter structs just fine. SetMembersIn function allows the setting of specific properties.
Im trying to format Text in a UI element like so 00:00:000 (a lap timer) but what is the best way to approach it? i seem to be unable to keep the 0's as it currently just does
"1:43:120" (for example)
The case would be identical without a struct if you just had a map of String/Integer. You still cannot alter that integer without overwriting the who entry.
that's what i currently have yeah.
oh wow. had no idea that existed!
thanks @maiden wadi it works as i hoped it would now.
that ms accuracy is gonna suffer π
Why for?
Only a 1000 of them in a second, you can't display more than 999 of them before it reverts to zero.
wasnt it a case just a few days ago, where someone figured out it only reported like 3 different results on the last digit?
guess it matters very little anyways tho
if that were the case one could just do a rand(0..9) on the last digit π
nobody would ever know
Unless... you tell them
I think I remember that vaguely. I think that was a fluke with their framerate.
Wonder if I can repro that.
Hmm. No can do. But if I remember right, that was a float he was using. I'm pulling ms directly from UTC::Now, which has precision in ticks to 100 nanoseconds.
it's gonna be for a small game for my internship that they will add proper scoreboards too so random last numbers isn't gonna cut it haha.
I'd only use random if the alternative was some fixed 3 step value π
If the real thing works, then that is great
I'm wondering how to approach "missions" in the right way, specifically things that are spawned for the mission at different stages, like objectives or area triggers. Would it be better to place them in the world and deactivate them at begin play, and activate when needed? Or would it be better to spawn them in at the point they are needed?
I think that really depends on the context. If they're static missions, sure, place them in the level or whatever. If you have dynamic missions where places can randomize or whatever, probably best to stick with that model even for static missions and reuse the same code with one randomizable point.
I see, thanks!
a mission manager is generally used
whether that's a component on the player, an actor in the world or a subsystem is up to your needs
I made it work by disabling Android device profile selector. Now i can control those settings from menu.
I have only one problem now with those settings. I don't know how to control sg.resolutionQuality. it's set to 50 %
I set it from device profiles ,but it's still 50%. I Tried to put note that controls that ,but i don't find that node. There only "set screen resolution" and " get screen resolution" and that's not controling the Percentage of the screen ,just the XY of the screen.
And that then activates mission related things as needed right? How does that work specifically though? I just tried it with an area trigger, setting "actor hidden in game" in the begin play and then a branch that checks if it's visible on the overlap event but it still goes ahead and triggers when the player enters. Are there better ways to disable and enable blueprint actors?
you would put into the mission manager things that you would consider for your missions or objectives. think about how a mission is structured, then how an objective is structured etc.
it's more design work than actual implementation at this stage
it's how you would want your missions to be
Yeah I have that part together but it's all in the level at the moment, so you can trigger part 2 before accepting the mission for example. Now I'm looking for ways to have it all disabled in the beginning and then enable them section by section depending on how far the player has gone through the mission
okay, is it just for one level or is it a system you want for more levels?
It's an "open world" area where you can start missions like in GTA 3 - You enter a circle, see a cutscene and then get your objectives marked. So for example I'd imagine it to work like this: You start the mission, get told you need to go to a location to pick up some scattered packages. When you start the mission, the trigger for the area is enabled. Once you reach it and trigger it, the packages get enabled. Once you collected them, the area trigger for where you need to take the packages gets enabled.
This all works already, but it's all active from the beginning, mission running or not
so if you need something like that and you have multiple missions available I'd consider a systemic approach. from the sounds of it the design needs more work
I'm working on a prototype right now that's just supposed to showcase 3 different types of missions. For my current use case it would be enough already to just have it all disabled at the start, then enable the gameplay elements of the next mission section as the player reaches them. But I'm not sure how to properly deactivate and re-activate blueprint actors that have been placed in the environment.
I mean you're just setting yourself up for more work
but it's up to you
you can use event dispatchers on actors in the level blueprints as events
that's generally how the level blueprint is meant to be used
since you're already talking about event dispatchers:
Probably a super easy question but I'd like to understand it properly: For what reason would one use Event dispatchers over Blueprint Interfaces for communication?
Many. Interfaces are most often a patch to bad hierarchy considerations and what people replace casting with. Dispatchers are entirely different.
interfaces generally are used for something that goes across several hierarchies. so if you had a Use() function on an item and would want that same functionality to exist for NPCs, that's where an interface would be valid
event dispatchers are a form of indirection that allow for subscribers to register (bind) to an event. when that event is called, the subscribers are notified
the dispatch caller does not know who the subscribers are (by design)
hello I would I do a shield before my health is taking away I already have a system where my health is take away already
event dispatchers also allow for dynamic runtime typing, so you can register and deregister subscribers as you go
this isn't possible with interfaces
I'm not sure what you mean by that. What design needs more work? The approach to the showcase missions in this prototype is all multi-step "quests" a la "Go somewhere, when there, do something or collect something after which you're told where to go to and do something next". A systemic approach would certainly make sense especially when adding more missions later, but I have no idea where to start with that or what to even look for. Googling "unreal 4 mission manager" doesn't turn up anything useful other than a bunch of marketplace plugins. Can you give me some starting points of how you'd do it and by what manner I would have mission objectives activated and deactivated in the world? (Goes back to my original question about having it all there from the start but disabled, or spawned as needed). Still a bit confused by the whole thing.
performance wise interface calls are more expensive as well
@normal adder I already said this before and I don't want to repeat myself. these are the questions you should be seeking to answer
@peak wedge thank you, that makes it much clearer.
I also mentioned how you could use event dispatchers in actors to activate them or deactivate them from the level blueprint
Yes but it was my understanding that you were saying that was not the best way to do it, so I was asking what you meant instead. If that's what you meant then fair enough, misunderstanding.
it's not the best way, but it depends on what you want to do. is it a prototype that you have to get ready immediately? is it a long term project where you have to scale this concept?
I'm just telling you how I would approach it
Hey no obsticle and coin spawning in my map they are spawning when 2 tiles meet any lead how can i fix thia
@odd ember and @maiden wadi thank you for taking your time to answer our (often silly) questions in this channel β€οΈ
by just reading the most common questions and answers of this channel, I could learn a lot already
if only everyone had that approach π
also sorry if I forgot other helpers, it's just the names who stuck out the most to me personally
@maiden wadi Hey man! We talked yesterday about the variable thing - and what you talked about doing (making the var local to the function) worked superb! Only caveat now is that because it is being updated on tick, the list view resets so quickly I canβt even press anything lmao
I still want to run it on tick, but do you have any suggestion to make it so I can actually click on something π
Not run it on tick^
hey guys! I'm using a 'back' input on the player controller to navigate back in my menu. The problem is, suddenly it stops working, if I put a print right after "pressed" (from the input action) it prints nothing, what could be the problem?
just the thought about running any code on tick is scary π»
when exactly does it stop working? can you describe the scenario?
It can make sense to run things on tick, but it should usually be supported by a better reason than "i want to"
To clarify my earlier comment, Interfaces became popular in blueprints because of some people didn't bother to understand how Unreal handles loading objects into memory. On my phone, so not in a good spot to fully elaborate. In short you don't have to have higher levels of pointers to call interface functions, so you avoid casting. You also avoid loading the same heavy objects being always loaded by having correct hierarchy and base classes to cast to. As CE pointed out, both have no real correlation to dispatchers.
The reason is because my event dispatchers do not work and I need to keep my list view updated almost in real time
Example. I press start to pause the game, I select options. I go back and it works, if I press back again it doesn't work anymore, which would be ok haha but it's not printing even this π¦
are you saying that my GetAllActorsOfClass into a foreach loop using GetAllComponentsOnActors into another foreach loop on tick is wrong??
Make a setter function. Use that to add to the array, then update the widget after.
select the inputaction event and look in the details panel. there should be an option to execute while paused
Wouldnt it make sense to get the repnotify's up and running instead?
ticked of course
Only if you dont do Super::tick. Then its all fine

I am quite confused π
ah I see, I misunderstood the question. I believe this has to do with which widget is focused
so once you click back and close or hide the widget, you need to bring focus back to the previous widget
Only a few reasons. Game paused, other actor is consuming this event. Widget has used on key down and returned handled, or your input is set to uionly
but should still print the pressed
can be I put a disable input somewhere?

