#blueprint
402296 messages ยท Page 576 of 403
This is how you would switch https://docs.unrealengine.com/en-US/Gameplay/HowTo/PossessPawns/Blueprints/index.html
Illustrates using the Possess node in Blueprints to switch between and control multiple characters.
but not sure if the following would continue
Thank you @bright frigate that is quite interesting. Probably will use it in the future.
However I do not want to possess the second_ch only to switch positions for now.
Can instanced meshes be attached to bones?
Hmm. I am trying to do a foreachloop for two arrays and I thought having a second one in the loop body would do the trick. However it runs the values in the array of the first loop then goes onto the second loop and then there is a mismatch of data between the arrays. So I put two arrays into a struct..and it doesnt work this way
Can someone help me out on how to iterate from one array to another array one after the other so they are in sync
@oblique jacinth not really. I mean if you want it to update every frame then it needs to be run on a "ticked" event, whether that's Event Tick or a Timeline. If Event Tick is too expensive (for animation in general), then the alternatives are adjusting the tick rate to something less than the framerate, or running it on a looping timer, or figuring out how to do the animation as a vertex shader (material graph) or as a Niagara particle system.
@mental robin What is the goal of the loops?
@tight schooner Sorry for the late response, but thanks for the answer!
I'm using the Find Look at Rotation node, but how can I use the value to add, let's say, 20 degrees to the x or y rotation depending on where the objects are in relation to each other?
@last jetty like you want to clamp the amount of relative rotation? I'm not sure offhand, but if there is a clamp rotation node, then I guess you can use that by feeding it a rotation relative to whatever.
@tight schooner Sorry, I'm still new at this. To be more explicit, I want to make it so that when my character is next to a cube, the camera tilts a little bit away from the cube, but I need to make sure that it tilts away in the correct direction regardless of which side of the cube the player comes at
@fresh bear still stuck? I thought of another way
@unkempt musk Yes still. Tell me!
@unkempt musk Thank you ! will try this now and let you know.
P.S. The game is in a 2D format with 3D background. I don't know if this plays and role.
for a swap like this, it shouldn't matter
@unkempt musk also the custom event is not connected to any node ! Or it doesn't matter ?
You can plug in the input directly or use a custom event. Either works. I just make a custom to make the examples easier to read
@last jetty ngl it's kind of a puzzle. I noodled out an idea. Maybe it works. Maybe I'm wrong. I'm assuming it's a third-person camera. The key is to have your camera attached to a plain old "scene component", and the camera itself has a relative location/rotation of zero. That allows you to rotate the camera relative to the scene component it's resting on.
Maybe an InvertRotator node needs to be involved if looks toward the cube, or maybe you can just swap the Delta Rotator A & B
I'm also assuming that the "cube" is just a point in space for all intents and purposes
You want to have a camera that isn't attached to a player, but a scene component? What effect are you going for?
I mean, it's a scene component attached to a player. I took @last jetty's description to mean he wants a third person camera to swivel +/- 20 deg. based on some condition.
The scene component (a simple dummy transform) gives it one layer of abstraction
so you can rotate the camera relative to some baseline rotation
I appreciate the answer! I'm still wrapping my head around how to implement this properly, but I'm hopefully getting there
You want the camera to look away if you try looking at this box?
I want the camera to tilt away when the player is next to the box. Similar maybe to how characters tilt away from walls in stealth games
It's a first person camera, if that matters
@tight schooner I've implemented it like this, but not gotten any results sadly.
@unkempt musk Still the same issue. The main_ch is teleporting to the position of the second_ch but not the opposite. No position swamping is taking place. At this point I am out of ideas !๐ค
How do I create an event with one of those execution pins in UE 4.25?
I'm just getting one of these instead now
Not sure if it's a version thing or just a "different blueprint context" thing, or whatever
@last jetty looks like you're only applying it to X (roll) and not pitch or yaw. I don't think Find Look At Rotation produces roll.
In my example, I excluded roll
@tight schooner Oh I see, my bad. I think I didn't explain my goal well. I've realised that the issue may actually be simpler. The cube will essentially always be on the player's left side, so I can simply set the relative x roll to 20. However, it seems that the camera doesn't roll unless I disable 'Use Pawn Control Rotation' on the camera, which disables z pitch being controlled by the mouse
Oh ok
I haven't made a mouse driven first person game so I don't know much about that
That's fine, you've been really helpful anyway!
Maybe you can use the mouse to drive rotation on the scene component
@fresh bear maybe try swaping places with another actor/character. I'd check the settings of the 2nd character, or print the variables to screen and check those. I'm not sure of anything that overrides a SetActorLocation.
is there a tab open that hasn't been compiled yet?
Hey gang, sorry for the wall of text. Currently, I am trying to see if I can make a Half Life style surfing movement mechanic, and I already have a Physics based Sliding that takes into account the slope of the floor you are sliding on, but I have run into two problems. First, I am trying to compare the floor normal to the character's right vector to get an angle of how closely the character is 'moving into' the slope when holding down the right/left movement button. Strafing directly into the direciton of the slope should result in a value of 0, and facing either directly towards or away from the slope should result in a value of 90 (before the Map Ranged node). Currently, I can't seem to get this part to work properly, even though I am trying to only compare the X and Y values (by making it become 2D). After that, I am using that value to lerp between the regular Physics Sliding "Floor Influence" vector and the Actor Forward Vector. I turned them both into rotators because I thought that would make them easier to lerp between (and makes it easier to test/see when connected to an arrow I attached in front of my character) but it seems like the rotation (and resulting test arrow direction) has a tendency to flip/flp directions based on how far one way or the other my character rotates. Should I not have converted them into rotators? Or is it something else I am not understanding?
@unkempt musk Much appriciated. I compile every time before play . The second_ch is a duplicate of the first. I don't know if this effects anything.
@unkempt musk Tried with an object. I doesn't work either. I just teleport on the sphere !
P.S. Sorry for bothering you !
It's acting like it's not getting the initial location, but that's the first in the chain
If you disconnect your Main_CH setlocation, does the 2nd character move to the main?
any AI folks here? cuz #gameplay-ai is dead.. How can I get current age of stimulus that was sensed by AI Perception?
In this presentation, Epic's Paulo Souza uses Unreal Engine's built-in AI features to build smart enemy behaviors for a game with stealth-like mechanics.
By relying on the Gameplay Framework in Unreal, we're able to quickly create convincing AI using Behavior Trees. Behavior Trees are great for creating complex AI that can be presented in a way...
It might be around on what you are looking for. @teal nexus
nah, it's not - I watched that training session ๐
I actually just figured it out, so it's not a problem any longer
@unkempt musk I did that and only the main_ch moves to the position of the 2nd !!!
It shouldn't move at all if it's disconnected.
Hey does somebody know how to have a physically simulated asset (a gun with pieces that move around) attached to a character? I've basically just - spawnactor - attach actor to component socket - and that works great. I just can't get the thing to physically simulate. I've tried set all bodies simulate physics below, but that doesn't seem to work.... ๐ฆ I can't set my weapon to a physics asset & simulate physics, and also have it snap to socket.... its either, attach to socket, or simulate physics, not both at the same time. If someone could help me I would be forever indebted to your insight!
I test it again now it doesn't do anything as I removed the connector with space. But when I press W the main_ch jumps and also when I press space !
The event is in the Open Level Blueprint.
Too may hours awake. A solution must be found.
Let me know if this becomes annoying for you.
@unkempt musk
Hey I am trying to find info on calling an event and having the UI respond. I see the event in my weapon blueprint, but I can't seem to figure out how to call something in the UI, or having the UI register for that event.
@burnt tundra Is this something like an ammo counter, or?
@unkempt musk how did you make the straight lines?
@sour radish it's called secondary animation in general. And in UE4 specifically, you can use animphysics:
https://docs.unrealengine.com/en-US/Engine/Animation/NodeReference/SkeletalControls/AnimDynamics/index.html
Describes how AnimDynamics can be used to provide physically based secondary animation.
@sour radish I hope that would help you
oh dude @random hill lilkrit!!!
@sour radish name so nice, you gotta say it twice ๐
just giving back the knowledge I once got from an experienced game dev.
dude @random hill you just saved me so much dude
when you tell that story, you can mention that I was doing a hero pose ๐
Hero pose? You got it
Huh. Didn't actually realize that was that easy thought animations. I'd have went through the hassle of making it an actor as a second mesh and just making it simulate physics with a constraint.
@maiden wadi I am trying to update the total amount of ammo after you reload
I know via cpp when that occurs, I m just trying to associate the event to a UI call. I Think I got it. will report back otherwisse
I'd probably just make that a delegate that the UI can bind an event to. Makes it easy to call from the weapon even in C++
@burnt tundra one way is to have a listener in the UI. And another is to bind some value to the player / gun. (Assuming you only need the number of bullets)
@random hill is there any example or docs on that? I come from unity so im use to broadcasting events and handling it all in code
@burnt tundra I can make one for you lol.
@burnt tundra but for me it's very late. So I will make a very simple one and if that doesn't work, I can help more in the morning
yea sure. i have a little work to do in the am. but i'll be sure to ping you if things dont work out
ha. fair enough. its 2200 now
dang lilkrit is so nice
So this is the simple way (imo)
You have your bars in the UI
You can create a binding here
yep
Ok. I think that's the simpler method, it will work pretty much straight of the box
later on try not to use binds in general
they are a huge performance killer
much more expensive than a traditional tick
ok, i dont want to bind to this, rather when I the event 'reload' occurs
@burnt tundra ok, one moment.
^^ yep
if your health is always 100 you dont want to update that 60 times in one second
a lot of tutorials will show you to use binds, but their goal is to make a "working system" despite showing bad practices
yea the more googling has shown me that @white crypt
Im not too familiar with the call reloading dispatch
when i told this to my friend, he got like a 10fps increase
I have the red part, as I created that in cpp
@burnt tundra Does the UI have access to the weapon?
yes
Just create an event dispatcher in the weapon, bind that in the UI once to a custom event, and let the weapon call the dispatcher after reload to update the UI.
Then on the custom event, update the UI.
ok, i figure this was it
but i wasn't too sure in how to phrase this in google
@burnt tundra should be done.
Don't do that on construct though. Use Init, that or make sure you unbind it. Otherwise you'll end up with multiple binds if that widget ever gets taken out and readded to the screen.
@maiden wadi I could either give not a perfect example now or let him wait 8 hours until I wake up
Haha, fair.
I chose to help him now even if it's not perfect
I even specifically said that before sending any graphs lol
The thing is, this should work. And he can find more once he gets this
yea
@maiden wadi what do you mean by Init btw?
thanks guys, i think i can get stuff working. when my game is at a point to optimize, i will do it then lol
@burnt tundra that's a very good attitude. Premature optimization is the root of all evil
I think it's OnInitialized or something. I don't use it because I have my own C++ UserWidget with my own events I call manually for my widgets. But it basically runs once when the widget is created, good for bindings and such. Construct will get ran every time it's added to the screen as well.
first you make it work, then you make it work properly and then you make it work fast
@maiden wadi shouldn't that mean that it only runs once for things like healthbar though?
yea, ive been a jr programmer before lol. I haven't written cpp in several years, and im interviewing for places that use unreal...
You only want the binding to run once.
Yeah... and I only create that widget once
I don't add my widget every frame
I add it once along with the player. So that should be one binding
anyway. Sleepy time.
๐ค
am i doing this wrong or is this suppose to happen
Not sure what you mean? What's wrong? Or what are you expecting to happen?
im expecting it not to spawn so closely together with a box that big
maybe spawn right side left middle left and not rape the middle of the box
Is it always spawning in the middle?
well a little around the middle
What does your BoxExtents say if you print it out?
Okay. But what does the BoxExtents print out if you print it?
You won't get a location outside of that times two around the Box location.
So if you want more locations, you need a bigger box.
thx
Does anyone offhand know how you'd get a reference to objects that have been attached to other objects via the editor?
This is not spawned in, rather attached via the editor
and I can't find any function calls that say "Hey, here's what this actor is"
If you have a reference to the rail, you can get a list of actors that are attached to it.
Top one.
aye, I'd expect that one to work, but if I plug in the length of the array into a print, it prints out 0
I'm fairly certain that should work, let me doubt check.
Prints fine. I attached two static mesh actors to a blueprint I have in level. I only have one so I got it's reference with GetActorOfClass and printed the length of the GetAttachedActors.
Prints 2.
Interesting
I wonder if this is since it's being done on construction?
Feels like that shouldn't matter.
It's possible.
Nah. Just put the same thing in the construction script and it works.
Intersting!
I put it in an editor function, and it works just fine, but purely in construction script breaks
wonder if I call the function from the construction script, if that wll work...
Hah, that breaks.
Hey folks, whats the best way to override variables in child blueprints?
I have access to the variables from the parent in the event graph, but if I set them before the call to Parent: Beginplay, the override seems to be ignored.
Actually, turns out that does work. In case anyone's interested, easiest way is to unhide the inherited variables by ticking the secret box hidden under the eye in details, and just setting it there.
How did yyou guys learn BP?
yeah that's the way ๐
Started by downloading the editor, then following some tutorials on youtube (turning lights on and off, opening doores etc), and then started messing about from there.
Thanks. Do you think I so
should learn BP or c++ first?
I'd advise to start with BP
learn BP. In UE4, it's kind of the "front end" for C++ functions and classes
Okay thanks so much :) I will start with tutorials
Good luck!
Thank you!
I've hit a breakpoint in my blueprint. How can I see the parameters and local variables and such?
Print em out ?`'
You can hover over the nodes inside your event graph. If it's not doing anything, select the instance of the blueprint in the dropdown menu at the top.
@rapid robin ok, thanks
I have an RPC here on a blueprint and it says Replicated to Server (if owning client). That doesn not seem to be replicated to the server so it's not owned by the client? How do I set ownership?
this doesn't seem to be it
Is the OwnerReference a player controller or a player's Pawn?
the controller
Is this event inside of the controller class?
You're spawning another AI from inside of a unit?
oh, that's what you mean.. no. the player controller has an event on keypress that calls spawn on the server. that works. then I have a right click event in the controller that calls move on that unit (which should be on the server)
and which is on the server but doesn't get called, I presume because of ownership
when I print both the actual owner and self inside the mouse event, actual owner is bp_playerController but self is empty?
Does anybody know any good tutorials for blueprints? like a beginner game lol
But the ClientRequestSpawnUnit, what class is that in specifically, that's in the controller class?
I wonder if that actually works. Never tried setting owner from a networked pointer. Since that's in the controller, you can also ditch the OwnerReference argument and just use Self.
yes, that's what I did just now
hm, now it seems to be the correct owner but execOrderMove still is not being called on the server
How are you calling it?
Looks fine. Is BPUnit set to replicate?
I have checked "Replicates" in the class defaults
and I can see it on the client so it should, yes
What is that event in the UnitBP doing?
Guys, i'm profiling my project with stat startfile and Session Frontend. I see a lot of time wastes for "self" in functions. Does anybody know, what is this? Is it a function call itself?
@olive sedge If you print on that event, does it say Client or Server, or nothing at all? It shouldn't print client, and if it's printing nothing at all, your client doesn't own the unit for some reason.
I have a breakpoint and a print for good measure on execOrderMove on the server but it's not hitting
so yes, I think my client doesn't own it
since spawn is actually called on the server, the server owns it, I think
Nah. You always spawn replicated actors on the server and set owner like you're doing, to the server version of the client's controller or Pawn usually.
How many things do you have going on right now?
What do you mean?
Just in general, are the units your only networking at the moment?
yes
How many are there?
I spawn one unit by keypress, select it and then order move
just trying to get the fundamentals down before I scale up
@maiden wadi when I print the owner immediately after spawn, it's owned by the AIController
maybe I need to call the ai controller and that needs to replicate to the server
Hmm, that's a fair point. I didn't consider the ai controller possessing it.
I normally don't bother setting the AIPawns owners. I use IDs on them to set up their look/owner and allow movement based on whether the server version of the controller's ID matches the one on the pawns. Then all my movement RPCs and such are sent through the controller itself to the server, then called on pawns once on the server.
I had that at first.. my own owner checks
but it doesn't even replicate to the server so..
I mean I don't do RPCs at all in the units themselves. Pretty much everything is routed through the controller when it comes to client/server.
hm ok
give me a second
SimpleMove failed for bp_PlayerController_C_0: movement not allowed :/
oh, wait.
that would call move on the controller
ok, this works
thanks, @maiden wadi !
That works? O.o
Oh, I was like "LOL Wtf, you can use a player controller as an AI controller??"
Ah, yeah. I more or less do the same thing but with an array of units input, and then on the controller it'll forloop over them and call each unit's move individually from inside of the unit. Which in my case actually sets a blackboard value for movement, but pretty much the same thing.
that for loop is in the mouse event for me
I'd consider moving that over to the server side just for networking considerations. One RPC with a semi large input is better than a bunch of small ones with smaller inputs.
Also. Before you run into the problem, you'll probably want to up the engine's throttling. It's 10,000 bits by default. If you go to your project folder, and open up the Config folder, then the DefaultEngine.ini, add this to the bottom of it.
ConfiguredInternetSpeed=1000000
ConfiguredLanSpeed=1000000
[/Script/OnlineSubsystemUtils.IpNetDriver]
MaxClientRate=1000000
MaxInternetClientRate=1000000```
sounds like you just dropped a gem, thanks ๐
10,000 bits per second is pretty brutal to work with in modern games. Note that's like less than a fifth of a dial up connection. Ran into that messing with some gatherable foliage.
right
I'm back at the owner check. Can I get the ID of the calling player on the server without explicitly sending it? That sounds so easy to tamper with
getPlayerControllerId on the server gives me -1 as expected
How do I make mouse position updates without event tick?
If you want to do it via IDs, you'll have to set that when you spawn the unit. Mine is just numbers, but you could probably get crazy with it with like Enums or whatever. In short, the controller gets an ID first. Whenever a unit is spawned, the controller for it is used to get it's ID and set the same ID on the unit. Then you just send the units through the server RPC. Once on the server, you can send the controller ID through the event call to move the units and only do it if the controller ID == the unit's ID. It's tamper proof because nothing can be messed with on the client. You don't even have to replicate these IDs, it all exists on the server.
Once on the server, you can send the controller ID through the event call to move the unit -> this is what I'm trying to do but the controller ID on the server is -1, not the client ID
so the question is: how do you get the player controller id of the calling client on the server
I mean.. I could just send it but flipping that byte seems like such an easy hack
all of a sudden you control my units
I would think what if the socket had an ID I can check or something
Nah. Just a sec, I'll show you.
ok
@olive sedge Stepped away for a minute. But in short, you start on GameMode. Players logging in.
Hmm. I just realized I'm not sure how to do that in blueprint. Playerstate has an ID that it gets from the OnlineSubsystem to differentiate players based on their login to that subsystem, like SteamIDs basically.
I think you can use it in Blueprint, but anyhow.
Something akin to this in the end.
Here the client is getting it's own selected units and sending the list of them and the clicked location through to the server. Note no IDs, just the pointers to replicated actors.
with you so far
now on the server in move units, how do you get the player state? it expects a pawn as far as I can see
Server's function ends up doing this.
You just use the ID you've already put into the controller when the player joined.
If you spawned the unit in the same controller for instance, you'd do this when spawning it.
Otherwise you need a reference to the owning controller to get their ID somehow, however you set it up.
Then in the pawn, it's just a simple == check.
Does the controller ID match the same one you set? All ran on server. Client has zero access to the ID variables.
In fact, if client even tries printing them, it should come up Zero.
Note, there's a small issue here with testing. You might want to set up a small system of your own to assign IDs for testing, because I think testing on the same machine will return the same IDs for every controller if you're testing with steam installed, not sure about the Null subsystem.
Just like.. increment an integer or something in the game mode on PostLogin.
Anyone here use GameplayTags? Any particular thoughts on using them?
You will run into them when using #gameplay-ability-system
Other than that, we use them as identifiers
@maiden wadi that's a beautiful solution, thanks!
hi all very nrew to unreal
i have a human with diffrent fbx animation i can get 1 to play at a time but how do i play them 1 after another
Hey guys, wondering if anyone can help, anyone know a way to use the download image node and convert it from texture2d dynamic to just texture2d?
How do you build the server executable in a multiplayer game? I only find pretty convoluted tutorials where you have to muddle code
To package a dedicated server you have to use some small C++ to set it up, and also work from a source engine build.
Yes
ok, thanks
Hey guys how can I do it so when I drag a blueprint in, I have an array of empty actors that can be used as locations? So i can add as many as I want and move them about?
Hi @worn nebula , you could create a new blueprint, then add a variable that is an array of Vectors, then make that variable public. Drag blueprint into your map, then you can manually add to teh elements in the instance and set their location.
Does anyone know how to test in C++ if a widget variable has been filled in? I have a Texture2D variable that I can set in my blueprint, but when I test in C++ if it's been set, it always is, like an empty texture or something.
anyone have experience with camera shake and first-person weapons - we're seeing the camera shake around but the weapon models stays in a fixed location so you end up seeing all sorts of backfaces and so on, the weapon is parented to the camera, is there something else needed to unify the motion?
Thanks @rapid robin this is basically what I want but all these locations would take a while, is there not a faster way of doing this by spawning actors and placing them where I want them to spawn?
Sure, if you know where you want them to spawn relative to the bp position, you could set an array up in advance, then in the construction script (or begin play), grab that array of locations and plug that into a ForEach loop. On each iteration you spawn an actor in the location you want it to be. Something like that?
That's exactly what I'll want to do, after i've got there locations haha! So I've quickly dragged in two empty actors, to show how I mean, so I want to be able to have an array of empty actors and each time i add to an array it's a new empty actor, and each of them will be used as locations. Sorry, it's a bit confusion to describe haha
So the empty actors are actually apart of the original bp, in an array
Not sure if I understand exactly, but if you want to have an array of all the actors you've placed in your map, you could just call a GetAllActorsOfClass, and that node will spit out an array containing a reference to each of those actors. You can then cycle through that array and grab the (world) location of each. That any good?
@worn nebula if not, it'd be a good exercise to list the exact steps you want your logic to do.
@topaz rune You're sure you're creating the blueprint version?
Yeah not a bad idea... and yeah sorry, I really struggled to describe it haha!
@maiden wadi I have this in my header:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Variables")
UTexture2D* ItemImage;
and this in the blueprint:
all I'm trying to do is detect whether ItemImage has been set with an actual image/texture, but even when it's empty in the blueprint, it always seems to be set
I debugged and checked, and at runtime when my check in Initialize occurs, the value of ItemImage is an actual Texture2D
How are you testing if ItemImage is valid?
If it's set to none, it should definitely not be valid.
Try if (isValid(ItemImage))
I think that works on UTexture2D
aha that did it, thanks so much. been banging my head on this idiotic thing for ages
Haha. All good. Try to stick with If (ItemImage) or if (isValid(ItemImage)) most times. First is usually good unless you need to know if the object is set to be destroyed.
I don't think == NULL works. Then again if (ItemImage) should be the same as if (ItemImage == nullptr)
yeah, it's hard to know with the lack of documentation and out of date examples
@deep elbow As far as I know. Camera shake is entirely cosmetic. I'm not even sure if the camera's own center point moves during it. If you want a camera shake based on like weapon recoil, a lot of people do the major offset aim kick on the camera itself, and mix in the tiny little jitters with the "Camera shake".
@topaz rune Haha, I feel you. Then again I learned C++ just a few months ago through UE4 so I have no experience beyond the tall walls of the confines.
Been pretty easy learning once I got past pointers though.
๐
Hi guys, anyone that knows navmeshes? Im new to them in UE4 and cant figure out why it dosent generate on the stairs
There's max slope setting in that picture, have you experimented with higher values?
Step height might be too. I haven't really delved into it so just guessing here ๐
Oki, gonna try tweeking them ๐
Anyone know why retainerbox is forcing the image inside it to be the same width as the retainerbox? I can't seem to override it in c++ or in blueprints. it ignores a size box too
check the clipping option
just worked out it was the horizontal alignment on the image set to fill ๐
good to hear, it was my only suggestion since im not really sure how the retainer box would behave
but in one case for me it was the clipping option
I'll remember that, thanks
Hello guys, it concerns both cpp and blueprint, is it possible to make a custom c++ inherited blueprint class automatically overriding parent class functions when I create it?
That's especially the case when creating any blueprint class for the native BeginPlay, Tick, and ActorBeginOverlap functions. But I'd like it to happen for custom C++ functions
@gentle summit just to be clear, you want to override parent functions inside children?
Yes, but what I want it to happend whenever I create the Blueprint class, like an automatic process
oh okey, i could only show you a method in blueprints and a manual one :<
sorry cant really help you then
better hope that Authaer stumbles upon this ๐
Who's Authaer? You make it sound like the magical priest of the chan haha
maybe he is, who knows :D. you will see him plenty here, helping people and what not
but hes playing overwatch so try to catch him when hes free
Hey, I'm trying to get one static mesh in the array Random Actors to spawn in each of the locations in Spawn Locations, but they're all spawning on the last location, how can I do it so one spawns at each?
@worn nebula "length - 1" needs to go into max, and then set min to 0. You could also use "last index" node instead of "length - 1".
Also, if you want one to spawn at each location, then do you really want to use random?
Or do you want it to choose randomly, but still only spawn one per location?
Ah yeah, always the small things you miss. That's a good point, not 100% sure on how to set it up otherwise, I want it to choose a random mesh which I already have set up, but i guess it doesn't have to be a random location just as long as there's one at each
To keep it random, you can save the index generated for the location, and then remove that index after it spawns the actor, then it can never use that same location again.
Erh sorry I'm not to sure how I'd go about doing that... the random part really isn't the issue as it doesn't need to be, the main thing I need is it only spawning one at each location. I think that'd be the done the same way you just suggested anyway
Well, if you use random in location, there is still the chance it chooses the same location more than once.
Also, looks like this is the simpler way to choose random element from array:
I'll bring up my editor and give you a quick screenshot of how to keep it random, but also make sure only one is spawned per location.
That'd be great thank you!
hello guys, I would like (if possible) to load all the assets used in game (heavy textures) before starting the level. I don't know what to type on google to document myself. can you redirect me somewhere?
@worn nebula It will look something like this:
@dim robin You can load level, but have it instantly bring up a loading screen. There are most likely other ways to do this too and probably better ones, but that is the first thing I think of.
How can I get the player camera manager from a character ref? There is a GetPlayerCamera node but it takes a player index
@fair sun multiplayer?
player controller has the camera manager
yup
So get controller -> cast to player controller -> get player camera manager
Thanks
@proud hull thank you for going through that, I think I'm almost there, I still have some meshes spawning on top of each other. Could it be my for loop? When I remove that I don't get them on top of each other but then they're not on all the locations
Also realised my for loop needs to go through the branch when it isn't, I changed that and it still overlaps
length > 0 not random int > 0
That won't solve the problem though
The branch is to prevent it from running if all locations have been removed.
What locations do you have saved in the array?
Ok, I think I see what you want now. You probably don't need to do the random for location. You want every location in the array filled with random actor?
@unkempt musk Didn't seem to work either, thanks anyway! @proud hull Yes that's correct, just one random actor at each location
as simple as that...?
Anytime you want to iterate the entire array, you for each loop it.
I thought you had more locations than you were iterating, hehe.
More locations will be added but always the same concept
Assumed you had a huge lot of locations and actors and choosing only to spawn a few of them
I've still got them overlapping ๐
But anyways, that last screenshot should work well for you.
Adjust the collision handling in the spawn node.
Your locations are too close to each other if they overlap.
I mean like sitting on top of each other
How much overlap are we talking? Can you take a screen shot?
I clearly saw you put separate locations in that array. Should spawn them at those exact locations.
The left most statue is them overlapping
you can see the different textures
So yeah they're spawning at the correct locations, but more then one at each location
Sorry for being such a pain guys, i appreciate the help ๐คฆโโ๏ธ
There are 4 statues and only 3 locations though. Only 3 should spawn
They should make an "L" shape, like they do.
Looks like that left most statue is being spawned by something else other than what we just setup.
So what happens if I have more locations then statues, cause that's what I'll have eventually
It'll pick a random actor and spawn it
You can have as many locations and actors as you want.
Yeah that's what I thought, I didn't know if it was cycling round more then it should
The current code just makes sure every location is filled by a random actor.
Add a print string to the for each loop, after the spawn actor, and see how many times it prints.
Oh, holy crap, lol
I'm so dumb
You have that in your mesh bp
Yeah, lol, every time a mesh was spawned it triggered it to go again.
your code works perfectly, thank you so much for the help!
You will want that on begin play of your level blueprint though.
Yeah I've got an idea on how to get them spawning, this is for testing purposes at the moment
If it is meant to only spawn the statues in that level, it needs to be on level blueprint.
Currently, the statues will spawn each other, lol.
Put 10 statues in game, it will run that 10 times, making 30 more statues.
Then you have 40 in the end, haha
Yeah I know, and hahaha yeah i realised far to late, i forgot I dragged more than one in
hey there ๐ i have a question to you can i use a blueprint struct to store other blueprints in it like im having a few meshes that are the almost the same in the model but have different functions in the begin play . I want to be able to make like an omni blueprint and basically allwoing the player to choose the mesh for the omni blueprint and also if he chooses i need also the corresponding blueprint begin play event is this achievable ?
@obsidian pelican Are you thinking of a construction menu and being able to choose which to spawn?
Hey, my spline mesh component's mouse events aren't working, more specifically, mouse over and mouse click. They do not work at all.
what's the preferred way to handle mouse movements and clicks. Should this be done in the camera or in the player controller
and if those events handle the camera, how do I get the camera from within the controller?
controller handles controls
or rather, input
the camera just has to react to those controls
ok
@olive sedge Normally you have your camera on your Pawn, which you can access from the controller either via GetControlledPawn, or GetPlayerPawn0. Both will return the same object from a controller
I made a simple timer
but I'm 100% sure this is not the way I must do so
any tips on making it better?
burn it with fire, then use SetTimerByEvent node
the big brain play is using the SetDefaultPlayerFor override in game mode and spawn the PC itself with immediate hookin from controller
then use that as a variable
@maiden wadi alright, thank you
IDK how to use it ;_;
I'm not even sure what that means? PC usually means PlayerController. And I'm not seeing SetDefault anything in GameModeBase even in C++?
put the node in
pull from red square
type in "Custom event"
and you'll probably figure out the rest
it isnt working...
the timer is called but now it's endless (even when my "timer" int is <1)
@last walrus Delegates gave me a bit of trouble for a while too. This will do exactly what your current timer is doing at the moment.
but where do you call for "timer body"?
Follow the lines from the TimerStart. SetTimerByEvent is called, it takes the TimerBody function as an argument. So when it's timer finishes, it'll call TimerBody, or whatever event is connected to the red line.
So in this case, TimerStart calls the SetTimerByEvent, that starts the three second timer. After three seconds TimerBody is called, evaluates whether it should run again and if it should it calls TimerStart, and also does the print.
for some reason it calls timer 5 times in one tick and then does it's thing
(oh sorry forgot to remove execute)
Hi y'all, I'm rather new to unreal engine and have been working on some blueprints, mostly just following tutorials and trying my best to figure things out. I've ran into a re-occurring error and have no idea how to fix it. This is the error.
Blueprint Runtime Error: "Accessed None trying to read property CallFunc_Array_Get_Item". Blueprint: AI_Character_BP Function: Execute Ubergraph AI Character BP Graph: EventGraph Node: Set Visibility
And here's the problem child it links me to when I click to figure out what the issue is.
@last walrus Not sure what's happening there, but that's definitely not normal behavior.
@honest void Don't switch execution flow variables like that. If another execution flow needs a variable, try to save it in a variable and let the other execution line get that variable. You'll often find they won't be valid.
I already got it
Hah, I appreciate the help but that doesn't mean much to me. I've been working with blueprints for two days now so uh, I'm not sure what you're actually referring to, if you could elaborate in laymen's terms I'd appreciate that ๐
I wouldn't use the Array Element output of a ForEachLoop anywhere outside of the loop body
@honest void Your white lines are execution lines. This means that the flow of logic starts there. In this case, you cannot always promise that the bottom execution line that is running to the for loop is going to make that blue line running up to the node you circled a valid line.
Okay that is a lot more understandable, thank you! Now the question is what I could do to fix that.
Copy paste the same variable into the top flow instead of having it swapped out from the bottom?
It really depends on the moment. For simplicity I'd say just get it the same way you're doing it on the bottom line. Other times, you may want to save it as a variable and make sure the bottom line runs first, then use the variable elsewhere.
I think you can make an array variable from bottom lines and get it when you need to do smth with it in upper lines
I don't get the error every time I run a test either, whenever I play and end a test there seems to be a chance it'll give me a runtime error
However this here seems to have fixed it
That's what I understood from Authaer, could be wrong that I misunderstood what was being said but it hasn't popped an error yet.
Hi, does some one know how to exit a replay mode without reloading the level? (BP, console or C++)
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/
I had read when working with level streaming to use the "full path" for level name: https://docs.unrealengine.com/en-US/BuildingWorlds/LevelStreaming/HowTo/StreamWithBlueprints/index.html
How to stream levels with a custom streaming Actor created with Blueprints
What is a full path relative to the content browser going to look like?
in windows explorer I have Content/Maps/MyMap.umap
is the full path /Game/Maps/MyMap.umap ?
I have an array of meshes going into this spawn actor, how can i get it so they all get destroyed at the destroy actor instead of just the last on that spawned?
@worn nebula if it's a fixed time (2s?) then you can Set Lifespan on those actors. Otherwise you'll have to save the "Return Value" pin on that spawn node to a new array โ that's a reference to your spawned actor. When you're ready to destroy all of your spawned actors, then do a Reverse For Each Loop on your array of spawned actor references and call Destroy on each.
In that way, your spawning actor acts as a sort of manager
It is a fixed time but I need the collisions of them to still be there (i've changed it from destroy actor to actor hidden in game) :/ but that other way sounds good! I'll give it a go, thanks!
I get the sense you're doing a mesh particle effect as a blueprint... Sometime soon you might want to look into Niagara :)
Actually no, Niagara looks amazing and way to technical for me haha, but i'm working on a game that has a polaroid camera, and each time there's a flash you see something, but only while it's flash, but they need the collisions there as it's a maze type thing!
Oh ok
The return pin turns into a make array when i save it into a new array, will that still have all actors in it?
Make the (empty) array variable first of actor object references
Put the array variable on the graph and connect it to an Add Array node
And then you can add the output of each actor you spawn to your array
Then the array variable becomes a useful registry of the actors you've spawned
If you "make array" and set the array, you'll end up clearing the array
Ah okay i'm almost there, how would I connect the integer node to the reverse for loop? add it into a new integer variable?
First of all don't put a delay in the loop body โ it won't work
Delay, then plug Spawned Actors into the Reverse For Each Loop
Then in the loop body, Destroy
Legend, that's done it!! Nice one, thank you!
Arrays confused the heck out of me
There should be like a level system where people can give you a point if you help them out or something
go up the ranks
Does anyone know how to modify an existing option in a combobox with blueprints? (Not Add or Remove, Just modify and keep the same index) Add and removing options screws up my index.
@void oak Easiest way to do that might be just to clear the options, and readd them with the one changed.
@maiden wadi Ok Thanks i will try to get that going =), one would think Unreal would have a "modify option at index" function.
@void oak Do you want to change it by index, or by the existing option?
By index. It inorganizes the options.
Messy, but this?
@void oak One for by Option too, just for good measure.
Not entirely sure if they work. Logic looked sound. ๐คทโโ๏ธ
@maiden wadi Thanks so much ๐ I didnt think anyone would make the code for me. Your the best.
ill let you know if it works
Haha. I'm waiting for 4.26 to download. And to be fair I might just convert those to C++ and throw them in a library.
@maiden wadi cheers for info
@void oak Oh. Whoops. One thing I messed up. Probably want to refresh options at the end of that loop rather than in the middle of it each time.
Yeah i was just about to tell you, beat me to it.
@maiden wadi Works perfect. Thank you ๐
the variable won't see ANY objects so i can't select them
You can try to drag and drop it into the default value
(the variable is an object reference for objects of a class i made using "object" as the parent)
also did you compile and save?
@void oak Nice. I just have to test this one now.
i did
ok
fuck.
it didn't work
@vivid aurora You don't normally set pointers with any default value other than Nullptr. Or None. You're supposed to set them at runtime unless you drop that actor into the level, and then you have to make it instance editable and set it on that specific instance to something that's already in the level.
@maiden wadi Although the only issue is it doesnt keep the current selection. Should be a simple fix
eh?
@void oak Ah, fair. Simple fix. Save the current selection index and set it after the refresh again.
what do those words mean
i dont wanna be rude im just not experienced
also, i cannot set it at runtime
@vivid aurora Blue values like that are called memory pointers. They are variable types that point to a specific space in memory. By default they point to nothing. So when you start your game, normally at some point you'd spawn an object of your type of BPWeapon, and then set that pointer to that newly spawned weapon.
that sounds inefficient
What type of object is your BPWeapon? What does it inherit from?
i thought only soft object references needed that
its parent class is Object
You'd have to construct one then.
The difference between a hard pointer and soft object pointer is that saving something as a soft object pointer won't keep it from being garbage collected. You use these to avoid loading class defaults into memory at runtime until they're needed.
The blue are hard pointers, if you specify one, a class default will be loaded and ready to spawn versions of the object for runtime use.
Unless you place them in the level, they need spawned/constructed yes.
how would i even do that once i introduce the ability to use any weapon other than stock?
Also your weapons won't be able to be visible if they're an object class. Usually weapons stem from Actors.
i know
@maiden wadi I really appreciate your help dude! โค๏ธ
i switched to objects cause i thought that it'd fix the issue since it also would let me select it when i used actors
i just planned on using a "static mesh" variable for it to be visible
hi, can somebody help me? how can I call custom event every frame for a time? on keypress? For example, after pressing F key, call event every frame in 5 seconds?
there has to be a better way.
that sounds so inefficient
Normally it's a class inheritance thing. You create a base class that you can call events in, and create child classes of it. For example. One class might be GunBase and all it has is a blank skeletal mesh and a couple of events. Pull trigger, release trigger. You create a child of it, and in the child which might be LaserRifle, you'd set the mesh value to the right skeletal mesh, and then override the PullTrigger and ReleaseTrigger for that weapon's actual firing.
Then the only thing you ever need to cast to anywhere else in your coding is the GunBase.
What base class should I use for a blueprint that's just a logical element, if it doesn't need any properties like scale, rotation etc?
what does that have to do with calling the class though?
that's
just
the process
of making a class
Hi ! Begginer here.
With the help of @unkempt musk we were able to to reach at a satisfying level.
However now I am stuck again.
What I want to do is the main_ch teleport to the position of the second_ch, upside-down, stick to the surface, walk and the second_ch to follow the movement/mirror of the first.
Any insight that works would be helpful.
Thanks !
@oblique jacinth in blueprints, add a timeline node.
i am losing my shit this is not supposed to be this difficult
I want to make my objects collide similarly to in this video: https://www.youtube.com/watch?v=okWQNOQoOEw
But i cant find the "grab method" default value in BP_PickupCube like in the video. Can anyone help please
This is just a short demo of what i mean by the item collision that i've also worked on. I will hopefully be able to finish this soon and show how i did it. But it's mainly a matter of switching between using AttachTo and a PhysicsHandle based on collision.
@vivid aurora Just making the point that it's not really inefficient. You just make one class that routes all of your casts and function calls. But you still have to spawn an instance of your weapons if you want one. ๐คทโโ๏ธ
@vivid aurora You can spawn and attach one on beginplay if you want. This is for Actors though.
@vivid aurora I think the point you're missing is you say, e.g. your character has a variable "Weapon", and you pass it a reference to some child instance of "Weapon" like "AK47" in the game.
yeah
that is exactly what i'm trying to do
Reading your posts, I think you have some ambiguity over what is a class ("Weapon") and what is an instance of the weapon in game. The blue nodes and hooks and what not are looking for a reference to an instance of weapon, in the game. Like something you can see in the world outliner.
It doesn't want the Class Weapon. It wants an instance of Weapon or an instance of a child class of weapon.
Your basic goal is to set a reference to the character's weapon right?
yeah
Ok you want an object reference. That is, you want to reference a thing, in the game.
The class would be like "the concept of a weapon" but not an actual weapon.
but it wouldn't need an instance?
as long as it can read things about the weapon, it shouldn't be too bad, right?
thank you, I was thinking about it.. but isnt it weird using timeline without tracks? Just asking
the point of having a variable is that it knows what weapon i have in my loadout so i can actually use it in the game but how do i let it know like that?
My last screenshot is one way. I spawned a new instance of it and set the pointer to it right after, then attached it to the ArmsMesh on the character.
For other ways, you'll need to learn how to get references. LineTrace, SphereOverlapActors, Collision events, etc.
@vivid aurora First of all, an Object reference means a reference to an instance. Same thing
okay?
you can't use collision events on an icon in your loadout menu
so how would i get the reference i need?
How can my actor (skeletal mesh) be affected by an explosion (particle system) so that it knocks him off or that the collision with explosion triggers the death animation?
Depends on the loadout menu. Full UI, or 3D visuals?
@vivid aurora Call Spawn Actor. Give it a CLASS reference (from drop down) of your weapon class. That will spawn the weapon in the game. You can drag the output of that to set the object reference for your character
like shown
UI except for a 3d model of the class you're picking out your guns for.
think the TF2 loadout menu.
cause it is the exact same
I'd personally probably create that out of a datatable. But that's a bit of an advanced method. You could possibly do the same thing with a base class and some child classes. Create an array of the base class type and populate it with your different classes and get their class defaults.
oh?
@marble badger tell the mesh to start simulating physics (this will make it ragdoll). When the explosion happens, do something like check overlap sphere to try and find all killable actors, the kill them, and apply a force so they go flying away.
Where ever you need to use it. Possibly the weapon selection widget.
Depends. If it's currently controlled via the PlayerController, you can use GetPlayerPawn.
huh?
it's called SpawnDefaultPawnFor and it allows for custom hookups to delegates that aren't possible otherwise
but the pawn can't store that value
@odd ember Ah. Funny enough I've never actually used that. Thanks though. I'll keep that in mind for later. Might come of use in my current project.
it's the only way you can create a binding link between player character and controller
so e.g. you can setup dispatch events that can be called without dynamic bindings
Can somebody link me a tutorial for changing parameters in level and character blueprints from a Widget UI ?
Before / when loading a level I mean.
I want checkboxes to change things in my Character blueprint before I open a level basically.
i am so upset
I see there is an option string on the Open Level node but I don't know how to use this
i have actually cried trying to implement this stupid weapon system
@vivid aurora simplify your approach. Authaer's giving you good advice, but he's also giving you a lot at once. Start by just spawning the weapon and setting the reference with the two nodes I showed you
implement that later.
that is a basic feature
but basically in the screenshot I showed you, where I selected the gun from the dropdown list, you would drag a pin to determine the class instead.
doesn't matter ๐ you make a GetWeaponClassToSpawn function
and you implements its contents later
for first go it can return a hardcoded one class
Yup. Do things one step a time so you can understand each step.
oh ok
My mesh also has animation before an explosion so ragdolling it wouldn't show that animation. How can I even tell the mesh to simulate physics? How can I find actors in explosion radius? How can I apply force to the mesh?
Does anyone know what exactly this FABRIK node is for?
that's an IK node
ik animation
@marble badger Start by finding the actors with Sphere Overlap Actors
Then if you have some sort of pre explosion animation.... play it, and then trigger the ragdoll? I'm not really sure what a pre-explosion entails though haha
@astral fiber FABRIK mean : Animation node for Forward And Backward Reaching Inverse Kinematics.
@astral fiber this video explain you an example usage : https://www.youtube.com/watch?v=Okq-mkEvcGU&ab_channel=CesarSC
@gritty elm thanks!
I thought on the walking animation of the actor
hello everyone, I wanted to make a function that appends an array of strings to a certain string, The problem is that the append node is a node, doesn't have an execution pin.
for example i want to make a for loop that for each output of that loop it appends a certain string to the main string
Append is a functional node. it returns a string. So if you want to update a string variable, pipe the output of append to a Set {variable_name} node
aha, so does that not overwriting what i've already stored in that variable ?
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/
@sullen radish Correct, very little will take a variable and change it (mutate it). Most everything will need to be explicitly set with a new value
array [1,2,3,4,5,6] >>> the main string is :
"counting: "
and i want to append for example "the number"
The output i want is :
{Counting: 1, the number 2, the number 3, the number 4, and so on}
@covert delta does that makes me get an output like I've mentioned ?
you put that output in brackets. You meant it to be just a string though right? Like
"Counting: 1, the number 2, the number 3, the number 4"
yeah exactly, sorry
actually is what i want to do, is that i'm calling an API get request from unreal, and that request depends of the array i want to send,
for example : {{url}}/files?ids[]=8&ids[]=9&ids[]=10
the ids i want to send are 8,9,10
what if i want to send that same request but with 8,9,10,11,12 (5 arrays)
the array is variable, it doesn't have a fixed length, so by using a for each loop for each index, i want to make the start of the request be "{{url}}/files?ids[]="
and then append the first array value, which is 8, and then append the &ids[]=, and repeat for each array element
is there any way to make a for each loop that automatically adds a pin for the length = the length of the array ?
Dynamic array huh
Why don't u try while look?
Loop *
While x add array
For each loop is fixed length, u do be specifying them at the start of the loop
@trim matrix Yeah i think i will try the while loop ๐ Thanks i will let you know the results.
How can I lower the first person character's position over a certain amount of time? I implemented wallrunning but he doesn't move down over time.
@thick solar Couple ways you could do that. I'd prolly have a script that fires every frame (for your desired duration) which calls AddWorldOffset on your player, using an offset of <0, 0, -(DropSpeed * DeltaTime)>, where DropSpeed is how fast you want the player to move down
Or maybe you could implement physics and mess with gravity values instead of directly messing with the player's location like this
I just did that. Thank you for the help!
There was a Set Plane Constraint Normal making the wall run go in a straight line. The gravity scale while you were wall running was also set to zero. So it deleted the Set Plane Constraint Normal and set the gravity scale a bit up and it worked!
Is it possible to change the AI Perception's "Auto Success Range from Last Seen Location" via blueprints?
Also, is it possible to make the AI forget last seen location - they remember it permanently
Im trying to make my projectile disappear after a certain amount of time after i click shoot, but its not worrrkiing
This is what a wrote, and i keep getting the error:"'First Person Projectile 1' does not inherit from 'Static Mesh Component' ( Cast To FirstPersonProjectile1 would always fail)."
Any ideas
What is the variable type of cube? @fading raptor
its just a regular static mesh
I think i just have to make it destroy actor straight from where it spawns the projectile
Instead of separately in the bullet blueprint
When you spawn the projectile, you're assigning cube to be that projectile?
yeah
Show that snippet. spawn actor and the assignment
I think i got it to work from where it spawns it
yeah nvm i got it im dumb
Thanks for going out of ur way to try and help!
I'm trying to move a node from a BP to a BP function library
when I attempt to do this it says "cannot be placed in a function graph" but doesn't really explain why
how do I diagnose this? (These are nodes from a Plugin)
It's probably a latent action like a delay
it is
those can only exist within an event graph, not inside a function
OK, interestingly, how does one create a function that uses nodes like this for reusability ?
you don't
might be possible to achieve the same in C++ and wrap that inside a node
but it's a limitation in BP's that you can't use those in functions
I don't remember for sure since I haven't used those so much, try and see I guess :)
OK, thanks for helping me figure that out
it's not really weird though, it just relates to how the different graph types work in terms of their execution
I don't think so, did someone say that?
No, macros are basically just a copy paste type thing. Under the hood it's like the whole macro was inside your bp graph
You can't call latent actions in BP functions, those are the actions with the little clock on them.
What's up guys, I'm new here and to gamedev in general. I am trying to make a game where you can pick up a destructible mesh and throw it(having it explode on impact). I am having trouble because for whatever reason it's not letting me create a physics handle on the destructible mesh(so I cant pick it up). Does this have to do with wake/sleep? If so is there a way to control the wake and sleep of a destructible mesh in blueprints? Thanks
I am not a Master after 8 Month but i set up already a Destructible Box in my Game , you need a BP to controll the Destruction at all inside the BP i hope i understand it correct your question.
To pick it up use a Fake Destructible and replace it after you throw it and collide with the wall or ground
Yeah ok how do you do that exactly?
I take the same Item in my Case a wooden Box its must look the same size in the Bp you take both and hide the Destructible Wooden Box. After you Throw it and when it collides on the wall or ground ,you destroy the Fake one and set Visibility to true on the Destructible
I tried something similar to that but Iโm having trouble detecting when it collides with another object
I will send you here a Example of my BP but its not small , i hang on it 2 days figure myself out
Hey guys, unsure if this is the correct channel to ask for help with this issue but here goes:
My project keeps resetting or not saving some values, especially static and skeleton meshes. I got this error after closing the project and opening it again. Many other assets in the world also keep getting randomly reset or modified
Did you rename a struct or delete it?
Nope. Literally untouched
I closed the project, went to eat food, opened it and now it's different
Yeah this is surprisingly tough, do you want to split it up and send multiple screenshots?
Would be having 2 different projects open at the same time be causing issues when saving?
You just need the one Above because in my Case i have 2 Actors hit the Box
@frigid ether having the same project open twice does cause saving issues
Does it only work when the player collides with the object or does it work with any other object?
Here is where the Box overlap because its Physics on the Box as you can see , then you can add the Bp i add above with this i post new, Ignore the Plane , all was parent on the Box and the Show box is your Fake Item and its parent on the Destructible
@frigid ether then no
Im still confused sry. Where exactly to you make the box visible when it collides with an object
Above the first i post you where the Destructible get Damage(Not Visible Showbox and Its Visible true) there was the change
Hold on I'll show u what I have and maybe u could help me there
So Im working with a similar principle, except instead of hiding and then turning visible, the fake cube gets destroyed and I spawn the actual DM with its transforms. The problem is with the "Event Hit" It only triggers if the player collides with the cube, I want it to trigger when the cube collides with anything
try the Overlap Event instead of Event hit but on the Destrcutible Blueprint not here , you need the DMesh parent on a Cube or something with Physics
Now it doesnt trigger at all
You need to cast after the On overlap event to branch
Where do I add that?
Like this? Or through the executable?
Through the executeble
It comes up as an error. It says I need to determine the object type in the cast
Connect the object from cast to the other actor from Overlap Event
It still doesn't trigger
Ok i see
Ok than try to add a Collision Box or a Sphere and attach on Bp your cube on it and use it the same Way you use it above .
Sry Im new how exactly do I do that?
On the Left side Add Component and type in search Collision after you get Box press on it you see it on the left , than drag your Cube on the Box its Blue and attach on it
After if its doesnt work try to get all Stuff in one BP as i am show on these Picture , ignore the plane
I drag the DM onto the Box Collision on the left?
Do it on both
DM Bp and the Cube BP
Now press on the Box left side and type Overlap event Box in your BP
Hold on like this right?
Like this? or reversed?
yes Right
1.Set the 1M Cube to NO Collision on the left side 2.the 1 Cube DM to world dynamic block all
2.the 1 Cube DM to world dynamic block all
Yes these my Settings now try to Connect your new Overlap same as the old one, Without the Cast
The cube seems to be glitching out and explodes/glitches when I press start
Its a good sign now you can hide the explode DM Cube in the Bp , event Begin play - Set Visibility - Target DM -and set New Visibility to False
You must play around with you Physics settings and try to damage the DM in the right time when it Collide somewhere , i write you before i need 2 days to get my stuff work , now you have the Base , sorry i hope i can Helped out with my 8 mont knowledge ๐
You Didnt need to Destroy , Destroy if all your Process are Finished, work more with Visibility
and dont forget no master falls from the Sky learning by doing and never give up
Man thanks bro for all the help I'll keep trying stuff really u helped me a ton here I'll dm if I have any more questions!๐
No problem Anytime again dont forget to watch Tutorials there are tons of Stuff i learned , get yourself an 2nd Monitor if u can and you can work Dual, thats i am doing good luck Stealthman
I desperately need help with this, my entire inventory system is broken because of this error and my only backup of the project is about a months old
Hey Variann did you not copy the Whole Project every time you get finished your work
no I've been slacking on backing it up, and clearly I should have been
I had the same problem before 3 Month my entire 1 month are gone , but now i make myself a full copy , and rename the Uproject file just the end Number
Well yeah I know how to backup, but this doesn't resolve the issue I have
even if I had a backup, I don't want to undo a ton of work just to avoid resolving this one bug
Yes its sad i even dont working with Backups no Autosave active , i just Copy Paste , is there no chance to Get and older BP from your older Projects and replace them , but make a copy before you try , otherwise i didnt know wish u good luck
Hey can anyone help me....I am making a wall run system but I can't ...Do some of you have some tutorials or something
Project Files : https://www.patreon.com/posts/35566022
Today, I am going to develop a wall running system using the third person character template in unreal engine 4. Just like in games like prince of Persia, Star wars Fallen Order - Last Jedi, the character will be able to run along a vertical wall in an arc to reach the next platform.
suppor...
thanks bro
Much appreciated
But do you have for the first person template
I am working with that
I made a grappling gun and stamina system
And don't want to scrap that
No problem if u need more or different style first person https://www.youtube.com/watch?v=xqKLkOkAH_s
In this video I go over how to create a wall running system in Unreal Engine
โบCOURSE ( Learn how to make an amazing 3d Platformer Game In UE4) : https://www.udemy.com/course/how-to-make-a-3d-platformer-in-unreal-engine-4/?couponCode=755820B1C4D85C3DB992
โบSUBSCRIBE:
https://www.youtube.com/channel/UCQv4mwerZLQVe3wPbsMc-qw/
โบSUBSCRIBE WITH EMAI...
OH
Sorry to disturb ou
But this one doesn't work in my project
LOL
Leave it
I'll do it myself
No need to disturb you
๐
No problem Bro , its same in my Case some Tutorials i cant get work too , just find https://marketplace-website-node-launcher-prod.ol.epicgames.com/ue/marketplace/en-US/product/first-person-wall-run
Maybe you can grab some Info out
how do i get the pitch of a object like not the speed but you know, 90 degrees 180, 0 i did it before but forgot how to, now im just getting the speed of it
https://www.youtube.com/watch?v=py74Aq75iqQ these are Ladders maybe it can be helped in the BP Senchay
Somebody requested a ladder! I RAISE YOU UUUUP SO YOU CAN STAND ON MOUNTAAAAINS!
FILE - https://drive.google.com/open?id=0B4babORM1Vv4VjJDVy1Xa3JaSXM
Twitter: https://twitter.com/Play_Ruff
Patreon: https://www.patreon.com/deanashford
Discord: https://discord.gg/gPnr339
@unkempt musk sry for the delayed dm yes something like an slide show where the models are presented and i the player chooses one i want that to be builded i got it to build a BP Struct class which contains themed based meshes but i need the whole BP of that mesh because i have like normal ramps and maybe ramps with light that when the player is near by the lights go on and all this is written in BP in the BP class of the specific ramp
Hello. Guys I'm trying to make a simple locomotion system. I'm trying to use the same technique as alsv4 and how epic showed animation techniques for paragon characters.
F, B, LF, LB , RF, RB ( 6 blendspaces) similar to alsv4.
I am blending these poses using the same technique as alsv4. Using alphas to drive the poses.
The problem I'm getting is that legs sometimes don't blend properly. Any idea what i should do ? i've been stuck on this for a couple of days.
Hi everyone! I have a question about Landscapes... ๐
Crosspost from Level Design channell.
Speaking of 4.25 and Landscape edit layers...
Do you know if it's still possible to use the old (but still present) Editor Apply Spline node to conform/paint a layer from a BP?
It still works if the landscape is "old style", so without layers. With edit layers switched on, the node doesn't do anything.
It gives no errors...just does...nothing.
I suppose it's because it lacks the info about which layer must be affected.
I should do some simple roads stuff and the new landscape brush bp is still a royal pain to understand. I tried to reverse engineering epic's bp and materials but I'm lost in a nodes nightmare ๐
Edit: The official docs for that node shown an Edit layer name, but I don't see it in 4.25. Maybe it's a new feature of 4.26...
Hi everyone, do you know how to add ripple when you make move a buyoncy mesh in water ?
Does anyone know why this is occurring? It works as it should, if I plug the EndOverlap into the reverse of the first timeline, but I want the door return to be a different animation, so two timelines it is. But this happens, the first event is all fine, subsequent events the door snaps and there is no sound. It also works fine if I plug the event into play from start and play form end in the second timeline, but that's not what I want either. Relatively new to Blueprinting so any advice is much appreciated
@covert kestrel Since you're using two different timelines like that and not reversing the one, you need to PlayFromStart.
Yes but that destroys the fluidity if you start to leave the collision zone. Is that something I can;t avoid
Why does the close have to be different than the open?
The door springs back, the curve is different. Also the handle doesn't have to turn, when it closes, and it's easier to sync the shutting noise instead of using a flip flop. But if it's something inherent in the timeline I can't get around then fair enough, reverse it will have to be.
It's possible that you could use the same timeline with different curves in the same one.
That is a solution, but how would it select the different tracks?
IsReversing node?
is there any way i can convert a material into a png image with alpha using blueprints
for some reason mouse events are not working when I change the input mode
can you tell me why?
https://gyazo.com/b596adeb717cef4e0a035e9017cce354 Hey my camera is going so far. I can see inside walls. How can i solve that ?
make your capsule bigger
Oh ok im gonna try thanks
@covert kestrel Yeah, you could either branch off of that or use it for a select node.
@last walrus Which mouse events?
Input actions - get mouse
Hello! I'm trying to find a solution / way around to get timelines work properly.
Apparently after packing timelines run 3 times faster than tick.
This provokes that if you are moving an actor using a lerp + timeline + movetolocation the actor will move 3 times further after packing, compared of what you see in the editor.
I want to avoid using root motion at this stage. What reliable work around can you suggest to clamp a timeline to the tick or time?
I found a bit of information here, but not sure about the solution:
https://answers.unrealengine.com/questions/705642/timeline-ticks-faster-than-tick.html
@last walrus You've disabled input actions by setting the input for UI. If you want the controller to retain that, use GameAndUI.
hmmm
okay
I just removed input mode changing node
and now mouse events called only if I hold any of mouse buttons. but how to make it call if I just move mouse without pressing buttons?
@short bramble You have something else wrong. I set this up to increment and print both after 5.0 seconds.
he said it was after packing though
@maiden wadi thanks! yeah, I'm gonna record it, I found some similar problems around in the forums.
yeah @maiden wadi @odd ember similar to this:
https://answers.unrealengine.com/questions/965415/tick-appears-to-be-faster-in-packaged-game.html
I reckon
That's not the same. That's expected. Packaged games run better and aren't editor capped at 120 fps
it isn't actually faster
yeah I was going to say you'll need to limit your framerate
tick is once per frame
Packaging to test. I need a good package in this project anyhow.
Even still though, Timelines should be at the same speed. Their update is supposed to run once per frame as well.
this makes the actor to move 3 times faster after packed. I have the editor cap in fps
These are the same prints, zero changes, just packed and ran from the executable.
Hi guys, when you create a Pool, do you use arrays or Maps to store the actors?
@maiden wadi what about my question?
If you want to continually get the cursor location, you likely need to rely on tick. I do that with a radial menu that's designed to point to a direction on screen based on the mouse's delta. The Widget itself just gets the player controller, gets mouse position, uses it to see which direction the mouse is moving, caches the mouse location for the next tick cycle.
so there's no good solution without tick? it's very sad...
I dunno, that's just how I did that one widget's functionality, because I needed the mouse location often. What are you trying to do?
widget movement with mouse
like this one
I'd consider doing the widget's functionality in the widget, honestly. Then you can use it's tick and whatnot freely and then when it's collapsed or removed from parent, the tick stops. Clean solution.
Don't fret over using tick in places like this. It's there for exactly reasons like this. Places where things need to happen often and smoothly for an unallotted amount of time.
I know ticks are bad
so its the reason why I tried doing this without them
Ticks aren't bad.
The way some people use them is bad. Tick itself is just a tool. But you don't use a bulldozer to dig fence post holes.
some people do ๐
My playerController does not trigger input events when in dedicated client, any ideas what might be the problem?
The animation still jars if I exit the collision box too quickly, and I'm not sure if this is the correct way to swap float tracks in timeline or not, but with my very limited knowledge this is as good as it will be without anymore pointers or experience. But there's always another problem when one is solved.
dunno if this is the right channel, but i'm having issues getting one of my widgets to show, and i'm not sure why
Hello, I was hoping someone could help me here: I have the following component hierarchy. And I was wondering how would I be able to move only CollisionComponent (The root), without affecting the children that are attached to it?
Essentially, I want to be able to move the parent component and have the children at the same position they are before the translation operation.
is there any reason this wouldn't be working, at least that's obvious?
the only error i get upon compiling is that setshowmousecursor returns null
question: is there any way to "upload" files in game from a computer folder? (example of use: choose a texture in a computer folder to update a texture in game)
@drowsy terrace Does the widget show up?
It doesn't no, thats the entire problem
Where is that event called?
Eventbeginplay
Of what actor?
Its just in the gamemodebase
Its also a cut and paste of a similar custom event i have that works fine, with only the widget being changed
The blueprint is exactly the same, but rather than creating the main menu widget it creats the high scores widget
You can ditch the cast. You don' t need that for Set ShowMouseCursor. And unless this is a local coop, you don't have to set the owner of widgets.
But other than that, I don't see any reason the widget wouldn't show up.
My playerController does not trigger input events when in dedicated client, any ideas what might be the problem?
Not unless the widget itself checks something on construct or where ever and removes itself.
Yeah, i've already talked at length with another person in this discord about it and they ran out of ideas
The widget only has one function, OnButtonPressed, remove all widgets and "ResetGame"
Also, its worth noting i created a blank slate version of the same blueprint in a seperate file, it worked exactly as intended the first time, but when i reloaded it it stopped working alltogether
Like, in an empty project, just for testing sake
@drowsy terrace wanna show the actual widget?
If you gimme a few to load up my computer i could show you the entire project if i had to, i want this issue solved
At the very least to know what i did wrong
Do you want the graph, design or both?
@olive sedge Slow responses, Overwatch. But it's hard to say without seeing what's going on. You don't get any input from any controller on any screen?
@chlorocombatant both would be best
Okay, 2 secs while everything finishes opening
@maiden wadi well, i print on input in the playercontroller but don't get any output. Camera not moving either. Doesn't work on kb or mouse
Is this in editor when testing as a dedicated server as well?
no, editor works perfectly. only in the dedicated client
graph
oh.. you mean when I "play as client"?
designer
that works perfect as well
Hello everyone i have a problem, i construct a border in a widget blueprint and i don't see it.
LogBlueprintUserMessages: [Onset_WidgetBlueprint_C_0] true
LogBlueprintUserMessages: [Onset_WidgetBlueprint_C_0] Visible
LogBlueprintUserMessages: [Onset_WidgetBlueprint_C_0] false
LogBlueprintUserMessages: [Onset_WidgetBlueprint_C_0] true```
I'm not much help there. I've messed with the editor testing for dedicated server, but if you've built the server and are testing it, I haven't done that yet.
@drowsy terrace have you tried taking out the remove all widgets node just to see if it is actually your problem?
@maiden wadi :/ ok
@limber robin Have you set it as the child for anything?
Problem is that I really don't know what else I could try.
that should only apply after the button is pressed no?
I should ?
@olive sedge Do their beginplays run?
i'll try it and report back to you
It's working perfect in editor and I see no reason why it shouldn't in the dedicated client but.. yea..
@maiden wadi yes. both server and client
nope, still nothing
@limber robin Creating it doesn't make it appear anywhere. You have to add it to screen, or as the child of another widget that you're adding to screen.
@olive sedge You've done the full build dedicated server from source code thing?
yes
How should i add it then ?
The "Owner" of the Border is the widget blueprint.
@limber robin Owner doesn't matter unless you're using local netowkring. You have to get the parent and call Add Child as blah blah or whatever.
@maiden wadi
// server
[2020.12.04-15.07.12:408][164]LogBlueprintUserMessages: [bp_PlayerController_C_2147482565] player controller begin play
[2020.12.04-15.07.12:409][164]LogBlueprintUserMessages: [bp_GameMode_C_2147482577] find player start
[2020.12.04-15.07.12:409][164]LogBlueprintUserMessages: [bp_GameMode_C_2147482577] logged in
[2020.12.04-15.07.12:410][164]LogBlueprintUserMessages: [bp_GameMode_C_2147482577] find player start
// client
[2020.12.04-15.07.12:386][101]LogLoad: Took 0.039462 seconds to LoadMap(/Game/entryServer)
[2020.12.04-15.07.12:615][103]LogStreaming: Display: Flushing async loaders.
[2020.12.04-15.07.12:625][103]LogPlayerController: Error: EnableInput can only be specified on a PlayerController for itself
[2020.12.04-15.07.12:644][103]LogBlueprintUserMessages: [bp_PlayerController_C_2147482506] player controller begin play
I think that EnableInput Error is suspicous but it also happens in the editor
and it triggers before the begin play
@drowsy terrace Put a print on Event Construct and PreConstruct, see if either/both of those run
i'm sorry what does that mean exactly?
@olive sedge Where is that EnableInput being called? Is that something you put in?
I don't know where and no.. I don't have EnableInput anywhere in my code anymore
ohh, gotcha, its the events in the widgets
PIE: Error: Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetParent_ReturnValue". Blueprint: Onset_WidgetBlueprint Function: Create Border Graph: CreateBorder Node: Add Child```
both pre and event construct run fine
print outputs from both
@drowsy terrace Hmm.. How about destruct?
uhh, where's that one?
Same place. Just right click in the graph and Event Destruct
it doesn't have one labeled destruct, Event Pre Construct, Event Construct, Event Tick and On Clicked (play button)
@olive sedge That's really odd. It might have something to do with the player controller setup phase to be ready for the player to use it.
maybe, yes
@drowsy terrace It's there if it hasn't been overridden. Either at the top of the Override list or this.
it seems to me the player controller is set up and working correctly but it does not accept input for some reason and calling EnableInput myself doesn't change that
i just added one in, that gonna matter?
@maiden wadi could something else consume the input before it arrives at the controller?
destruct gets print output too
If Destruct prints, your widget is being removed. I'd check elsewhere to see if you have anything else removing widgets for any reason.
@olive sedge Only if you've enabled input in an actor that isn't it's Pawn. But that's on a per key basis. So you've have had to overridden every single key you use in the Controller for that to have happened.
that's strange, so i may have a misplaced Remove all widgets somewhere?
@drowsy terrace do ctrl + shift + f
Possible. That or you got some other more massive issue. Cause Widgets removing themselves isn't normal.
@maiden wadi any way to get all input enabled actors from the level?
i've only got 2 remove all widgets, one in the actual main menu widget for when the play button is clicked. and another in my player controller file
this one here, in my player controller
Here is my full function. https://blueprintue.com/blueprint/hng_gb2y/
@drowsy terrace might not be a remove all widgets. try to see if there are other remove widgets anywhere. and disable all instances of widget removal you can find, just to eliminate them as possible error source
@drowsy terrace have you checked your log btw? any errors maybe?
the only error i get is the setShowMouseCursor at the end of my create main menu function returning none
Does anyone know if there's a way to get rid of the "drop down arrow" for the combobox inside blueprints.
It seems i can get it with pic below, but there is no set option.
okay, so removing that remove all widgets out of the player controller seems to have fixed the issue
its working as it should be now
nice
so, i have one other question. though this may not be the best place to ask
whats the deal with the little sphere in the middle of the map, i didn't put it there and it only shows up during standalone simulation
that's some kind of empty actor it seems
it doesn't show up in the editor at all...
when you run your session you can see the actors in the world outliner..
maybe you can find something that doesnt belong
thank you guys so much for the help with that issue, its been bugging me so bad for a couple weeks now
or that might be visible when it shouldn't
when i'm in the editor all my actors in the world outliner are accounted for, and there arent any stray or unidentified ones
