#blueprint
402296 messages · Page 577 of 403
like camera pawn or something other you wouldn't expect to have a physical representation
i manually selected each of my actors and moved them a little before resetting
none of them were that little sphere
unless its like the atmos fog or something
but it has collision
don't rule anything out
So the sphere does not show up during Play-in-Editor?
no, exclusively shows up in the standalone game simulation
Hey guys how do I do it so a widget is only called once until it's removed from parent to display again? Currently I have this and you can see it overlapping https://gyazo.com/10370289b4cda0bc209164c9426b607a
not even in seperate editor window, it ONLY shows up during the standalone
@drowsy terrace Do you have the ability to move the mouse in your game? If you can mouse over it, you can make a quick key test to line trace and hit it and print what it is.
the mouse cursor gets disabled after the now functional main menu is closed
Make another button to show it just for the test.
also. how would i key test it during the standalone simulation?
i have the mouse up aparently, guess it never actually gets hidden
@drowsy terrace Can try something like this.
so if i reacreate that in i'm assuming my gamemode base it should give a print output of whatever the cursor is hovering over?
actually wait, that has inputs, should it be in player controller then?
Controller, yeah.
what is that multiplication node in the example you gav?
i can't plug both values into the vector + vector or v*v nodes
nevermind, i think i got it
it doesn't return anything at all
kinda like the box brushes i have making up the area
@drowsy terrace maybe set one actor after the other to invisible?
do i run the simulation while actors are invisible?
set invisible -> run; next to invisible -> run; etc.
until all actors but your mystery object there are invisible
when i run the standalone sim the ones i set to invis are still there
i'm gonna have to figure this out tomorrow or some other time, its already 3 am
i'll catchya guys later
@drowsy terrace Try changing trace channel to Camera. Forgot about that. Also try these debug settings. See if it puts a red dot on the sphere.
Alright, i'll try that when i get back on next
@olive sedge I just had a curious thought. Are you using SetInputModeUI?
Anywhere.
Like even the main screen or something.
@maiden wadi I tried all the input modes I believe
@maiden wadi I just built the third person project and it works there so it must be something I'm doing with the player controller or whatever the problem might be
so.. I'll copy over my game logic to the third person demo and see where it breaks
Hi, can somebody help me with my blueprint logic? It's a thruster effect for the player-controlled spaceship. So far I managed to implement simulation of the inertia dampening and player's linear thrust (Thruster reads its world speed, and if it is aligned with it it is activated. While the ship itself slows down via friction settings of the physics body, thruster creates an effect that it slows down by the RCS means). Now I'm trying to add to it a rotation check that would mirror the velocity vector that the thrusters checks to see if it's activating (So that thruster would activate if it's angular velocity matches the player's turning direction), but I have troubles with how to process player's mouse input to do that without messing up the linear motion system.
This is the entire blueprint:
https://blueprintue.com/blueprint/l7pma29f/
@olive sedge For a very bad test. Try just setting SetInputModeGameAndUI on tick or something.
i need to connect actors across level boundaries. to spawn wires in between them. the wires should be spawned into the level of the starting actor of them, i guess. the connection would need to reference the target actor. but afaik the construction script gets rerun when cooking. and i guess the other level would/might not be loaded then, so the target actor wouldnt be there. what's the best way of doing something like that?
@vapid ibex uh. Is this just for visuals or for physics?
just visuals
Pmd
Hi Guys! I've tried using Export to Disk to export panoramas from my scene. They keep failing and the only thing I'm being told from the log is "Invalid texture supplied." I've tried with multiple textures, not just the cube render target, still fails
@maiden wadi unfortunately doesn't work
Got a problem in the tick updating a mesh array locaitions with the same delta I get different locations
someone knows how is possible that I'm getting an error at place the meshes ?
how do I get widget position on canvas? I know only how to get canvas position on viewport...
@maiden wadi this is so weird. just to check, I set the default game mode and in editor, I just get a free camera. When I package for dedicated, I get a fixed camera behind a manny that does not react to input
I printed my movement of the character and it says "Walking"
If I perform an attack I set Movement Mode to "None"
And when the animation is over I switch back to "Walking"
However, my character does not respond to my inputs
What do I wrong?
Where do i find the template emitter library? to check out other options in this case leap sound. the only one i see is P_Sentinel_Leap_launch_trial. and it doesnt produce any jumping sound to my character. The delay shows to be 0. is there a list somewhere to see what other leap_launch? if that makes any sense. ty.
@olive sedge Not a clue there. I've never experienced that, but like I said, I've never done dedicated servers. My couple of multiplayer play around projects are listenservers.
@alpine terrace Would have to see the logic flow to guess what the issue is.
Okay one moment
Am I missing anything, that sound doesnt play? the landing sound in a separate function works just fine, yet this right here doesnt.
im in the BP_Player already. fixed it tho the play sound 2d function had the wrong sound selected.
ty tho
@maiden wadi
Results of the prints
Okay my AnimNotify is fired 2times but why lol
Hey folks, naïve artist here. I'm making an asset pack and wanted some guidance / point in correct direction for a process, that in my head sounds straightforward.
I'm creating some floor panels with joists on the underside, which will be parented the main framework and I would like an option to rotate them incrementally by 90 degrees - in the form of a slider (1,2,3,4 or 0,.25,.5,.75,) can anyone shed some light or pointing in a direction that can help me investigate my idea?
from image one to image two would be the ideal result - the pivot is in the centre, so it can be done manually, however, I feel that a novice using the pieces may find it easier if it were a slider.
when overwriting an event, can I call the parent event handler somehow?
@trim matrix You just want a four point slider?
I wasn't sure if I could force rotate the child 90 degrees on the Y axis in the form of a switch parameter (called 'Rotate?') and IF not it stays as is
@olive sedge Right click the red event and there's something like "Call Parent Function"
@maiden wadi I think a switch would be an easier option tbf
@trim matrix This is in an actor blueprint?
yes
And you want to do this in the editor from it's variables?
yes so in essence a prefab that enables users to change "parameters" to suit the scene development
on paper it sounds straightforward but i'm not kidding myself on the 'simple things are often the hardest things to implement'
@trim matrix Slow to respond, dying in Overwatch, but in short, you can probably just set up something like an Int as Instance editable, set some slider settings, and do your rotation in the construction script.
@maiden wadi no problem man, I appreciate the time - do you 😉
thanks for the advice 😄
@maiden wadi well, that wasn't even actually it. Just making a new game mode did the trick. I'm confused why it works now. But anyway, still thanks for your help 🙂
That'll lock the int to 4 values, and rotate by 90 for each of them.
oh awesome! Can i set it to a specific mesh?
I just have a parent with children tha need rotating
Certainly, just set that's rotation rather than the actor.
Or actually, maybe use relative rotation for the child.
World would snap it to strange ways if the parent is rotated at all.
I just need to getr the kids down then I'll give this a go
I guess I could get the actor rotation first before instigating the force?
It should be fine if you just use the child's relative rotation setter instead of the World.
@olive sedge For the event or the controls?
@maiden wadi not sure what you're asking but the controls didn't work. I tinkered around a bit with maps, game mode, default pawn, etc..
in the end I created a new game mode and now everything works as intended
not sure what was wrong with the old gamemode but I'm happy it works now
this part of code getting mouse position relatively to widget
but it's getting it depending on viewport position on screen
how do I solve it?
If I make a blueprint off a base class, will other blueprints that inherit child classes from the base take on that functionality?
@burnt tundra yes
yes, me too but I can tell you that yes, that is so. I did that before
Errr no I don't think so.
You're saying if you do Base > Child
Will something that inherits off of Base have properties of Child?
I don't think that's the question, doesn't make any sense
in other words i have in code the base == weapon and a child flamethrower,
If I make a blueprint for weapon, will flamethower have that same functionality?
yeah
ok
sorry was just misreading
all good
Hey Guys, quick question. I'm dragging a Widget onto an actor using DragOperation and Event On Mouse Enter. But when I drag a widget onto another actor, my mouse is technically not actually entering the second widget because the first widget is in the way.
What I can't do is doing some kind of collision between the widget and the actor because it needs to be specifically the mouse (or mouse position) that is entering the actor. You guys have any idea to how to fix this?
opacity didnt work haha
@wicked dock Try making all of the dragging widget's stuff not HitTestable. May work.
can you please answer on my question? its here: #blueprint message
(this is the last one today I hope)
@maiden wadi oh yea, good idea im testing it out
@last walrus What's the issue with it? What's it doing wrong?
it's providing mouse location depending on viewport location when it must do so not depending on location
(you can look at screenshots and when viewport is on different places it gives different values for same position)
@maiden wadi sadly it doesn't work :/. Interestingly it is not even working if i make it invisible doing the dragging.
@last walrus Can I ask what the desired effect is that you're after? What are you trying to achieve in the end?
I want to get mouse position relatively to widget
it's for getting the place where I'll press on it (not implemented for now because I'm testing getting location)
Relatively how? Like widget's top left being 0,0 on the grid, and anything to the top left being negative, anything to the bottom right being positive?
@last walrus Try Get Screen Space Position?
Does anyone know how to save the state of a level sequence to a save game bp?
I'll try to explain with screenshots. at 1'st screenshot position is 0:-26 because mouse is on widget (on place I marked with red spot). at 2'nd screenshot I moved mouse out of widget (red spot) and now the location is different. in fullscreen viewport it's working good. but if viewport is moved on your screen - it's adding some value from top left corner of screen to left top corner of viewport
And you want to get the value as if the widget stays in the top left of the screen?
no
I will also move it on the screen
on screenshot below - mouse is on red spot and mouse location value is it's location on widget
Right. But if you move the game window itself, that value changes?
Even in the same red dot location
for some reason - yes
where are you reading those values from?
from the vector2d provided in red spot
@last walrus Try this out. See if it runs well for you.
@maiden wadi maybe you have an idea? the game automatically spawns a camera that I don't need. When I connect a 2nd player, the first player seems to possess one of the automatically spawned cameras.
even if I spawn 4 players, the first one will possess one of the cameras
the others work fine
it works! thanks!
but... there's some weird rounding i main viewport...
@olive sedge Odd. What are the camera? Your RTS camera?
@last walrus It's probably just the multiplication from the scale. If you wanted, you could easily round that to the closest pixel with ToRounded(Vector2d)
@maiden wadi my default pawn has a spring arm and a camera. that's the one I want to use and works really well when it's only one player or when it's the 2nd or 3rd
but when there's more than one player connected, the first one gets stuck in some random camera
and I don't know why that is
maybe some autopossession thing?
That's strange. I'd check any GameMode overrides. I'm not used to doing anything than just setting the default pawn class, and letting them spawn.
If you don't find a solution, I'll be on in the morning. almost 11pm in Finland so I'm off to pass out.
thank you a lot
I dm'ed you yesterday. can you please read my message when you'll be free?
@maiden wadi alrigh, thank you!
Hello, when I try to "Goto Definition (Alt-G)" on a Blueprint node, I am getting a Access violation reading location error
This is on a fresh install and build of UE 4.26 with a new empty project
Also would this question be better in here or in #cpp ?
@maiden wadi i fixed my problem the sad way. Finding the widget positions and comparing it with the mouse position. i feel dirty.
the node find look at rotation how do i have it where i select the way it faces like a side i pick instead of it picking a main side and keep having it face me
I am trying to find a tutorial on how to make a drag and drop inventory system but I can´t find any. Does anybody know one?
there used to be a sample project in the launcher for that, not sure if it is been updated to newer version engines or not
Anyone have frame dependency issues when using timelines? I have this timeline based motion that is getting different results depending on which window I launch from
I tried setting a tick interval and that wasnt the answer...
@trim matrix Timeline?
@heavy gulch timeline is a "ticked" event so yeah if you're doing things that are framerate dependent (such as adding offsets/deltas to things) then your math needs to factor in World Delta Seconds
@tight schooner thank you jumping in
Also it only samples your curve on the frame so fewer frames per second = more quantized curve
Basically I am decaying a value over a looping timeline
How would I factor in delta seconds? Multiplying into the delay?
decay****
oic there's no curve in your timeline... You're just using it as a pseudo tick. I'm not familiar with how Add Movement Input but it's basically doing it on every frame, so if your framerate is twice as fast it'll do it twice as much in any given second for example
Get World Delta Seconds will give you the frame time (at 60fps, it'll provide a value like 0.0166666)
So typically you multiply whatever you're feeding into an Add node by World Delta Seconds
I really appreciate the help\
If this is the stupidest way of doing this feel free to lmk haha
Seems like I would actually need to divide by the delta time
hmm ni
anyone know how i can get the right or any side of an object to face towards me i only know how to get front and back
What is the best way for me to get a reference to my local player controller on a replicated actor in a multiplayer game?
This is for getting the look at rotation for floating names and health bars over character heads
this wont work for a mp game because I want the widget to face clients as well.
ok I figured out a solution on this one
did anyone ever had problems with save games which hold structs/enums?
Seems to work fine for me
i'm getting unexpected behavior, and sometimes it saves or loads fine, sometimes it doesn't (hard to tell if it fails on save or load)
use more print strings to see if you can get an idea of what is going on
on save it's always fine, it fails after loading
or it saves bullshit
how should i tell if its saving or loading wrong?
Hello, Can I ask a question? I've found this set array elem in a blueprint and I don't know how did he create "item class" pins and "item name" pins.... it's like a custon "set array Elem" ... How can I do a custom set array elem?
@gloomy light it's probably a struct array, and he clicked the struct pin and selected split pin
Thats new to me, I will try, thank you Ben!!!!
apparently the problem is that the internal unreal enum that i'm using can't be converted to byte (and so it saves garbage) -.-
thanks for not showing a warning unreal 😛
ive got a question about the Buoyancy component, why is mine only working if im using the 'Editor Cube' as my static mesh? im quite confused
this will be some fun to refactor 😦
Hi - trying to attach a pawn actor to another static mesh actor BP so when the parent actor moves (using set location) the pawn moves with it until it is detached again. Can't seem to get it to work. I can attach a static mesh BP and it works fine but when I try the same with a pawn class BP it does not move with the parent BP at all even though it is attached?
Everything is set to moveable in the Pawn BP
@maiden wadi i tried that suggestion you gave me with the linetrace and it returned something, Default Pawn
yea after changing that enum to my own enum it works fine -.-
Hi there. Real basic question here. Is there a way to move the pivot point of a cube to the end of it? PS - I'd like to do this within the actor itself. Tried Alt + middlemouse and it just moves the whole cube object.
i'm making a SPDT electrical switch. So the cube is really the electrical "pole" that needs to rotate from it's end.
Maybe if you extended the bounds of the mesh... I'm not sure. In lieu of anyone chiming in with a better approach, you can attach the cube to a plain old "scene component" which is just a dummy transform that can act as a pivot for everything else attached to it.
Thanks for the response. I will give that a go..
aw that seems to be working just fine..
Hello
I have a quick question. I have blueprint which is a pawn but the root has a static mesh. Which is player controllable. The thing is the rotation don't necessary match the forward direction. I would like the forward direction to always match the mesh but still be a playable pawn.
Am I doing something wrong?
My question is why do you need the forward vector to match?
And I think a component of your BP has their rotation being set instead of setting actor's rotation
The force causes the rotation of the pawn(actor) which basically rotates the static mesh and children. Just out of ease of editing in the editor mostly. It overall works I need to stabilize the ship movement.
https://nerivec.github.io/old-ue4-wiki/pages/blueprint-multiplayer-respawn.html
im at a loss on where this fails for a local server. Works fine on a dedicated server. I think its because the call gets made on the server player controller, still trying to figure it out. New to UE4 Networking still.
I have a widget make the respawn call, it casts to a clientside on the player controller validating if the player has a pawn or not, if not it does the server event which i think is causing the mixup
is there a way to make the ocean in 4.26 infinite?
I'm a bit lost. I would appreciate some insight on this system I am trying to build. (Possibly there is a better way to do this?)
I am working on an RTS project. The way I set how things are organized is:
Buildings and Units have their separate DataTables, which include in-game name, resource costs, UI text, BP class to spawn etc.
In the PlayerController, there is a little logic which detects what object is clicked.
What I want to do is, pull data from the Unit or Building table according to what type of object is selected, and populate TileView on the HUD.
@elfin inlet I'm very much a beginner, but just watched this tutorial which covered how to use data tables to populate UI elements, might be useful? Or might be super basic 🙂 https://www.youtube.com/watch?v=FFmr8W04p-Q
#UnrealEngine4 #Blueprints #GameDev
Completed Project File: https://drive.google.com/file/d/1_uzllEAopz0KwBdGr_EKh7Z0L9awUshB/view?usp=sharing
In this video I go over how to make a simple choose your own adventure game with a basic graphical user interface in Unreal Engine 4.
so, beginner question: I'm using blueprints, what class should I use for a reusable utility function that will be used by multiple blueprints but never appears on its own? Like, what's the most basic blueprint?
object > actor > pawn > character
from simplest to the most complex
but keep in mind some odes are unavailable in object class so you maybe should use actor class
ah, cool, thanks...hadn't realised you could set stuff as 'object'. But actually in this case I think I might be able to use Function Library even, it's just a very simple one
im having several issues right now, my bind is not working properly. I think the way i'm creating the tile widgets might be the reason
i've checked the video, the concept is similar but i think its not very useful for my situation :/
that is a level design issue
oh sorry
make them both additive
that might work
this is how the tile entry widget is created
and this is the text bind inside the entry widget
you dont need libraries to create object classes
the entries are created with default text and not binding
i have no idea why this is not working
@plain flare Stair additive after the subtractive brush.
hello
I remade my widget movement logic and now it works better then yesterday
but for some reason it's moving with like 1/10 of mouse delta
can you tell me why?
Possibly a scaling conversion issue. Maybe the set doesn't like it being scaled down. Are you just trying to move a widget on screen?
yes, just move
I was trying to make my own way to do so but it always not working as I think it will...
Haha. You can probably get it working. I'm lazy, I just use the DragOperation method. 🤷♂️
what is this?
Wes Bunn covers it pretty well in the UMG video for it. If you're starting to work with widgets, I'd give it a serious watch. Good material. https://www.youtube.com/watch?v=wyC5vl64V9k
I'll watch it for sure
thanks
any ideas? i'm completely lost here...
i'm sure it has something to do with the variable being exposed on spawn and fed data when the widget is constructed
i've tried several bind methods and none of them are working 😦
@elfin inlet Is TileEntry a widget?
Yes, it is the entry widget for TileView
Create, not Construct.
@elfin inlet Odd. Can you print where it's being created and input into the widget that it's not blank there?
now tile widgets are not being removed
i need to use construct because the owner of those widgets is the tileview
it prints correctly
animation channel
Oh sorry, I posted it there and tought it was blueprint (cause of attachement, i don't know)
What about your Widget's Construct event? It should print correctly there to I think.
Kind of strange if it prints right before going in. Unless it's being changed somewhere else, the binding should be right.
makes sense
if i print it inside the tile widget, it prints the default value
this means the parameter is not being passed on
Strange. I've never had that problem with instance editable.
I've checked the debugger and apparently, it's creating two instances of tile entry widget when the function is executed
one has the default value, and one has the proper value
this doesn't make sense to me
Hello , sorry to interrupt , new to the whole discord servers community thing . is there an etiquette one should follow or something §? like can i ask a question or should i wait for others to solve theirs first or something ? i know this is a weird question but as i said , new to the whole discord thing
When i select a building in game, it should create 2 entries but it creates 4
the first 2 entries are correct but tileview shows the latter 2 entries which has the wrong value
if you really need help fast, going into voice chat and asking there might be better
but i dont think there's a rule for "waiting"
if its not complicated just send it
😄
not really , just stuck at something that might look simple to most people , no need for it to be fast 🙂 i ll just drop it here then .
i m trying to make a top down game and i want my left joystick to control movement and the right one to control the rotation where the character is looking at .
now i have two problems i kinda need help to solve :
1 - the important problem is that when i release my jright joystick the character goes back to facing his default direction ( right ) . i d like him to keep looking at the same direction he was looking at .
2 - for some reason my character looks 90 degrees less than where my joystick is pointing at , you can see for now i worked around it by adding 90 to the Z rotation , but i d like to know why it's happening in the first place if possible )
Ok so...
The Code i sends Flips a The Charecter to face the moused based on if the mouse is on teh left or right hald on the screen
Its For a paper 2D Srite
How do i make A paper 2D Flibook animation to play once, and once its playing, you cant move, and the default animations dont interupt it, And once the quicc animation is done, it goes back to normal
if tried disabling with an if statement
Ping when respond
@burnt anvil Don't worry about interrupting people. Just post questions if you have them and answer them when you can. Can I ask why you're using the player controller's location though? If you just want the one joystick to control the character's look, just do... I'm going to blueprint this rather than write it all out.
@burnt anvil This is top down, X vector being Up/down, Y vector being right/left?
x left to right i believe .
Yeah, just noticed that.
actually , 1 sec . joystick's X goes left to right but the world movement X is going forward ( up )
Either way, something like this is what you're looking for I think. Tick is slightly better because input axis events run on tick anyway and this reduces the rotation call to one instead of two.
Basically if your look joystick is not centered, have the player rotate to face outward from the capsule in the direction that the joystick is moving towards.
trying this right now !
okay , i tried that and my character stopped turning at all , i changes the get move right and move forward with get look right and get look up and now anytime i move my thumbstick in anyu direction the character faces downwards . :/
Let me see what you have at the moment?
sorry for going afk , had to help dad in something .
@burnt anvil All looks fine. What do the two Axis event floats print out?
When setting the material of a skeletal mesh in BP, do I need to do something else to apply it?
added this ADD vector right before the target pin , now it rotates with the joystick ( it goes 90° more for some reason but it rotates at least ) . and when i release my joystick it goes back to looking at the top
@maiden wadi they do print out correctly . numbers between 0 and 1 depending on where i move my joystick
set the material of the mesh
-> \*target mesh\* -> what is that? getMesh?
yes
cast your actor object as a character, then get the mesh component of the character . then set the material
or you can drag out from As Character and look for set material node. it will automatically fetch the mesh
yes
oooooh. I get it.
It was only working in the constructor, not in the controller
but this is a server event so it sets the material on the server and no one cares :>
cool.
yes 😉
thanks @stable frigate
so.. when I spawn this character on the server and it gets replicated to the client.. any good way to catch it there?
the only way I could think of right now is iterate over an array of that class and the last one should be it but that's hella dirty
not sure about the client server. i've never worked on mulitplayer games.
ok
but cant you store the spawned actor in an actor variable? then use that variable to do whatever logic you want from the client side
hm.. I guess that's worth a try
but hm, that's still prone to race conditions and I wouldn't know when the server is done
gonna try to find out if there's a way for the server to RPC the client with the object ID or something
really cant help you with this client server issue. i have never worked on multiplayer games. Why don't you post the question in multiplayer chat? you might get some good suggestions there.
my pleasure sir. and keep on rocking
So this is a bad test layout but how can I add UI in the world?
So it is placed behind the gun for example
on screen or inside the world? like a 3d ui?
If its 3d:-
Add a widget component in your character blueprint.
Add a socket to the back of the gun in the mesh editor.
Set the location of the widget to then socket of the gun that you added.
Set the rotation of the widget to always face the camera.
@stable frigate How can I make it always face the camera?
find rotation between widget location and camera location. then set widget rotation to the obtained rotation.
Find Look at Rotation
you'll have to do this on tick or create a timer
Only needs to be updated on tick if it's not attached to your character. Otherwise you can just attach it to the player's camera and let it's relative location/rotation update when the camera's does.
@maiden wadi got it working , probably not efficient in terms of optimization but at least now it keeps looking at the correct direction when i release my joystick ! 😄
@burnt anvil Eh. Vector math is cheap. Unless you're doing this on hundreds to thousands of instances on tick, worrying about performance for design is a fairly moot subject in most cases. Glad you got it working though! 👍
thanks for the help , it's a mobile game , planning to just have 8 to 12 characters in game .
Yeah, mobile platforms tend to be a little more stingy in terms of performance. But vector math is always very cheap, so don't be afraid to use it.
What structure would you recommend for (non-user-configurable) gameplay settings? I'd like to have them in a central location where other blueprints can get them - is there a standard way of doing this?
I think you're talking about data tables
Thanks!"
so, I made a data table and a struct, this is the sort of thing I was talking about. Do I need to pass it to all the objects as a variable?
oh, figure it out. Thanks!
next question (sorry, I'm new to this), what's the recommended way to handle errors? I assumed there'd be some equivalent to Exceptions, but it seems that's not the case?
you can just make "print string" for when row is not found
is there not a more direct way of setting an error? Hmm I guess I could do a print string and set a breakpoint on it. I'm currently printing quite a lot of debug info, just wanted to make sure I don't miss it 🙂
Like - if I have loads of blueprints, and see an error printed, how would I even find it? I guess I need a unique print string for each one?
I've made a little GetSetting function, seems like a rather hacky way of doing it but guess it'll work!
Hm actually, it seems to give a compile error if you try to use a missing row, so I guess that's what I was looking for 🙂 thanks!
How can I cast to a UI widget class from the widget component?
Anyone else encountering issue with accessing solar time in 4.26?
So my "raining" parameter can only be either 0 or 1. I was wondering what is the lerp going to default to if it's 0, A or B?
I think 0 is A
You're creating a drop operation and referencing self widget to it but then you are removing it
this was not the problem because it was removing previous self ref
the problem was in ||I just did it in wrong blueprint ;D||
I have a material with a "Particle Color" node going into emissive color. And created a particle beam using that material and set the "Input Color" to blue. But my beam in my scene is still the default white? Is there something else I need to enable? I just following a tutorial click by click and it should have changed color.
Ah. Not familiar with Cascade. I'd recommend learning Niagara honestly. Cascade is getting ditched sometime in the future.
dont cast to your "AmmoCounter"
just cast to it's class
like on my screenshot
@last walrus But how can I access a event in it?
like this
(for event you dont need a class ref itself)
Justevent node is my custom event in desired class
for me it works :/
can you show your error?
i'm doing this with widget classes but in others it will be same (just replace get all widgets with get all actors or whatever)
try toggling breakpoints on different nodes calling for event and tell which one of them is not breaking
the I cant help you... maybe Authaer will
alright thank you!
i'm having issues saving (or loading) an save game which contains an struct array (actually a map with struct as key) where the struct has enum values that get mixed up
did anyone ever encounter something similar?
@maiden wadi Do you know why it isn´t working?
it may sound stupid
but have you placed on scene actor you are calling for?
@trim matrix I haven't been following the conversation. What are you trying to do?
I am trying to access a widget components object to use a event
@last walrus I if I have placed my widget component?
Where is the event?
In the ammo counter widget blueprint
yes. is it already created (in viewport I mean)? not created actors/widgets cant do their things
Haha, I'm pretty used to working with Widget Components. Using a lot of them in my merchant game for "holographic" displays.
not sure if this is the best way to go about this but.... I've setup a function to to do a movement check and set a slate based on the results, it basically works like:
if (player running + stam) return running
if (player sprinting + stam) return sprinting
else return walking/idle
am i over complicating it?
the slate is used in several components for movement & stat modifications
@orchid garden Can I ask why you don't just base those off of velocity?
not sure if velocity would work but i could try replacing moveforward/moveright with it.
wouldn't that return a false positive though if say the character is falling?
interesting that the inventory drives stamina; that's normally another component for the vitals
?
CP Player Inventory -> Stamina
A lot of animblueprints are updated via velocity like that. You can check if they're falling from the movement component, and if they're not falling, if velocity length is a certain length, they're likely moving, if it's above another length, they're sprinting, etc. A lot less branching logic.
I tend to do bWantsSprint set from the sprint button being held (or toggled), and a CanSprint() function which would evaluate stamina, other things preventing a sprint - so this evaluation would be
if (bWantsToSprint and CanSprint()):
return Sprinting;
else: return Walking; // or running
else: // not moving
return Idle;
psuedocode so I don't have to open BP
no worries i get what your saying 🙂
AnimBP states would be entirely velocity driven (at least for base locomotion)
But I presume you then wanna tick stamina and update your speed based on this?
eg lerping between run and sprint speed?
yeah the stamina get ticked by the slate change
right now its not overly complex for handling movement but....
So then CanSprint shouldn't worry about the velocity, and in fact you should check the input vector and not the velocity. The pawn should have a function to peek the input vector
Oh
Why is this all one enum?
the functions inside the colapsed nodes are pretty basic:
different stats are being effected by what type of movement is taking place
just setting the movement type and using a single variable for the movement type just seemed to make sense.
i'm having a problem with my first-person player model, it's insisting on being turned to the right when the game's running
its rotation doesn't seem to change that
asking this here because i have a follow-up blueprint question related to this, too
Might make sense to look at how your logic is structured and consider splitting aiming, sprinting, and crouch states into different variables.
Also (I'm not saying this is a good idea) you can combine distinct states into a "flags" field. You reduce the total amount of states you can support, but a single variable can represent any combination of the limited states.
Bitmask is what the editor will call it
i believe the capsule controls the player direction if im not mistaken so if your actor is facing to the right of the capulse forward direction it will always be facing right by default.
are you doing anything in the construction script related to the mesh?
rotate the actor to the left 90 degrees, and your other components.
i had the same issue setting up my character initially
had to align the character to the capsule like so
nothing in particular in the construction script, i think
let me try rotating
didn't fix it
just for giggles.... did you try disconnecting your construct to see if it was the root of the problem?
checked it now, no difference
hrm... if you don't have any scripting causing it... the only other thing i can think of is perhaps the animation
there is none (yet)
should i start over with a new player character? i can easily transfer what little blueprint work i made so far
yep, empty
wow thats wierd... i honestly donno :S
ugh, it's okay
i'll transfer what i have to another character
thanks for the help though, i'll come back if anything stays like this
what did you start out with for your base actor?
yeah, first-person template
i wanna try this now and see if i get the same thing.
i started with 3rd person for mine, modified it for first / top down
huh
seems to be something with how the structure works for the fps character
does that give you any ideas?
Hi - trying to attach a pawn actor to another static mesh actor BP so when the parent actor moves (using set location) the pawn moves with it until it is detached again. Can't seem to get it to work. I can attach a static mesh BP and it works fine but when I try the same with a pawn class BP it does not move with the parent BP at all even though it is attached?
Everything is set to moveable in the Pawn BP
using mesh2p i was able to align it properly so the 'Mesh(inherited)' in the template can't be used for the character model, you'd have to use a different static mesh component for the character.
seems like it technically worked, but now the skeletal model (now Mesh2P) is just moving around with the camera
my order and children must be wrong, though
the order you can see in my image is the default for the 1st person character
it seems like your trying to make a third person character in a first person blueprint?
nope, i just want a first-person character with a body model
what's the easiest suggestion? should i reset the player character and transfer my blueprint work?
this is for a game jam, so i'd rather avoid spending too much time
your wanting the character to show for you, or for other players?
for you
this is single-player
look down and see your body, do actions with your body showing, etc
thats why i started with a third person game, was simple for me to do
this is how the camera is set on my character, you'll have to adjust the position of the camera abit so that your not looking through the face itself
okay, sounds easy
you end up with something like this if you look strait down:
my characters animation turns her slightly to the right, and is why its angled.
im not doing the game jam, im just building to see if i can make a game lol. a challenge for myself.
and if your having mulitple cameras, don't forget to setup a way for them to switch between them and set the active camera when they do:
this is my full camera toggle routine sense i have 3 different cameras that can be switched between:
first person, third person and top down camera views
here's my zoom in / out that allows the player to zoom between third and first as well:
hope it helps you 🙂
hey, sorry to bother you, heres a lil update on my situation
Hola hermanos saludos a todos es un placer , alguien puede ayudarme por favor con una funcion en unreal engine?
les explico un poco e creado una funcion de cambiar camaras y funciona si preciono una tecla , pero la idea es hacerlo para android y hice un boton widget con un on pressed pero no me funciona si preciono la tecla c si pero si preciono el boton no funciona
Hey guys, got a small question, I have a material with a scalar parameter. When the parameter reaches 0, the material is fully visible, when the parameter is 1 the material is invisible. What would the best way to manipulate this scalar parameter in order to "spawn" a mesh? I currently use a timeline with a finterp and set scalar material param but it feels really dirty and bad, is there a more cleaner way to manipulate material parameters in such a way?
you mean fade it into view?
@slender idol Not really. You can choose to do it in the material as well if you like by using Time and a clamp and some math to choose the materialization time. But if you want it controlled from code, you have to continually update the parameter someplace like a timeline/tick.
@maiden wadi Is there a way to keep the interpolation in the material itself and only trigger the transition from 1 to 0 or vice versa via code?
Meaning no timelines or set material params via code
@vivid aurora your weapon needs to inherit from Actor
Like when you create the blueprint, it click Actor.
@slender idol You could just input a 1 or -1 once, and set it up so that it starts at 0.0. Input the scalarparam as 1 and use that to multiply your parameters for 'spawning it in'.
Yo, having some issues, trying to find out how to possess a Camera Component.
The said camera is a child of an Actor, I want my Default Pawn Class to get that actor and grab it's camera (done) then activate/possess it.
@wind void reckon there's a player controlelr function called setView something
you don't possess it as you would a pawn
@odd ember to make it a bit more clearer, its about a disintegration effect, the actor spawns in and I'm looking to manipulate the scalar parameter to create the effect and I don't want to use timelines or ticks, just a simple call for the effect to play.
@slender idol I mean you could apply a new material for when it happens
but you cannot actually "call a function" on a material the way you would on an actor for instance
shader code runs constantly
Wouldn't that mess up the underlying texture?
I understand you can't "possess" it, but I cannot think of a better word, maybe activate?
Also I can't find any function/ability to change view.
you can have more than one material slot on a mesh
ooh
that could work, thank you for the suggestion !
figured I might get a better answer here since Im not talking about the effect itself
@wind void I think it's called SetViewTargetWithBlend
but that essentially is a shorthand way of moving to another camera
and "possessing" it, as you would have
ty, that worked 😄 I coulda sworn I tried that, but 🤦
Tysm!
over time my character slows down to barely moving using this.
yeah ik but theres no reason my character should be slowing down?
without knowing anything
probably because of your setup
draw some debug of the direction your control's forward vector is pointing
it could be you're walking in a direction that's not towards the forward vector
best guess
especially if it's third person
Hello brothers, greetings to all, it is a pleasure, can someone please help me with a function in unreal engine?
I explain a bit and created a function to change cameras and it works if I press a key, but the idea is to do it for android and I made a widget button with a press but it does not work for me if I press the c key yes but if I press the button it does not work
@vivid aurora Actors are stuff that are physically present in the game. Like a character, or a weapon, or a coin, or whatever. If you're making something that can be spawned in the game, it needs to inherit from actor. Classes all have a "Parent" class, that defines all the stuff it can do. So if you want to spawn something in the game, it has to inherit from actor (aka have Actor as its parent).
A hypothetical chain might look like Actor > Pickup > Weapon > AK-47.
In this case, your AK-47 is a weapon, a pickup, and an actor. It can use any of the functions available to those types, and the game can treat it like any of those types.
In your case, just Actor > Weapon is fine for now.
You can either make a new bp for weapon, that correctly inherits from Actor, or you can change the parent in the bp for what you have already.
Lastly, get rid of that "Construct" node you have. That's not helpful. Just spawn actor is fine.
So UE has a class called DamageType which I guess determines the type of damage like Melee, Magic, Ranged, Healing, etc
But the damage types can also be represented as GameplayTags. Like Damage.Melee, Damage.Magic, Damage.Ranged, Damage.Healing, etc.
This article gives detail explanation of using GameplayTags for damage types:
https://www.unrealengine.com/en-US/tech-blog/using-gameplay-tags-to-label-and-organize-your-content-in-ue4
But I see UE's Apply Damage using Damage Type Class, so shouldn't it be preferable to use what's already built-in?
Which is preferable?
Do you have a reason for doing it this way? Because if you don't, you shouldn't do it this way.
Go to Project Settings. Go to Input. Make an Input Axis, bind it to W for up and D for down and call it MoveForward. In your eventgraph, use the event InputAxisMoveForward, and just pipe the scale value into the add movement input node.
I think you might need to break the control rotation and get just the yaw value unless you want to be moving up and down through space instead of along the ground.
Like this for that last bit
im just trying to learn more abt locations n rotations so what better way then to attempt to make ur own without inputs but failed
the scary part is how you're handling inputs actually, haha.
The rotations bit is a fairly easy mistake to make.
like idk how to move an object according to my forward vector
Forward vector of the control rotation is the direction you're looking. So if you look at the sky above you, the forward vector is straight up.
is it possible to make movement just on world locations?
like instead of addmovement input use set world location
It's possible but you probably don't want that. Add movement is a good idea.
Use the snippet I showed you. This takes only the Yaw rotation of the player rotation. Like you're looking up at the sky and to the right, it only takes the bit about you looking to the right. So the forward vector you get is something is parallel to the ground.
my guy just keeps going up and down noclipping into ground
im just gonna use input keys ig
show me your bp with the input axis
I've found the solution, posted it in #umg. Could be helpful for other people working with TileView and ListView
The Damage Stuff and the DamageType class exists for quite some time. Pretty sure GameplayTags are newer.
They are also more used with the #gameplay-ability-system, where you deal damage via GameplayEffects and what not.
If you just want to stay with the basic damage system, use the Type classes.
You can still use tags if they make sense in other situations of course.
I see. Then in the case of ApplyDamage, the DamageType input parameter will be empty if you plan to use GamePlayTags?
Well gameplay tags are just an identifier
They don't replace DamageTypes
DamageType is a full class you can create that can get your damage values and modify them
You'd create your own child class of it, and give it some function, like "ModifyDamage"
Where you pass in the damage and all other things yo uneed
@surreal peak how much do you like to trust the built in damage system, just out of interest?
I ask because I've made my own
You could pass in the GameplayTags too, but i don't see the reason
Eh, it's okayish if you want to do something simple
Hmm.. I just use DamageType as an enum
Well DamageType is a class
Not an enum or tag :P
You can make one single child of it
And pass in your enum
Or gameplaytag
or whatever
To then modify the damage and target inside of it
You get the spawned version of that class on the other end
I see, I'll have to look into in more detail
But basically if you use GameplayTags, you're going to use both GameplayTags and DamageType class?
So in the Actor that you damage
You have the OnDamage or so function
That has the object of that class
So you can then call your function
Idk, GameplayTags are just a way to tag stuff
There is no "you are going to use this or that."
You use what makes sense for your system
We use GameplayTags to identify all sorts of things in our project, but without using GAS at all.
Cause these tags are handy
You don't have to use them though
I was planning to use them to save narrative game states
probably combined with some JSON
what’s the canonical way to do a dynamic crosshair? one thing I ran across suggested using a widget, but I vaguely remember there being a more direct way to just draw stuff to the viewport
Crosshairs are UI
UI in UE4, by now, is UMG
You can use the old HUD class if you want, but it makes very little sense
Put an image into your widget and either use animations or a materials and modify the mat based on values from your weapon
got it, thanks!
Hello! How to get this marked point? I have a known A point's coords and B point's coords
but I dont want to reach location B, only for example 100.f floats in front of B's point
Hello guys, I am spawning Actor with custom blueprint class but spawned actors not running EventTick.
https://gyazo.com/8efadafa2f2e2ef2046da861a9e64eed
Any ideas?
Just pin it into Event Tick function if you would like to spawn it every single frame
Nah, it's spawning fine but when Actor Class is spawned then it's EventTick not running.
The one which is spawned.
Look at the spawn class properties
On the top one you have a class settings
Do you have checkbox marked for tick?
I do not see it. When I drag this Actor to the scene without spawner class, it's working fine.
Can't see tick checkbox in class settings
I forgot this section name
But around to Ai controller neighborhood
You should have a placement options
Show me your top options
Class Defaults?
Or whole screen (this one should be better)
Yea
This one
Change placed to spawned
Do you see this option?
Inside the class defaults menu
Great
I wouldn't find it in ages
Yeah it works fine, thanks @stable fjord
is there like a do nothing node? I have a parent class that throws granades but I dont want child to not throw granades but if I leave it like this on the child it still throws granades
how can I get the granade not to throw
maybe put your grenade throw code into a discrete function/event (in the parent class)
and in the child class, override the function
(go to My Blueprint tab in the child class, mouse-over "Function" label, and click Override)
@pine trellis
That's the path of least resistance anyway. You could also do it in reverse -- have input events call an empty function on the parent
and override it on the child class, putting in the grenade throw stuff
It depends how you want the hierarchy to flow
but either way would accomplish the same thing
@tight schooner thanks the blank function did it!
gonna have to ask again, anyone ever had trouble using enums in structs and saving them with an save game object?
or with maps and struct as key
question, whenever i delete something ue4 crashes, anyone know why
can someone please clarify how to do that answer on this forum thread im having a problem rn : https://answers.unrealengine.com/questions/929534/view.html
Hey all, been spending a lot of time on a dash mechanic (for FPS) recently and was wondering how others have handled this situation.
I am creating a vector and then lerping the actor's movement to that location. No issues there. The complications are coming from handling slopes, specifically UP slopes. How have others done this? Can't find anything elegant that gets the job done.
I'm using Break FindFloorResult + Break Hit Result to get the angle of the ground and am rotating my vector around my character's right vector to get the uphill "dash destination point" but the results are really inconsistent.
Also wondering what other issues I will run into with uneven terrain, and started to wonder if my whole approach was sort of flawed from the ground up.
Hence me wondering what others are doing 🙂
I would try applying an impulse into the dash direction
so apparently i can't use pure object references in data tables, while i can use them in structs?!
a data table is an asset which contains some data, having object references makes no sense
object references are references to things that are spawned into the world at least if it's actors or such
if you want to refer to a blueprint class or something, use class reference instead
no, i mean datatype object, which can reference any asset
Ah, in that case not sure. I'd imagine it's probably related to the objects requiring actual instances to exist even if it's an asset instance like a texture or something
I'm not quite sure why you would need a data table that can have a reference to literally anything
ok, object soft reference seems to work, wonder how save it is to use for my usecase
because the datatype is for some reason not exposed to be used
Material Layer Blend Instanced while Material Layer Blend is exposed -.-
Odd
indeed, maybe they just missed it, i should probably bug them about it 😄
Figured it out a little bit. Will remove my previous statement.
when using the FunctionalTest BP, and running the tests, it seems like any error (even if it's unrelated to what we are asserting in the test like just an error log I wrote and printed myself) will cause the test to finish with a status of failed.
Is there a way to prevent this? to make functional test BP only care if the assertion fails but ignore other console errors?
ok i've been busting my head over this and looking for tutorials for a whole day to no avail- How would i make a system to a physics-walker object didn't fall over?
I have a physics-based walkers with an animation that makes it walk forward but of course as with all non-complex robots that walk it just topples over since its not designed in a way that it would physically walk, how could i make a blueprint that i could toggle on with a hotkey so a vehicle like that would walk without falling over?
i can't edit the walker itself (modding limitations) it has to be a blueprint that affects it by getting the player controller and then the controlled pawn- which works for similar things so that's not a worry, i just need to know what the actual code to make it not flip over would be
Hey all, quick question. When my first person character walks off of a ledge, they get a sort of boost/jump that propels them off, ignoring what the normal trajectory of the character would be normally. I have been looking for days and I can't find out where this action is coming from and I really REALLY want to turn it off. Can anyone tell me what is causing this and how to disable it?
The image shows that when I go off the ledge (the red path is where i moved), the trajectory of my character changes because of this mysterious 'jump'.
Here is a short video of someone else showing off the same issue in their own project: https://www.youtube.com/watch?v=q6_dCmNWDms&feature=youtu.be
Is voxel plugin pro worth it for making hugley procedural games?
Hi all, does anyone know if there's a node in the BP system that when exposed in the instance of the BP would display as a button and allow me to refresh a stream seed?
maybe it's #umg question?
is the image png ? i mean is it transparent outside of unreal ?
@turbid pecan make an editor callable function?
can someone explain to me where the default movement comes from when I dont have a player start in my scene? Now when I click play I get this floating camera with WASD / Mouse controls but I would like to use this camera + controls to modify the position/focus of the camera(edited)
but What should I call for
I already have a custom gamemode and Player controller but I dont seem to get anything useful out of those that changes it
Hello. I have a widget that is constructed one time, but the construct-script is running, twice. Is there some kind of cache I'm missing?
constructor script whenever widget is added to viewport/parent
yep, added once.
use OnInitialize if you want a one time thing
if you hide it and show it again, it will run twice as well
I want it to run on construct, just not twice every time.
make sure its the same instance of the widget, its very easy to make that mistake
put 2 identical widgets ontop of one another
Easy test to make sure you're not actually spawning two, is to just put a print on the OnInitialized Zlo mentioned. If it prints more than you ever intended to create the widget, you likely have more than you intended to create, because that functions should only run once in a Widget's lifetime.
oh, thanks. Let me just reboot the ol' pc and I'll test that one out.
Sorry what’s UMG?
I assume there are docs for this I can look up?
@maiden wadi
construct
init
construct
That's what I'm getting when running the game.
UMG is UE4 system for widgets
in my previous message I gave you a link to it's chat on this server
Ah right. But I am not making any UI widgets. I just wanted to expose a button in the actual Unreal editor as happens when you expose a variable and it appears in the instance parameters for a blueprint.
buttons are widgets too
@turbid pecan
Make a custom event. Check the Call in Editor checkbox.
Shows up in editor properties window:
Ah that’s what I’m looking for!
Thanks everyone.
So events can be just exposed as and when..
Yep..... There is another level of customization using EditorUtilityWidgets that uses UMG, but you dont need it for simple stuff https://docs.unrealengine.com/en-US/InteractiveExperiences/UMG/UserGuide/EditorUtilityWidgets/index.html
Describes Editor Utility Widgets, and how to create them.
(and then there is Slate in C++ if you wanna go even deeper)
is there a way to check line of sight other than lineOfSightTo?
I don't have the controller of the actor at that moment
@olive sedge lineOfSightTo is just a wrapper for a visibility LineTrace
is there a way to duplicate an static mesh inside a blueprint, place it with an offset and change its appearance ( like if its an instance)
Yes, create a new mesh var and set it to be the same as parent.. I think. Ive done it before.
yep
You'll want to call AddStaticMeshComponent Get the first staticmesh's StaticMesh value, set the newly created Mesh's StaticMesh Value to the old one's. Then you'll have two static mesh components with the same mesh. Then you can do what you like with the second one to offset it or change it.
works perfectly 🙂
So.. General question: I want to make a zone that my actors can interact with. It should be a circle on the ground and change color depending on who is inside the circle. I also need to trigger when someone enters the circle
How would I do that? add a sphere actor and scale it down?
add a cylinder and scale it down?
alternatively: I could define zones inside the map which when entered make the ground glow
Like RTS control zones?
not sure but probably yes
@maiden wadi don't know if you play battlefield but imagine a capture zone like that
and then make the ground glow a certain color
You can make it event driven if you want, but if you have a dozen or less on the map, I'd probably either make a timer or make an actor with a lower tick rate, and just check what's in the circle on tick and do logic that way. Check it like five to twenty times a second. If you're doing multiplayer, only do this on server and replicate the state of what team is capping, and maybe a percent for total cap time if the player needs that for their UI or local version.
ok, sounds sensible
and for the actual glowing area, how would I do that? I don't have the faintest idea how that works
That'd just be either a particle or material that's set on client based on what you've replicated for who's capping or how much. I'd assume.
particle, hm
haven't worked with particles yet. I thought those are only flame sparks and such
I guess I could emit particles around the zone?
that would actually look pretty cool I think
@olive sedge A lot of games like that rely on material shaders, but just do what you think is badass. You don't have a department of critics breathing down your neck to tell you otherwise. On that note though, make sure to learn Niagara over Cascade. Cascade is getting ditched possibly sometime in the next year.
yes, fortunately 😄
I'm still not sure how I would define these zones though
would be best from a level creation standpoint if I could just have some kind of poligon that I could drag to the size I need it or something like that
just define the edges of the zone
ok, I guess a volume would be best
@olive sedge There's a few ways you could do it. Are they square, Circular, etc?
any shape around an objective I think
could be a gas station, small village, wooded area
preferrably I would be able to set the boundaries in any shape but I think circular would work best for starters
Circular can be done with a single input. Just needs a float for range. Then you could set your system up to turn that into a circle. Box needs at least a single vector for box extents, maybe two vectors if you want a rectangle instead of a cube. Alternatively, you 'could' make any shape you wanted in theory since Niagara also allows sampling of meshes for locations. I believe either vertex or triangle center data is used, so you'd need some form of subdivided mesh for best look.
hm
I think I'll start with a circle
can always scale that up to something more elaborate
Hello smart folks, another BP query i'm stumped on.
Currently I have an enum that calls upon:
- no fixings.
- 1 fixing.
They work nicely, the issue occurs when I try to implement two. I obviously want to reference the '1 fixing' and mirror its location but I have no idea how to achieve it.
This would be 1 fixing
@maiden wadi just so I understand you right: I would create some kind of particle system with Niagara and then I could also use that for my game logic? (if inside perimeter of niagara actor or something?)
that would be 2
@trim matrix FYI there is no mesh hooled up to second node
He's asking how best to go about it with different transforms.
@trim matrix Hook up the same execution line, and for the Transform, just Select off of the same Enum with different math.
@olive sedge Well, if you want a circle, that one's easy for both. Put the Niagara emitter, and the checking vector at the same spot. If Unit Distance to point is less than the distance you also put into the emitter, this unit is in range to cap.
It should pretty much line up your visuals to your game logic that way.
You can even make that instanced editable if you're creating maps, to see it in action from the construction script.
i found this Macro in a old redit post, and it seems to work for both mouse and keyboard to detect if a does a single / double tap of a key/mouse button, is this a good way to go about it or is there something else I should look at:
ok
Apologies @maiden wadi I'm a bit dense. how would you suggest doing that?
I have a physics question too, I've set a static mesh model with these settings but when i bump it its like im kicking a football across field, the thing fly's away with just a little bump, how can i get more realistic movement from the static mesh vs. its weight? Scene has default gravity settings
@orchid garden I prefer this style as opposed to delays, personally.
thanks i'll give that a go 🙂
time difference is that fed by world delta seconds?
@trim matrix You want to actually create two of the same thing that the one is doing, right?
@orchid garden Nah. You use it like this. It'd be the time allowed between button presses for it to count as a double tap.
ah okay got ya 🙂
Actually, thank you for that. You just gave me an idea for my GameJam project. 😮
@maiden wadi that is correct, pal.
@maiden wadi , might you know the answer to my physics question?
My attempts seem to remove one with the other🤦♂️
@maiden wadi couldn't find the set float function, but assign worked in the macro 🙂 working like a charm:
@trim matrix Hmm. Fair, for that you'd probably just want two different execution lines. Probably just loop and make a simple select to set your object's local location based on the loop iterator.
@orchid garden Not sure on the physics thing. I haven't messed with physics much. I'd either find a way to up the mass to different values, or find a way to dampen how you're colliding with them.
And the SetByRef you can get from dragging off of the float, it's the same thing though.
i'll fiddle with it more, its for droppable/placable objects that can be effected by world actors
Yeah, unfortunately from what little I know, making kinematic things like characters work alongside the Physics stuff can be tricky at times.
ty much @maiden wadi , yeah physics have drove me nuts several times lol, best of luck with your issue @trim matrix
thanks @orchid garden - such a novice when it comes to BP, its frustrating because I know the logic just difficult to find the bit to make it works
Appreciate all of @maiden wadi 's help and advice
Whew. Five days and two hours to go.
that all thats left for the game jam?
@trim matrix im a novice too but its been a fun learning experience even with the hair pulling / beating head on keyboard moments lol 😉
ahaha too true
My blueprints look psychotic right now. I haven't even touched C++ in this project yet in favor of keeping speed and simplicity.
it's an ads system
but idk how to put the camera back at it's starting posititon
anybody could help me out?
pls ping
@pine pivot You just have to do your logic backwards. On a side note, I don't know how different it looks, but I know some people achieve ADS by placing a camera on the weapon and calling SetViewTargetWithBlend on the weapon on button down, then again on their pawn with button up.
@maiden wadi i did it with only a camera
i would make it like that i get the basic location of the camera
and then make the camera go back
would you know how that goes?
do you have a basic example that enables that loop to work?
Even some docs I could read into
@trim matrix Is this in the construction script?
What is FloorFixingDummyA, where is that being created?
better description
that is just a null which I can then choose to replace via the static mesh
null/dummy/empty static mesh
So it's added in the components list?
@trim matrix You could spawn it from the construction script instead depending on whether you need it. I don't have your Enum so I'm using a different one. Messy example, but sort of like this.
In your loop you could even simplify setting your location like this.
I have a project with a plugin installed on 4.25 and I want to open that project in 4.26, but I can't because that plugin is not on 4.26 yet
what do i do?
contacthe person who made the plugin
I've been trying to use the UI progress bar widget for enemy health, but it looks like I need to bind a widget to a specific actor. Is this the only way? I'll basically need to make a new health bar widget for each enemy bp?
@maiden wadi circle 😄
how do I make an enemy ragdoll after it dies?
@rugged walrus enable physics
what node exactly?
@rugged walrus I'm pretty new myself but I would try to enable physics for the skeletal mesh
or the character
Hey guys, in today's video I'm going to be showing you how to create a unique and adaptable ragdoll so that you can trigger it manually, when you overlap something, or when you die.
Unreal Engine 4 Tutorials Playlist: https://www.youtube.com/playlist?list=PLQN3U_-lMANOnnjfvEEVeAPE8mfrGr_VH
Blender Tutorials Playlist: https://www.youtube.com/pl...
here
@pulsar basalt Ideally all of your enemies inherit from a class called Enemy, and you call the implementation of getting health from that, rather than reimplementing the same thing for every type of enemy
Can someone help me? I'm trying to make a sphere disappear and then spawn an explosion effect. I'm new as this is my first day. Any help would be appreciated.
Heres my current code
@maiden wadi thanks for your help, it works!
well, it wasn't but when I connected the completed in the for loop to the first pass, it then worked. Was that an omission or have I made a happy accident?
I was looping twice in mine. Index 0 and 1. You could do the same thing by replacing that Loop with a Sequence too with the way you're doing it.
So I made a pawn that is supposed to be able to fly around a building zone to create a vehicle. It works but the problem I am encountering is once I release the buttons for movement the pawn continues to have momentum in the direction of travel. How would I counteract that in my bp so that the pawn only moves when I press my movement keys? Hopefully this picture is more readable
@exotic cradle Sounds like more of a settings issue. This is a Pawn using FloatingPawnMovement Component?
It is not. I wasnt sure how to add that already with a charactermovement component in place
In short, you wouldn't. You'd create a pawn from the Pawn class instead of character. Though I'm sure there's a way to make the character class use antigravity movement. Haven't messed with that much.
Yeah I went and used the "Default Pawn" instead of "Pawn" when creating a new BP and it works like a charm now. Just have to go rereference some things in my HUD BPs now
Ahh now that I used that my BPs always fail to Cast to "EditorCharacter_New" due to not inheriting from "Character"
Dang. Ig Ima have to redo this entire HUD from scratch to get this to work but atleast the pawn moves like it needs to now
i want my character to be able to spawn multiple particles attached to him but i dont want to have multiple niagara components, how would you guys solve this?
Ah do I need to change the gamemode to be able to even use the pawn like I would like?
I'm very new, how would I edit the acceleration, air speed, etc. of my first person character? I'm using the default fps thing and I'd like to make a platformer, but i'm dissatisfied with Unreal's default movement.
character movement component
Click on character movement component and in the details panel it gives you all of the values for movement.
oh wow thanks. That's perfect
I have a particle system in my level and I'm trying to set the color of the particles via blueprint in the level
it's not doing anything though, what am I doing wrong?
So now I get this when exiting the editor but have no compiling errors.
Where the error message points after closing the game in the editor. I feel like it might have something to do with the 'Get Pawn Owner" component but am not 100% sure.
Ig I dont understand how a pawn works lol
what is it about pawns you don't understand?
Im trying to cast to a pawn since that is what I am using for my vehicle editor in order to fly around.
well, that is much later. Your call to GetPlayerCharacter seems to return none
I have the third person template as my default level. When the player interacts with a design bench. The third person template level is closed and a new level is opened called "Vehicle Editor". Now within the vehicle editor level I am using a "Default Pawn" bp so that I can fly around the editing space to create the vehicle. Originally before using "default pawn" I was using the "Pawn" when you create a new BP which didnt give me the proper movement I was looking for in my editor as the character wouldnt slow down once the buttons were released but due to how I made this HUD for the Editor Level I used "Pawn" which inherits from character while "Default Pawn" does not.
ok, I see
so then there is no player character
default pawn probably doesn't inherit from character
No it doesnt.
try GetPlayerPawn
Wow it was that simple lmao. Thank you I now have no errors xD
no errors is good but does it work?
Yes. I am able to move exactly how I need my pawn to and my HUD shows up on screen
👍
Thanks again
sure
Branch always selecting false path
I want to go different paths while pressing and releasing button
Any help?
just use the pressed and released pins?
How?
Is there a Blueprint mechanism to start an interpolation that occurs every frame for some amount of time? Or is Event Tick the only option?
Kind-of like the Delay node.
Can anyone recommend a tutorial to get proper turning animations using blend spaces. I have blend space that has all the necessary animations. I have the walking running transitions working well but the turning animations don't work. My AI just spins in place then continues the walking animation when on a straight trajectory
Btw: Simple little Blueprint Macro Library (derived from Object) that does an action only when a boolean is false, and sets it to true as it executes. I use it like a DoOnce but where multiple things need to be locked if any one of them does their thing.
Usage (as Do Once by Lock):
Use as you wish, but no warranty.
is there any alternative to maps? somehow unreal screws them up when saving them with save game object
Is it just me, or is camera shake broken in 4.26? All of the settings are gone except for "single instance"!
i have an issue with a line trace
I'm doing a line trace from an object to the ground
if it is touching the ground, there is no hit result from line trace
basically, its a spring force for an object to the ground, and i want to keep the object above the ground
although it can press up against the ground if i hit it hard enough, and in that case I have no line trace to increase force
nvm solved
does someone know how to store a reference to a texture as string, and how to load it at runtime (has to work in standalone, too)!?
actually there's get Path Name which gives me the location of the texture, but i have no idea how to get an object from that
this works in editor, will it work in standalone, too?
Hey, I'm working on a slide mechanic similar to Apex Legends. Everything is working but I want to control how much velocity is gained and lost when going down or up hill. Is there a simple way of finding out the angle of the surface you're on?
finally my data is saved correct -.- stupid shitty unreal save game object -.-
had to make my own implementation because its to stupid to handle structs as map key correct
@frigid ether There are quite a few different implementations for something like that. The Simplest is just tracing down to the ground and using the hit normal. You can turn the normal into a velocity in quite a few different ways. Alternatively you can also do multiple traces to get a better normal, use sweeps, etc.
OK... don't laugh, I'm a total noob. I'm trying to make a bool trigger the rotation logic if true. Clearly I'm failing, can someone suggest how to trigger that set behaviour or use another type of conditional for this?
The beginning of the branch needs to be connected
i would also look at that warning cause its telling you something important like, this wont work
It works if i ignore the first three nodes on the bottom
But i have to use 60 as a get or hardcode it into the multi node
The warning is basically - without plugging the exec noodle of "SET" it wont budge
whats the problem with using it as a get, isnt it something you set as a default anyway
It's a conditional option I want in the BP, but I want it exposed as a bool and not an int
So if someone was to toggle it they don't have to know that 60 or 0 are the only possible correct inputs
sounds like select is more what ur looking for if you're hardcoding 0 or 60 anyway
and who is the toggle for? people that use your blueprint?
Yeah and me when i forget what was the magic number
question, does anyone else have a problem with the "Show Material Section" node? it doesn't seem to work, neither for me and a friend of mine.
yeah so select 0 or 60 depending on condition, right?
indeed
use select instead of branch then
and remove your set default stuff
this could also be solved with a comment header saying 0 or 60 is a magic number lol
since its something for your own sake
Can you tell I'm a bit bullheaded? hehe
👍
ive asked this before but had no response so thought i would ask again is there anyone who knows how to make twitchworks blueprint work please ive tried everything but not getting any where
Hey everyone! I'm constructing an object for a ListView from class, and no matter what I do, I'm not able to set a variable inside the constructed object. I tried both an ExposeOnSpawn method and manually setting the variable from the outputed object reference, but no matter what I do the variable default remains.
Here's how I'm constructing my object and setting the variable. I've tested the ForEach class output with a Print and it works as expected. Am I missing something obvious about how to set variables on constructed objects?
Hey does anyone use one blueprint for multiple ai in one Area ,Change Mesh,Stats etc.
i use one blueprint for multiple ai in one area they have their seperate stats
Ok thanks for Answering , just a quick tip for me how you controll the Skeletal mesh Change via Variable or Overlap event to get the right one to change , any link or any Tutorial out there would be very nice ,thanks
so if something happens you want to change the skeletal mesh of that one ai? for it wont interrupt the others
Wanted to avoid using tick
@woven saddle You could try storing it whenever the character safely lands somewhere instead.
@woven saddle If he's falling in a void, he won't be touching the ground, so it won't register a new "safe" position.
Ok many thanks for your Advice, good to heard it does work ,your question was the answer , wish u many Succes for your Game Soopnano
Does anyone know why the bones on the left and right side of the ThirdPerson Sekelton are inverted?
Maybe ask it on the Animation Channel ,too
There is an animation channel?
If you mean where it is , on the left side you have many tabs choose Animation and doubble klick on it
@wooden rapids oh wow, somehow I collapsed Content creation, where animation is 😉
Is it possible to automatically inject "tick" into a macro or function?
I'm thinking along the lines of "being able to do something similar to what Delay does".
oh sorry this can help you is just for a Macro , inside a Function is no way to implement it .https://www.youtube.com/watch?v=NTvxvc1zO8Q
#ue4 #beginner #blueprint #delay #macro
Work around for getting a delay node into an Object-Based macro that can be called from any blueprint! Great way to extend the functionality of the default macro library.
Ah?
am i over complicating this?
Sound in is a enum of a 'action list', it then grabs the item row from the data table (item details) breaks the returned row so that it can get the struct of possible sounds, then selects the sound its supose to play, checks to see if the sound is valid then plays it at the player location:
its the only way i could find to select a item from a struct based on a enum
@north herald the outer needs to be list as well
I need help with heightfield painter
before I click play button there is a texture
but after i hit play it's gone. I followed this tur https://docs.unrealengine.com/en-US/RenderingAndGraphics/RenderTargets/BlueprintRenderTargets/HowTo/HeightFieldPainter/index.html
How-To use Blueprints and Render Targets to create realtime Height Filed Painter.
Hello Guys and Gals still kind of new to ue4 so please excuse myt dumb questions.
I'm wondering if anyone knows how to make it so that a point lights attenuation radius does not pass through a wall?
@fleet estuary I would ask #graphics on that one
Unless you're talking about adjusting the radius dynamically or something
Well, either way I'd ask #graphics
oh okay lol thank you
Hello! I'm a newbie and don't really understand the blueprint system yet. I'm trying to implement a teleport system when clicking on the widget button, I could not find any similar information on my question. Can anyone help with this issue? Thanks in advance
Hello, I'm new to widget blueprints. I was looking at another persons assets but I can't see nearly any of the elements. Is there a setting I'm missing?
can some1 help me as to what i'm doing wrong. im making a ParentDoorBP to open a bunch of doors the same way: \
different doors will call different sounds:
im not sure how to set the sound variable to play properly cause i still don't hear it
tried it both on construction script and event begin play -> parent
i am not setting it in the parent so that I could hopefully set it in child
nvm i used Set in parent, and Child, when i was supposed to get Get in the parent
@jaunty acorn the sound should just be a variable. No need to touch the construction script.
i structured my class hierarchy like this (top to down):
Pawn
GameObject
BuildingMaster - UnitMaster
I need movement for the units, which is in Character class. But to parent my units to character, the entire hierarchy needs to get parented to Character, and I don't want my buildings or other GameObjects to be characters.
How can I approach this?
(really don't want to create a custom movement component for UnitMaster)
but I would like to keep GameObject as the parent of both units and buildings because that's where I build the shared functionality
Make a custom component for your shared functionality.
Or use an interface.