#blueprint
402296 messages · Page 770 of 403
Promote the output of the spawn actor node to a variable
Are you following what I'm trying to have you do at all?
that makes sense you want me to create a reference for where the bomb spawns from
i think i got it
No, i want you to make a reference to the actual bomb
so then you can tell it the direction to explode in
but anyways i gotta go, good luck
Yea I'm so lost it didnt work but every number I fed it was rounded so?
split times add up to 26.108 final time was 26.111 (ignore the 18.104 thats level record)
can i see the bp graph?
yea 1 sec
timer
end time (display) and math
wait this is the in game timer display
question, do you need the float or the text or both?
as in, to be used elsewhere than just to show the player
float for math text for display (to see if the split times/final times are slower or faster then float to display it so its readable format 00.00.000)
well, i mean i see the leaderboard on the right, that's updated somehow too right?
yea trying to find that spaghetti
so the split time is set depending on what level your on shown here
and is this a mp game?
If you want to take large screenshots of the bp that aren't tiny blurred images >>https://www.unrealengine.com/marketplace/en-US/product/blueprint-graph-screenshot
This works as if your on stage 2 and time is 10 secs and stage 1 was 6 secs it subtracts that giving stage 2 a time of 4 seconds since it will always add up to total
it even works for first stage since previous stage doesn't exist so its total time - 0 which works fine
hang on, brb
Hmmm so theres this tiny 0.03 discrepency but otherwise everything works as you intend?
Would this also be the same when tested in standalone?
the discrepancy is different every time but very minor this is why I believe its a rounding error
I was thinking it was a tick thing, not being true to framerate
this is editor after all, not accurate of true framrate
yes but what confuses me is the in game timer and split times should both be being fed the exact same values to do the calculations
so, about that
hey guys, level bp stops working after my level encounter starts. anyone knows what happens?
here's how i read it
not enough info
gimme a sec, snapping
I see you have the StartTimerEvent, this is calling GetGameTime, then after the gate it calls it again. This is based on tick firing and when it is opened
Game time should be the same, but its on Tick's repeated call, which could differ as startTimerEvent accesses game time, then opens the gate, Tick fires thereafter
I would be under the assumption that it should happen in one frame though
so should I not be using an event tick?
so, without having you tear this all down, i think testing it standalone would be easiest to verify my assumption
hope u guys can see it
uh, i see them all fire, are they suppose to keep firing?
ill package now but still unsure what your saying, I should rethink or even remove this whole gate system I have?
i dont know 😛 its a hunch since everything else is working that ive seen
if the average difference between times is around 0.03, then im looking at tick, even though its quite a large chunk in regard to tick rate
I thought they supposed to keep firing
When I get the time float I round it and I when I print its not rounded but its so minor I think its the engine just being weird
it adds .000001 so its like whatever just interesting since I round it at .001
they could, depends on how you call them. All I see is some lines being fired. Is the even plugged into the sequence Begin Player or what?
floating point precision shouldn't be that noticeable though
.000001 yes, but not .01 or .001
keep testing it though, maybe a pattern emerges
Event BeginPlay -> Sequence
that will only fire once, as it states, at the begin of play starting
it just seems like a math error to me, on the end result you have the total time spend in the event rounded while in the splits you're rounding it up or down on every split, so wouldn't you naturally get a different result from adding the split times vs the total time
okay but do u take this as normal??
could it be since everythings not happening at the exact same time that's why the math comes out different
no I don't, but I've not used timers to run that long, though by its function it should keep going
bc here I print 15.242 ... the timer says 15.242 ... but now the in game final time display is 15.241?? it happens after how is it a lower time? first I pause time then I set final display
I did not expect time to be this hard
now that that is odder
in reading that forum post a little closer, it seems converting the time float to an int or text is more accurate
once in text can I do math or do I have to convert it back
maybe float to string to float would be better
ive not done this kind of accuracy with floats/time so personally, i would use integers
in any form it still seems like it will not be accurate
Im not worried about accuracy I just want the split times to match up with the final time
ill try the float to string to float
Im interested
make it a pure function, since it is performed for Old Time and New Time
for the gate
To me, that may look it up as the same value, and this is on the assumption that this is where the discrepancy is happening
to know exactly where the difference is happening then it might be easier to discern
ah, sorry, yes its made like a function like anything else. give it the output and all that
on the function itself (select the function) there is a pure checkbox
In one frame doesn't mean it'll be the same value as that node gets the exact time when you call it so it's totally possible there's a small discrepency between repeated calls even on the same frame.
Also depending on how you're calculating the split totals you could run into issues as float math is not exact and every operation you do introduces some small error, if you repeat that the errors can compound. So for example repeatedly adding your split times may not give the exact same value of just subtracting your start time from your final end time. See https://0.30000000000000004.com/ for a good example of what's going on there
That is not true. Pure functions do not cache values and will be called once for every time you read from an output pin. Never rely on having two things connected to the same pure node being the same value. For example the random node, if you have two prints connected to the same random node you'll get two different values printed.
Yep and Yep, I stated this as well
Ah sorry, I came in late so I may have missed that. Anything involving floats is definitely tricky to get right sadly
said it here: #blueprint message don't think its so clear though
nah its good to reiterate
i would think to set a variable to then use so it is the right value, but this sutuation doesnt allow that
I'll try the function with the pure true and see if it changes
and if the pure function doesnt change it, which is a reach, then maybe keep it a float for as long as possible and convert just the one time it needs to be
this, i assume, could be with the CurrentSplitTimerNEW
Though.. #blueprint message
Ah, It's one of the things I dislike with discord, if you join a conversation late it can be very hard to track, especially as it starts getting mixed with other messages
still doesnt seem like any way around it though
Okay noob question how can I use an integer to get decimals?
oh your all good, not a worry, this has been a long solve in a topic that i didn't want to jump to about float inaccuracy
just to preface, this may still be as inaccurate as it is currently. but its close to what you're doing already. GetGameTimeInSeconds x 1000 (or whatever) convert to float via truncate or such
again, this still does not quite get around floating point precision though
so, basically, 30 minutes ago, GO TEST THE STANDALONE
I'll do that now
thank you
id hope its more accurate if anything, even if still a bit off
wait didnt you test standalone actually?
Confused float inaccuracy is such an issue when so many other games (every racing game) .001 precise split times and in game times which align
well.........
programming may have some extra tools that bp does not
they could write the entire thing with ints for the sake of accuracy
Thank you so much, even If I can't figure this out right now I've learned a lot, Im gonna sleep while it packages considering baking lighting for just 1 level takes nearly half a day
yep, learning is important
float IS float32 on modern systems
the 32 just specifies the number of bits (effectively how much memory it takes to store the number, which also determines how accurate it can be)
float on modern systems is set to be 32 bits and double is 64 bits. In UE5 we'll have support for double in BP which will give you more accuracy in floating point calculations
Spoiler alert:
||60 FPS = 16 ms/ frame = 0.016 s / frame||
||120 FPS = 8 ms/ frame = 0.008 s / frame||
||Given the common frame times are not even less than or equal to 1 ms, and Unreal waits for a frame to be fully finished, you're exercising in futility at that accuracy.||
I think a lot of racing games went for fixed frametime rate, e.g. only logging the record in multiply of 16 ms or 8 ms.
thanks for the correction, i was thinking of int
that is a good note about racing games being frame limited. still wondering about dropped frames and how that would get solved, but im also not making anything with such precision (not yet!)
starting to wonder how effective it would be to use tick delta for counting frame/sec but im pretty sure that what get game time does already, and specifically when game starts too
Same thing, int is the same as int32 on modern platforms, although a lot of coding standards now prefer you to explicitly specify the bits to there's no confusion when someone else reads your code about how big something is
damn, im blowing it, i was getting int and int64 confused - with float and with int32!
Though it's more of my educated assumption. You'd definitely had to analyse a lot of tool assisted speedruns of racing games directly by playing the recorded input and tamper a frame or two to get a more conclusive result.
i bet the info is out there if i looked for it, no motivation to do so now
Hah no worries, having types not specify their size definitely makes things confusing. I know of one platform where bools are two bytes for example which caused chaos for code that assume it was only one 😦
Besides, I'd argue that losing to 1 ms inaccuracy is super astronomical.
One trick that I've been thinking is to switch the time value from the paused real-time to the stored one upon finish.
code is my kryptonite, its showing, memorization to that degree is just that extra layer. like a character build, i opted for that skill and put points into art
hey ya, i have a question. i need to use blueprint to control some actors depend on a work flow. some of the actors need to move or do some operation sequentially, and others need to do the same tings in parallel. how can i implement such feature? do i need multithreading?
feel free to think on the idea more, i gotta move on
Totally understandable! There's so many different things that go into games it's completely unreasonable to expect any one person to know it all. I only know my own little bit of stuff and definitely have to rely on others for a lot of different tasks
I think my most frequent reply in #cpp when people ask me a question is some variation of "That's not an area I know about, sorry"
Actors doing something is going to add up to the Game thread frametime. Unreal will finish all the stuff that supposed to happen in that particular frame before moving on to the next.
ah for sure, but hey if no one else is responding, why not give it a shot?
For most people, definitely! Always good to try to help. Sadly because I work at Epic if I am not sure about something and say something incorrect people treat it as an official answer which can cause more issues
I think if anyting, MTing would just even out the tasks, possibly reducing the frame time. Though I don't think BPs are capable of MTing to begin with
ah damn, yeah, you've got some liability there
Though I don't think BPs are capable of MTing to begin with
They are not and in fact it is not safe to interact with any Unreal Object outside of the main thread. You can still do multiple things on the same frame which will appear to a user like they happened at once but really they'd be calculated sequentially. Considering a user only sees updates when a frame changes, doing multiple things on the same frame will have the appearance of it happening in parallel
thank you first, i think i understand you. probably i need to use cpp. what i'm doing now is creating a work flow, just like a production line in a factory. i need to control actors to finish some operations in sequence or in parallel.
If the frametime impact on Game thread is not that high, you could get away with single threaded BP, no MTing necessary.
Though that being said, if your BP logic does impact the Game thread that bad, just try translating the function in C++ so that it runs on C++ speed, and still no MTing involved.
Was about to say the same
C++ isn’t as daunting as people say it is
Especially if you’re just translating from BP
Rule 1: don’t optimize
Yeah, considering a lot of built in BP functions are callable in C++ through Kismet function libs (just that you'd prepare for lengthy function names), and stuff like asset loading (which is PITA to do in C++) can still be outsourced to BP for the ease of use without taking much BP overhead.
Yeah exactly if you just expose some data to BP but your logic is in C++ you will still benefit the performance
But regardless you should always follow rule 1 of optimisation
Don’t optimize.
regarding bp and cpp, ive tried the bp nativization on packaging but i hadn't notice a difference in framrate and there is a lot of bp being used
It really depends what you’re trying to do
In many scenarios your framerate will be depending on GPU not CPU
i tried it thinking it would be better seeing that the preference on performance is cpp
The difference is pretty tangible IMO, but because it's basically machine trying to reverse engineer BP without love, it's not as optimised as manual translation.
i kinda figured as much, it also did not work on some bps (i think because they used structs?) Maybe one day ill optimize things in cpp
Have you compared actual stats? Or just framerate?
just framerate, so yeah i getcha
Because cpu load and time should be different
good! by the way, where do you think is the best position to write the main control logic, which will control the work flow, like sending some signal to tell the actors begin to operation. level blueprint? or an controller actor customize by myself?
i felt no difference when playing the game, which means i dont need to profile to great length 😅
Nah don’t use level BP
If you want level specific logic, you should probably have it in gamemode instead
And just have more gamemodes
I think anything but level BP is more acceptable.
its unfortunate how many tutorials show things in level bp.. it should just not exist
In fact, my own rule is not to use level BP at all times (mainly due to open world necessity)
Completely agree 👍
Yeah I just make child GM blueprints instead
thank you for all of you, you guys really give me a lot of advice!
The Level blueprint is nice to use for debugging at times, but yeah avoid actual game logic in there
its weird like that isnt it? its like, are you new? use the level bp and then you learn never to use it, like... wtf
im comfortable just making a bp class and tossing it in, but thats me
i feel its a remnant from udk days where kismet was only level bp
Using the level bp might actually be easier for beginners, but it’s not best practice and that should be explained in tutorials that utilize it when you maybe shouldn’t
There are some use cases...
I can see how just putting everything in the level bp to make your logic work can be encouraging and easier for beginners
Yeah for sure
Such as tutorial triggers that are completly level depending anyway
But not much more besides that
easier yes, but still possible without
Well anything is possible without the engine structure haha
You should always make your life easiest
by that logic i would retain the fact to never use level bp then 😆
Generally speaking though, the level blueprint isn’t too useful. More for prototyping, debugging and perhaps some one off logic.
what's easy right now vs down the road
If you’re like me, down the road will include rewriting everything 4x hahaha
yes, programmers call that refactoring so they sound like they know what they're doing 😁
Heh. Don't remind me of myself refactoring my own tools 😉
I think artists are worse in that case, they don’t refactor
But they change their mind 10x
they could be neater 😛
dont put in art in a box 🙂 they have enough to deal with when they don't know what they're doing until you ask them what it is... we'll say it was planned all along
no one is safe! it's all anarchy in game dev
Yeah I can only talk about student game artists
When you’re almost done with making it all work they go like: “wouldn’t it be nice for this to do that”
😔
yeah, gotta have some professional background to realize its better to complete an idea than to never decide on one
thats discipline right there
contradictory to what most artists want
I’m guilty!
Altho not an artist... trying to make a full game has been a lot of back and forth
But you learn along the way...
A lot of leaving “dreams” behind and just making it very simple to begin with is the key
yes it is! tis why i avoid cpp, it would be another avenue to change my mind in, ill stick with..... design, bp, art, animation, vfx, sfx, data tables
i think the list goes on but yeah, many hats right?
Haha for aure
thats normal and its good to get use to
I got in to C++ for my project, just as an extra challenge
But I’ve been learning the language in uni anyway so
too cool for me
I might be overscoping a little with added multiplayer...
Considering how many other things I still have to learn about animations and vfx 😅
oh geez, just pile it on
But oh well for such a simple game, making it MP isn’t that hard and I wanted to learn it at some point anyway
Might as well start simple
anyways, yeah you know... blueprint performance is a riddle, that framerate... mp with bp, tricky huh?
For sure possible to make most games if not AAA work in BPs only
Mp that’s something else...
Can’t even get Steam to work without custom C++ code in 4.27
can you think of any mostly bp AAA games? fortnite?
but all the books!
There are fairly big BP games tho
Haha don’t worry I’m done ranting 😂
Best of luck with your project, I should get to work
ah right, same to you
im off to bed actually
Goodnight in that case
Either I've discovered an engine bug or I'm doing something wrong. It seems like the SceneCapture2D component's "Show Only Component" node isn't working with Niagara components.
Steps to reproduce:
- Add SceneCapture2D component to BP
- Assign a RT Texture Target, set Render Mode to "Use ShowOnly List", Source "Final Color", turn off all Show Flags except Particle Sprites, Static Meshes and Translucency
- At Begin Play, execute Show Only Component with target as the SceneCapture and In Component as the Niagara Component (if this is changed to a static mesh it works).
was there a question here? 😆 or you just want to show an internet connectivity issue?
i just want a solution
Ok, for whatever reason, your editor believes it is unable to connect to epic games data collection endpoint. it is just a warning and has no impact on your game.
if you have a specific issue with your project you can ask here as well, but that is just a warning and has nothing to do with your project. 🙂
ok solved
i need help with something, i converted some meshes into blueprint actor and when i try to save all, the level doesnt save, what could be the problem ?
@vivid sleethttps://answers.unrealengine.com/questions/1000387/cant-save-map-graph-is-linked-to-private-objects-i-1.html
Maybe make a full backup before attempting the fix.
Just to make sure.
i fixed it, the problem was the blueprint i recently made didnt get included in the level somehow,
Guys im having problems setting up a multiplayer game
I cannot posses a character in client
When I bind a button's "Is Enabled" to a function, and it gets disabled, it looks like this and is still clickable
but if instead I call Set Is Enabled with false, it looks like this and ISN'T clickable
what gives?
(is this an Unreal bug or am I doing something wrong?)
for reference, when the button is enabled it looks like this
@atomic salmon it didnt work for me
But you fixed it right?
#multiplayer but be more specific about what doesn’t work and show some of your code
i fixed it by deleting the blueprint that i just made
once i convert the sofa as a blueprint actor, it does the same error
is that normal ?
Errors are never normal. It may depends on how it was imported. Maybe you can try to reimport or try a different import method if feasible?
i imported it by datasmith
question, doesnt making copies from the object of the same object then coverting them into blueprints produce this error ?
bcuz at first, i imported 1 sofa, then i coppied it and converted them both into blueprint actor
Q: Is there a way to clear the datasmith user data or remedy this problem?
(I figured out the solution to this shortly after posting)
A: There is an “Asset user data” category at the bottom of the object’s detail panel, clearing the datasmith user data asset from this has solved the error and allowed the object to save.
will that make the objects as static mesh componants ?
If the clears the error then you can try converting it to BP
I guess you need to be able to interact with the object?
i just want to change the materials of it by widget BP
Then yes, usually through a dynamic material instance
I've got a little puzzle I need to solve for my game. I posted yesterday about the weapon attacks being too quick for a basic trace to work, so I needed to find a different solution.
The solution I've found so far is to do a sphere trace based on the maximum range of the weapon. This consistently hits enemies, but obviously it can't distinguish between enemies that are in range of the swipe, and enemies that are behind the player.
I have it saving the position of the weapon in the last frame so I should be able to test whether the enemy is between the two angles, but I'm still working out a way to do it consistently, so far it only works most of the time. Does anyone have any suggestions?
Apologies for the terrible example drawing BTW 😛
So in this example it would need to register a hit on the top enemy because it's between the two weapon positions, but not the lower enemy.
Dot products my friend
^^^ that
Thanks, I'll look into that.
that will give you the cos value of the angle between two vectors
Consider the weapon positions as vector and do a dot product with the vector from the player to the enemy
If the sign of the result is positive the enemy is in front of you
just a quick question... when i play animMotage for death. how do i stop ai standing back up into idle pose after it completes?
have you tried to disable auto blend on your montage?
you could also freeze/pause the last frame or just disable all animations on the mesh in general
🙂 i didnt know i could disable animations, thank you
bruh no one is answering there
And no one is guaranteed to answer, but you're more likely to get a response if you ask in the correct channel. The game mode has an easy system for respawning players. Why don't you just look up tutorials
Be patient.
Hours after response is like the normal luck you can get.
well i did for 5h
@desert relic this is the process I have set up for one of my older projects
yeah but u didnt use "posses"\
😐
The game mode has a built in function called restart player at player start, which takes in said player, and said player start. It handles all the spawning and possessing
No. The game mode is server side only. So every thing done on the game mode is done on the server. The cast to the game mode will fail unless the cast is done by the server
well im trying to make mine for on the client too
? It also respawns clients
I am trying to play a sound whenever my enemy moves but it isnt working. Is there something here which isnt correct thanks
Create an event and plug it into set is moving. Off the begin play use set timer by event, plug the event you just made into the timer, and set a delay on the timer
@ancient atlasEvent Being Play is executed only once, at the beginning of the game (when you start playing). After that it is not longer triggered. If you need to constantly check if you enemy is moving, either use a timer as suggested or use the Event Tick which fires at each frame
The best would be to delegate that to the enemy blueprint itself, so when the enemy moves it will trigger its own sound
Event tick in this case wouldn't make sense, because you don't want a sound to play each frame. You could set a delay, but generally you should clear your tick event from code as trivial as this
i hooked it up to event tick before but it still didnt play, i will try the other way
@silk cosmoscorrect, I should have been more complete in my answer. In that case one would check if the sound is already playing and not play it again.
Same problem with a timer though. You would need to know how long the sound lasts or still check if it is already playing.
@ancient atlasin that case you would need to check your logic and also ensure the sound is not triggered again if it is already playing
i also tried to add the sound to the actual run animation but i couldnt get it to trigger
You would need to use animation notifies for that
Do some basic debugging to your blueprint
Use Print String to check when something is executed and write a message on the screen
@ancient atlas ^^^^
print strings are my friend 🙂
how do i replicate everything from server to client or vice versa
read the pins in #multiplayer
Do on clicked events not replicate properly?
Still working on 3d widgets and someone said they had to use on pressed instead to get it working
why do people abuse blueprints
Personally I like to prototype in BP and then transfer.
I find it way easier for debugging and iteration, plus it's easier to visualize the flow of the logic
where can i find the " asset user data " ?
transfer to cpp?
^
Unless you're really into watching things compile.
is there a way to temporarily disable all physics in the world instead of looping trough all actor and manually disabling it?
how to replace that Jump Asset when i have a custom jump function (it didnt worked so i just created my own, and actually want to keep it now :))
that Screenshot is from the 3rd Person template State Machine, from JumpOut to Idle again
like what does this function
Little question, do umg tooltips work on 5.0?
perhaps better asked in the UE5 section of the discord
that's animation state transitions, #animation
nobody anwsered there and i thought this function might be used in other cases too
no it's purely animation based
Hey. Can anyone help me with a save game problem.
I made a currency in game.
I win coins in game so I put the coins in the player BP then i reference the save game and set the coins i won from BP player to save game.
So when i go to menu to use them. In bp menu widget they are not there.
I've set already in widget to show me the coins saved in SAVE game and they are not saved. I don't know what to do anymore. All other things are saved like unlocked level
By coins, do you mean an integer, or actual objects?
INT
Would need to see the saving and loading code then.
Yeah.. but all the other things are saved ,just the coins aren't saved. Could be a bug?
It's unlikely a bug. Unless you're using UE5.
I tried to see the problem with print string and then the level is done the coins are changing like it should be ,but when i change the level in this case the menu level that number is not saved
UE 4.27.1
show your save/load stuff
Can't help without seeing literal logic. 🤷♂️
Best anyone can do before that is to tell you to make sure you plugged the thingy into the other thingy that does the thingy with the thingy.
make sure you plugged the thingy into the other thingy that does the thingy with the thingy.
^
you wish^ (and so do i)
is the only way to delete an object is to remove all references and wait for it to be collected?
Pretty much. At least in Blueprint.
thats painful
O.o Why?
I built it with many references in many different blueprints and now I have to change how ive written the system
The first is Menu WIDGET ,second level BP to save every time the level is complete , the third is in the player BP
actually does it include references to something within the object?
@warped spindle I don't know where that long blue line is going. Where are you setting SaveGame1Ref? Both in the Level and the Widget
Just to save game slot
What about the SaveGame1Ref?
It's the save game reference
But where are you getting it from?
To set coins
To get the coins in save game and change them with the coins collected trough level
I meannnnnn how many objects would be performance dropping? they're all very time logic wise.
Right. But where are you setting the reference at? That is just a pointer. Have you actually loaded a savegame and set the return to that pointer? I'm assuming initially that is what you need to do right after LoadGameFromSlot.
If i have radial force in my character bp will it affect the charracter in game ?
depends on the objects. not all objects are created equal
The reference is made like that.
It's the same in others BP to get the reference to save game.
How does it get from HUD to the level blueprint?
I made the reference is level BP too
Made or set? Because just making the variable creates an empty pointer for an object of that type. It'll be empty/null until you set it to a valid object.
No. It's made exactly like in the image before.
Then you haven't set the variable to anything.
The thing that's not working is that Int after i change the level.
The bool highlighted it's working perfectly and it's saved in save game.
Then you have to be setting that variable somewhere in your level.
It won't just work by naming them the same thing in the HUD and the Level and you're setting it in HUD.
how can i make a exec line to my location vector
I remembered that a simple blueprint can't communicate with Level BP directly. That was the problem. I solved connecting the player with the save game and then with widget menu. Thanks anyway for support
https://c.tenor.com/RegpKvUKWgMAAAAM/boom-explosion.gif
level BP can communicate with actors in BP?
although level BP should not house logic that is systemic
Actor that exist in the level you can comunicate with them trough level BP ,but if they aren't exist in an other level you can't communicate with them.
yeah level BP goes for the level you are in currently it should go without saying
Hello everyone,
I'm trying to figure out how to make a crank in VR. Anyone had experience with this or can share resources?
(research resources)
have you tried #virtual-reality ?
whoops 🙂
Hey im currently setting up a system for being able to throw/drop an object and on hitting the floor it activates a game over.( the object being thrown is simulating physics but when it is being held it is not simulating physics) when it hits the floor after being thrown it doesn't trigger the overlap but while holding the object it triggers the overlap is there any way to trigger overlap events on objects that are simulating physics or another way creating the system that could fix this issue altogether? thanks in advance 😋
i mean that yellow position thing if you want to spawn
lorash is trying to say a vector is just data, you can't execute data
why don't you trigger the game over on the Event Hit?
I did try a On component hit instead but it doesnt trigger in either situation for some reason 😅
on which actor are you doing this?
on the actor of the object being thrown i guess now im thinking bout it it needs to be on the floor rather than the thrown object right?
no the actor is fine
but you need to be sure that it has generates hit events checked
okay I had the collison box simulating on hit results but not the static mesh its self it now works on hit but it results in the same issue of only working when being held rather but if its thrown it is completely ignored
can you show your setup?
can do 1 second
(... and they were never heard from again)
thats the physcis for the thrown object
the simulated physics gets turned on once the object is thrown but turns back off on pick up so the player can hold the object again
ah sorry I meant the collision settings
no probs xD
is there a way to calculate a clockwise angle between two vectors?
or any angle in BP?
still ends up with the same solution on holding object it finds the floor, but when thrown it finds nothing on hitting the floor
hmm that might be some physics related stuff
try in the #legacy-physics channel
though it should work
you'd be looking to work at quaternions i believe
isn't there also an even for physics volume cahnged?
also just found that if i pick up the object after it hits the floor it activates the game over 😅 so definately physics and yeah ill try in the physics channel thanks for the help though
im not to sure lemme check
yeah it does
you could try and see if that triggers on throw
but I would recommend that you speak to people in the #legacy-physics channel I'm sure they would know
yeah ill look into it and ill ask over in the physics channel and see what they say thanks appreciate the help
How do i create 2 cursors for 2 players
in local multiplayer
1 cursor controlled by mouse other by joystick
use get viewport size
and the input values
if you add 1 then multiply by 0.5 you can get the input axis value from -1..1 to 0..1
which you can multiply
onto the viewport size
i mean how do i create that cursor
so that it can be seperate from the mouse cursor
Is there a way to get the list of object that collide with a mesh?
Without a hit event
well
you can check every frame if one object is within the other object's bounding box, or close to it
but you'll be better off with collision
Or is there a way to check if an object doesn't have any collision?
the above
I just told you
.
overlapping should work in case you have it enabled on the mesh
probably wrong collision settings
Im using the physics actor preset and am currently using the rolling ball template
i can only move the cursor by a bit
from gamepad
why?
and when i stop moving it
it defaults it to center of the screen
your math is all messed up
you're not saving its relative location
yes
yeah then you need to add it on top of last location
limited to screensize x,y
if i change it to 1920x1080 then when i move it a bit
it straight up teleports
to top of the screen
top left i would think
wait
why do you have these 2 tho
you watched tutorials on math 😛 ?
tutorials on moving cursor by gamepad
he did this shit and it somehow worked for him
can someone help me fix this lmao
how do i save its last location
store the 2 values before you draw rect
i dont understand
yes so you can store the last value
dude I gave you the instructions to make it work
if you're using any kind of XInput compatible joystick you can use input axis with MoveRight and MoveForward
how do i update the last value
can i update it by
wait
it's all in my example
also doesn't DrawHUD run every frame on it's own?
hmmm might not be every frame, but basically
anyway you can do it without even being inside of the HUD class
since you can GetViewportSize inside the player controller
all inside player controller
@timber knoll is this how its supposed to be
bro idk how tf do i use this
what after this?
do you have a widget for your cursor?
yeah do
for now, inside your player controller you can create that widget
and set it as a variable
widget variable?
use the CreateWidget node
well you haven't created the variable, just the widget
the cursor widget is a variable
from the blue pin at the end of the CreateWidget node promote to variable
yeah
but
actually
no
you need to connect the out pin
from the Set node
to Add to Viewport
yes
what next
so from your widget variable
you should have something like...
set position
or set location
so now you can probably see how this lego brick connects with the previous lego brick construction I showed you
just a note: the set position needs to be set on input
And MoveForward
then head into your Project Settings > Input
i didnt create the axis bindingsi guess
yep
I don't know which controls your controller uses
so it's trial and error for you to find out
yeah that's just the name
it doesn't correspond to the input, it's just the default name of the axis value
I don't know, this is #blueprint
where do i talk
So it can be Right X or Right Y
with these problems
#graphics maybe?
if it's UE5 then try one of the UE5 channels
ty
I don't know which controls correspond with your controller. you have to figure that out yourself
MoveRight and MoveForward are default names used by epic for templates
they are just names
Yes
nothing more
did you hook it up on begin play?
remove the last Set Position
you need input events for that
and you need to follow the other lego brick I gave you
well if you look at screenspace you probably need better naming
so forward could be up
and right could be.... right
you should have input events now
u said that i have to remove set position righ
yes
try it
no you need it to run set position
and set position doesn't run on begin play
and you don't need to set variables for the floats, you can use them directly
where tf do i put set position
think
i dont know im 1 digit iq
what red node did you just pull out
Gamepad left thumbstick X- axis
so where can you connect it then?
set position?
show me
correct
well
almost
you don't need variables for the floats
and both events need to connect
you need the rest of the math still
try it
probably your cursor is tiny
it removes the pictrue
so add a new one
head over to #umg to see if you can get the cursor to spawn properly
but the logic should be correct for moving it
assuming you picked the right input axis
for your particular controller
yes but the widget isnt creating
well there you go
means that your cursor wasn't created
for whatever reason
I can't tell you why
but #umg might
but it throws 11 gazilion errors
click on your cursor variable
and it defaults back down there
right click
and select Convert to Validated Get
then on IsValid plug it into position
leave the other path
that'll be why
you can't use pins between execution paths
that's going to give you errors
you need a new variable
that's why we made it a variable in the first place
what do i do
then
once you have it, right click and convert
.
.
whaat u said that i should hook it up to set position
yes but not from beginplay
also you completely f'd it
yes
no
why do you have a validated set
is said Get
come on
you gotta listen
.
the get needs to be with the other execution path
i switch up get and set?
with what execution path
where get position is
bruuuh
yeah bruh you
bro idk where to fucking hook it up
yes
just hook up the set to add to viewport
and connect the pin from the get to the set position
try it
it is as long as you hold down the input
unless your controller is broken or something
yes but when i stop moving
from GetViewportSize, multiply both of those with 0.5
why?
do you want to fix your problem?
all this time you've been fine following what I said now you're asking about why we're doing things
lmao
show me what you did
no that's just the previous logic that I showed
you didn't add the extra change that I asked you to do
do it before the other logic
oh okay
then
i mean this aint too bad
its suposed to be on that side anyway
the only problem is
its teleporting
not going frame by frame
do this after you set the cursor variable on begin play
as for why it's not going frame by frame, it should follow the framerate
so either your controller is busted somehow or your framerate is low or your widget has some weird settings
if i straight up go right it teleports to right
but it goes slower
i think sensitivity to high
yeah
so you can add a float variable
called Sensitivity
and multiply it onto where you have the other logic
you need to do this for both x and y
can i do it in project settings
yes but also no
you can set the value of the axis to be lower
at the risk of screwing all the logic
so I'd recommend you do this as a separate value
and how do i set sensitivity then
just set the default value really low to start
like 0.01
and adjust as needed
later on you can set that to be a custom setting somewhere
but that's another can of worms that I'm not gonna open with you
where you have the 2nd 0.5, hook it up into there
on both x and y
so i should create sensitivity and hook it into 2nd 0.5
on both x and y
it just lowers space where it can move
ok but is it at least slower now?
try setting it even lower and see if it keeps teleporting
i realised whats going on
its not repeating
like if i hold right
i teleports and thats it
on the set position node
try unticking the DPI checkbox
but tbh I think it's your controller that has binary input or something
because that corresponds with why you're not seeing a steady increase or decrease
so you need to setup your input properly for this
Isnt this an issue of not keeping track of current position? Atleast it looked like it was
nah we're scaling the mouse position to viewport
So its supposed to reset to center?
but given it's teleporting it sounds like there is no inbetween from 0 to 0.5 to 1
which is true for boolean inputs
Or low res analog sticks
yes
Dude its not my controller
Is there a reason why I don't have the option to create a new skeleton (right)? The normal one is on the left (every tutorial out there) and for some reason I just don't have that option when bringing in a mixamo skeleton
well you didn't set up the input events properly
so it might be that your controller is ok
but I don't know which values it uses
because you shortcut it
On the right you are importing an animation to associate to an existing skeleton
not sure why this is in the channel anyway? seems like #animation
More #ue4-general as this is a generic question on using the engine
Aye, fair enough, thanks for answering
Can someone tell me why my character doesn't go up the ladder on this blueprint? he just stops movement completely.
does it work if you stop input and retry?
@odd ember no
I want to be able to call "ce <customevent>" using my gamemode instead of having it be tied to level blueprints. Is it possible to add a custom event to the level blueprint from the game mode blueprint at runtime?
Ce u got any ideas?
nope
will try that, not much else to debug tho
the place where you set the bool, the value of the axis, the up axis being correct
etc.
you can try ticking force as well
it might be that the CMC ignores up input by default
I wasn't clear. I am trying not to write code in the level blueprint cause I want the commands to work at any time the gamemode is active instead of being tied to levels. 'GetGameMode' would only be useful if I am writing it in the level blueprint right?
the event(s) would still exist on the game mode
you're just calling them from the level blueprint
doesn't mean you can't later call them from somewhere else
or even use the command yourself
Damn nothing worked... Will keep playing around with stuff like if flying is enabled etc... must be something small like that holding it back
probably is yeah
check the flying movement section under the CMC
to see if there's something there
at first it was disabled, but enabling it didn't fix it
Ok so I made a new level, "LEVEL_BASE" for all of my existing levels to inherit from, so they can all have the same set of commands. But it doesn't show up if I try to reparent the level blueprint of an existing level. Am I missing something here?
a level script actor is not the same as a level
and to be honest I'm not sure you can create a level script actor in blueprint
Ok so I'm starting to think it is just impossible to make all my levels share a set of commands without copy/pasting all of the events each time.
Create a Level Script Actor class, and in project settings change the Level Script to your custom one, like this:
whats fun is that level script actor classes dont show up when making a new blueprint
you have to click the + icon next to the selection in project settings, unless im just bugged
I already closed my project to go grab lunch but thanks @hardy fable . I'll try that out when I get back.
How can I use blueprints to make an ability target the mouse location?
Don't need a targeting reticule or anything like that, just press ability and it goes to mouse location instantly
Instead of having the new target view as third person character I want to set it to a camera from a different Blueprint, how do I reference that camera
anyone any ideas?
That worked (almost). All my levels show the command. However, for some reason calling the command doesn't do anything.
rookie question
i'm bad at maths I need 75% of a number in this case 75% of 104 but want the game to work it out
incase any levels made have different overall number of pellets
i've tried 75 / 104 * 100
sorry 104 / 75 = XX * 100 = XX
for some reason this isn't working ??
where my maths failing please
hang on there a percent node on UE4
75% of 104 would be 29 that correct thats waht U seems to thing anyway
104 * 0,75 = 78
To expand on this, to find any percentage first divide your number by 100 to get 1% and then multiply by however may percent you need, in this case 75. Due to how multiplication and division works you can just calculate 75 / 100 first and then multiply your number by it. i.e. (SomeNumber / 100) * 75 is the same as SomeNumber * (75/100) or SomeNumber * 0.75.
Because dividing by 100 is just moving the number two decimal places to the right you can easily figure out what value you need to multiply by. For example if you want 25% it will just be 0.25. For 125% it will be 1.25 and so on
yeah for some reason taking the 104 vaule down to 0.75 or atleast the way i was doing it it wasn't liking
Does anyone knows about the Replay System with the Console Command in BP the question is the Camera spawn i think in the middle of the Map ,how i can set the Camera or Move it to a specific location or can i controll the Movement anyway of the Camera
You can create a math library too to have common stuff like that right there when you need it if you keep forgetting how to do it
those nodes are so dark they're almost invisible
Just how I like it for my fragile little vampire eyes
😆
Not really sure where this fits in but:
I'm currently trying to achieve offsetting a Relative Transform location.
I have an Array of Actors
This I put in a ForEach loop and spawn a Spline mesh component.
my question is how can I offset them in Y Coordinate based on the Array's length?
For example
Distance float= 50
Array Length = 5
Result should be:
-25
-12.5
0
12.5
25
Any guesses? I would search the internet but can't really find a term for it
1 Entry = 0
2 Entries = -25, 25
so it spans out equally
I think I would need to see a visual of this to understand it
you can use a Mod of 2 and when result = 1
and set the 12.5 to negtive
and multi that by the index of the loop
Hi all, anyone know if its possible to add a socket to a skeletal mesh in blueprint, in the construction script for that blueprint?
I see a "Add Socket" node, but I'm not sure what's supposed to go in the bottom pin for the Socket Asset... I cant seem to create a "Socket" asset..
afaik a socket is just a transform
uhh... Don't think I understand that :o
So I take my Distance of 50 mod them by 2 ?
yeah nevermind i didn't think it though lol. i dunno
The function is normally called linspace however unreal doesn't have an implementation. It's easy to right though
First you set the value to be -(YourFloat / 2.0) and then you set your Stepsize to be YourFloat / (Length - 1) . Now in your loop you use the value, then add on your step size to get the next value
Any thoughts as to what goes in that bottom pin though?
you can hover over the pin to find the class
Can I calculate the stepsize ? or will I have to just set that manually ? :o
Yeah, it says "Static Mesh Socket Object Reference"
but I can't create one of those as an "asset" despite it having a search... I think its for hooking it up to a socket you've already created manually on a static mesh
You can calculate it, it's just Distance / (Length - 1) using the names from your example. So if Distance = 50 and Length = 5 the Step size is just 50 / (5 - 1) which is 50 / 4 or 12.5 like we'd expect
for Distance = 50 and Length = 2 we get 50 / (2 - 1) = 50
Just be careful as you have to check the case that Length = 1 as you'd get Distance / (1 - 1) which means you divide by 0 and it'll throw an error. You need to decide what should happen in that case (maybe just return 0?)
possibly? I don't know that sockets can be added in BP. as far as I've seen they're only used in mesh editors
the closest BP equivalent is a scene component that you could perhaps offset from an existing socket
The reason I wanted to "create" one, was so that I can avoid passing all these string references around for the socket names (does my head in!)...
I figured if I created the socket in the construction script, I could then store its name "once" in a variable on the object... then, when used, just access the variable...
but if I can't do that... Im back to crappy string references 😦
why are you referencing socket names constantly?
Thanks alot! That helps :D
You put the name in the socket itself - so thats one...
Later, using a Physics Handle, I need to set the "In Socket Name" - so that's twice
and I think, in Tick, I'm going to need to constantly set where this thing is (as its sway about a bit outside of the animations at the moment) - which means I'll need to use the string reference again for that too!
Those should be two separate things and saved to variables. Make a variable called something like CurrentOffset and give it the value -(Distance / 2 ), then make another variable StepSize and set it's value to be Distance / (Length - 1) then in your loop you will do something with CurrentOffset and then afterwards you set CurrentOffset to be CurrentOffset + StepSize. That way for Distance = 50, Length = 5 you would have -25 first, then -12.5 on the next loop, then 0 and so on until you hit 25 at the end
you may have better luck asking in #legacy-physics
okey dokey... thanks anyway 🙂
Did everything like you said but it's still not centered :(
Note that the "Output Vector" Variable just has a Fixed X of 50... is just so the lines do not start inside the button
Swap the order of your Add Spline Mesh Component and your Set Offset node. You need to use it first and then update it. You're updating before you used it
uh? What exactly do you mean by set offset node?
What's happening is you're adding the stepsize to the offset before you use it. So using the Distance = 50, Length = 5 example you set the Offset to -25 and then before you use it you add 12.5 and have -12.5 so rather than -25, -12.5, 0, 12.5, 25 you get -12.5, 0, 12.5, 25, 37.5
yea sorry kind of forgot about that
No worries, glad you got it sorted!
Good luck!
i feel like more people use blueprints rather than cpp
almost as if the barrier to entry is much lower with blueprints
There's not much inherently wrong with that.
there is
Tick overhead, trap of some questionable practices? Fuck yeah, even though it's not entirely BPs fault.
Also your baby might speak C++ since birth, but not everyone is. BP is good for protoing gameplay quicker than writing it in C++ out of thin air. At least that could help designers and engineers to be on the same page.
people who dont want to code
true
people who can't code
Well, it's cool if you speak int main() as a baby, so does your elders.
I give you that if that's actually happened
Though realistically your elders should speak assembler (or even Fortnite Fortran), but that's nitpicking.
you're doing it wrong if your not manually setting your bits with a magnet/voltage switch - directly to storage.
haha
Screw it, transistor is shit, absolute heresy. Real man use vacuum tubes.
I'm sure vacuum tube users get VIP access to hookers and blackjacks.
Transistor peasants can go screw themselves.
The point is, C++ and Blueprints have their own strength and drawbacks, and they can be used together.
It's not about superiority complex about one or the other.
anyone know how to use this plugin?https://github.com/BenPyton/ProceduralDungeon
The same crap can be said for any scripting languages or any level programming languages, if "the hardest to do always superior" is the measure.
Nope. Least not me.
Though it's a good rule of thumb to always read the manual.
and i did, and still not really working for me.
at least have the setup
or just leave it and do some design first sound good
not really relevant to this channel, or perhaps even this discord. you should contact the owner of the plugin. but you may find some assistance in #plugin-dev
ok
Hey guys, is there a way to filter data tables based ona boolean in the data table?
as in data table queries?
I don't think so
but you can filter them once you've loaded the data
yeah
