#blueprint
402296 messages · Page 620 of 403
Or your GameInstance because you can just Get Game Instance 🙂
Or put in GameMode, GameState, GameInstance, PlayerController, PlayerState, etc.
HUD even
i think i will do good old game mode, game instance saved for saving stuff
get game mode
UMG based, you can use HUD as a middleman
You will need to set the right collision channel for the ghosts
You may even need to make one where they ignore each other's channel
@tired cypress well i did that for the capsule collision on all of them, and are set to object type "enemy" and "ignore enemy", but they bump into each other. If i set the object type enemy and ignore enemy to static mesh and mesh(inherited) its same issue
So you made a custom collision channel called Enemy?
Since default response is Block, you will need to set the Collision to Custom and then be sure that Enemy is ignored. I would do this for the capsule and the mesh
mesh (inherited) or static mesh?
All the above
@proud hull welp, beyond my wildest expectations, I might have nailed it on the first shot:
Seems I can now select the "downloaded" datatable with a widget combo box np
but still testing. I would be floored if it doesn't break somewhere in my testing
Kinda depends what you want to do. With a character BP you can choose if you want the CapsuleComponent to be your source for collision checks, or if you want one of the meshes to be your source
how do you do that if you dont mind me asking?
guys.. I just casted to level bp from umg. 🙂
thanks!
Did it quite differently but yeah, there is Level event possibility if you right click on it and then just delegate the wanted thing there and cast or get actors from umg 🙂
Does anyone know how to handle flying enemy pathfinding over pits using a navmesh? For example I have a flying enemy that I want to be able to fly over a pit to take the shortest route (I'm using EQS to determine its target/path), but I just can't seem to wrap my head around how they would not follow the ground and just fly over any gaps in the landscape
I also have regular enemies that walk on land so they would have to go around the pit
I would just set both the capsule and the mesh to your Custom collision object type
If you have other meshes...just set them all the same
That SHOULD work
yup it worked i will mess around with it thanks!
Awesome! It's looking great
Hey does anyone know if there is a way to call a parent's parent event?
can you replace a timeline with set timer by event
they're twodifferent things, though what's commonis they have a timing mechanism. Can probably solve a lot of things with either, but there's usually a more appropriate one. Timelines are better for when you need to do something at each tick throughout the timeline based on a value that is set throughout the timeline. Timer by Event is better if you only need the event to happen every X seconds with no value being set by the timeline
what abt lerping in speed can set timer do that
im just lerping actor 1 to actor 2
ok i got it to work just lower the time to make it slower
So the issue is that I have a blueprint "Collectable_Object" and I have a "Laptop" which i want to be a child of "Collectable_Object" but I also have a "Terminal" and I want the laptop to inherit events from both the Collectable and the Terminal, so I made the terminal a child of the Collectable and made the laptop a child of the Terminal, but i need to call an event in Collectable which i overrode in Terminal. In short I'm confused 😦
why not just make a different event in Collectable instead of overwriting it?
that way from Laptop you can call your event from the Collectable_Object class, and then that new event from Terminal
Dude dude du dude you are a genius, i've been on this for 30min. I'm using a marketplace template so I never even considered touching the Collectable but you are absolutely right it's working now thank you so much!!
Anyone know how I can get my pawn to change when I overlap a trigger box?
thats what I have but its not working of course, I know I need something in the target pin but idk
how should I get it? Im pretty new at this so sorry if its a dumb question lol
I am using the starter stuff so Im guessing I have that stuff needed just need to get these nodes set up right
Get Player Controller
okay got it
where should I connect it up to?
Oh I got it (sort of like still super broken) working, when I overlap it my controls now move the other pawn but sadly the camera doesnt move over to that one so idk what that is about
thats what I have so far (Solved)
If I assign the same AIController to two actors is it still a single instance?
Sorry, two characters I mean.
To be more clear... I have setup an AI Controller. I'm not using behavior trees. Instead, I'm just doing simple behavior in the controller. I have character wonder code in there. It works perfectly for a single character, but when I spawn in more than one, they appear to be sharing the location vector I use for a wander target. The vector is a variable in the AIController, so it looks like the controller is a single instance and not one instance per character.
I'd think itd multiple instances (dont think a single controller could possess two pawns) but they share the value if the variable is the same in both controllers (default values). Having the value in the actual pawn instead could be beneficial, and just exposing it there
Then the controller would just get pawn and cast to that specific blueprint, accessing its variables.
Variables then probably being instance editable ane adjusted to your needs :)
Is there a way to make a destructible mesh from a static mesh in-game? I want to use something like a freeze attack and move it around with a grabber
my gui isn't opening for some reason. I have tried everything but it never goes onto the viewport, here is the code
and the gui is some text and 2 progress bars
The problem is almost definitely your level open node. The level is the context within which everything happens in unreal. You can’t open the widget, while opening a new level and expect it to still be there
Try it without the level open node
that fixed it
but how can I make this work then
because I need it to open this level somehow
The code to open the widget needs to occur sometime after the level has loaded. The level itself could load up that widget. For a more sophisticated approach, you could save the widget on the game instance to be triggered by the loading level
Try to understand that Whatever object this code on is is getting destroyed because the level is changing
Level widget is not a good place to create widgets. You should have the player controller create the widget on begin play. If the widget is map specific, have the levelbp call the event on the controller to create the widget. Either way, player controller is preferred place to create widget and store reference
The AHUD class is also a good place for that. Very easy to reach globally via GetPlayerController0->GetHUD, and it can help keep your controller cleaner for gameplay stuff.
hey does anyone know how to make widgets reflect in reflective materials?
For saving r.raytracing commands, do I need to put them in the DefaultEngine.ini file?
I need to know something about a class before I spawn an object of it (the height of the capsule). Can I set or get this static somewhere?
@olive sedge Not without making it a class variable you can get via GetClassDefaults. Otherwise the only way to get that in blueprint is to spawn an instance, get it and then destroy it.
@maiden wadi so a static variable in C++ that I expose to BP and then in BP GetClassDefaults?
Should work. Alternatively... let me check something really quick.
ok.. that should be easy. I have a C++ base class on this anyway. But yea.. I'll hold
I'm trying to do a line trace that gets the me the material of what it hits. Problem is, it gives me the material instance rather than the material the instance was created from. I'm working on a vehicle and the material instances allow me to adjust friction depending on the surface, however I also want there to be a check for the "parent" material so all material instances belonging to this count as "drivable". Walls for example will have material instances belonging to a different "parent" material and so will be ignored by any attemptsa to accelerate (if the vehicle is up against the wall on it's side for example).
Could somebody please give me some tips on how I would get that "parent" material?
@olive sedge Wanted to double check if it was possible, but since you're working with C++ as well, you could also get the class's Default Object and get the capsule height from that. At least it seems to work with a default ACharacter using this syntax.
ACharacter* MyDefaultCharacter = Cast<ACharacter>(ACharacter::StaticClass()->GetDefaultObject());
float CapsuleHalfHeight = MyDefaultCharacter->GetCapsuleComponent()->GetScaledCapsuleHalfHeight();
UKismetSystemLibrary::PrintString(this, FString::SanitizeFloat(CapsuleHalfHeight));
@maiden wadi thanks man!
@primal smelt I'm not for certain on that one. Does calling GetBaseMaterial from the retrun value of GetMaterial work for that?
That it does! Thanks very much 🙂
Hi!
Anyone can help me out a tiny bit? I have a database that I am getting values from. However there is a slight issue that I have encountered. So the database has string columns for different area values. So 14.5 squaremeters is actually 14,5 in the database.
The problem is that we cannot just re-write these to correct format in the Database, because they have systems and sites working with these formats. Since they are kept as STRING, when I get them from the database, and do a String To Float, the value becomes clamped.
Eg. 14,5 becomes 14.
To work around this issue, I have created a macro, that takes the string, splits by the "," delimiter, takes the left side, then checks the right side, then adds the two together. This works perfectly fine, HOWEVER there is one BIIIIIG issue, that's runing everything.
I've made my code in a way that if a field in the database is empty, then remove that in my app completely. However it seems like that due to my macro, there are no "empty" values, as if there was a previous one, that was valid, it gets stuck and carried over to the next loop iteration, putting these wrong values in the next blueprint, when in reality they are empty, and should be removed completely.
Here is an image to the macro itself. It's kept in a macro library
Tried Floor, Truncate, Round, all does the same
Hello, I dont know what I'm doing wrong,but it seems like I cant change a structure's variable. As I'm making a inventory system I wanted a drop system. In the structure variable, I have a integer that is for quantity which I want to decrease by one when an item is dropped. But it simply will not decrease. Am I doing something wrong? Here is a video showing the code and the issue. https://youtu.be/et6fm9nntoQ
Here is the part that removes the element from the map if the float value is empty, however any previous valid value gets stuck in the macro and carried over so nothing is actually removed.
Where you are checking float == 0. Is it returning true? Cuz even a fraction differs than it's not equal. And if it's the issue then try 'nearly equals to' rather than ==
@haughty bone It's likely that you're trying to set a copy by ref.
@weary jackal No it's returning false.
I'm getting 160 rows of data from the DB. And for example:
1st row FIELD1 FIELD2 and FIELD3 contains: 15,5 - 16,5 - 17,5
2nd row FIELD1 FIELD2 and FIELD3 contains 14,5 - 0 - 0
But when I use the macro to convert the string to float, the first rows values (where it would be empty) gets carried over, so second row ends up like this:
FIELD1 FIELD2 and FIELD3 containts 14,5 - 16,5 - 17,5
I will try and make a pure function instead of a macro and we will see how that goes
Answering to this message, that's not the proper way to do it
your string have comma where String to Float expect "dot" (not sure of the english word aha)
@inland merlin Can you please elaborate? Also @weary jackal Using a Pure Function instead of the macro works perfectly fine (same code in both)
@inland merlin Aaah I see, tbh I don't fancy BPs that much and barely use any string operations. If it were for me I'd have set up the DB correctly from the start
But yeah your replace solution is 100% better than my math method 😄
And it will keep working if you ever replace the data from your DB
tbh, looking at the web code and the competency of the web dev company who made this shiat that they dare to call code and db, I highly doubt anyone will ever touch it
Do you ever clear your map?
Each BP that holds the data in the end, has an empty map that just has the types set correctly: String - Float (Key - Value)
I'd be curious to see the whole function to understand what you were doing wrong, if you're still interessing in understanding what happened
When I get the DB data, I use the MakeMap node to create a brand new map in place
Then I set the given BP-s map to this MakeMap
Could share a screenshot of where does the struct input comes from, it doesn't show in your video
Hi, can someone help me to find a way, to avoid the 'stagger' from the Pawn, when a Projectile with physics enabled enters in collision with a Pawn, even tho, on Event Hit, that projectile is Destroy Actor ?
use overlap instead
Yeah, the thing is, overlap gets the thing too complicated for the use I want for it. Especially the fact that I need the Hit Impact Point, that overlap cannot give me
There isn't a simple way to avoid this 'stagger' thing ?
Seems a bit hacky but you could have a second capsule in your character that collide only with projectile, this way hit won't push your character
That could be an idea. Or a sphere trace on impact to get the end point as hit location, as Overlap. What would be the most performance efficient ?
Being a very low mass projectile, it shouldn't affect the pawn much if at all.
trying to make a window pop up with the clicked on actors stats
but im missing something lol
do i need a for each loop or something?
thats the cast sorry bout that
Don't do it like that. You should just pass in information into the newly created widget before adding it to viewport rather than relying on bindings. The binding's logic is a bit off too.
thing is the NPC is the one showing that widget
so make a variable for your NPC on the widget
and make it expose on spawn
and just pass it in
True. Used to my own method of sending UObject pointers through more dynamic initialization events in widgets.
@maiden wadi thanks! whats the set text box tho?
Just an example. That would set the text of a TextBlock inside of that widget.
Make the text block a variable and then do like I did in the bottom image.
ay it worked thanks 😄
@prisma stag there is an #gameplay-ai channel might be better there
Will do.
hi, how can create Pulling back time mechanism?
This is the start and end crouching functions
For some reason things looks wierd
When I coruchon the server
clients can see it but server cannot
When a client crouches
Client can;t see it first time
But serverr does
Second time client crouches it works
Unsure on why
Help would be appreciated
@opal sinew You should not replicate from your AnimBP. You should set variables in the Character that replicate, and that your AnimBP can pull from in it's update event.
I see, so character variables that have an update event
Which trigger the action in anim BP?
And in my srv events I only have the variable updates?
The character should be what's replicating. That way your crouch only needs to be a button press event, and a server RPC with a boolean to tell the server if you want to crouch or not. Then server sets that replicated variable and all clients get updated and in the notify you can do stuff with it.
Alternatively. If you're using the base Character class, crouch and jump are already both replicated with client side events to call.
Ah I see thanks, I am using the base character class but had to change the crouch animations to work with guns
Isn't update in anim similar to tick? Using that is less optimised i.e performance?
Od i want to trigger an event based on which of these two boleans is true
How is that
Really depends. All it should be doing is setting and checking variables from it's pawnowner. You will not notice and performance gains until you have quite a few hundred instances of it. The heavy lifting is the animations themselves, but all of that is done on a separate thread.
So my understanding is:
- Character BP has crouch bool
- Crouch event calls srv notify (run on server)
- Which calls multicast event
Where do I put the actual crouching function?
With the edit of moving coruch bol to character BP
My guess is crouch event and multicast?
good stuff
I'm learning dialogue systems based on behaviour trees. What's the best practice for displaying player characters lines? I mean I display NPCs speech in a widget from BTTs but character speech is currently represented as option selection in another widget in a vertical box. But I would like to have multiple sequential player character speeches. The only thing I can think of here is using the same BTT for displaying dialogue line but I intuitively I find this not really good because I would have to write all main character phrases in my NPCs behaviour tree. Are there any other options for this?
So I deleted my character parent by accident. Anyway to restore it? All my variables and functions are gone in ThirdpersonCharacter and AiCharacter
It auto saved after i did it and cant undo the delete
if its controlled by the character component, and you want it to work for dedicated and listen servers - off the multicast.
Revert using your version control system?
(this is why we use version control systems)
@paper trench Check your project's directory in ProjectDirectory\Saved\Backup
If you're lucky you have an older version of it.
Anyone can see my question ^ ?
don't you already check both?
first branch -> if true fire event... false -> second branch -> if true fire event?
unless im misunderstanding...
I want based on which of them is true
Yes i do that too but i think theres better workaround ?
Smth like switch on int
Or similar
Like how u do switch on enum
enum is basically just a switch on int
Can i apply switch on int on this some how
only real reason to do that is if you wanted to be able to fire both events otherwise its just abit of unnecessary coding.
I dont like how it will go through first branch then check if its false then fire the other , i want it to fire the other directly if its true
you could take the whole thing there in the image, turn it into a macro/function, then have the trues set a int value and return the int value so you could switch on int, last false setting int value of 0.
Ok thanks , i will try to understand and check how that would work
the third thing (for firing both events) would just be a branch check to see if both were true.
so then you'd have 0=nothing, 1=first true, 2=second true, 3=all true.
Is it possible to let the mouse extend the viewport? e.g In a top down building game, the player hold right click and drags the camera in the x,y but keeps going ? https://gyazo.com/fb9f4410870e6ba1d0da1de42510bf83
check mouse position vs. center of screen, if position > < center falloff, increase movement in x / y direction.
stick the check in a timer, have button down trigger timer, button up invalidate timer.
When implementing console commands into my game how do I make them so they do not rely on being custom events?
c++?
Yeah you need to use C++ for it
You can make them BlueprintImplementableEvents though, allowing you to do the implementation of it in BP's, but it still needs the basic declaration in C++
I have a Blueprint class that is getting quite big, as in having many Components. This makes right-clicking in the Event Graph slow since it lists functions that can be called on all the Components as well. Is there a way to disable this, so that only functions and variables on the Blueprint class itself is shown?
How can I get that Projectile, overlap walls ? I mean i've tried to get the wall in all collision setups possible, it just passes through.
you need to have Collision Enabled as Query and Physics
@inland merlin Just tried it again, didn't worked
also enable GenerateOverlap event
The Wall
The Projectile
For the sake of showing, i've enabled everything as overlapping
Simulate physics isn't enabled to let the ProjectileMovement component active
ohhh
Nevermind, it was about the target non valid
What should hold the world data about who's on what team etc, Gamestate?
thanks @tight schooner 🙂
Say I want to Get all characters on team Blue, I'd save an array BlueTeamCharactersArray in Gamestate right?
yes that's what I do. What I do personally is have an array of the player controller class I use that updates anytime someone joins or leaves the server (i.e. event on login and event on log out) Then in my player controller class, I have a reference to the Character class the controller is using. So when a player joins a team or leave one, I call an custom event on gamestate class that clears the team arrays, then for each loops the player controller array, get the character class reference, gets the team variable on the character then adds to team 1 or team 2 character array
oh they actually fixed DoesImplementInterface
Any good resources to learn BP?
how can I change value of the pp material using bps?
This is the best tutorial series for starters IMO: https://www.youtube.com/watch/EFXMW_UEDco
This video gives us an overview of the Introduction to Blueprints video series as well as jumps into a high-level overview of the concepts behind Unreal Engi...
Not sure what a pp material is but there is a Set Material node
the pp material
post process I assume
Ive seen it!
I also recommend Ryan Laley: https://www.youtube.com/channel/UCsS5i15vvUbwfr_1JdRKCAA
SUPPORT ME
Patreon I https://www.patreon.com/ryanlaley
Buy Me a Coffee I buymeacoffee.com/RyanLaley
Donations I paypal.me/ryanlaley
PRIVATE 1-2-1 SESSIONS
Email me at support@ryanlaley.com for more information and rates, or visit http://www.ryanlaley.com/learn-games-development/
JOIN THE COMMUNITY
Discord I https://discord.gg/TcPtCBp
FOLLOW M...
He has a ton of topics he has done
Yea post process material
Unfortunately @mortal isle I'm not sure offhand.
So I'm trying to draw text from blueprints in UMG. Is the correct way to position things is to get the Viewport Size divided by Viewport Scale to get screen height/width then position from there?
or is there a way to get the x/y position of a Canvas panel? (I haven't been able to figure out how)
Anyone know what the new version of the "Render Movie" node is in 4.26. It would usually work off "construct Automated level sequence capture" but is no longer an option?
Hi everyone one, currently Im making a 4 player coop game mode, do you suggest I make teams for the AI vs the 4 playeres?
So does the "Print string" node play to all clients (when testing the game locally with multiple clients on the same machine), regardless of where the code is playing?
feel like I have been banging my head on the wall trying to work out why code (print string) was playing on all my clients
when I can get other things to work correctley
🤦♂️
Is there a way to split this vector3 into xyz the route is coming from an input node in a macro
what component do I need if I want to check if there's something directly underneath?
can probably do what you want with a line trace
yes "break" is the syntax you're looking for
No it should only execute on the client or server that it is being executed on
You probably would want to just use an enumeration (enum) here
Are you using UMG or trying to render in a HUD?
using blueprints in UMG
specifically the On Paint function
Sounds like you're over complicating things. can you post a screenshot?
I'm trying to draw text via blueprints onto an image I have in UMG
so use an overlay widget, an image widget, and a text block widget
should also move this conversation to UMG
I got a probably very edge case question.
I'm trying to make a procedural aim offset, the problem I'm currently have is rotating the spine_01 upwards or downwards. Problem is, I need to rotate it while it has it's "offset", rather then it's own orientation. Any ideas how to achieve this?
issue is, the text drawn needs to be dynamic based on the speed of the player. (think of a speedometer)
so I can't just type in the text
Is it possible to make an actor to be a consistent size in the viewport? I need to create floating speech bubbles for characters. Characters can be in front of each other so their bubbles should occlude each other accordingly Optionally it would be great if they could never be occluded by static geometry. Is it possible?
yes look up screen space rendering
In hopes to clarify the issue. I'm aiming downwards and the character is bending over, the problem is, it should not bend straight down but actually bend down and lean a bit. If that makes any sense. You know how when you hold a rifle your spine is rotated slightly clockwise. If you would aim down, you'd not aim straight as your spine is facing but at an offset. If that makes any sense whatsoever. xD
have you tried this?
Yes, that's how I rotate the spine
so what isn't working ?
I want to rotate it aligned to direction of the character regardless of spine direction itself.
😅
Lemme try to manually rotate it in hopes it can show what I'm after.
Hey guys so is it possible to work on my character animation while having my character in my boat mesh so i can see where the walls are and stuff?
sounds like you're on the right track, just need to do some additional vector math to account for that
hi all, I have an issue that I've been banging my head for a couple of days now. I import a skeletal mesh with animation. It's a fish moving around (made in XSI and cleaned in C4D). Basically, I want to hit the mesh and place a UI element in overlay. When I do so, everything works and I get a reference to the actor, but the position return is based on the 0,0,0 of the whole animation. Can I add an actor to my moving mesh?
I know, just can't get my head wrapped around it. Dunno where to start from. 😅
can you not get the current rotation and just add rotation then set it?
Left is simply rotating one of the axis. Right is manually approximate how it's mean to rotate, it requires 2 axis rotation.
hello! is there any way to init default values in a Behaivour Tree, or should be all set in beginplay?
I need to access this Parameter in blueprints but dont know how any help?
@tardy kayak look up dynamic material instances
You can use a Break node or just right click and select Breakout and it will break it right inside the same node
One thing you could try is adding a non-visible component to your actor that is right in the middle of the mesh
Then return the location of that component
Hello! I find once I possess character A, and then possess another character B to trigger a elevator to take character A to higher place, the character A will be still there, not moving up as the elevator goes up.
Anyone knows why?
If I don't possess character A at the beginning, the elevator will work well.
Seems like once a character has been possessed, something changed. But I don't know what it is.
I put an unpossessed character to compare. It really is the problem.
Also, when I repossess character A from character B, it will suddenly move on to the elevator.
Maybe possession is somehow changing the collision?
I eject to check the character and comparison one. Collisions are the same...
Is there a place like an array to store the controller possession history? I want to clear that.
Also tried unpossess the old one first then possess new one.
In the elevator BP, I use "set relative location" to realize elevation. Is that right?
Hm, do you set Physics enabled once unpossessed?
Try that on the capsule component, maybe that will work, or it needs some dormant AI. I assume it's the way the character BP (character movement component or some of them) that do some fuzzy stuff if no player or AI attached? (turning off physics and perhaps making it a static object or some such)
Realized this might be a better question for this channel...
"Making a checkers board style game just for fun.
Is there any particular trick/bp/node that anyone knows of to set points? Like each square has a point, player can move piece to adjacent points if point is not occupied by their own piece check if its empty if empty it can go there, if not it does further checks to see if it can take the other players peice.
Any case.
Trying to think of an easy tool or way to have set points on the board? If that makes any sense.. any and all ideas are appreciated 😉""
I tried turn on "Simulate Physics" when unpossess, but the character capsule is easy to flip aside.
There should be some (keep upright or keep on Z) unless i'm mistaken.
Meanwhile, anyone know if you can get bone transforms from attached child actors? I'm really struggling with this one. xD
Dormant AI might be a solution.
You could however also actually move the dormant pawn with the platform as well with a trigger box that detects any non-controlled characters and moves them up too.
That way you can make the other character "static" as in so that the other "controlled" character can't push it around by mistake. Unless pushing non-controlled characters should actually be a feature.
I'm trying physics + locking Z.
Hello. I need help figuring out something. I'm trying to get it so every element in an array except for the one selected through the select node is affected by the for loop. How would I go about doing that?
Sounds like you need a !=
For each element != (selected one) continue..
Thats correct 👌
Seems to work like a charm! Thanks!
You can remove the first node and just use the result of the != to set your boolean
for a cleaner implementation
did you mean to send this to someone else?
Thanks!
It's now cleaner
Although in my hovered boolean, I had to add a NOT boolean to it to flip the value
yea i meant KingKrouch, sorry
This definitely is skyrocketing my vision into the skybox, and I am aware of why. Any suggestions for making the crouch a smooth movement rather than an instant one?
Now it's down to this
nice
is your crouch not done in animation?
It's literally a fresh first person template, so no
switch on direction and use the float as the offset instead of a lerp
so your timeline would just be a horizontal line
I'll go ahead and play around with that
does the standard camera actor have some kind of tracking where it keeps focus on an object? (and rotates to the object)
you can use a spring arm component
Well, I don't know what to do. I have the crouch going up and down, but not the playercamera/arms are lower than where they are when spawned in for the first time. How do I get it to be consistent in that it returns to the starting point?
yea that usually works, but i need that for a cutscene and it would make the camera positioning a pain, guess i'll just update the rotation of the camera in the tickevent
Hey, I’m new here. Also I’m having an issue with my blueprint code. Would anyone be able to help me figure out where I went wrong?
well, just ask?!
I did ask.
that wasn't really specific
Basically I’m trying to make a block move in 2 directions endlessly as long as the chunks are loaded. In the future I’ll change it so they all generate at once and it’s limited amount of chunks. It’s a 2d game with basic Minecraft like mechanics and it’ll have a story and such
The issue is the code isn’t completely working in regards to making the blocks generate
you would have to show some screenshots of your BP where you generate the stuff
otherwise it's hard to tell what is wrong
just in this channel
Okay. It’s lot of screenshots. I already took them
That’s all of them
If you need to see what’s in the variables I’m using I can send those too
hard to read half of them so much zoomed out
My bad. I can zoom in on them
does it work for some chunks or doesn't any chunk at all generate?
No chunk generates. Just a single block
what is MainC1? is it the chunk actor or the player actor??
Player actor. The chunk actor is procedural. It just contains the block. I’m trying to make it so when the player moves chunks generate
check this one
spawn chunk at is always called with 0, 0
should be the current for loop values
Thanks it works now! Only issue is that the blocks are too separated. But I know how to fix that part. I appreciate your help. 😊
What's the best way to animate a lerp node inside a function ?
wait... does a timeline work inside a function ?
Works now! I fixed the issues so far. 🙂
dont think so, still you could delegate the work to an event, i usually go for saving the starttime + duration and calculating the current alpha, but honestly now i wonder what does consume less resources...
Booo
I don't like using a custom even that is called from outside just to tick. 😔
anything internal?
What are the Set Timer by Function and Event Name Nodes in Unreal Engine 4
Source Files: https://github.com/MWadstein/wtf-hdi-files
probably all depends on your actual use case
Ohh yes... I forgot set timer
thx!
it's so my AI can lerp into transitions rather than snap
is it possible to rig the new free stylized characters in als v4?
is there something incorrect with my blueprint because the player camera rotates for no reason
im not even touching the mouse it just rotates
i think its because even if mouse X was 0 which is not moving it adds +1 right???
I have a session system and I want to display all the current servers being hosted. how can I put all of the sessions into buttons which can be clicked and the user will join that server
or how can I add a button for each result?
You mean Like A UI?
yes
Well first you want to get all the sessions available to join and store them in a variable
from there I mean there's like multiple ways you could send that information to the UI Widget responsible for joining sessions
The easiest way would be to create a button in the widget first, and then from there have that button cast...
Cast to whatever blueprint is storing the session variable
... Let me show you an example hang on
This is what I mean, all I did was create a button... I then casted to mygameinstance which is where my sessions are stored, and then I called the appropriate event
@fast orchid
does that make sense
no not really
which part
all I wanted to know was how to make a ui list. think like csgo custom server list
just a button for each server
there is code
foreach server inside (server array reference)
make a button going horizontally
and if you click the button: join server
now that in bp
right.. That's what I'm trying to tell you
You need a widget for that... And then after you create the widget, you have to add code to the widget aswell
it's as simple as you seem to think it is
its just an empty widget with no code
okay
so on the top left there's something called a pallete
Drag and drop button off
damn sorry
so click on the button
scroll all the way down in the details panel
and you'll see "Events"
From there click on on the "+" icon next to it, and it will take you to the beginning of the code for that button
now you should be in graph
I am
From here
there's a few things you can do...
For example, what I did was cast to my game instance
because that's where my logic is for joining games
I'm assuming your logic is also in a game instance
what like FirstPersonCharacter?
a blueprint, yes
in in the event graph for the widget how do I add buttons for each item inside of the sessions array?
man you're really confusing
You could stick ten buttons in a vertical box and then reveal / hide them based on the number of found sessions, otherwise you will have to create widgets dynamically
Is that what he wants to do? I was thinking to pre add the buttons up to however the maximum sessions can be found.. And then set them to visible for each session found
Thats what i meant
But explaining how to write code for that is not something I want to do lmao
that's a bit of work
if you don't know what you're doing anyway
I dont work with blueprints often so i cant show you step by step how to. Im sure there are tutorials on it
I can't find anything online
You just need to break down what you want into steps. Dynamic widgets for session joining is too specific of a question. Look up those things separetly then combine them
Usually you have a widget called ServerList and a Widget called ServerListEntry.
In the ServerList one you have a vertical box.
When the ServerList widgets calls Construct it empties the VBox, calls FindSessions and creates a ServerListEntry widget per result and adds it to the VBox. The ServerListEntry widget would have the button to click on and needs variables to show the name and save the SessionResult.
The button press then calls JoinSession.
And there are tutorials for this as it's an ages old topic.
You can probably also look into ue4s multiplayer cowboy example. That might have some widget examples for this
Code of that, given how bad the lobby tutorials are, is probably shite though
That is, at least in a very basic sense, the only way I would come up with
Only thing I'm confused on is how you would get the button to go to the correct session
I'm assuming you would use a get to pull one out of the array of sessions...
And pass it the session struct
ServerListEntry needs a variable of that type set to InstanceEditable and expose on spawn so it shows up on the CreateWidget node
Inside of the ServerListEntry you can then call JoinSession with that variable
There is obviously more to do in the long run. Refresh button in the ServerList, disabling all entries when you click join, etc
But that's more UX than anything
Right
you're actually making me want to create it just to try it out
It seems so efficient
Does anyone know how to bake an array (because it goes back to zero when restarted) made with a forloop?
Bake an array?
That sounds like an artist throwing random terms at programmers haha
You want to save stuff between game restarts?
Sorry about that. I am generating a coordinate system to use in the game (so 256^2 = 65536, but I need a lot more, which takes time to generate, I mean loading), just trying to find a way to make it more streamlined.
Oh that suddenly sounds a lot more complex
Do you generate that everytime you start the game?
Yes.
Only once before the game starts.
I can do it by hand, but it's going to take forever.
Vector 2D with coordinates (0,0)
I mean you can save them to a savegame
Or at least try
Also questionable if you need the whole array at all times or just a way to math out the required coordinate
So save (as a placeholder, only for that purpose) and just load them?
Is it the same for all playthroughs or different per new game?
So you can't generate it pre runtime and save it with the map?
Sorry, I didn't catch what you mean.
Well if that array is the same for every player and every game then there is no need to create it when you start the game
Oh, yes. I just want to populate the array.
Simplest and dirtiest idea would be placing a custom actor into your level
And let that generate the array in the construction script
That will then save with the map
You can use the GameMode or GameState BeginPlay to grab that actor via GetAllActorsOfClass as long as it only exists once.
But dirty solution. There are prettier ones
Then you have access to the precreated array
@surreal peak Just ran a test and working. I really appreciate your help!
Hi there, Does anyone know how to have it so that the Characters slow down gradually so that their animation slows down as they come to a halt rather than an immediate stop?
@fiery crest Try to change the braking speeds in the CMC.
Is there a shortcut to edit a nodes comment bubble (not box comments)? I know it's possible through right clicking the node or hover-clicking the bubble but it sucks to always have to click. So far neither UE docs nor aunt Google had any helpful hints, so I assume this shortcut/hotkey is simply not implemented?
@maiden wadi I played with those settings a little but the walking animation still snaps back to the idle animation
@fiery crest Depends on your anim blueprint then. You have to set it up via velocity of the character and a blendspace so that it blends between idle and moving based on the speed they're moving.
I have all that setup which is why it's confusing me as to it not working
@muted comet Got side tracked and am putting this in the Blueprint channel instead, but I'd strongly recommend learning ENUMs. They're a pretty basic data type and widely used for readability. I'd recommend reading up on them, but in short to try to explain it, they're just an ordered list of named numbers. Way back when they still walked uphill both ways to school, programmers just used integers and did logic based on them. Which works fine, but it can be hard to follow sometimes. For instance, rather than having three booleans and doing three if statements for something like an anim blueprint and you have movement modes. You'd do three bools IsRunning, IsSwimming, IsFlying. Then do If Is Running, If Is Swimming, etc. Instead, you create an enum that has three entries for those names. So... IsRunning=0, IsSwimming=1, IsFlying=2. This allows you to branch your logic with one value rather than three. It also allows you to better keep state because you don't have to set the other two booleans to false whenever you set one to true, you simple set one value. The following screenshot might clarify the similar uses a bit.
Yep but beware that the UE Editor/Blueprint implementation of Enums kinda sucks and renaming/sorting them breaks a lot of stuff. I learned the hard way to just completely ignore Enums and substituted them with GamePlay Tags, which are (so far) superior in every possible way.
Ok lol so I’ve always done it the Boolean way I guess
Not really any different in C++. Just don't rename them. But then refactoring of any kind is usually difficult. Programming without a plan can be brutal.
Ok but wait this haven’t been a fix for my problem yet
My problem involve the replication part. I haven’t been able to get that right. Right now it works for the clients only
I can’t seem to replicate it across all clients without issue
At first I tried in the player controller and had no luck. Then I extended it too the game mode
That just got over complicated
I assume I need to just tell the server to update his Boolean and then he can update everyone else’s
As a long time C++ dev I know ups and downs of enums but I had my rose colored goggles on and assumed meaningful abstraction inside the editor and BP system. Sadly I got let down and then threw them out the window, since using them inside a BP state machine was worse or equal the amount of work compared to just doing it in code the first place. Hence I switched to GamePlayTags which are basically enums on steroids and have more decent support. 🤷♂️
Not gonna lie tho that Enum example is great @maiden wadi I can understand that easy
I had a pretty similar experience when I first started in Unreal. My only "Programming" experience was LUA scripting some UI design. Couldn't use Enums, so everything was switching off of integers. Keeping that all readable required a lot of commenting. Enums sounded dumb when I first started, now they're just a commonplace basic datatype.
Wait im in the wrong channel now whoops
@muted comet And the reason you can't replicate it across all clients on either of those is because neither of them exist on all clients.
GameMode exists only on the server, you cannot RPC or Replicate from or to it.
@muted comet PlayerController only exists between one single player and the server, so whatever exists inside it will not be known by other players, if not transfered elsewhere.
GameMode only exists on the server, hence no player will know about whatever lives there.
Use GameState or PlayerState and have a look Cedric's Network Compendium http://cedric-neukirchen.net/Downloads/Compendium/UE4_Network_Compendium_by_Cedric_eXi_Neukirchen.pdf
so it should be the player state im doing this stuff in
What is the variable for? What's it supposed to affect?
the booleans will tell the players UI which character has been selected
so then they can make the buttons disabled so players cant use them and take that character
Hmm.
Are these characters different classes, or the same class with a different mesh?
Right, but I'm asking id you're making separate classes for them entirely, or if they're just different meshes used in the same character class.
If they're separate classes, rather than using booleans or enums, you could just make a list of character classes, and make your selection RPC simply pass that class through the RPC.
sorry had a phone call, they use diffrent meshes and they have diffrent ability in there actors,
should i move this to the multiplayer chat?
one other thing that complicates thing is that its you click a class then you click ready, and when all players are ready it spawns them all at once
Doesn't matter so much being blueprint related.
true
But are they different actor classes?
If I was doing this, I'd probably use mostly the selection widget, GameState, PlayerController, and possibly GameMode for the actual spawning on start.
alright good, we are thinking along the same lines here, should i be using a has authurity in the state?
My setup would possibly be... On setup, GameMode could populate an array of classes that clients can get. This array of classes will be all selectable characters. This is just to tell clients what characters can possibly be selected so they can set up their own UI. This allows you to alter this via game rules, or added characters later, or whatever.
So client gets this replicated to them, and they set up the buttons. Each button gets that class it's meant to select passed into it. On click, it gets the local player controller and passes that class through the event, That controller RPCs that class to the server. The server version of that controller calls an event in GameState that tells GameState that controller wants that class. First it checks if that class is in the originally replicated list, if it is, then it checks a second array to see if anyone else has selected it, if not, it sets it in that array. The second array would be an array of structs that is a PlayerState, and that Class. This array also replicates so that clients can update their UI when it's changed for selections.
Then when everyone has selected and clicked ready, the server can iterate over that second array, and spawn each class in the array, for the controller associated with their playerstates.
that makes alot of sense in my head and usually that never happens
Oof great
i cant cast to playerstate
@muted comet How do you mean?
its alright i had to use the override i fixed it
ok so werid issue
it? worked??? idek
might just be it glitching
Not sure what you're doing.
me neither
What problems were you having?
Umm honestly cant tell, trying to trouble shoot, ive moved the booleans into the state, ill show u a image
so i have a tick event in the UI BP
i think
i need to update the bools via a diffrent method
@maiden wadi u free to voice chat haha, i think im brain ded
I can't. But I can advise not using tick for that. You're basically asking a client to send information to the server sixty times a second that doesn't change that often.
yep already working on fixing that
Anyone know the best way to create a harpoon using the Physics Constraint? Changing the linear limit seems to not work correctly.
basically be able to change length of cable and hook onto actors.
Doesn't look like i can even get the current constraint length, however i could sync it with a variable using the default setting
EDIT...
Set Linear x,y,z Limit seems to make the constraint no longer free to move towards the center but instead of acting like a rope act like a rod
Hey guys, I have a very strange problem in UE4
in my HealthPickup blueprint I have a slot for a trigger volume
but UE4 won't let me choose one
They're all there in the list
but if I click on one nothing happens and the health pickup volume stays defined as none
got it, I was trying to do it on the main blueprint when I needed to create an instance of it in the world and then it let me choose a trigger volume
Just posting so you know it's the correct solution.
What you tried before won't work, as the BP Class can't have a reference to something in the level (an instance).
Only one instance can ref another.
Your health pickup blueprint should contain its own collision volume instead of using one provided to it by the world that you then have to link up later. You can simply add an actor component (box, sphere or capsule collision component) and then setup your overlap event inside the health pickup blueprint. The overlap event itself with provide any necessary references to interact with whatever triggered the overlap.
Or, you go the opposite route, and have a volume attached to your player so when that overlaps a health pickup then it fires the correct event. Less volumes needed this way, only a single one for the player for all pickups.
I got this error text when I build lights : 'MainCharacter_BP_2 Static mesh actor has NULL StaticMesh property '
Any ideas ?
Did you set the mesh of the static mesh attached to MainCharacter_BP_2?
selectable volumes via vars are only selectable in the level design, not in the blueprint itself.
It's like telling the unhatched chicken what it's mother is.
your trying to access a static mesh that has no mesh assigned to it.
i.e. null = empty
For me it has a mesh ?
Isn't the error coming from MainCharacter_BP_2 and not BP_MainCharacter?
But the text says MainCharacter_BP_2
yeah
But I ain't got second actor of that name on the map
You want to look for when you reference the static mesh in question. Somewhere in your code, you are trying to get the mesh of that static mesh, and it is not assigned anything.
Right-click the mesh you have highlighted in your component list on the left. Then find all references. Click the binoculars to see all blueprints that reference that mesh. Then you can add breakpoints or print string by every instance of where you access or change that mesh's properties.
did you have a second one on there at one point? it could be a ghost in the map (have litterally had that happen)
Try, right-click content folder, choose fix up redirectors. Save everything and restart editor. Open level again and test.
(on save all - do from the file menu, not the save all on the content folder listing)
Shit, does that help? I've been using content browser button, hehe.
yeah when fixing redirectors
So, I got 3 references because it's a new char, and all of them are tied to animation exec on event. I'f unpined them, still the same problem.
I saved all, fixed redirections folders on the different folders
quitted and launched again
Try the redirector fix first. Could be a non-code issue and engine issue instead.
Ok, cool
Do search in content browser for "MainCharacter" do more than 1 blueprint show?
but what I don't get is why on Play mode, it counts a second actor of the same class
Hmmm, yeah, just readd the actor then if it works.
does your game mode spawn a character?
If it spawned in a character though it should use the default settings of that character bp, which has a mesh set.
You running this in multiplayer test?
if hes adding one and it requires a pawn possess but doesn't have one, it can cause a slew of errors.
Nah purely single player
thanks for explaining what was happening, I appreciate it!
i've made all sorts of wierd sh... happen in ue4, all part of the learning process lol.
whats wrong with this? im really new to unreal engine btw, whenever my character spawns in camera angle is stuck and cant move
Your level blueprint looks fine. Does your character have input events to handle mouse/keyboard input?
If you are this new to unreal, you might want to load up some example content to play around with first.
oh wait my bad i got it
yeah i've been following youtube tutorials
im just stuck on a character selection menu rn, it doesn't spawn the character I want and instead spawns the default third person that you start with
Stay away from any tutorial series that has you work out of the level blueprint a lot. Seen too many people trying to do everything in level blueprint then wonder why it can't communicate well with their other blueprints.
That is a game mode issue. Did you make a new game mode blueprint? You then need to set your default pawn to the character of your choosing.
Or edit the third person game mode to change it
When I click on the highlighted BP_MainCharacter_2, nothing happens. Why does it create another instance of that BP when there is only one assigned to the level, when I build lights ?
this is the ui blueprint for when u click the button for the character
that is the project settings part
Hey guys, I have a "data flow" question, coming from somebody who's not too familiar yet with Blueprints.
I have a WBP_Hud which I need to initialize with some data. I've made BP_Hub, and attached the WBP_Hub inside of it. This is because it needs to be an actor in the world.
I want to attach some dynamic data to this BP_Hub and then expose it somehow so that WBP_Hud can initialize itself based on this data. What are my tools to get this done properly?
if you've added one into the map, and then your controller is spawning one, then its most likely BP_MainCharacter_2 is the one thats spawned.
@solemn parcel and thats why your unable to click on the bp
Ah, manually spawning them in, I see.
yeah
@solemn parcel so at that point you aren't even hitting play, just building lighting? That means that it has to do with the physical character you dragged into the level.
Do you run anything on "construct event" for that blueprint?
@orchid garden Yeah But i spawn in that character on Play mode, and there isn't another spawning asset
@proud hull Just when I build lightning it happens, things seems fine in editor and in play mode
On 'construct event' ? If you mean the 'Construction Script', it's empty
set a reference for the bp_hud in the wbp_hub when you aded it, then in the wbp_hud you can use that reference to grab any of the vars. The other way would be in wbp_hud get a parent reference and cast it to the bp_hud. I prefer the first to avoid casting, expecially if its something im going to be using to constantly access vars with.
Hey, I'm trying to write, If character don't moving, Play ..... animation. How can I do that ?
construction event has its own tab, its own event graph essentially.
I dont mean Idle, either it is on Idle, If player doesn't pressing keys, How can i write this
set a reference for the bp_hud in the wbp_hub when you aded it, then in the wbp_hud you can use that reference to grab any of the vars
I'm a little confused about this part.
For example, if player doesnt pressing anything about 5 seconds. I want to write, If player doesnt pressing longer than 5 secs, make this, make ........
@proud hull ConstructionScript ?
You can add a new state to your animBP, that only can be accessed when velocity is near 0. I think there are transition checks you can use to randomize when it occurs too.
make a var in wpb_hud that is set to object reference for bp_hud as the var type, name it parentref. When you create the wbp_hud get a refrence to it drag a pin off and set that var to the bp_hud reference.
yes, you got anything in that?
Thank you 👍
@proud hull Im using it on Idle
Nah, empty
If velocity smaller than 1, Im playing Idle animation. But how can i say,
If velocity near to 0, more than 5 seconds, change animation
If in Idle too
@proud hull
state transition from your movement blend space, which include idle. Transition needs to check for velocity near 0 to guarantee you are in fact, idling. Then you need one more condition check based on time. How you set that is up to you. On release of movement input, you can set a variable to save current game time and then check against that variable to see if 5 or more secs has passed.
GeekyGek, I would need to create a function called "Set Parent Reference in WBP_Hud", right? Variables don't automatically get getter/setter?
Gotta get ready for work, good luck all.
I'm experimenting with something where I added a copy of the hand bones in the weapons skeleton itself to hold the weapon properly. Is there a way to copy all the bones shape onto the mannequin?
As in, to avoid a fustercluck of Transform (Modify) Bone in the anim BP xD
don't really need to create a function, just set the var reference to it after you create the whp_hud
@proud hull Thx, gl too
@proud hull how can i save location ?
I mean, I didnt understand you well. Now, i should save player's location, then i should get that saved location after 5 secs, then i should comparison them, If they aren't same, i should play sitting animation, right ?
Hmm I think there is something I am still missing here
I created my variable called "ParentReference" inside of WBP_Hud that points to a BP_Hub Object Reference
I also set it to be instance editable.
Now inside of the BP_Hub event begin play I am trying to call Set Parent Reference, but I don't have the right data to connect up.
Because in BP_Hud, my Hud "variable" is NOT type WBP_Hud but rather type Widget Component.
@orchid garden am I following the flow you were describing?
Oh gosh! Sorry I didn't see you had PMed me!
set you some example pics via private message @dusk flame
How can I say, "Longer than" ?
I mean, for example I'm pressing to ESC. I want to say, if player pressing to ESC longer than 3 sec, do ....
How can I do that ?
Something like "still" command ?
there is a simple way to do the hold, just a sec and i'll give a screenshot
this is a macro function:
does a check for hold, single tap, and double tap
'hold time' would be the amount of time you want the player to have to hold the button down. Tap Tollerance is the amount of time that can pass between a single / double tap detection.
default for tap tollerance is 0.25
Ok, thanks, that code is about button pressing/holding. But, how can I check a value ? I mean how can I say, after 5 seconds "If value equal".
For example, I have a valuable that changable. How can I check, " if this value, still same value longer than 5 seconds" ?
off the top of my head:
actually.... to avoid false holds....
think i did the and right....
Hold on,
no it shouldn't have the not...
I have speed of my character.
If my character's speed >= 1, character walking
If my character's speed <= 0, character in idle
Now, I want to achieve:
If my character's speed still 'speed <=0' after 5 seconds, make character sitting.
@orchid garden you sent about buttons. But speed value isnt about buttons.
This setup ?
did a little test:
@maiden wadi may be able to make that abit cleaner 😉
Realistically I'd just switch on velocity in the anim's update.
You need velocity for the blendspace's speed anyhow, usually.
@maiden wadi I have it, I'm already using it for my Idle.
@plain flare its how you asked i guess... you asked about checking a value vs. how long a button was held
If it was me, I'd create a small enum and just use it's logic based on states in the animupdate.
anyone know the maths to make this so that it provides the inverse values than it currently is? i.e currently when the player is close to actor it produces a value of 1, and when the player is far away its a higher number, I want this to be inverted so close = 100 and far away = 0
@orchid garden yes. ESC was an example. But my real problem is: If my character's speed still 'speed <=0' after 5 seconds, make character sitting.
i'd do like @maiden wadi said, set a enum state, and then have the anim bp check for the state being set to sitting.
this maybe?
unfortunately that does the same thing
map range
@orchid garden I have anim bp already. I didn't understand how can i solve this problem with enums. Is enum checking "If my character's speed still 'speed <=0' after 5 seconds" ?
Or just 100-x?
in the anim bp you can just check the players speed, if its <=0 make em' sit
Yes. I'm already using that for my Idle. like, if its <=0, idle
far as a idle counter, you can do that with a simple timer you activate when they are inactive, and invalidate when they are active.
so the animation bp would check to see if speed <=0 and idle counter => 5
before starting the timer you'd just reset the idle counter.
thank you! seems obvious in retrospect
@orchid garden Set timer by event ?
It often does 🙂
Im gonna write it into Animation BP's Event Graph, right ? @orchid garden
kind of a messy example of what i was saying:
then off the true and false you could set a enum state and in the anim bp you could check the state to see if its set to sitting, if so, make them sit. if not make em stand.
@maiden wadi basically what you were saying isn't it?
acutally you'd need to reset the enum state off the first false come to think about it.
I'm writing it now,
its probably got flaws, its just a slap together.
this should work:
(i just used a int as a 'pretend' enum state)
Yeah, this code didn't work. It was like so true, i dont know why it didnt work
Isn't Idle Counter float counting seconds ?
yeah idle counter was just counting seconds.
thats why i said you could skip that setting the timer to 5
Hello , i have a skeleton inheriting BP_mob , the mob can walk to the character to attack him , It works fine when i place BP_skeleton in the world but when i use the node spawn actor it does not walk , the skeleton stay in place
Is there a thing to do with spawned characters to make them work correctly?
order of execution? you may be telling it to start walking before its spawned (if doing it off the contstruction event)
The construction script ajuste the size of the trigger box detecting aggro
maybe the construction is not called when spawning?
its called, just some things i've noticed seem to happen before the items spawned
check if the pawn auto possesses when placed in world and spawned
does anyone know what's the formula to find x here: 0.75 * X = 1
I shouldn't have been sleeping in school
1/0.75?
x = 1/0.75
🙏
Kira where is the setting auto possess please
in the actor details
its a npc isn't it?
(the skeleton)
yeah but shouldnt it auto possess ai?
Its a BP_mob which inherit from Character
Hey @orchid garden I write codes like that. And It worked ! Thank you from the bottom of my heart :)
https://gyazo.com/066b175f3b03beb24cff5ed3f74548f7 by default the details are on the right side of the screen but i dragged it off to make it a bit more visible in 1 picture
gj @plain flare
yep was just looking at that, needs to be set to 'spawned' i believe
@last abyss
@last abyss @orchid garden Thank you very much
Its so good to have this discord 🙂
And actually, the ESC question was my another problem. This Press Type is that macro, right ? Hold on
that fix it @jaunty stirrup ?
yes
Was this macro @orchid garden ?
it wasnt possessed when spawned
that macro is to test to see if a player held a key for X seconds, tapped or double tapped a key
Yes, I know it, this macro was that codes, right ?
yes
Ok, got it, thanks again
So I still have a warning ONLY when I build lightnings. I've tried a tons of things to fix it in the BP_MainCharacter, which is the only actor on map with that name atm. I've even changed the mesh from it and still got the error.
That warning writes : BP_MainCharacter_2, BP_MainCharacter_5...
Meaning on building, it creates other instances of that actor, and I don't understand why
The BP is pretty simple for now, nothing in Construction Script, and the mesh is preperly rendered when Play mode.
I'm quite lost
Do you have a Player Start in your level?
Are you possessing your Character?
@solemn parcel ^^^^
can you confirm that the L_Hand_CastingPoint static mesh component has a static mesh assigned?
@solemn parcel
@hollow cape You found it. I did a test earlier deleting that component, because it doesn't have a static mesh assigned. But for some reason it still wasn't working. Tried it again, it worked.
Thanks !
damn
yep
thought it had to be a null mesh
glad ya got it working @solemn parcel you've been working on that project for awhile now 🙂
@orchid garden Glad too ! Actually it's the third time I restart it, for different reasons, but this one will be the final one 😉
hehe, i restarted my main 3 times myself. im actually thinking about doing it again even though i got the inventory system almost completely done. Sometimes you think you can do it better the next time, if i do restart this time im keeping the old project though lol.
Yeah, and mostly reusing most of the code ! It feels really good sometimes to make a fresh start on something that looks more clear !
yeah and finding new ways to optomize coding bits along the way 😄
I'm sorry to interrupt. I am forgetting something easy. What will cause an Add to Viewport to fire an "Accessed none trying to read property..." error?
@orchid garden Exactly 😉
the variable its trying to read has nothing in it?
I thought I did here, but am missing something, apparently.
This is in a class that inherits from Player Controller.
When I updated to 4.26 I got a performance drop on mobile. Any idea why?
Not that it will help anyone else, but the solution to my issue is "Switch Has Authority" , since I am using dedicated server.
Edit: This may not actually be the best solution.
Dedicated server doesn't have UI
Yup, which is why i needed to add "Switch Has Authoirty"
You need to only do the UI if it's a local player
Yup, that's what i was saying was the solution to my problem.
That will fail if you ever have single player or listen server.
Switch on Is Local instead
@grizzled rain I would ask in #mobile. People there are going to probably be a lot more used to profiling or optimizing for mobile devices. First guess for an engine update would be that something like a plugin for the engine got added or enabled that you're unaware of. Or a way you're using a default class is now different or wrong. I know 4.26 did quite a bit of backend restructure to some components at least. But in short, your easiest way is going to be profiling and comparing. Look for the highest cost and trim it as much as possible.
@pliant frigate On a side note to your issue, this is another reason I find it nice to use the AHUD class for UI. For pretty much all of my UI purposes that are not done in WidgetComponents on actors, my UI is done via calls to custom events in my AHUD class. Only one is created per machine for the local player controller and not available on a dedicated server. Getting the local controller and calling GetHUD on it will return your AHUD to you to use for local UI. Basically if the local controller's GetHUD returns null, then you're not on the local controller in your execution. Which makes it infinitely more easy to debug and understand widget related stuff in networking.
Thank you! I will read more into AHUD then. I am still very new to all of this, having mostly just experience on the art asset side. Its a challenge, but I am enjoying it and am having fun. I managed to blunder my way through compiling unreal for a dedicated server, got that up running, and successfully got friends to connect to it from the outside - I have decided to use that as my testing/learning environment.
@trim matrix Why would you even consider running timelines on tick? Both a timeline and a tick run at the same speed.
@maiden wadi dumb question: is AHUD same as the HUD class?
(I am working from blueprints. I assume AHUD is a C++ class? Again, I'm pretty new to this).
Correct. The HUD class set by GameMode.
Awesome. Thanks again.
@trim matrix All a Timeline is, is a component that runs it's own tick and updates the timeline. So it's already running on tick. You should find a logical way to use Events to trigger the timelines. Or simply ditch them and just use tick itself for the logic.
It's really ill advised. But I suppose if it works. 🤷♂️ Make it til you break it. Then you get to profile and fix the stuff. If your game is very simple, or incredibly small, I doubt you'll notice it unless your target platform can't handle it.
You're asking why you shouldn't use a car to drive a car. If you have one car, why do you need a second one to drive it?
Timelines are just to organize your ticks into more easily event driven logic. So turning around and putting them on tick takes away the point of them.
Timelines are not normal nodes. When you put a timeline node down, what you're actually doing is adding a new ActorComponent to that actor. This actor component is designed to send updates through the node you placed when it's own tick runs, if it's supposed to run based on the logic in that actor component.
Heeey! I’ve a little problem, I’ve a platform (ActorBP) which turns at 360degree, but when Im on the platform and I jump, I am propelled according to the movement of the platform, it also makes this with platforms which move from left to right. Does anyone have the solution?
I think I need to set the platforms movement can’t influence my character movement but idk where is that
@trim matrix Here is a good and very simplified example of the timeline component and how it works. Normally you would do the things like calling the StartTimeline event by putting execution through the Play on the Timeline Node. But this is how a timeline component would work if you did it in blueprint.
Whoops. Wrong logic on the tick in the component. Should have been CurrentPlaytime < CurrentDuration.
@atomic prairie I haven't messed with those, but you might try the Impart settings in here, in the CharacterMovementComponent.
trying to follow a yt tutorial, but he doesnt show what the green set variable is :/ anybody here able to tell me? im creating a jump animation for a character btw
looks like its the squaredvelocity of an actor :yesiedittedtocorrectmyselfxd:
what would it be called if im trying to add it into the event graph
@maiden wadi I’m gonna try this
let me know if I'm understand it right, are u asking what he is plugging into the set node or are u asking what the set node is?
what the set node is
it's a variable (on the left hand side you can add it)
the green one?
yeah, it's a float
this is what mine looks lke
alternatively you can drag off the vectorlengthsquared pin (or right click) and promote to variable
then it will automatically show up on the left hand side of ur screen (in My Blueprint, Variables) as a float variable
got it?
yes
does it matter if i change the New var 0 name to speed?
oh wait
sorry im really new i dont think i did it right
this is what i got
it doesn't really matter, but naming is handy to remember what the variable represents
looks good to me
How would I be able to remove this mini map widget? I want to get rid of it when isMapOn != true; since it runs on tick
I can't find any tutorials on this but basically im trying to spawn actor (points) across my whole level using EQS, but i can't figure out how to do this 😦
I can try; what should I use the flip flop on?
I'm not sure if that would work; I cannot get it to be removed from the screen at all
is it running the remove from* parent? @odd plume
idk i just tried it with the flipflop sebbi recommended and it works fine for me ?
I used the flip flop, that worked
🤯 nice
I could not get it to use remove from parent tho
😦
Like the two things to the flip flop instead of the function?
That worked better. Thank you guys for the help
is there something like setactorlocation sweep, where instead of putting the actor at the location the sweep hit, it just doesn't to the movement at all?
basically only teleport if there's nothing in the way
I'm making a prototype for a grid-based game and if the hitbox matches the grid exactly it seems like it sometimes gets stuck on edges, and if I make the hitbox smaller the sweep places my player off-grid
I could do it without the hitbox and instead just do a linetrace in the direction I'm trying to go, but I figured I should give the 'proper' way a go
Hi ppl, what method do you recommend for a simple single AI (chase player, move to location). I started with Blackboard but am now thinking it is overkill and considering moving logic to the AI character BP...
@sterile helm If your actor uses a fairly basic shape, you can shape trace with the same size shape from the actor to the intended spot. Otherwise, you could just save the actor's location, do the sweep move and if something is hit, set it back to the original location.
You had an interface function and an event with the same name on that class
Just make an event called event shoot and have the interface function shoot call event shoot, or just do the shooting stuff right in the implementation of the interface function
is there a way to render hitboxes while playing for debugging purposes?
As in your actor's shape components, or?
if I spawn an actor during gameplay, the sweep hits it, but if I put it in the level before it works fine
as in, I'm spawning in a block to act as a bridge
it also only seems to be hitting it in certain directions
Is it possible to make lines like these perfectly straight
they are abit off and its annoying me
I believe the shortcut is to select the node and the reroute node and hit Q
Can I take a look at the implementation of SpawnActorFromClass node?
Nevermind found it.
UEditorLevelLibrary::SpawnActorFromClass
Select them, press Q
or
right click, straighten connection
@stable dove set a breakpoint on a BP node, and when it gets tripped during gameplay, you can mouse over variables and data pins to see the values in them IIRC
What might be making black lines in between different layers of instanced static meshes?
Hey I found something I could use but I dont know
How I accomplish that? lol
nvm got it
👍
Hi, I'm wondering if anyone knows what I can do to capture mouse wheel scroll inside of an UMG INputKeySelector widget, which itself is inside of a scroll box? Basically I'm building a keybinding menu, and the Input box is not capturing mouse scroll, the scrollbox keeps scrolling...
Hmmm, that's tough. I think the scroll box is designed to steal the mouse wheel input
Hmm. then I should disable scroll when input key selector widget is clicked on...
Maybe that would work. Is it because you want finer control over the scrolling?
Well, the game uses weapon next/prev and I want to bind that to the scroll wheel. But the menu with the keybindings customization buttons is inside of a scroll box because it's long
I would probably have to build that out and test it to help heh. Usually the scroll box only responds if the cursor is over it right? Does it work as desired when the cursor isn't hovering over?
Because if that is the case, you should be able to set your scroll box to visible but not hit testable
Which will make it ignore those scrollwheels
if the mouse is inside of the box it captures it
Yeah take a look at the visibility setting of the box. Set to non hit testable and try
I have a bit of an issue. My character falls through procedural mesh. However she doesn’t fall through anything else. I could use some help
Sounds like you're not generating collision
Yeah I have had to setup collision on both the Capsule and the Mesh for characters, otherwise that happens
I have collision on
Collision works on my sprite character as she stays on every other type of mesh
Just procedural mesh. I made a code to generate the block
Yeah, a Character object type usually has a Collision Capsule that helps handle this
Treat "complex as simple" for the box?
For the scrollbox issue and input key select, i turned off scrollwheel consume on the scrollbox (so I have to drag the bar to scroll), but the input widget still doesn't get mouse wheel scroll as input 🤔
I was thinking you change the Visibility
There's an option called Not Hit Testable
Which should ignore the cursor if it is over top
thanks for the help, I can't get the mouse wheel spin captured (just click) by the input widget, and I think I'm just going to cut my losses and make it a togle option to use mousewheel or not in the menu... the show must go on
okay so why the hell isnt delay showing the timer countdown. This makes no sense. The upgrade in 4.26.0 had this and now 4.26.1 its no longer there. Everything compiles just fine. Was this intentional for UE4 to do this now? -_-
how can a spline have an "on component begin overlap" event if it doesn't feature any kind of collision?
Hello! I have some questions on how to tackle a first person turn in place system. Here is a link to my reddit post: https://www.reddit.com/r/unrealengine/comments/lc6avk/first_person_turn_in_place_questions_w_video/
You need 2 yaws, upper and lower body. Mouse drives upper. When walking, lower = upper.
Otherwise, if lower-upper is too big (90 degrees?) Play some anim that shuffles the feet while lerping lower to upper
Thanks for the reply! How would I set the yaws for upper and lower body?
I understand setting a yaw for the mesh rotation, but how would I get the two different ones for one mesh?
There's a million ways to do it but fundamentally you need to keep track of 2 yaws
1 might be the capsule/mesh/root bone already
Depends on how your skeleton is set up. What's after root?
Show the heirarchy
one min..
I'm using a mixamo model
if you want to see the rest ill take another screenshot
So where's the legs, what's the last common parent of the legs?
Alright so you're gonna have to drive hips by the rotation delta and spine by the opposite. So if the difference between loweryaw and upperyaw is 30, rotate hips by 30 and Spine by -30
There's nice smoother ways to do it like layered blends etc but they're so quick and dirty get it to actually work and let you understand the concept. there's a million videos on it if you want a step-by-step
random question but is anyone else getting tooltips in the blueprint editor showing up, flickering, then going invisible? Or like if you're typing in a new blueprint to add? I've tried to run verify but it doesn't seem to fix it
does anyone know how to get a newline in a text field thats part of a structure/datatable? shift + enter doesn't work -.-
I don't suppose a \n would work 😅
doesn't, tried that
and i can't even use replace node in text, so i would have to convert it to string and then back to text if i want to manually replace it 😦
just wonder if theres any way around that
Hello everyone !!! I’m my game ( third person template ) I control using impulse my character that has been ragdolled. You’ll know here they the ragdoll is in fact the mesh so the capsule doesn’t follow the rsgdoll. I am trying to make so when the ragdoll touches a trigger box, it will teleport the ragdoll to coordinates. I used some things that worked for another project but the player wasn’t ragdolled and the fact is that it doesn’t work in this project. How can I make this work ? I don’t find any clue on google unfortunately
Here is how it looks
« lesolcdlalavemdr » is the trigger box
And in dest location I putted an actor instead of coordinates but yeah you get it it doesn’t work even if i change it
So the teleport doesn't work?
Does your mesh have collision enabled
I think or it would go through walls doesn’t it ?
Well it doesn’t go through them
So yeah
Is the blueprint correct ?
Or do I refer the wrong thing
I think you need to cast to the player character
I don’t understand
Casting is way to select a subtype that is part of a class or struct
I also made one in a moment try to adapt this in yours.
Okay
You don't have to cast anything, does the overlap event actually fire?
Since my computer is closed right now it’s really hard to follow
- I’m a newbie so it’s harder
^^
I’m screening solutions to work on it tomorrow
Yeah no casting.
@teal spade like a Bear is ..a bear, and a bear is also an animal, sometime you dont care about the bear features and just nead info about the animal part