#blueprint
402296 messages Β· Page 750 of 403
how would we travel ? π
its called 3rd newton law
fart in space u'll advance
was it clear ? i can be more precise
I'm thinking something so I'll let you know π
I'm thinking to divide by the total seconds (the base unit I'm using to track time) divide it by 3600 to get the hour (or just use the hours value) and multiply it by 30 to get 180 degrees, yes? That should work
yea that's no problem, in my time manager bluepring I'm using it to get hours/mins etc. so I don't even need to divide by 3600
im not sure there is severam path to it, as long as u use modulo to get transformation 29h -> 5h u should be good
although problem is, my time is tracked in military format (24 hours) and the degrees will be going to 360 which only corresponds to 12 hours
i know there is no air in space
isn't it why they call it space
well space is just the emptiness, no air = vacuum
again modulo not 24h but 12h
thanks xd
mister hoodie think we go to Mars by aiming correctly from the earth !
if you really want to be accurate, there is actually some sort of "air" in space, as in, molecules of gas, but the density is ridiculously low
u dont need the ground
this is just physics im sorry !
u eject matter u have a force in the opposite direction
i cant justify it except by some adhoc argument like energy conservation
im not debating with u xd
But you did it anyway. Stop lying to yourself.
okay, I can't tell if you are arguing about the specific term or saying that spacecraft literally cannot propel themselves in space
dont listen to him lol
ofc u have rocket physics in space, u just dont have frictions which makes things actually easier to simulate
idk thats the first guy telling me spacecraft cant go to space
i perfectly undestood u
u think we need air to propel spacecrafts
which is the dumbest thing ive heard today but the day just started
u still got time to pb
a
u seem to enjoy speaking about things u dont know
good day anyway !
i see no insults
but ok !
Anyfuckingway, you could take the Flying BP template, add some scifi effects, and work your way up from there. The default template isn't that snappy for gameplay purposes, so you should make some adjustments to it.
bad advice imo
space physics is simple enough he can do it from scratch
Great weather today
Is realism even matter for scifi space games?
There is a fantastic thing that people came up with in the 90s when the internet started to be a big thing and people were acting just like this. It's called a mute button. Please use it. This place is meant to be constructive.
no need to be rude
i dont mute anyone
i just demonstrate how stupid they are if necessary
and it was here
since he's misleading another member
okay, go have your awesome discord slapfight elsewhere
and prove your awesome victory there
i was on my way anyway
no but thats funny saying a spacecraft doesnt work in space
imagine
anyway
Check my DM.
ok I'm not sure why but it's not working as expected.
If my start time is 15, then it should go into the true branch, which it does.
15-12 = 3
3 x -30 = -90 degrees on the X axis. But instead of pointing to the 3, the hand is pointing to 6.
Are you taking into account what 0 is pointing at?
try manually put -90
doing this is pointing it at 4 lol, strange. The start positions of all the hands are 0 (so all are pointing to 12)
How is the clock oriented?
i see a relative rotation
Seems weird
Makes sense now because with 0 they are pointing to 1 lol
ah
that's odd, why are they pointing to 1 at 0 relative rotation? Do I need to deal with pivots yet again?
the parent is offset for sure
I made sure they were all aligned.... ughhhhhhhh
No idea about your hierarchy
hmm
So can't answer that
Hello, can anyone explain what exactly does
To Direction And Length
(2d vector) Do?seems like it just compares two cordinates with eachother to see which one is bigger?
then the axis are shift ?
have u tried world rotation ?
world rotation 0 should give u 0h
if not then the axis of the arrows are not aligned
lemme see
It gives you the length of the vector and the normalized vector (direction)
Or what do you need to know?
Still has the 30 degree offset ππ
Also I think modulo equations will do the same job fine.
Something like
ClockRot = (Hours % 12) * 30
perfect !
check the axis on your mesh
u better in math than physics
It's perfectly fine here π¦
Thanks will try
Well, I did get poor grade for math at school.
when u set world rotation 0 every frame u dont have it straight like that ?
Can you explain what it means?
when I print it it looks like it compares X with Y and if they are the same it returns 1.0 and 1.0
but if x is 2 as big it returns something like 1. and 0.5
so the length is the distance between x and y or what?
My attempt would be (Hours/12 * 360)
x 30 is for hours because hour hand has to move 30 degrees to match the number
Which is essential the same
That's also an option.
@bright frigate try change the mesh
When I was doing doors earlier, anything more than 180 or 360 would absolutely obliterate everything lol it was ridiculously complicated
it really should work
I'll send you dm with full code hold on
Not sure what your DCC tool is, but in Blender, it's easy to forget to apply transforms.
Also how about the clock hand mesh itself on its own?
If it's appear to point upwards in the viewer, in UE, that means the mesh itself is fine.
3ds max
Here's an arrow lol
how do u know it is preserved in ue
i meant to battou
u should check
Try opening the mesh asset itself in UE.
well I didn't mess with anything, I just see if it imports properly. If it doesn't then I redo things in the DCC
ue can mess things for u
i hope u know that lol
seems fine here
Import settings can be screwed up, for one thing.
also, I know that if I don't do this set-original-position and just let it increment from pointing at 12, then everything works as expected. It goes from 12 to 1 correctly
err scratch that, it starts from 1 as well lol
aight
so there's a 30 offset for some reason
even for world rotation
Do you have AddRelativeRotation node got executed after it, by chance?
can u make sure of that @bright frigate
if yes this is def a mesh pb
no need to look at your bp
yup world rotation was also producing same results
i would raycast alonf forward/up/right
I dunno what I can do with the mesh, it's all set correctly
Also another way to do clocks is to make it a skeletal mesh, but that's kind of a different topic.
im saying in ue
forbidden forest for now π
thats an overkill
unless u wanna do arrow physics
when u break it
u tried raycast in ue ?
if up is along the arrow tilted with worldrotation =0
i'd just kill myself @bright frigate
I'm putting suspect on the timed Event there π€
i suggested him to try every tick i hope he did
ok something is going on with the last node here
disconnect the timer, try the rotation aain
I disconnected it and then setting 0 for X was correct
yeah, you're probably not setting current hours when begin play
when I reconnected that -30 one, then it gave the offset
bad reference?
well Sun BP keeps track of hours, mins, secs
So at begin play I'm just pulling the value from there
JEEZ
yeah but you have a variable called CurrentHours
and my guess is it is set to 0 when the event first fires
u are setting the relative rotation from the relative rotation
idk if it's that i just wouldnt
and when you start with hour 15 (Sun BP) lets say, the branch will run
because 15 =/= 0
then it sets currenthours to 15
and rotates the thing
but he tried worldrotation = 0
I just tried to see what happens if I reconnect the modulo logic with the final node at the bottom disconnected
and that causes the hand to point to 5 lol
I'm gonna disconnect the timer to make things simpler first
Set CurrentHours to the SunBP's hours on BeginPlay
but I'm not using current hours until I get into the timer
A bit of suggestion, but I prefer going with a single float for total seconds, and do a bunch of non destructive modulo to pull the timestamp out of it.
So for example 30630 seconds would be 08:30:30.
now I'm not getting into the timer anymore, it's getting a bit complicated. With this, it should point to 3 on the clock, so why is it pointing to 5 LOL
yeah I have the float too, I can get that. In fact, "hours" comes from modulo operations on the seconds float in the sun bp
here's 0 which is correct
it's back to it's pointing at 5 again rofl
Can the wristwatch die at any moment in the game?
haha thanks, I'll show you a real photo of it
nope
timer is disconnected?
yup
no other actor runs the Update Time event?
You can imagine a Vector like a stick in real life
The Distance is the length of the stick
The Direction is where you are pointing it at
nope
this is so weird lol
are you sure?
If the watch won't die/misalign at any moment, I think directly getting the time value every tick, without storing it in another variable would work.
yup
the watch is broken
sure? I was avoiding tick since that's good practice and all
it is from the 70s afterall ...
I know that the sun bp time works flawlessly because I'm running the lights off of it too and they run fine. I'm running audio from it, which also run fine
Event Tick is fine in this case, since (assuming) you're doing the world time update somewhere else.
There is no comparison though, The math behind it is quite simple.
The length of a vector is sqrt(xΒ²+yΒ²+zΒ²) and the direction is just a normalized vector (so a vector of length one), which you usually achieve by diving the vector with it's length (cause, you know, x / x = 1)
@bright frigate increment 1 every tick and print the transform while looking at the arrow
so u get the full picture
It is, unless you really really need an update every tick (e.g. renderering, physics)
fuggin A look at this
if I use the float instead of the int hours, then the hand is pointing to 6 correctly lol
everything works fine now
lol
wtf unreal
why ??
wtf
Seems like something got lost in truncation
ye
yeah looks like it
but what
unreal makes me this panda
also maths
I did great in advanced maths but man simple maths blows my mind off
ffs
well anyway thanks brudders
i still unsure what happened
always good to talk, makes the brain go weeeeeeeeee
np c;
"my code works, I don't know why" π
well, its not unreal, that's how cpp converts floats to ints, use round instead
I had to read it 10 times but I finally got it, thanks a lot
Have a very nice day Cedric!
it just blindly truncates ?
Truncation just omits the decimal numbers in float.
frack but the moment I add that last node back in, it adds the 30 degree offset again
so maybe i should use -x30 instead of -30?
well, thats the instruction that it was given, static cast from float to int, truncates the float, even if it is 2.99 it will still result in 2
Have you do the same with what's on the timed event?
i know what truncation is but here it is int -> float
why does it fuck up like that ?
gonna try
gimme a sec, I need to understand what are you guys doing here
I think I need to redo the rest ... the timer code should use the same float now instead of the others because things are being 'lost in translation'
print out the values of current seconds and hours on begin play and compare them
here's a refresher
I think the SunBP has a bug with converting from seconds to hours
no I think what's happening is, current hours (mins and secs too) aren't being set at begin play
they're being set in the timer
so at the start they are 0
when the values are different, the branch then assigns the new to the old
print them out and you will know
which causes the offset to take place
if I print them at begin play they will be 0 since that's the default value
these are local variables in this BP
unless you mean the sun bp's int hours
I do
that's printing 17 ... I dunno why, gotta check this out now
clock is set to 15 though (from the seconds float = 54000)
oh wait
haha
ok there are 2 int hours
one is the current hours being set in the bp as the time updates
the other is the one for the UI compass mesh of the sun bp component. Which does not change/update. It's just the slider value
this guy
so I was 'get'ing the wrong one
ouch xdd
that's why first thing you do is debug...
then you blame the engine
nah nah, always blame the engine first
way easier
engine is only wrong half of the time
man everytime I do debug first, it's always fine ... reality is that the world is always gonna do the opposite π π
@native willow are these Floor nodes the culprits?
because even with the correct variable being 'get', it's printing 0 instead of 15
argh
deeeeebuuuuuuug
use print string or breakpoint
this prints correct, so no problems here
but if I print it here in the clock bp, then it prints 0
so I dunno wtf is going on anymore
other than real world timing that somehow beginplay is printing it before the value has been set in the sun bp
If I use Event Tick like this, then it's correct lol
where is this set?
on what event?
Tick fires AFTER the begin play
it's in sun bp on tick
ok didn't know that I thought tick would be first
here comes your answer
but how does that translate to the 30 offset?
should I just remove this timer stuff and use tick
I have no idea, im not following your code
ok
this did nothing ...
u checked mesh visibility and location at runtime ?
Hello and sorry for my stupid question , iam trying to understand Cast To . For the sake of this example i have created BP_Item1 BP_Item2 BP_Item1 has a custom event called Hello . If i want to access it from BP_Item2 with Cast To i should do as the follow screenshot ?
looks good why dont u try instead ?
i always havve an empty level to test those things
@pure walrus iam confused because we are already accessing BP_item1 class , why we cant acess its variables and events/functions etc direct after we got the reference ?
what if u attach a simple cube to it does it show ?
good question
actually u dont
need to cast
if u hover your mouse on the output pin it shows the type
What about if we have like 10 items from the BP_item1 class ? And we need to access one exactly ? We should filter it ?
resorry no u dont need to cast
You don't need to cast, but you still should cast or check IsValid.
ye either u keep track of them with indexes or u put them as a variable instead
and set the reference
So basically if i have lets say 2 BP_actors (two cubes) and i want to access each other i have to first get its class and then cast to the actual BP_actor1 . So its a required that we have to Get All Actors from class if we need communication between two actors .
What is the use case for the two cubes? Are they placed in level and just need a reference to each other? If so, put an instance editable variable of the type, and set them in the level on the details panel.
and event dispatcher if u need every instance to respond the same way
Yeah , iam just trying to understand Cast to , iam not searching for the best solution . Thank you for ur kind help
hmm
can u change the snowman mesh easily ?
so u are sure it's not a custom mesh/material problem
oh
thats a difference between them true
worth a check
but u said the cube is visible normally ?
if u attached it to the mesh then rotation must be good
ye
ah
ok
ig u checked on wireframe
@echo salmon Casting is much simpler when you understand the data you're handling. The blue variables like that are called Pointers. These variables do little more than hold a memory address in them. When you create a new object instance, that instance gets created and is placed in memory. Pointers point at that memory location. This is done to avoid copying around the object everywhere. Pointers by default are empty, this is why if you place a new one in a class and don't Set it, it'll be invalid. But like your GetAllActorsOfClass, this function iterates over all actors in the level, checks if they're that type or something that inherits from that type, creates a memory pointer and passes those back as an array.
Basic lesson over, the reason it is important to know what memory pointers are is because when you cast, you're telling the compiler what you expect this pointer to point to. This is a safety feature to keep you from accessing random pieces of memory. Say you create Item1, this gets stored at memory address 123412345. When you cast this pointer, you're not actually changing that. The pointer will still point to the same spot, you are simply changing what you expect to get from that memory location. If Item1 inherits from Actor, it also inherits from UObject. So you can successfully point to the same object stored at 123412345 location whether you cast it to Object, Actor, or Item1. If you try to cast to Character, the cast will fail, because Item1 has no inheritance chain to Character.
@maiden wadi thank you so much for you in depth answer about Cast To . Make sense now.
show collision ?
Best way I started learning Casting personally, was to start thinking of it as TreatAs instead.
i see them as policeman checking ids
that's a good way of thinking about it
thanks
but it is on the visible one ?
then the mesh went byebye
so the cube would be floating here in the capsule?
if yes i would say the mesh has a problem not the component
can u set snowman mesh at runtime ?
i think u gotta check if the cube is attached to the mesh by shifting the mesh, it should shift the cube too
if it does that means the mesh is here but has no geometry somehow
if it doesnt move it may have been destroyed
lol
thats weird..
nice!
u are just setting the location here
no matter the shenanigans u do this should'nt tilt it
Ahhh, I see. I missed that.. and almost missed your reply. TY.
I know you asked this a while ago, but I thought I'd have a crack at it...
Hey thanks, I just figured out the answer myself moments before you posted this
It was my logic
the rotator -30 = new rotator is flawed because it just deducts the angle regardless
the yellow highlighted part is the one that I should have done
because that properly takes care of the values on whether to move it or not
i said it lol
I didn't understand what you meant haha
but I think when you said it, this did flash in my brain for a moment but there were so many things going on that it just slipped at the time π
we did said a lot of things xd oh well u good to go now
don't worry I'll probably think of something else that will require brain frying hahaah
Hey, does anyone know why my Blendspace 2D is not playing turning animations, it does IDLE/Forward/Fast but even though I have all the animations setup for left turn and such. It does not register the turns when the animation is played. I have setup the blueprint and setup the direction and speed variables and put them into the statemachine. It would seem they are not working. Anyone have any ideas what could be causing it.
does it show in editor ?
Sorry the animation is not playing but AI character is turning
It swimming forward, but when it turns it does not show the turning animations.
I am using EQS system for navigation
so does it happen only at runtime or also in the anim blueprint (assuming thats what u use)
At run time
the animation blendspace is working fine in the editor, its when run time happens, they don't play animation when turning,
and u have debug the variable u feed
Yes, I have check to see if getting direction and it is
I have printing everytime it turns
have u check with a constant value to be sure its not a ref pb
letting me know the values and they are between -180 and 180
not sure what constant value your refering too
value that ensures u dont get a static state
u only set the speed in begin play
I swapped them around earlier
to see if that was problem
from Event blueprint begin play and Event update animation,
Swapping them around did not fix the problem
How would I be able to get a live reference of a spawned enemy to update its own Health bar Widget UI? Cause this is what I did but it looks and seems wrong.
Yeah i have tried lots of things to see if it fixes or breaks it more, see if i can find problem, but I clearly missing something
How do I use Event Dispatchers in Unreal Engine 4?
Source Files: https://github.com/MWadstein/wtf-hdi-files
so by constant values i meant unplugging direction and speed and put big numbers in it
but i guess u already tried
so you mean I could use EventDispatchers on my Widget Blueprint?
why dont u put the widget as a variable of each ai ?
if thats the pb
or/and vice-verca
I did...?
then whats your matter exactly ?
spawned enemies have the same UI; even when their percentage values decrement due to damage dealt
it updates the same; loses some gains some
Hello. I created a project in 4.27 but have to use a plugin which is only working for 4.26. Now when I switch engine versions the map can't be loaded anymore. Is there a way to convert the map to another engine version or am I stuck in 4.27?
whats the map?
with the function u used so far
this ^
variable?
yes
jeez
sorry, noob here
was confused with TMap container
here for reference sorry.
it can be too hard for me to explain it in words
@zinc blade this is the way to go with an event or a function
be aware that u set the type to "Widget" and not anything else
(im just paraphrasingg)
Is there a way I can use that world asset in 4.26?
switch the engine version, I don't get the issue
then it complains my world asset was created in a newer version of the engine
Add a variable to your WidgetBP of <YourEnemy> reference. In your enemy, OnBeginPlay => get your Widget reference, and set it's enemy variable to self.
try to migrate it
now you can use the bind function inside the widget editor to update accordingly
Ok will try
Thanks a lot
Failed to open map file. This is most likely because the map was saved with a newer version of the engine.
This is the error I get
i would need your bp to understand more but i know its wrong to use "get actor of class"
u should call the widget function/event from the owner AI class
so u are sure everything is separated
yes
now try it
I think it is a widget ref. Is this right? I set its Widget Class
GetWidget retunrs the widget reference it currently draws
aight
haha
thanks you guys @obtuse herald @pure walrus
you're welcome
The WidgetComponent draws a widget inside 3D Space (often used for VR). The WidgetComponent thus creates it's widget but instead of adding it to the viewport it draws it inside the 3D space.
here's the result~ thanks again, so much.
(technically it draws the widget onto a rendertarget and that gets drawn onto a plane)
can we say its a widget + scenecomponent ?
ow whoops I always forget; my mic was on
yeah thats probably good enough
hm never did 3d widget
aight nice c:
Hi, I want my mouse cursor to snap to a world location on screen. But the cursor is always offset from it's target location. Any idea what I am doing wrong?
I notice the offset varies when rescaling my window
but I am kind off lost on how to take that into consideration
try inputing a player controller
yeah, already did that π
wasn't the cause
I uncollapsed my helper function to show my logic and the node was disconnected by that
isnt it the ceil part ? or it's a big offset
I don't think we are talking about a 1px offset
isn't possible to keep stored an array of components created in a BP ?
without the need of recreate these on the construct
You need to instantiate components. What are you trying to do?
Can I use timers dynamically? Like having an array of timers doing the same thing with different parameters?
Inside a BP that are stored into a BP Array of StaticMeshComponents
at restart the editor the array is there as is visible
but the components are null
When are you adding them?
Hi all,
Attempting to get all Data Assets that derive from a C++ Type using the Asset Editor Subsystem "GetAssetsByClass" with "Search Sub Classes" set to true - what Class Name am I supposed to be entering? I've tried various formats (full c++ class name, without the U, with a /Script/MODULENAME.ClassName) but still not getting any results.
This is just in an Editor Utility Widget. Any help would be greatly appreciated
once I click in a custom event called from editor
As in starting multiple timers to the same function with different start times, lengths, etc?
Hello. I have a simple logic in the level blueprint that allows me to activate and manipulate level sequences using certain keys.
However, since I am making an open-world game I would like to manipulate and activate this only in certain trigger boxes. Also, in the best-case scenario, I would have different children mechanics applied for different cases and level sequences. I would need better control.
How to translate the logic from the level blueprint to a separate blueprint
What is the easiest way to translate this level blueprint mechanic to apply in certain trigger boxes for example or in certain cases? Thanks in advance!
I tried to copy and paste the logic from the level BP to another newly created BP but nothing happens
that is super hard to read, any chance you can paste it into blueprintue.com and post the link here?
Yes, I am sorry. Didn't know that exist π https://blueprintue.com/blueprint/tdlo4f9c/
Basically, I need to translate this into a separate BP I think and activate it only in certain triggers on my map... But have no idea how to do it
So im trying to make a really basic character changer and my problem is that when i change the animations, its not all the animations its just the idle animation does anyone know if theres a node i can use?
And as my game grows I sense there would be a smarter way to do this kind of mechanics instead of accessing them all through my level BP
Hi, so I have been trying to make car controller similar to rocket league but I cant make it work. Has anyone an already set up car or maybe someone can help me make the controller arcady?
Yeah so that'll be because a BP can't access the same things a level BP can. This is one of those classic youtube tutorials where they tell you the easiest way of doing something to get the shortest video length, rather than the best way of doing something. There's quite a bit you'll want to do and learn, so it would actually take me a while to explain it all. Have a look at some more tutorials of how to do individual things first, then you'll slowly get a hang of all the different techniques to put them together.
So just some random concepts I'll through out are gonna be key inputs in project settings, trigger boxes, casting and object references. You're going to want to use those, if you just really want to do this right now
But I would recommend watching some more tutorials first
Level BP I'd ok for very level-specific things (tower falling in battlefield, etc). But I would make BPs for more generic things like buttons opening doors. You can make a door BP and button BP and link them up by tag.
On button press, Button looks for Door that matches it's tag and opens it.
Get actor of class with tag.
Thank you very much guys. I searched some tutorials for this kind of scenario, but wasn't able to find ones.
So, I need to make a generic BP and cast the sequence to the generic BP and transfer logic there?
It's still messy in my head. Maybe if you suggest me some particular tutorial for this cases.
What is Blueprint to Blueprint Communication, or how do I call functions or get variables from other Blueprints, in Unreal Engine 4?
Source Files: https://github.com/MWadstein/wtf-hdi-files
Yeah, you also should go to 'project settings', then go to 'Inputs' and add some custom inputs. Little bit easier than doing a key input every single time. It's also better when you get a little further down the line
Oh thanks! I am going to hit that books now π
Can someone help?
@zealous meteor You can create a new project and select the vehicle option for the starting assets
Assuming you didn't already know that
I want to make my own car
But that vehicle controller might steer you in the right direction
Well you gotta learn from something, might as well learn from the base line vehicle pawn they provide. You don't have to use it, but learn from it
On my end, I'm trying to figure out how to get the text in my enum to a string or text variable haha
@zealous meteor ask in #legacy-physics, there is quite some expertise and similar ongoing projects
tostring
Aye, it just returns the number that enum was set to. All good, ima run a ForEachLoop and get the index number
Unless there is a diff way to go about it
When you have a for each looping through a class struct array variable, are each of the elements passed by value or reference
@unique wyvern Are you talking to me or someone else?
asking a seperate q
there are 2 functions, they look the same but they return diffrent things
you want this one
<@&213101288538374145>
My god...you're right @obtuse herald That's exactly what I needed! Thanks!
:no_entry_sign: Klavs#8135 was banned.
Dude, that just unlocks so much more potential haha. Why did I not know that?
you're welocme
Thanks
for each loop passes you a copy
when you double-click the node, you can see it for yourself
aight ty
You need to first learn what casting is. That's not a sentence.
(references always have these diamond shaped pins)
Completed, start loop again.
Delay nodes don't delay the ForEachLoop
It's not that. WasKilled is never set in the loop.
i got an actor i wanna turn visibility on, when its not on screen. i tried this setup that i found online. it gets the location of the actor and converts it into a 2d point on your screen. with this blueprint, the game knows when i dont look at the actor. problem is that, when i look at the actor, but i place a wall inbetween, the game still thinks the actor is on the screen. how can i check whether theres an occluding object in the way?
ohh the delay node doesnt, I see. How can I handle this situation then
Wait. No. I confused myself. I thought those were checking that the same.
But yeah. If you call that with WasKilled false, it'll infinite loop.
I'm sure DoOnce can help
DoOnce -> Play Montage -> Delay -> Reset
It would actually still infinity loop
I don't know why you wanna do this but you can always line trace it and see if there is an occlusion, or even better, use the 'WasRecentlyRenderd' node
wait no the node aint work because the visibility is off when you're cehcking thus no render recently
yea exactly xD. but i can try some line tracing
but how will i got about doing that. can i shoot a line from the camera to the actor, and then check if the line hits something on the way? i havent worked too much with tracing
Yeah
Okey guuuys, so fast question again if you have 2 minutes.
I made the transfer from the level BP to generic BP which holds only the needed information for the game mechanic.
I set ActorBeginOverlap to play the function, but I had a bump there too. So basically everytime I enter the trigger the sequence will play only 1 time. I need when I enter the trigger NOT to activate the BP but provide me the opportunity to play it on input keys as it was in the level bp.
https://blueprintue.com/blueprint/qduj2bfi/
Any advice is highly appreciated!
It only checks the origion of the actor tho, so if it's large things might not worke out perfectly.
gotchya. I was making a new macro for a for each loop with delay built in as a solution haha
that ofc works aswell
ok. with the location to screen node, i just added multiple points to hit, so its withing the threshold-ish, if that even makes sense. no matter what, i think the trace solution might work. ill be back
this setup seems to be going through walls if im correct. should i use another linetrace function?
Uh, what exactly are you trying to do here?
@faint pasture this
Trace to your target actor by channel
That trace you are showing there is tracing from camera location to plane, and only hitting the plane. That doesn't make any sense
so you use trace by channel if you wanna include other object in the trace too?
if that makes sense
Yes. Trace by channel traces from start going to end point, and tells you if it hit anything the blocks that channel. The channel you probably want to use is visibility, one of the built-in ones
Like you could have your walls block visibility but not your glass
ok thanks. i got a bit confused with all the trace functions
But remember it only traces to a point. Depending on what the actor is, its location might not be where you want to trace two. If it's a character, you probably want to move the point up to like head level instead of tracing toward their feet
How would i go about doing a 3d widget that stays the same size even if ur distant from it?!
try it like this
this is the function
I think on the widget component you should have an option for screen space
That is, if it's a widget component attached to an actor, not a widget added to the viewport
Note that Screen space widgets will never get occluded
any idea why it doesnt show on the edit viewport?
cause it's screen space
its working but its not on the position i want am i doing anything wrong on the actual widget? ** **
So I'm trying to make a simple AI character that walks on the x-axis towards my player, but it won't move with physics enabled. And I need that to perform attacks on it that knock it back. This is what I have for its movement now:
it's running on event tick
there seems to be a lot of issues in that node setup
yeah, I'm just guessing at this point T_T
unless it should really only working when on the positive side of the x axis
dangerous
for right now, yes
is there a better way to do this?
because it's getting frustrating
lmao
or use nearly equal zero (which is the same but a bit more compact) π
and you might want to negate the output
as it actually would only move when it's at 0
that would be Z axixs then
nah, beginner mistakes
and it would really only work with flat terrain then, so you may wont to improve later on this
okay, so it stopped moving when it's hit up. But now it won't move to the side lmao
we've been all at the point were we thought that y axis would be up/down because we all've played minecraft before
could use a line trace to detect the distance to ground
thats not even ai movement
I've got it on an actor because add movement input wasn't working
and I don't need like crouch or sprint or anything on it
If it works it works
well, those can all be disabled in character movement component
it doesn't lmao
but it's not the usual way
just be aware that there are other methods that are usually used to let AI wander around
I guess I'm just trying to figure out why the character refuses to move lol
just add a zero an see if it does the job
depends, if your mesh is not attached to the capsule collision then it wont move
does anyone know what am i doing wrong?
oh it is attached. And the zero didn't work. It just straight up will not move side to side
that looks good, where is the problem?
I was gonna say, that's great, dude. Very visible
debug print it what the branch executes
I mean the widget was covering it up was it not?
thats what screen space does
oop. that's what it is. it's just not adding any force
hahaha
Hello. Who, by any chance, knows how to get the get global settings node?
This?
no
okay, it's working now. Thank you guys so much β₯
yeah then I don't know what you mean
you're welcome
im trying to recreate something like this , now i think they are not using screen space
They probably are, just the pivot of the widgets are at the arrow-head
That's in screen space for sure
ok i finally got it working exactly as i wanted xD. i had some trouble with multiple objects to trace to, but it finally works! thanks for the help @obtuse herald and @faint pasture π
gonna guess collision is set to physics only or no collision
How does the Combine Rotators work
I thought it would add the two together but it doesn't seem to work
order matters
try switch
another problem :)
How do I reference the blocking volume I'm using for the ground? Like if my collision capsule is touching the ground, I wanna do _____
best to check at runtime
print collision object type
ok
to be sure
visible in ray tracing ?
If it's not hitting then that object isn't blocking whatever channel you're tracing against
i think he was tracing against self
is it possible to store an object class in an array instead of its reference in BPs?
or actually just a class object variable instead of a reference
lets say i spawn an actor but the actor instance variables changes throughout the game and i want to save it as a variable with all the variables but then i delete the actor and i want to spawn it again with all its same variables it had when i saved it
Oof. The Savegame wall.
i meant storing the object as it is
if i spawn a class of it all of the variables will be set to default
Usually you just store what variables you need to save somewhere. Either on another object or in a savegame object, then reset them after creating the new object.
so u have to manually store the instance variables in a different object then set them all of them when u spawn a new actor?
kinda seems too tedius especially if u want to save different classes of objects
Are you talking about saving things in the same game, or saving things, closing the game, starting the game and loading all state back?
saving things in the same game
lets say i spawn an actor instance with hp 50 but then the instance gets hit and has 25 now
lets say i want to store that instance that has the variable hp 25 and then i want to clone the instance so now theres 2 of them with 25 hp
basically saving the actor class with all of its variables
Not saving. Creating a new one and copying variables.
so i have to get set for every variable the instance had?
Sure. Structs will help with that. So will a decent hierarchy of objects if they're going to get complex.
but what if i want to store different class objects in the same array
or do i have to use c++ for that
Lower level class pointers.
C++ won't help much with that. It has the same restrictions. If you want a lot of different types in the same array, they need to inherit from a common place and be stored as that type.
inb4 voidpointers
or byte arrays
if you want to save objects, use a 3rd party plugin which allows for object serialization
i mean they are all actors but they would be inherited child actors
...but yeah those might be signs of poor architecture
...huh? π€
lol yeah
it sounds like you'd want an event dispatcher?
Also, you've been on Youtube too much, that is not what casting means to do.
@trim matrix
Casting doesn't actually have anything to do with communication. It just tries to allow you to use a pointer to call a specific function on an object.
Calling the function is communication. Calling a function is making a phone call. Casting is knowing when to use the country or international code.
casting is like calling someone and asking him if he identifies as Dog
Am I able to know what player caused the error to happen? (not this specific)
hey guys
m having a big issue with my blueprint
so basically my random idle breaker animation is not working , its only playing the first animation over and over again
It was working perfectly before
ever since I added this it stopped working
this is too to check if the idle breaker is playing and the speed is greater than 0 , the player can transition into the next animation which is walking or running
We really need a Casting 101 page for newbies, every day there's someone using it wrong.
Hello, does anyone know how to make this array to work? I have those 3 skeletal meshes, they go through an "for each loop" node, but it only fires the first item π
@trim matrix Confirm that the idle breaker index is getting set to the random number as you think.
mmmh
where exactly cause I think I might of broken something
the issue is here???
@faint pasture
Print that value to confirm that it's actually changing.
Is it possible to use curves outside of timelines? For example I define I curve and later I want to get the y-value at x in ablueprint function
casting can be thought of as typecasting, so something related to acting
Yes
Already did
cast as a role
@faint pasture #blueprint message
i have a question that i always got confused at, how do i set that uplink widget texture thats blue to be like red for example if its the other team's actor and the material but thats a stretch
on a multiplayer game
Do you already have the functionality to change the color? Not to drive the change, but the raw functionality?
Like a dynamic material or widget tint or whatever.
If you do, then you need to come up with some function to drive it. If you already have a Team variable living somewhere, then use that.
Just give the actor a Team. Then if Actor team = local player team, set it blue. Other way around, set it red.
@faint pasture did you watch the vid
No I'm on a phone and can't see s***. But if you can confirm that the index value being read in the anim BP is correctly being randomized the problem is going to be something else past that.
are the animations set to loop?
but how do i set it blue if its a world widget
The widget sets itself blue
but won't it be blue for the other team also?
It's a widget component on a world actor rightm
No, you don't replicate the color. You just replicate the team the widget belongs to
It does that work as expected?.
Test it at the last place that variable is used, in the animation blueprint. If the integers random as expected, then that's not your problem.
yes the number keeps changing
but the animation wont play
unless its 0
so the problem is not there I think
Its somewhere else
what about here?
Are you sure the other animations plugged into that player or even valid?
I think yeah
this is so that the character can walk or run even if the idle breaker animation is playing
are they set to LOOP?
or play when becoming relevant
does anything play if the index is not 0, like the first one?
Yeah plug the first animation into all three sockets and see if it works for any random number
ok
so for some reason
I remembered my friend put that value
and now it works
can someone explain to me how
what transition is that even? in or out of the idle breaker?
π
lol
bro I slept 5 hours
idk wtf is going on
well since im already in the animation
idle breaker time remaining = means the next time before the next animation
so since the time remaining is currently 0
0 is smaller than 0.2
idk if I got that right
@faint pasture you get it?
is this bad code for setting up different color for players based on team?
Also it only works with a keyboard input for some reason, if not it gets called 3 times
hello everyone i have a question im trying to make a button that changes the resolution, i dont know to explain this very well but, everytime i click the button it changes to a higher resolution, then loops back to lower resolution
that sounds awful
id do a checkbox with 2 different res image
oh sorry i said this completely wrong
its to toggle between fullscreen and windowed
you could also make a button that picks a random resolution π
i would just make a combo box to switch between the modes
or put a transparent border and collapsed it to have the other fullscreen
in a horizontal/vertical box
i made this at it seems to work
isn't there also windowed fullscreen?
get the current mode as enum, switch on that
and offset them all by one
e.g. if it's fullscreen set it to windowed fullscreen
if i's windowed fullscreen set it to windowed
if it's windowed set it to fullscreen
or use a enum select node, to specify the new enum value
which is the compacter solution
what event is called after ALL scene is prepared for work?
in multiplayer looks like players are not created instantly after the "begin play"
beginplay
look closely
it's already called in beginplay
Learn to use an enum driven State machine, once you do it, there's no going back.
yea, but beginPlay can fire in arbitrary order, thats why i removed that comment
and... how do I make it to execute after everything is done? maybe theres another function saying "hey dude, game is ready, you can play"
maybe beginplay of the level blueprint? π€·
or is your event already in the level blueprint?
I'll try this
1 sec
also don't move your whole logic
just add an customEvent to your game master manager actor
nah
doesnt work
in this example - 1 (server is not counted cuz it doesnt have a possessed pawn)
the window in right - player camera
if I make this screenshot right after the launch - screen is black - no player yet
is the first player client also the server?
no
@last walrus I know this isn't exactly perfectly helpful, but realistically there are no perfect events for something like that. Pretty much all events are considered unsafe to rely on for order in multiplayer. This is one of the biggest reasons that C++ is so highly useful in Multiplayer coding. For instance it would be very easy to use PlayerPawn's Client side Possessed version to send an RPC to server, telling server that client is ready after possession. Store that character in GameState as an array or something. On number reached, do game start code. In blueprint, you're going to end up relying on the locally controlled pawn's beginplay to do this same thing, not quite as nice in the end. Ends up with networking checks and fusses up what should generally be used for state setup for actors becoming relevant.
looks like this is the only solution
I thought about it too but relying on some variables/other actors... Ill think of other solutions, without calling after all actors are spwaned
is it true you can't change a mesh size/scale at runtime?
At the moment I am trying to add impulse to an actor (Another character). However, when I turning on simulate physics (which allows add impulse to work, the character ragdolls. Any other way to push an Actor.
Have you tried it? It's totally doable
So what's everybody use these days for blueprint unit testing?
Is that a thing?
I've heard Rare has had some success with it
Dunno if there are others who also have done it
I could maybe see unit testing GAS stuff with it but otherwise I don't really see the point.
Most other BP should be fairly simple
Rare sees a point to it. And I do too. Just wondering what's everyone currently using for it
This looks cool
I doubt more than 1% of the people here are doing any sort of automated testing. That test suite looks awesome though, might be worth it for like an open world game or something with a lot of required coverage.
If I was looking to have a camera focus on an object, and the camera will only pull slightly in all directions using the mouse, anyone know I can incorperate that? The focus would never leave the object.
On tick:
At least I think that may be what you're looking for.
I think thats it, thank you so much @dawn gazelle
Hello. I'm using a paragon character, now i want it to shoot, but these characters have the weapon mesh integrated in the body skeleton, what could be the best way to work this?
Depends. Do you want them to shoot their own weapons, or other weapons you want to provide to them?
maybe just find the gun socket
on the skeletal mesh
and use that as the location where you spawn projectiles/trace from
their own weapon
That would be up to the animation, and do either hitscans with fake projectile (most TPS games do this), or actually launch projectile from weapon's socket location.
i wouuld be shooting the projectile just when the character fire animation starts
thx @odd ember will research how to do this
thx @icy dragon
you can use anim notifies to figure out the exact timing you want to fire your gun at
within an animation
Though unless it's a special ability shoot, the firing logic should be done the moment player pushes the button.
yeah, i know that despite i didnt use much
at first i think the only thing i need is the socket where to spawn the projectile, coz observing the shoot animation seems that the right time to spawn
at the beginning
Often times devs prioritise more instant shooting feedback and "bend" the animation to it, at least for regular shots.
You can still use anim notify to wait for special shooting animations.
that's a design decision
ok
In the BP
yeah
how can I make a normal sprint system with a custom made character
Just change your character max speed everytime you press a button
Create an action named sprint, call it on your blueprint, then get character movement and set max speed everytime the action is pressed and return it back to normal when release
Guys i want to create an inventory system with stackeable items, i saw the umg ui inventory series on the unreal engine's youtube channel and i already have that structure done
But idk how to configure the slots to make them stackeable
Any help/advice you guys can provide please?
I can show my structure if needed
What does your inventory components representation of the items look like?
Just an array of item structs?
That's the structure i have
Can't go digging into all that. At a fundamental level what is your representation of the contents of an inventory? An array of structs or a dictionary or what?
It's an array
Array of what?
Im going to be honest with you man, it's my first time using unreal and i just followed the tutorial steps
I don't have an idea
π¦
Show where an item is added to that array
K so to do stacking, there's a few ways to do it. At a minimum you need to add a MaxStacks field to your item struct
Then there's a few ways to handle stacking. Simplest would be to also add a Current stacks field to the struct as well
Yes, i already have TypeOfItem string variable and MaxStacks Variable
K so when you add an item, first check if there's already an entry in the array with the same item and Current stacks < MaxStacks.
So if you're picking up a Potion and you already have an array entry with Potion, 3 stacks, 5 max, then just add 1 to current stacks.
If there is NOT already an entry with current < max, then just add another entry. That'd be starting a 2nd stack.
I do understand the logic but since it is my first time with unreal i don't really know how to do it with nodes lol π¦
I am used to work with code lines and i don't know the correct nodes to use here.
I'm pretty sure i can get the "TypeOfLoot" node from the variables I have and just set the MaxStack but in Unreal what's the node i have to use to compare the item im grabing with the entire array to check if it's just going to stack or if it is going to set into an empty slot?
Hey guys I'm just looking for clarification of how to describe what type of communication is happening with interfaces. Between event dispatchers and interfaces I mix up describing what is actually happening a lot.
So when I set up this interface. I am inputting a reference to the object variables into "Solved Trigger" part of I_Moveable.
With this action, in this case the "Sender" requires a reference to the "receiving" objects correct?
TLDR. Interfaces only need a reference to the object as the sender. The receiver only needs to wait for the trigger event and therefore does not need a reference - is this correct?
Exactly what kind of mechanic are you trying to do here?
Well the mechanics work i'm just trying to improve on my lingo when describing how functions work. I mix up the communication types. e.g. what and when object references need passed in.
This trigger basically toggles objects on and off when the button is pressed
so these are instance editable variables. I select the phasing object sets within the play editor
That BP snippet is calling Solved Trigger on whatever those objects A and B are
Interfaces just let you define functions that will be implemented arbitrarily in arbitrary classes. Interact is a good example, a door and a button will respond to Interact differently and shouldn't share a common base class. That's where interfaces can step in.
Right so interfaces allow for different mechanics to be implemented from the exact same signal
Interfaces get around the inheritance problem
You might have say InteractableActor, that you use for interacting with in the world
but what if now you want to interact with say another player? or NPC
interfaces make a contract, whatever implements this interface, responds to these functions and handles them.
Yes so I guess im just confusing up the 3 communication types for references that need passed in. Just to make sure i'm understanding how each works individually:
For direct communication, only the sender and needs an object reference
for interfaces, only the sending event needs a reference. The "event" in the blueprint does not, as it references itself by default (as an event)
for event dispatchers, receivers subscribe to a reference of the sender
@surreal delta those naming conventions are wack tho, I'd expect IMovable to have movement related functions
The objects in the game move when interacted with
Dispatchers are like, oh this just happened, anything that wants to know about it can be told now
(Dispatchers are just Events/Delegates that get broadcast)
dispatchers "subscribe" to the event basically. thats one way ive been told. Its like getting bell notifications on youtube - e.g. only the functions that are assigned to care about it will act.
you bind to them, and run something when its called, which can be in the future.
On that topic, is there any way to accomplish a global message bus with dispatchers or does it have to be wrapped up in an actor? I suppose a Subsystem could work too for easy getting
Direct comm, only needs sender to have the receiver's object reference.
in bp? not sure, in C++ you can make delegates static
Hmm Intredasting
tho if they are local stuff, you can route them through GameIntance or w/e
Ive come to learn my school will likely not teach us anything about the C++ end of UE before i graduate. wondering where I can go to learn that on my own. In a game designer program so more focused on level design
So I take it a global SomethingDied buss could be accomplished with a static delegate removing the referencing
didnt see anything in the learn hub for C++. Maybe a few things but no beginner stuff. I have a little background in C#
yeah tho, i do that via the GameState/GameMode
due it to being only valid during gameplay
Just dig in and try to make something small like a BP callable function library to start
do you need the VS version of UE to do C++ or do you just tell the project to run C++ files. not sure if prereqs are different
I suppose yeah that's no problem because when wouldn't GameMode or GameStaye exist, so no problem with the referencing.
I just like super loose coupling. Just want something to shout into the void that it died and then something else to react if subscribed.
yeah we do that via GameState
there's a few options for compiling UE4 c++ these days, but by default you need VS and a bunch of packages but it's all grouped in a simple UE4 dev package install when update/installing VS.
yeah thats the first thing i need to look into is that
weve only played with blueprints and thats all were gonna do until i get my degree
any recommendations for schools to get masters? Not sure if it should be in "game design" but after attending an epic games hiring seminar it seems likely I will need a lot of experience beyond school to even get my foot in the door
bit off topic but since were here, sorry lol
yeah you're going to need to ask that in another chat channel, no idea.
@surreal delta Ask in #career-chat
Do computer science or just make games. Game design isn't worth much afaik.
As a degree. As a skill it's awesome, bit it's a lot easier for a CS grad to learn games than a game design grad to learn programming. Unless you wanna just do art you have to be able to do a bit of everything yourself. Depends on how big a place you wanna work at tho.
Yeah my mindset at first is that I wasn't too worried about programming and more so becoming the prototype artist for levels and mechanic implementation.. The degree is for computer science and we have done a bit of scripting outside of unreal. e.g. practice C# in VS but mostly focused on learning bps
This is a great read for general knowledge.
awesome thank you π
but yeah hindsight what your just said is 100% right. I will need to push myself to learn this on my own and if I can find somewhere to learn more programming without drowning in debt that is probably the best
@faint pasture Not yet, was wanting to learn how to do it., change mesh size at runtime?
@undone otter you mean setting scale?
Set scale
I've changed the FTableRowBase of a data table, now I can't reparent it and it gives me this when opening it,
I can delete and make a new one just fine, but what if I wanted to change the RowBase of a huge data table? how do I change it properly so it wouldn't break things....
Not sure but the fact you're hotreloading could be causing at least some of it :P
so should I close the editor before compoiling the changed data table?
Yes, you should always close the editor before compiling unless you're using live coding
Hover over the Get Global Settings node and see what it says