#blueprint
402296 messages Β· Page 465 of 403
thats exactly what i told you to do π
Sorry
I didnt know you meant this
i created a variable
but i deleted the set
cause i thought it was useless
if you ever get "Accessed none" it means you are not setting that variable
its the most common error
and the easiest one to fix
ok
thank you
and also the bar dosnt update correctly
like it only update when my value goes to zero
like its either all yellow or nothing
that picture doesnt tell me anything
that doesnt help as well
i dont see the code
that doesnt help either
since you binded it to wall run stamina
you need to show how you are updating it
so the progress bar goes from 0 to 1
by default
and you are taking half of it away
i assume you are using tick
so in two frames it goes to 0
yeah but progress bar can only be from 0 to 1
you can divide it by 100 inside your widget if you want
it does
so can imake the thing constant
if you have 100fps then this code will run 100 times per second
ok
avoid tick as much as you can
how much research have you done about timer by event?
What are the Set Timer by Function and Event Name Nodes in Unreal Engine 4
Source Files: https://github.com/MWadstein/wtf-hdi-files
if you watched this you would know how to use it
ok thank you
whats the math expression that basically does this?
(that's a poorly drawn infinity symbol)
but basically, a node that will only return the positive values of the float (not ABS value since I dont want the negative information)
why dont you plug the 'value' into max
oh
no idea if that's a hack but it would do the same thing i guess
don't say it's smart until you try it and it doesn;t break lmao
nice!
what is the best way to do anti spam on a key press
branch or gate with a delay i guess
is there a way to keep the variable enable for a few more second whith out holding up the whole line
How can I listen, check for Escape input action key press, when the game is in input mode ui only?
@grave apex "Max" node with a 0 in one of the slots also works. It's a node that'll always select the larger number.
@jovial bobcat Not sure if I get what you're asking, but... Make an event or function that disables/resets whatever you're talking about, and use a Set Timer By node to, well, set a timer on it.
Anyone got some experience with component activation, trying to get an event to fire OnComponentActivated but nothign seems to fire
Who has tried doing this?
Why does my spawned object look like that?
Centered
Not centered anymore
(This is in the hands system)
Does the object have physics?
The mesh isn't the scene root, so if you give it physics, it will drop in local space without moving the actor itself
I already figured that out.
So, can I safely ignore the scene root then? and just work with the mesh?
Just replace the scene root with the mesh, yes
oh that works
awesome thanks
The thing is, if i replace the scene root with my mesh, it doesnt work in the inherited objects
Can I force it to update somehow?
Thanks.
Guys, the node "Add Child" always adds widgets to the end of the Vertical Box. Is there an way to add it to the top, or insert it between any other children widget of the container?
you can use a grid panel
and set your desired row/column
other than that, you could make an array of added widgets, re-arrange them how you want and re-add them again
That is an good solution. Thanks a lot.
np, let us know if you have any further problems doing that
How do I keep the scale correct after attaching it?
It worked when attaching the mesh only
(It scales to 1/1/1)
But the mesh is 0.1
And now it spawns objects twice lol
@fossil crater I recently did that, I create a widget called text box that will be a vertical box child, then dothis:
@fossil crater then clear the vertical box of all children, then do this:
insert at 0 just bumps everything downwards, and i resize the array cause i want alimit on amount of text that gets added to the vertical box
It completely broke π¦
@deep elbow yup, or another option could be using the set array element
just for organizing your array
@willow lichen try changing your scale rule on attach
Guys, i have some troubles. Someone know how to make camera like that. Prefered control is android. Ping me if you now answer.
π
For inheritance, you change the model on the static mesh component on the children rather then adding more meshes
@white crypt yup, for me this was the way I needed it, not for everryone but principle is there! π
Inheritance can be a bit fiddly
@willow lichen try changing your scale rule on attach
@white crypt Nope didnt work
@pseudo hearth you mean zooming in and out?
@pseudo hearth you mean zooming in and out?
@white crypt Yeah, and moving left, right...
I will be very grateful for your help
hmm i dont have experience with androids but your main concept should be changing the cameras location. Z would be up and down in this example
for testing you can make a widget which would have several buttons for controlling camera
if you press the button you would get your camera location, break that vector and add to the Z axis
@willow lichen you can also try setting the scale yourself. after you attach get the same target and set scale
how to control the camera
Like, getting scale of target and setting scale afterwards.
More like a workaround but if it works
Thanks Yeah
yup
@pseudo hearth i could only answer that with using keyboard
not a phone
sorry
I see the problem. But it worked before i changed the mesh to the actor root
yeah it was inheriting your parent scale probably
ok, what answer for keyboard
But i overwrite it in the child
@pseudo hearth what class your controllable actor is? character/pawn/camera/pc etc
And i reference the child as the parent. Which should work and did before. But it's scale is set to 1
camera
so first I would recommend adding a player controller
so we could add some basics controls inside
let me make a fast sketch on my project
@pseudo hearth ok so first create a new player controller
after that https://prnt.sc/sjm4tv
set default pawn class to default pawn and player controller class to your newly created player controller
actually you dont even need to make a new player controller
default pawn already inherits inputs for movement with WASD
if I rotate player start like this https://prnt.sc/sjm6yz then my W will zoom in. S will zoom out. a-left d-right
but if you want to make custom inputs and custom camera speed then you would need to create your own pawn class and set it up all the logic there
hey, dont know if anyone can help but, does any one know a way to change from a strafe movement system to a rotation movement system during gameplay. I'm trying to recreate the sprint/run system from the res 2 remake/res 3 remake When not pressing sprint, the character is in a strafe movement system and when sprint is held down the character goes into a rotation movement. If anyone can help that would be amazing π
@pseudo hearth thats a very cheap trick to make something like you wanted and it works right out of the box. for more custom stuff as I mentioned you would need to make your own pawn. I know my explanation is not the best and in this particular case it would only work a keyboard
Hello, is it possible to attach a spawned actor to another actor, or component, and maintain a static rotation once attached
think of a top down camera not rotating with a capsule component, not exactly the use-case but a decent example
@deep elbow under your springarm settings try these
i mean thats only for the top down example, not exactly sure with your case
by attaching there are rotation rules, you can try playing with them as well
yeah @white crypt it's not quite an actual gameplay topdown camera, it's a 2dSceneCapture and it's not part of the pawn.
maybe by setting it to relative is what you need
I tired the rotation rules but simply by attaching the component it just ignores any pre-defined rules
sec
hm nah, the attaching overrides it all, i'm just trying hard to avoid manually setting a rotation constantly, seems like such a waste
absolute rotation might do the trick
legend, you're a boss
other than that not really sure, you can try adding additional scene component so it would act like a container. you would attach your child to that scene instead of the previous parent
oh ok. cool π
cool, never used it myself but knowing web dev i was expecting it to do that
didn't even cross my mind, i've used absolute rotation like once in 5 years
yeah you tend to forget stuff after continuously learning something new
@deep elbow Thanks for the help. I am already using the grid to solve that, but I might need your solution in the future too.
hmmm i wonder if it's possible to have only a certain actor see specific objects, owner no see is great, but only for owner, only owner see and owner no see combined is just setting visible to false, can you use a stencilmask to just not draw somethign but keep the stuff behidn it drawn, impossible cause deferred i guess, hm hm
Hello, I have a problem with the camera. After death, the camera moves to the right, I will add that a month ago I started working with an unreal engine. I would like the camera to stay in the same position at the time of death. I'm doing a 2D game. Please helpπ
you destroy pawn on death? the camera probably resets to some default position
Yes, here I have a sample death
In this part we will handle the death of the player as well as respawning! Leave anything you'd like to see in the comments below so I can work them in as I go!
UE4 Download: https://www.unrealengine.com/en-US/what-is-unreal-engine-4
Assets used: https://www.gameart2d.com/fre...
this may be useful, you probably don't want to destroy the actor, or if you do you'd need to do a bunch of other stuff, this would be good for where you are
also try Snipping Tool, comes with windows, you can take screenshots of your screen without a camera!
Ok thanks :)
Need Cast explaination...: I have MyFloor actor with 4 cube on it. I have a tank. I want my tank to cast to MyFloor to get the 4 locations variable. I want to get that in a Event BeginPlay. Anybody can tell me what thing to connect to my input Cast wildcard?
cast is for when you have a reference of an object, and you want to know if it actually is that object, and then do stuff specific to that object. so you need to get a reference to what could possibly be the floor. you can do that any way you want, line trace downwards fromt he tank and get the hit actor and plug that in, or use a collision box and get overlapping actors, or from whatever is making contact with the floor, but casting isn't like throwing a fishing line and grabbing something, the wildcard is the actual object you are casting to
and if you want some info from begin play then do a get all actors of class and set that to be your floor, or set the floor itself to store a reference to itself somewhere that your tank can access
@sonic crescent SphereOverlapActors with BP_Floor Actor as filter > get (a copy) > You don't need to cast because you'll get the floor under the tank of you set the location and sphere radius correctly
thank you i will check that
@hallow night what's the object type to connect to SphereOverlapActors?
(make array) and add everything
anyone know a method to hide certain components from a cameras view, i want to prevent certain particles (not all) from being rendered by a regular camera
@deep elbow runtime or editor?
run time
@sonic crescent check out this video:https://www.youtube.com/watch?v=6IOgkWv1lEY
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
i'm trying to capture particles in a scene capture, through the ShowOnlyComponentList feature, but i don't want hose particles visible to the player camera
you can play with the visibility; doesn't mean that it will stop existing, just not render
and i need the particles moving with other actors, so i can't seemingly attach a aprticle to an actor without making that actor the owner, so i cant use the Only owner See flag
i want it to exist, i just need it to not render in the player camera
oh is this multiplayer?
no, if only it were that simple lmao
hah
darn
opening up my editor, sec
the only thing i can think of is playing with the LOD
yeah, i dont think it'll work
ah wait
the other way is to make a material property work specifically with the camera controller
for instance, you can lerp the alpha based on a param and the param is set to 1 but your player sets it to 0 when needed
in the end, it is there but transparent
close enough? :/
hm, i think i need it to be visible even when the player is lookign at it, just hidden to the players camera, i need to constantly capture in a scene capture tbh
anybody ever tried to save a texture inside a savegame? i think it doesnt work right away
im saving some in my savegame file, but on reopening and loading it the textures are gone
trying to kill off some spawned hexagons that arent in the sphere but the detection node doesnt work any ideas?
When you click on the error, post a screenshot of what it shows you
try to show some of your code
Show the EventActorBeginOverlap event
where it says the error is
If you just click on it in the error message it should take you straight to it. There should be a red ERROR flag below the part in question
Also, side note: just use an increment operator on Level. cleaner.
get rid of that branch to check if the class is Monster. Just casting to Monster is enough. It will fail if the object is not a Monster.
I still don't see anything that would cause an infinite loop.
No, just the cast is fine. Just get rid of that branch and the GetClass and == check. The code will end up doing the exact same thing
@tight venture i got the problem. If i do not use do-once, it is casting many times while in collison
In your error message, click on the call stack Show thing on the right and post that message
Oh okay
i used do-once and it does not give error now
right on
@tight venture thanks for your attention and information that gave you dude
np. I am a noob to UE and BP, too, but not to programming π
same π
Hi guys 'n gals - Does anyone know if you can 'stack' widget switchers i.e. one inside another?
sure, dont see why not
thanks @white crypt - here goes......
good luck on your journey my little one
π
Is there a more efficient way of doing this?
(Bounding a value between 0.1 and 0.9 in this case)
clamp?
much cleaner
no, I had the min and max values correct. double check it, you'll see
thx @marble folio
Does anyone know how to detect overlaps with brushes? Our artists are grayboxing a level with brushes and they clearly have collision settings as the player collides with them but I can't figure out what those settings are.
i dont think you can, as far as I remember
but you can convert all the brushes into static meshes
should be an option inside the details panel by clicking one of the drop down arrows @gray hare
I didn't see that as an option.
It looks like the brush component has a BrushBodySetup that needs to not be null. But I'm not sure how to set that.
Oh, hmm.
you can combine them into 1 mesh if you want
Yeah. It would be nice to not force that upon artists while they're gray boxing.
if you are using source control, one of your other members can do that transition
?
i mean if you dont want to bother your artists converting brushes into static meshes
but are you using source control in general?
of course
kk π
I mostly meant if they want to use brushes, I shouldn't force them to use meshes.
hey anyone know how to play unreal composure ingame?
how to start composure by blueprint
brushes must have a collision type, I just don't know what it is
So, I'm watching Youtube tutorials, and I see a lot of this:
Don't you have to subtract 1 from the length before you plug it into the max for the range?
@white crypt yes
okay, just making sure I'm not the one that was insane here
Another question
How do you move an actor with physics enabled? It looks from here:
Build powerful visual scripts without code.
That the only two options are to turn physics off, move it, then turn it back on...
or
Apply force and/or torque to the object to move and/or rotate it, respectively
You can't just SetActorLocation?
what gives?
you could teleport it
What's the difference between that and SetActorLocation with the Teleport box checked?
@zealous moth
not sure :/
Out of curiosity, why is it not possible to have multiple blueprints on an actor root?
Seems pretty crazy to me, considering pretty much all other ECSs I can think of support this
like what's the point of an ECS when you can't actually create new components to put on an entity π
@azure mason you mean have a BP contain another BP actor as a component?
I mean like you have an actor with two reusable blueprints, like an InteractiveObject BP and some other BP
Its called "Interface"
or like a pawn that has a WeaponController, HUDController, HealthComponent, CharacterInteraction, etc
you can make actor component if thats what you need
an actor component can be placed, but not added as an actual component to the root actor from what I can tell
Maybe I'm missing something here? Like an option that enables what I'm looking for?
pls don't make me return to Unity π³
Aaron I don't quite understand what you mean. Screenshot of BP?
Add @trim matrix add sockets to the weapon mesh and get the sockets location then spawn a bullet for each socket
just because you cant find an option doesnt mean it cant be made, im not exactly sure what you are trying to accomplish
can you give an example?
Okay sure, like what if I have the FirstPersonCharacter and a reusable CharacterInteraction script that enables the character to fire raycasts at objects with a component that executes logic when "interacted" with. Rather than manually creating that interaction logic on the character-side for every character that should be able to do this, in Unity I would make a CharacterInteraction component script and add it to whatever entities should be able to interact with stuff.
yea I looked into that, seems kinda like what I want sort of
you can make a parent bp that holds some of the logic or all of it, but each child can overwrite every function and have its own unique values
but ideally the CharacterInteraction component wouldn't have to like, search for a parent entity to execute logic from, like to get camera data/etc
you can always cast to parent class
wont need to look for a specific child class
if you are concerned about performance then that shouldnt worry you
Unless you're using a for loop with cast
π€
hi guys
well there might be a need for that π
just saying that it might be possible
why does a socket not move with an animation montage?
@azure mason and that is why Unity is just plain bad. It has no transferable skills whatsoever
thank god i jumped shipped way before their ECS garbage
@inland lark afaik, sockets are attached to bones. should move with the bone (or relative to it, wherever you put the socket)
tbh Unreal's the first engine I've encountered that doesn't do it this way
Unreal works the same way as Unity did back in 2018, before it hit the fan
If I have it right!
brohe
And I am trying to explain that to him right now in a call
if Unreal worked the same as Unity I wouldn't be having this issue 8D
Its easier for a non programmer, differently not for a programmer that is used to coding π
I made a game in unreal in less than a month which took me 4 months in unity because I had to program and QA everything from scratch. A huge waste of time.
yea Unreal's def easier for prototyping
We made a remake of a AAA game in 2 years using UE4 :))
way faster to get up and running
How TF are you supposed to move actors that have physics enabled?
@stable plume https://prnt.sc/sjuw1f like this?
I even tried disabling "simulate physics" when I want to move it, but still doesn't work
it's not better for prototyping, it's better to make games with. Unity makes money selling you assets and wasting your time. Unreal gives you everything out of the box so you can just make the game to sell
The spawn location works, but as I hold the touch input (mouse simulated) down, it doesn't teleport like it does when I disable physics in the BP before playing
@tight venture i don't think you can sequence timed events/timers
If I disable simulate physics in the BP_Yarn BP, then play, it works fine
I think its because when you disable physics it deattach from the parent so you need to reattach it again?
@tight venture you want to carry an object like in half life? or smth else
my take is that you are sequencing too many things out of sync
oh you are doing this with touch
add a print string along the lines and you'll see it is not doing it in order
That's the BP_Yarn in blue. The translucent sphere is its "influence" (no physics enabled but does fire overlap events). The blue thing in the middle is the actual ball of yarn (this is the component in question)
The influence disappears when touch input is released (set visibility = false)
It didn't capture it in the screenshot, but my mouse cursor was right over the yarnball that time, it was updating the location of the yarn as I dragged my mouse (because I had physics disabled)
If I go into the BP_Yarn and enable simulate physics, it spawns in the right place but never moves as I drag my mouse
... enable simulate physics on the yarnball, that is.
Sequence does things in order and if it cannot proceed, it skips to the next sequence item; your bp has 2 sequences with things moving between items. I recommend redoing your sequences and avoid having different items with timers and they are NOT processed in parallel
The timer only runs while the touch input is held down
It gets cleared and invalidated on release
@stable plume well when you said if you can stack, i thought putting switchers on top of each other. if you can give maybe more info or a better example i could maybe try to help more. but its better to do that in #umg
It works if I disable simulate physics. Just fine. You sure @zealous moth that my sequences aren't set up right?
that's why i said put some print string nodes
i am pretty sure you are not disabling physics
add some print string nodes or watch values and see how it progresses
Okay. So check if physics is getting disabled?
the way I am reading your BP you have redundancy and some stuff may get skipped
sure
you can put it on tick and see if your input changes it
when I use 'set style' in the widget, even though the style I'm setting in BP is identical to the one in the designer, the buttons change like above .. anyone know why?
this only happens when 'set style' is used. Above is before, below is after
@plush ridge looks like it is boxed, for image
I tried 'box' and 'image' both, no difference in result
Printed FALSE when I clicked. Printed TRUE when I released.
no, there are variations for each but they're all the same type of button
they just become squished inward like above
something about how the same button before and after is rendered is different
@tight venture not what I had in mind
get the actor's "is physics enabled" and return that value into a string
oh okay
i can print any message I want all day π
I have a question, is casting, saving the reference at begin play better than casting when i want it?
What do u mean by center of camera
@hallow night if you're loooping, yeah
@zealous moth It's not simulating physics until the very end, after I release the mouse/touch input
@hallow night i have a model there are 3 weapons at different locations on model. When i click the button, i want to spawn bullet from one of them for shooting. I added socket to my gun's hole and try to spawn but it spawns at different locations (not in front of weapon) (at left & right side on camera / think like doom 1 shooter game)
This guy has the exact same problem I do
For gameplay programmers writing C++ code.
Its working fine for me, are you sure you're not doing something wrong?
who was that intended for?
@tight venture try setting the component location and rotation?
this is the model's socket that i want to spawn bullet on
Try disablling the collision for the bullet? Maybe its hitting something so it spawns somewhere else
i tried it but spawning location is like -10 for Z
not spawning in socket
like socket.location.z -= 10
π€
Good thing you are not programming or you would have deleted the entire project ππ
Hey, I'm currently toying around with a prototype and I want to create small areas that apply a slowed down time effect on all objects within the area. So far I've tried to use custom time dilation, however, this can only be applied to actors and ontop of that, it doesn't seem to apply to any other actors than my firstperson character.
So I either have to find out why it doesn't apply the dilation to other actors or I have to find a way with c++ (unless anyone of you has another idea) - however, so far I could find even less documentation about time dilation in c++ than blueprints
@hallow night actually i have 5 years experience and working as software developer (using rust,c#,js) but this... good thing is i am not working on c++ game project right now lol
@hallow night I have tried SetActorLocation and Teleport, both. Neither worked as long as one of the components of the BP had Simulate Physics checked before playing
Screenshot of bp?
Hey. I got an issue with my horse mounting. When I'm mounting my horse, I basically want to hide the player mesh and unhide the mounted mesh, which is a part of the horse: https://gyazo.com/99fdbfde40b814a930ffe06ef4010682
Then, I want to attach my footplayer's armor to the horse. Everything works fine, except a couple of things:
- When I want to unmount the horse, the horse rider's base mesh gets hidden (in this case the character is modular and the base mesh is the head, and the body mesh is a child of that).
- The dismount animation doesn't play, mostly because of the above issue. I'm just fiddling with a lot of different stuff atm, not really sure what I'm doing anymore. Would love some tips or guidance here as it's been an issue I've come back and forth to a lot of times in the past. It's a customisation to an assetpack from the MP, but the creator's taking weeks to respond.
The upper section is when the horse is mounted, and the bottom part is when the rider unmounts. This works, but then comes the section where I begin adding the different body parts back in: https://gyazo.com/5ba6d81179bca4c9d61b00685dc820bc
Here I'm hiding/un the mesh (which is the head) along with all of the character's different armor pieces. The issue lies in the top section of the graph where the rider is mounted, but the mesh is unhiding as going into unmounted. Not really sure how to explain this better. :/
mind if i DM you, @hallow night ? This channel is getting pretty hectic
I'm talking about setting the component "yawn" or the ball that has physics
Not the actor
Yes or both for that matter
Right now I am teleporting the BP
I'll try just the ball
I can't seem to set the ball's location (it's a static mesh). Am I not seeing the correct node to use? All I can find is SetActorLocation for the root component
The Yarn component is a sphere. This is the component that has Simulate Physics enabled (or should anyway), and that I am having trouble moving
This is what happens when I check Simulate Physics on the Yarn, then hit play.
I clicked where the yarnball is, then dragged over to the right. You can see the Influence moved, but not the Yarn
Grab the ball and drag and use "Set world location" or something like that
That worked!
But it feels odd to use that AND have to use Set Actor Location. Cuz it did work, but it only moved the yarnball of course. Why doesn't Set Actor Location move the Influence AND the yarnball together?
Idk i think its because physics deataches the ball from the root
hmmm... maybe if I made Influence a child of the yarnball or vice-versa it would work
Nope. I can make Yarn a child of Influence (which didn't work), but I can't make Influence a child of Yarn cuz it's inherited
Can anybody help me with getting a shooting montage to line up with the aim offset direction?
nvm
@sharp aurora has a image for montages and aim offsets
Updated my question above with another picture, would love if anyone could take a look π ^
This worked. Thx @hallow night for helping me with it. Been at it all morning
And thx @zealous moth too
Np glad it worked
@tight venture Sorry. I missed a lot of this conversation. What's the problem you're having?
No problem anymore π
I had a BP with two static meshes: one of them had "Simulate Physics" enabled, and SetActorLocation wasn't allowing me to update the location of the one with physics enabled
If you're wanting your objects to move with SetActorLocation after you've simulated physics on them, you need to reattach them.
Reattach?
I've never come across the concept of attaching or disattaching anything yet
Though I am UE noob
Components are detached from their parents when you simulate physics on them. To make them move with the actor again, they need to be reattached.
This sounds promising...
Figured as much
Would I do that in the BP construction script?
This is a good example for you for this. V just simulate's physics on the first press. Staticmesh drops cause it's now simulating physics. This keeps it from moving with the actor from the Tick event's movement. Second press stops simulating and reattaches the object to the actor and lets the movement on tick affect the static mesh again.
So, Simulate Physics and being attached are mutually exclusive?
Unsure. I don't know the code behind the nodes. Just had some experience with how they act.
Let me see what that does in VS.
Is there any way I can do a delay in a function?
@summer apex Latent nodes of any kind cannot be used in functions.
@tight venture what was the issue?
Hi, i'm a couple days into ue4 and i'm stuck trying to get this to work. is there anyway to loop an event?
I'm not exactly sure yet, but I posted a pic of what at least works for now a few pages up
What are you trying to do
@hallow night im really new to this, what is a macro exactly?
Like, I created one, but how do they work?
Macro is just a code expansion
@summer apex you can double click a for loop to get inside the macro of the for loop to check it out
@tight venture This is the comment above the SetSimulatePhysics node.
So, I suppose attachment and simulating physics are exclusive, yes.
OMG it worked
functions cannot into timers
No SetWorldLocation necessary
It's a macro
@maiden wadi Do I need to unattach it again after enabling physics or does that automatically happen anyway?
@tight venture Should happen automatically I think.
#ue4 #beginner #blueprint #foreachloop #delay
Byte Sized Tutorials! How to create a custom "For Each Loop" with built in delay!
wooo! thx @maiden wadi! This is the answer I've been searching for all morning
@summer apex
@maiden wadi You should answer this guy's post
For gameplay programmers writing C++ code.
If you don't, I will (but I'd rather not take the credit for answering it if you want to)
Or I'll at least drop your name π
its a 2014 post lmao
why would you answer it
I'm pretty sure there are rules against necroposting
@tight venture He seems to have a bit of a different problem though. His physic enabled asset is the root. Set Actor Location should still work on his skeletal mesh even though it's physics enabled, because setactorlocation sets the world location of the root component, which is his skeletal mesh.
Oh.
lol really old
Haha yeah
He probably finished the project or just stopped
oh pffft nvm totally different conversation, sry
He probably died of old age
errrr nvm don't mind me. yay, just so excited I got it working
Haha, good!
Why not answer it, though? It would have helped me. There is also this one
So I am basically trying to change the transform and the velocity of a rolling ball. The ball is supposed to teleport away as soon as it touches a specific
Very similar. Google for "ue4 set actor location with physics enabled" or something like that... you'll see. not much help out there that leads you to the right answer
@summer apex To answer your earlier question about the macro, it doesn't work because you're not delaying the loop. You're putting a delay after the loop and calling it 60 times in an instant.
Is there any way I can "refresh" my BP so it correctly grabs inherited stuff from my base CPP class? Sometimes it seems the BP freezes or bugs out and duplicated inherited stuff
@fervent flume It shouldn't. If it does, closing and reopening it should fix it.
What's the best way to optimize a simple ai character that follows the player around (100 on screen)
The fact that enabling physics causes the component you enabled it on to become detached from its root is the answer I needed. The answer that Google query should lead you to, but doesn't.
I have to run a dozen or so nodes 3 times for 3 different sets of data/variables, is there a way to loop or something with those nodes but swap out the variables?
@zenith pond Not exactly sure I follow. What are you doing at the moment that you're wanting to condense?
You can make a macro with the variables exposed and run the macro 3 times with different variables connected
Or just a function with a for loop and variables exposed
How do I correctly store a material instance inside an array then use that to assign it to a decal? Right now the decal just turns up as green/missing, with this:
U sure that u are getting something valid from that array?
no it seems i'm not, hence the question :--)
that screen is all there is to it though
the array is of type material dynamic instance
Print the display name of the material u are getting
It's empty which is the problem. My question is how do I properly store it in the array?
Use the add node
Usually something like that for materials is done with a MakeArray or setting the array's values as defaults.
so Create Dynamic Material Instance, then Add that to the array?
Could anyone fill me in why this only get executed if I set the variable directly, and is completely ignored if i call the custom event?
and then perhaps I can set it
Then you can set the decal material after making and adding the instance to the array
@rugged carbon Where do you normally have it placed?
I mean that is the setup, a custom event that sets the variable. If it is plugged as above it fires, if I plug it to the custom event it does not. The print text is fired in both cases
It doesn't fire right now. You have no execution line going to it.
This does not work, that is the problem
It never gets executed despite the text printing to screen
I cannot for the life of me figure out why
Make it a function and try that
@rugged carbon The last picture. If you leave it like that, and put a print after the event UpdateRemainingTime, and print A, does it print the correct value that's passed from Shoptime?
hmm. me again. Sorry to disturb. I'd like to get locations of the 5 vertex of my mesh. I'm definitely doing something wrong. Can help?
The print string does not print anything
@sonic crescent Your For Each loop has no array. It'll never run. I think you were looking for a ForLoop, not the ForEachLoop.
@maiden wadi Thank you for your time. In fact, this is the ID array i can't get. A loop from 0 to 4 returns wrong values.
@sonic crescent Let me try something quick. Not used to working with Vertex data yet outside of Niagara.
@maiden wadi thnks. All my values are <0,0,0> ...
Can somebody help me out a bit here i am making an actor with a widget component and when i press it i want it to toggle the visibility of a light i got some help but it didn't work here are two screenshots.
Just ask if you want more screenshots. If anyone can tell me what is wrong that would be good.
@sonic crescent Just so I understand correctly, you're trying to get the vertices locations in world space?
Cause if that's what you're trying to do, I'm not sure that it's possible strictly in blueprints. There are libraries that add that functionality through CPP, and I know Niagara allows it, but I'm not finding anything that'll allow this with default blueprint coding.
Yes. (It may be Relative space too)
in relative? I'm not using Niagara. Isn't a particle engine?
I tried, still can't get vertex positions. It's probably the reason Rama made a node for it in his extra blueprint nodes plugin.
Is it me you are talking to or someone else? @round torrent
yeah you
Do you know how to do that? @round torrent
it's just a checkbox in the mesh
Mesh of what? @round torrent
@mortal wharf Looking at your graph, the question I have is: what is inside of the "Set Visibility" array?
i think that's me
you almost have the same name
Do you mean the var? @tight schooner
yeah, the array variable you're feeding to the loop
Ok wait a sec...
so, no i do not know where is that CPU allowing. But Authaer seems to have test that with no luck
@mortal wharf I'm not seeing issues with the rest of your graph; it should work. Have you confirmed that the loop is actually executing? (Have you tried breakpoints and/or print nodes?)
Here you go. @tight schooner
i can't believe how hard is to have a proper path from a mesh into Unreal. Spline are unprecise in the editor. Export Spline aren't possible without tables, and long workflow... and accessing vertex is not allowed. Damned. I'm stuck.
let's see this Rama plugin. Can you share a link please?
@mortal wharf Is that an actor class? Anyway, first I'd determine if the loop is executing
@maiden wadi Wasn't possible to get relative position too?
I haven't used it myself, but the link is https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/4014-39-rama-s-extra-blueprint-nodes-for-you-as-a-plugin-no-c-required
Dear Community,
MIT Software License for The Victory Plugin ~ License (https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/4014-39-rama-s-extra-blueprint-nodes-for-you-as-a-plugin-no-c-required?p=1718286#post1718286)
I've decided to create my ow...
Yes it is an actor class at least i think it is. @tight schooner
I couldn't get either from it. I assume that this was an intentional decision not to include this kind of stuff in blueprint originally because it's heavy on processing and artists don't always consider that sort of thing.
@mortal wharf if you're getting root component, what if you checked "propagate to children"
in your set visibility node I mean
Didn't work either. @tight schooner
ok, you gotta to some normal BP debugging with breakpoints and/or print nodes
figure out if every node is actually executing, and the data going in & out is what you think it is
If "Lights Right" is a straight up actor class, you can set visibility on it directly rather than getting the root component
Yeah but i tried connecting it but it always said root component.
I don't have UE4 open rn, but maybe there are separate set-visibility nodes for components and actors. Some things in BP are like that.
One thing is that lights right is only one light and not the two lights because i want like two buttons that disable one specific light.
2 Buttons 2 Lights
Do you mean that i might get other set visibility node if you drag from array element? @tight schooner
yeah. It's just a guess though.
The only different ones i get is defaultsceneroot and pointlight.
I mean you can drag out Array Element and type Set Visibility and maybe get a node that plugs into it directly
a version of set visibility that says underneath: "Target is actor" or w/e
Anyone knows how to optimize ai?
Defaultsceneroot and pointlight only gives scene component. @tight schooner
@hallow night What kind of AI? What base class are you running them on and what are they doing?
Sorry for sending this video again today.
Character class?
This ai is running the character base class. And they are just chasing the player. When they die the get deleted
I'd start with their mesh and maaaybe movementcomponent tick rates. You can lower them a bit and still get a good look, but a lot of extra performance.
Right now i can only spawn about 50 of them on my phone with 144 frames but adding more will drop the frames pretty fast. Also the rpg literally drops the fps by half
The mesh is about 500 verts if i remember correctly
Its using a cast and a for loop i should probably change that. Lol.
@hallow night Try this for starts. It'll make them look weird, but test it for the performance and see how much effect those two things have.
The mesh animation bp is using the new 4.24 animation thing i forget what its called but it gives better performance
But what do you mean about a node that plugs directly into the set visibility node? @tight schooner
Just delete everything after the For Each Loop. Drag the "array element" pin out and get a context menu. Type "set visibility".
Do you get a Set Visibility node that takes the array element directly?
If i drag straight out of array element yes. @tight schooner
The only different ones i get is defaultsceneroot and pointlight.
Idk what that means. If you Set Visibility directly on each array element with nothing in between, and still nothing happens, then you have no choice but to do some old fashioned BP debugging
What do you mean? @tight schooner
What i meant before was that when i dragged off array element i only got Set visibility defaultsceneroot and Set visibility pointlight. @tight schooner
Btw i also get Set visibility just those three. @tight schooner
I spawned 200 zombies now and i have 60 frames (i have a button on my controller to spawn 50 zombies for debugging)
@maiden wadi
oh, I guess you can only set visibility on components
I thought you could do it at the actor level
@hallow night What was the framerate before with 200?
Actor Hidden in Game is the only actor-level thing
@mortal wharf If you want to hide the whole actor, then use the Set Actor Hidden in Game node. If you're hiding a specific component, then Set Visibility works.
That said, you haven't yet established whether your loop is executing in the first place
I have three actors Leftlight Rightlight and Button
so we're not sure where the problem lies
The lights are just pointlights.
Hey guys question about player controller
Would you recommend switching a player controller for something like this
in the game you walk around and pick up things
but then you see a table and you can play a mini game on the table
player controller swap i figure?
or just enable disable certain controls on the controller
I think you can do either
Because whenever I close the game In the editor I get an error about my toggle lights custom event. @tight schooner
what does the error say?
Is it ok if we chat again tomorrow as I need to go to sleep. @tight schooner i will send you the error message right after i wake up tomorrow.
Is that okay?
@untold sapphire Personally, I'd recommend making it so that your walking around and picking stuff up is done in the character. This is character specific functionality. The controller should be used for non pawn specific stuff. One classic example of this might be tabbing to show a score screen while your pawn is dead and destroyed. But all of the running around, shooting and such is done in the Pawn. So in your case, the walking around and picking things up should be in the character. For your table top game, you might create a second pawn that is spawned at a specific place on the table. When the character interacts with the table, call unpossess, stop movement on the pawn(Keep a reference to it for when you leave the table though), Possess the table pawn and do some camera work if you want. Doing it in this manner allows you to keep stuff like menu access and non-gameplay specific keys available while both in the pawn and at the table without having to copy that functionality into two different player controllers.
Hey guys question about a scoring system that I am trying to add in my Game, followed a Tutorial on Youtube by The Phantom Game Designs
I don't know if I how to proceed for different objects having different points, should i move to a trigger system or keep the system that I have currently picture down below
@trim matrix is the scoring per player or per object. if it's per-player you should think about using the score variable on the PlayerState
@warped bear Its per object
yeah i would just have a variable on each object for their current number of points, then the UI should probably have a reference to that object so it can reflect the points on the object without having to set that var in the UI everytime the points change
i mean if your player is collecting score than you're probably gonna wanna use the score on the player state as well
unsure what more to say without proper context of ur game
It is a bumper cart style game on an obstacle course, with points to customize character and enemies.
@warped bear I was thinking of a trigger system for unlocking parts to a level, and sorry i am like two days into using Unreal 4, appreciate the help
sure thing. im unsure how a trigger system plays into the points stuff though!
I was watching offical Unreal tutorials and they showed off opening a door with triggers, i was thinking of triggers for opening sections of levels
Hey guys. Im trying to run JS code in the web browser widget to activate micro and webcam. It works on chrome but doesn't in the widget. Any idea how I can achieve this?
@trim matrix well i dont see why u cant do that!
window.AudioContext = window.AudioContext || window.webkitAudioContext;
var audioContext = new AudioContext();
// Create an AudioNode from the stream
var mediaStreamSource = audioContext.createMediaStreamSource(stream);
// Connect it to destination to hear yourself
// or any other node for processing!
mediaStreamSource.connect(audioContext.destination);
var video = document.querySelector('video');
var videoTracks = stream.getVideoTracks();
window.stream = stream; // make variable available to browser console
video.srcObject = stream;
}
function onfail(error) {
console.log("permission not granted or system don't have media devices."+error.name);
}
navigator.getUserMedia({audio:true,video:true}, gotStream,onfail);```
HereΒ΄s the code i am using
@warped bear thanks for the help, currently starting on the UI, can i DM you if I have any questions?
@trim matrix sure go ahead
How do I use GetClassDefaults for inherited variables?
BP_Foo has variable foo; BP_Bar extends from BP_Foo. So, BP_Bar also has foo. But when I use GetClassDefaults for BP_Bar, nothing shows up. I have to use GetClassDefaults on BP_Foo and then foo shows up.
But I can't use it on BP_Foo, I have to use it on its child class, BP_Bar.
@tight venture did u check the details panel to make sure all the pins are being shown
all the pins?
lemme check
What screen would that be on? I don't understand when you say "node"... there is no node in this context
the GetClassDefaults node
oh... sec
That looks like what I need! Thx @warped bear !
But now... oh jeez I messed up
How do I get the "My Blueprint" section back? I closed it on accident
GameLore? Is that what that says? Um, depends on your question
Check the channels on the left, choose whichever one matches best
okey ill try to find the one matching best
@tight venture there is a "window" option at the top
Looks like mac is different
lol this is dumb
GameLore I can't @ you your name is too bonkers
wtf...
There it is!
I had to click in that tab first, then go to the Window menu... :/
thx @hallow night
thx again @warped bear that solved my problem with the GetClassDefaults. My "My Blueprint" tab vanished right as I was testing it out and then I got derailed so I just now finally got to test it.
no problem π
hey folks
I have a little question: is there any way to actually assign a variable in the construction?
I'm trying to add elements to an array in the construction, it prints the correct value in the editor, but on play it loses the data
It's also not showing the elements of the array in the editor window
I don't understand what you mean @dire lichen. Is this a member variable of a BP class?
I guess I mean... "the construction" of what?
sorry hehe
construction script of a BP class
here is a sample
first of all, this should sum the array lenght for each time the constructions is called, 10, 20, 30
but it always ends with 10 elements
It looks like "Ints" is a local variable
that's probably why you're losing the values
Or... I guess I really can't tell from just looking at it, whether it's a local variable or not
it also loses the data on Play, when printing this lenght it shows 0
Okay, then show where you say it's losing the data
it's like it didn't serialize after the construction runs
this will always print 0
Do you have a LevelGenerator in the scene?
yes
If not, the construction script will never be called
hmmmm ok
so, let me explain a little more
this example was a simplified version of the problem, I probably am looking in the wrong way
what I need to achieve is pre computing some data of the class
in this case I need to look at every child actor and store all the values of some internal variables
I need to acess this data from the class default values
in short, I want to run code in the editor and serialize the data gathered in the process
(english errors everywhere hehehe)
I wonder if you're trying to work around the same thing I just dealt with
When you say "child actor" what do you mean
brb 15 min. I suck anyway, some of these other guys will probably be able to help you easier.
im pretty sure the construction script ending with 10 elements all the time is correct btw, its not ever gunna reach 20, 30
unless i've miss understood ure first post.
as I never clean up the array, it should keep adding elements to it
the issue is exacly that, something in cleaning the memory and whiping the array
construct is called when the actor is created, its only called once, so the array always starts at 0 no?
no, this is the case for construction methods in C++
BP Construction Scripts runs every time there is a change in the BP
when it's compiled too
it you move or change anything inside a BP the Construction Scripts triggers
in this case, printing the "10"
hey, I need to go, but thank you for helping :)
I'll be back tomorrow <o/
@dire lichen Construction Script runs on a default actor, I believe. The script may fire a few times, and the object may share the same name, but it will be in it's default state.
It's really only helps if you drag an actor into the level and then save that level
i have a quation i want to use 2d render componenet but the 2d render component should be only visible for the player who uses it for example a sniper scope or a camera
How would i make that ?
Hey, I use the FirstPersonCharacter, my movement are defined for the QWERTY keyboard, but I would like those who have an AZERTY keyboard to always be able to move ez, where can I modify the keys? I would like to make a button to switch between QWERTY and AZERTY or I'm thinking of putting W and Z together, as well as A and Q.
@trim matrix So, the scope on the rifle isn't visible to an observer? Even though the person using the rifle is looking down the scope? Is that what you mean?
@atomic prairie I think you'd need to do that in the project settings under the keyboard input section
and what in the world is an AZERTY keyboard
I'm trying to get a reference for "CreateServerBox" but when i go into the graph it does not show up in the Variables
@tropic mortar Did your expose it as a variable in the top-right of the design view?
i did not do that thx it working now
hello guyz i have a (i think) simple newb problem, can anyone help me ? (i'll stream you my screen in discord)
@twilit blade Not really up for the screenshare, but what is your problem?
Hello, How do i check a boolean value from the level blueprint in another blueprint?
or : how to modify a variable of all actors of a class
found by myself π
you don't need that first cast node
you can just use the input on Get All Actors of Class
can anyone help me i spawn in an actor and it has hidden in game as false but when i click the button to spawn it, it doesnt show up and when i unposses and click on it in the scene it has hidden in game off so i check and un check it and it is now visible
Hi! Do you guys know if it is possible to access UserName folders from BPs? It doesn't seem to work...
(it works with other folders but I'd like to save/load my images from the Documents folder)
hey guys, need to ask my question from yesterday again, my savegame file somehow doesnt save textures, any help on that?
Afaik you cant
Feeling braindead over this atm - I have a 24 hr clock going off an event tick, and when it hits a certain time i'd like it to fire off an event that will set an interface function and go from there (make a light visible). I just can't figure out how to branch off of the event tick into another event that should only only trigger for a single frame. Can anyone help? Sorry if I didn't explain it well
get the number that feeds into your clock, == whatever number brnach and firee
so I have a Pawn Turret as a child actor to a Pawn Vehicle, any Idea what I'm doing wrong?
I'm not able to get the parent actor properly in the anim BP
can try get owner
yeah that's not the right node
the turret should be owned by the vehicle (I'm not actualy sure how I can check that cause its a Chiald Actor Componet)
and as you see the first few nodes gets the turret owner (I think?)
@round torrent what node should I use?
I don't know how your setup is but try GetAttachParent
oh sorry I didn't realize this was an anim bp
is here something else I can do?
your setup is a little strange, I don't understand how you want to have a pawn inside a pawn
@deep elbow so something like this?
that is not great code
@round torrent great, i'm slowly learning but idk what proper code looks like yet, what are your suggestions?
your setup is a little strange, I don't understand how you want to have a pawn inside a pawn
@round torrent yeah, it is odd, but I'm trying to make a vehicle that 2 players can use, and this is the only way that seems to be posible
@simple lantern that looks like it should work, is something wrong with it?
@simple lantern You should get all those actors before the tick, for a start
yeah it definitely should work
if they have the interface
so get all actors on begin play?
maybe you need a Boolean variable for the [Light Turn On] Interface?
what dose the other end look like?
check that it actually fires with a breakpoint tbh
have you printed out the value of the clock time so you know that actually increases, hqave you added a breakpoint on the get all actors and checked whats actually in that array, etc
the actor that uses the inerface, what dose the event graph look like?
thanks for the replies, that screen shot was an example BP so i'm copying it over to the actual BP one sec
lol
So, the scope on the rifle isn't visible to an observer? Even though the person using the rifle is looking down the scope? Is that what you mean?
@tight venture
Not really if i have 2 players using the sniper the scope will only show what player 1 sees not what they should see
that's the BP with the clock
this is on the receiving BP
it's not quite set up correctly yet but it's communicating
@devout condor so you definitely chose the right node (sorry for adding to the confusion) and I can definitely use it to get the parent actor with a setup like yours
can anyone help me i spawn in an actor and it says the piviot point is where it is supposed to be but i spawns at the bottom of the map but then when i tick and untick hidden it game it teleports to the corret spot
@round torrent how did you do that?
@deep elbow clock works, interface works, everythings good there - I'm just trying learn how to break off of the event tick and fire off a separate event. There's much more code to the right of the Clock, so I can't exactly leave the Break node in between the clock and everyghing else since it would sever the execution, no?
@simple lantern you should add a boolean so you can turn it on or off
@devout condor exactly like you did, why doesn't it work for you?
is there a node to quit all audio files that are playing?
it only fails in multiplayer?
for example picking sth up and then quit it when the player picks up another object?
@round torrent yeah, works fine for self
its odd cause it works for self, but according to the print statment, the server should be able to see the client's anim update, but it dosn't
Still need some help with this, I need the clock to control multiple custom events (different things based on timers throughout the day), so I think using branches doesn't fit what I need. Plus, the event tick code for my day/night cycle BP (which contains the clock) is fairly long, and i'm not sure where in there I should drop these clock-timed events?
@simple lantern maybe you should make the interface have the time variable and do the time checks at each actor that need to know what time it is
@devout condor Wouldn't that require each actor to run off of event tick?
or I guess it could be a longer interval than tick
I was going to try to avoid each actor checking the time constantly during runtime, and instead the main clock could just fire off events triggering things to happen
so i found this "Exporet to dsik" node and tried around wiht it. but somehow the result in the event will always be false, no image getting saved
i dont know why, i tried to plug in just a filename, but also a path. also tried to just give it a texture in the node instead of giving it my generated one
any ideas on that?
You definitely should not do that. You want to minimize the interface calls. It's turning a light on and off at night, yeah? Just check if it's night and if the light call has been made. If yes, do nothing. If it's day and light call has been made, turn the off.
@simple lantern yeah, my bad
i would honestly do it in the game instance or game mode, and just have whatever stuff you want to listen bind events to dispatchers
You want to minimize the interface calls.
@maiden wadi weird everything I read says that interfaces are the more efficient, low-overhead approach. god this is starting to hurt my head
@maiden wadi thanks for that example
does this node work for anyone at all?
https://docs.unrealengine.com/en-US/BlueprintAPI/Texture/ExporttoDisk/index.html
Export to Disk
hey everyone, so I'm trying to make my camera movement (third person) smooth. for now when my camera hits an object in the world (like a cube static mesh with camera collision blocked under the collision tab) the camera snaps towards the cube and when i move camera again, it will snap back to its place (what ever value of my Target Arm Length for my spring arm component is). but I don't want it to snap back to its origin arm length, I want it to blend to that point so it gives me a prettier look. so is there any solution for that ?
@maiden wadi I 'm a little confused, in your example the first sequence is running through a series of nodes that would tie it up indefinitely, no? if so how would it go to the sequence pin in the sequence (the rest of the tick stuff)
@simple lantern It doesn't matter how efficient they are. Calling interface, casting and calling a function, using an event dispatcher, it'll all be a lot more expensive than a couple of branch checks every tick.
maybe I don't understand how sequence flow nodes work
It just executes both, one right after the other. The first doesn't have to finish before the second is called.
right, just looked at the documentation. that helps a ton thanks
does this node work for anyone at all?
https://docs.unrealengine.com/en-US/BlueprintAPI/Texture/ExporttoDisk/index.html
cant get it to work, would be awesome if someone copuld give it a go so i can see if its only me
Export to Disk
Hi.
What do i use for some kind of database? In unity it would be a serializable object (SO).
Something, that i create as a content, that exists uniquely in content, that i can reference in my other bps and all point to the same content
Pls ping me if you answer
@maiden wadi In your example, are you setting the 'Lights On' variable so that the execution will return False after turning call the interface?
like a lightswitch?
@willow lichen not familiar with unity but maybe you are talking about a data table?
What is a Data Table in Unreal Engine 4
Source Files: https://github.com/MWadstein/UnrealEngineProjects/tree/WTF-Examples
Note: You will need to be logged into your Epic approved GitHub account to access these examples files.
Can it Store for example a struct called "loot" containing a drop weight and a class to spawn
look at this video and decide if thats what you need
Yeah i think that was what i was remembering thanks
Ks
it cant store anything at runtime
but you can populate yourself before starting the game
Woaaaahhh
subscribe to that guy as well π
cool, let us know if you encounter any issues along the way
cant get it to work, would be awesome if someone copuld give it a go so i can see if its only me
bumping
lol I got the whole thing set up and UE just... crashes
when I do this, will it call the pure function twice or will it cache the underlined output variable?
Can you not 'GetMaterialInstance' from a mesh at runtime to store in a variable?
since you are only using the output once it will call it one time
if you had more than 1 output going out, then it would call it that many times @trim matrix
but I have the boolean and the the widget output
so will it call it twice?
or will this call it twice
since it uses the same output 2 times
2-3 is correct, will be called 2 times
but not sure about the 1
if it will be a 3rd call or not
havent used more than 1 output for a pure function
so to be honest i dont know
So if I cache the stuff as local variables it should only be called once?
If it wasnt pure, would it only be called once?
oh wait it will call 3 times probably
I mean I cant imagine that it would be called more often than once
pure is called everytime you need something from it
should probably just print something out to test it
to test it you would need to put that string inside your function
but since its pure you cant
yeah
and it wont appear on your whole logic that it prints more than once
for example if you had a pure function with a random integer inside and you used output once than more
it would return different results
on each call
yeah I think I noticed that before
to avoid randomness you should promote that output into a variable
and use that
then your code will use the same 1 output
probably its better to use a macro in this case
to avoid repetitiveness and different outputs
does this node work for anyone at all?
https://docs.unrealengine.com/en-US/BlueprintAPI/Texture/ExporttoDisk/index.html
bumping again
Export to Disk
but since its pure you cant
@white crypt of course you can
So I just printed it and this makes 2 calls
yeah my bad, you can add a print string.
How does blueprinting world on unreal engine, is it like itβs own form of programming?
was thinking that it will only print once and it wont make any diff
However, this has only 1 call
yeah, as I said pure will be called everytime you use its output
2 outputs
well thanks for the help I will consider this before I make functions pure from now on
you can make a macro and make a local variable inside if you want, or just use impure function
Is this a correct way of using unbind event node? Does it unbinds the event created on construct (upper execution line) or does it creates another event with given function and doesn't actually unbinds the event I bound on the construct?
Would anyone be able to help me make the ai i have do damage to the player?
does this node work for anyone at all?
https://docs.unrealengine.com/en-US/BlueprintAPI/Texture/ExporttoDisk/index.html
bumping again, any help greatly appreciated
Export to Disk
@trim matrix okay, so i am getting the picture here that you were just using the scope on the rifle as an analogy. what you're actually building is totally different. what exactly are you building? cuz the rifle/scope analogy doesn't really seem to fit. (2 players using a sniper rifle but both of them, when using the scope, see what player 1 sees?! lol... analogy just disintegrated)
like, player 1 is pointing his rifle at a giraffe, player 2 is pointing his rifle at an elephant. when player 2 looks down his scope he'll see a giraffe. i got that right?
i'm not at my desk for another couple hours, so i'll have to get back to you later. but anyone else thing they can help him out here?
I have a unique issue involving world dilation that i wonder if anyone else ever experienced it...it seems to expose a bug in the engine...i have a function that flipflops a bullettime bool...and i set the world dilation accordingly in the actors tick function...the bug is exposed when i quickly hit the key...at some point world dilation breaks...it will correctly set the dilation to .1 however it has literally no effect at that point...i googled it and found only one other person a year ago discussing something that sounds like this bug in version 4.14...where time dilation gets set but has no effect... Anyone encountered cases similar where setting it eventually breaks?
The issue exist even when converted into a timer or a timeline...simply mashing the button repeatedly eventually breaks it....
hey before I commit to something, I'd just ask one more time, does anyone know a way to set a camera to not render a certain set of assets, not a class, but an array of actors of a class. i;m trying to capture these actors in a 2d scene capture, but have them be ignored by the players camera
@deep elbow SetVisibility node
is there a way to get last tick's velocity of a component or am i stuck having to track it each tick?
@late gorge u gotta track it. it truly is tragic that on hit, u cant just get the prev velocity
@trim matrix Lemme ask you a question. If there is a player 3, when he looks down his scope, does he see a giraffe, too? Do all players see a giraffe?
I keep getting this error and crash of my packaged project if Ive changed the resolution size in my menu and then click on a button connected to a "launch url" node.
I've tried reinstalling the graphics card drivers and verifying unreal.
I keep googling it with no answers other than it might be directx
Is there any way to format text in a blueprint comment? e.g. superscript the "2" instead of writing r^2?
I Googled for it, found nothing
@gloomy stag there's a bunch of tutorials on youtube
@tight venture i never tried but if you write it in a text doc program that superscript it and pastes it in the comment does it work?
Eh... if I can't do it right inside UE then it's not worth it for me
but good idea, that would probably work
Alt codes work.
Is that really what you're worried about? π
hehehe no. was just upsetting the anal-retentive area of my brain
Okay, serious question:
Where would I want to put utility functions that I wish to use project-wide? Do I need to create a library? How do I even do that in UE?
@tight venture Library. And for functions, just make a new library in your content browser.
that's what I thought. thx
oh cool. there it is hehe
Just a question of your personal opinion:
Content >
Library ?
or
Content >
Blueprints >
Library ?
I use them a lot. I like wrapping my custom actors get calls in new projects. That way instead of calling GetPlayerController, CastToMyCharacter, I can just get and cast in one node where I'm working. Makes it a little tidier.
My project is starting to get a little disorganized
hehe okay that was a dumb question nvm
I don't think it matters where you place it. I tend to keep mine in the blueprints section of my files alongside more generalized classes.
π
good evening
Heyo.
yeah, that's nice
@maiden wadi There is no way of doing template stuff in blueprints, huh?
How do you mean by template?
I can't make a Util function in BPs like... RandomElementFromArray() because that would require a C++ template
(cuz BP doesn't know what-type-of-array to use as input)
Im trying to work out a solution to a problem I have with two cameras. Im doing a picture in picture thing and want to make an mesh invisible to one cam but not the other any pointers on how I could do it?
You can easily do that. Are you meaning for a specific array type, or unspecified array type?
unspecified array type as input. So I can pass an array of ints OR and array of floats in to the function and it would work the same
I'm just tired of having this boilerplate in my BPS:
@tight venture all players see giraffe
hey GameLore
that is an L, right
or is it GameCore hehe
anyway
Um... so, I am not the most versed in BPs, so I can't tell you exactly how to solve the problem, but I am an experienced programmer
Gamecore xd but np
And although most people do say it is an anti-pattern, the Singleton pattern sounds like what you want
@trim matrix I don't know exactly how that is implemented in BPs, and it may not even be the best solution, but that's the first thing that came to my mind
Okey and how do i do that
Before I divulge, lemme ask, was the rifle/scope thing an analogy or are you actually making a game with a rifle and scope?
@tight venture Had to double check some stuff, but here. You actually need a macro for this since it's not a specified type. Same thing as the Function Library, except you need a Blueprint Macro Library, for type Actors.
@maiden wadi what I want is (excuse my C++, been a few years since I've actually written any):
namespace Util {
RetType RandomArrayElement<typename RetType>(std::Array<RetType> array) { ... returns a RetType ... }
}
Okay, so it has to be a macro?
Yep, and if you don't care about the return index(Threw that in for the hell of it), you can also make it as.
Okay, thanks! I'll check out how to make a... macro library?
hehe cool, yeah
Blueprints that declare and define macros for reuse in other Blueprints.
@tight venture yes im making a fps game
okay, @trim matrix , then you have a BP class Rifle, I imagine?
Yes
Okay, so... um @maiden wadi maybe you can help me out with this... do you know GameCore's problem here?
Basically, the Singleton pattern would be this: In the Rifle constructor, make a Scope object and perform a check to see if it has been made already (it should only be made ONCE for any and all Rifles constructed), and if it hasn't, make it (that would be "Player 1's scope"), and if it has, reuse it.
There may be a more elegant solution, but I am pretty sure that would work. Then, when Player 2 looks down "his scope", he'd actually just be looking down the same scope that all the Rifles have, that single one constructed for all of them
Ill try that
As far as the BP components go, you'd have to duplicate the mesh or something, but have the functionality come from that Singleton scope
And, just to clarify, Scope would be its own BP class