#blueprint
402296 messages ยท Page 730 of 403
I just tried that but no luck. Also, I'm not hot reloading.
can you help me pehaps in dms
@rotund pilotNot sure then. If you just have that property, and then in the class constructor(not OnConstruction), are calling CreateDefaultSubobject<>(), then I'd assume some form of corruption. May require recreating the blueprint. Though reparenting might work as well.
guys seems that i have lost control when level starts
im not sure what happened
i previously tried changing main menu widget from main menu bp to character bp for something i had to add
and seems it has ruined everything
Okay thanks
You can probably test it without any issues by just creating a new blueprint class from the C++ class. If you can see the component there, I'd assume it's working fine and the other blueprint is corrupt. I'm not sure of any ways to fix that bug easily.
can you help me?
Hi all. Has someone a good weblink or tutorial on how to setup "Tutorial Blueprints"?
Not fully sure what your issue is. If it worked the old way, I'd change it back. I'm not sure why someone suggested putting it in the character to begin with.
look. i moved the widget calling begin play from the level bp to character bp' begin play.
so i tested a button and instead i tried this
not sure whats wrong about it
What was the original reason for moving this main menu widget to the character?
because originaly i was trying to play a cinematic video
i dont know onestly i forgot
im trying to get everything working again
because it ruined everything
OHH
i remeber why
its because i wanted to have skip and pause
on the scenematic video
and in order to link it
i had to reference the main menu
which required me to create the widget in the same character bp instead of the main menu level bp
it forced me to put the create widget in the same character bp
so i had to connect it to the characters begin play
but now there is something wrong. because the main menu only has controls button and the back button from the controls which work
and all the other buttons either are not working or are not removing the main menu from parent
There's still no reason for it to be in the character. If you want input to affect the menu, create some bindings somewhere like GameState, have the widget bind some functions to the event from a main actor like GameState which is easy to get and have your character get and call that binding, or call a function in GameState that calls that binding. Or better yet, make the input from the controller, since that kind of input functionality doesn't really need to be in the character.
Your character class should be able to be dropped into any level and just work. If you drop your character into a new level and it's still trying to open the main menu, that's going to be a problem.
ok so i added the main menu widget call back into the main menu level
so now how do i do this system
but able to call the main menu and the video at the same time
.
in the main menu this button is suppost to play the media player and have the function to pause and resume
and when finish it goes back to main menu
because in main menu widget its not going to let me call skip action
Hello there, I have an error. Blueprint Runtime Error: "Accessed None trying to read property Player Mesh" . Player Mesh is my pawn's skeletal mesh. I'm not sure what I need to do to fix??
I'd really appreciate the help.
Is this initialized?
I'm not sure, I'm new with Blueprint nodes
This is my "Event Graph" I'm not sure if the Cast to BP_PlayerPawn is an initialization or not
@ruby meadow Any suggestion how I could initialize it?
What's in Pawn variable?
Show me, how you initialized this variable.
@ruby meadow Not sure what initialization looks like in BP nodes. I took this code from an example project.
What do you put in variable?
Is the left hand column where the initialization takes place? sorry that for my lack of knowledge
What do you put, right side show me.
Is this what you want to see?
Should I change the variable type?
@ruby meadow I appreciate the help by the way ๐
Choose instead of Pawn your Class.
Is this exists in World?
I will try that thankyou @ruby meadow I will use a different variable instead of changing it, effectively the same thing.
Yes it does
Okay.
It does exist in the world
@ruby meadow The error went away but I lost functionality
Also I can't connect Try Get Pawn Owner to Set As BP Player Pawn
You need to connect TryGetPawnOwner to the cast node
@surreal peak Like this?
That's how it's done though. Rest is up to you
The only reason this would not work is if the PawnOwner is not a BP_PlayerPawn
I know this set up is wrong, but is there a better way to set the target for the Try Get Pawn Owner?
The Target was correct
Not sure why you are changing that
You are lacking a huge part of the fundmanetals of c++/BP programming
You should read up on casting and references
It's not helpful at all if I draw you the pins you need if you don't understand why you have to do that
5 nodes later and you'll be lost again
@azure smelt
https://youtu.be/qLpjGxyfZLg
Support the channel through donations. Crypto accepted!
PayPal: https://paypal.me/reidschannel?locale.x=en_US
Patreon: https://www.patreon.com/reidschannel
Bitcoin: 1JFwWHr4X6uAeoZadukzqKjzFBj3Qjy7Sk
Ethereum: 0x2B2Bc108F1Cc0fF899959dEF3226637787d8C3dE
Dogecoin: DNQ33YnhpWoTBokBNVkZP5ub8KTLkpyjpv
Join our community discord!
Discord: https://dis...
@surreal peak I'm familiar with casting and references in C++, Just not in BP nodes. It is helpful because I learn from what works.
But then why are you trying to cast a variable to the same type and then use that for the totally wrong target
I'll check it out @ruby meadow
But BP == C++ in bound of UE.
Because it's 10:30pm here and i'm tired. I was just trying to see if it would be a quick fix
The code I showed you with the red lines was correct
Damn, rest man.
I would need to know what exactly isn't working then
And back to work after resting.
If the cast fails, then the AnimBP is not used on a PlayerPawn class
Soooo I know this code works if my skeletal mesh component is "Blueprint Inherited" but I made it "C++ Inherited" so i could do more with it as C++ is my go to. But I get the Access error
That's the skinny of what i am doing
They idea stays the same though
The AnimBP is assigned to a SkeletalMeshComponent
That SkeletalMeshComponent is on a Character
Or whatever Actor
The TryGetPawnOwner returns that Character
And PlayerPawn is a Pawn/Character?
I don't know why it says _C though
That's normal
It's a Pawn
It was a character hahaha but I discarded it after talking to some devs about how pawn's are more optimal for VR
Yeah okay
So, is the Cast failing?
That's something you have to tell me
The one based on the image I gave you with the red lines
I believe the cast is working Yes, If it wouldn't work then the functionality would be gone i presume
No errors are coming up for the cast either
haha it's the same error as before
Can you post it for me
Okay, if you are familiar with C++/References, then this is a nullptr exeception
So basically the PlayerMesh variable is null
Not your PlayerPawn variable, but the PlayerMesh one you pull from it
What is PlayerMesh and where are you creating/setting it?
This is likely
It hasn't been set
It is placed in a few places.
The PlayerMesh Variable is created in the BP_PlayerPawn
Is it mean to be valid and you don't know how to set it?
Is that an actual component on the actor?
Or just a variable you named like this
It's a C++ inherited component yes
I took it from the components
Can you show me the C++ code that creates it?
Because if it's invalid then you are missing something
no problem, do you want the H file or CPP?
Both, but only the parts for the component
.h
```cpp
Your code
```
That would be optimal but screen also works I guess
Okay, that looks fine
.cpp
In the example code I had it wasn't attached to anything
Where as i have it attached to the VR root here. not sure if it matters.
no it should still be a valid object
Does it spam the error forever or just for a few frames?
When i test it in VR it seems to work fine for the Hands and Head IK,, but not the Foot IK.
All i want is the pawn to crouch like the example project i downloaded
I don't think it uses the tick
but it does have the same error appear alot
Well the ABP ticks
good to know
Not sure atm why you get the Errors.
I'll show you some more nodes
The AnimBP exists on the SkeletalMeshComponent that you call PlayerMesh
So the PlayerMesh being invalid is kinda impossible
Yeah if you plug an IsValid at the start with the PlayerMesh as param, then it would stop
But that doesn't solve the issue
Could it be because i am using chaos?
Literally The only difference from the original BP_Node code is i am now using a C++ inherited Skeletal mesh component instead of a BP inherited.
Should I make a cast at the beginplay and Set the PlayerMesh?
I appreciate the help @surreal peak And i learned a few things from ya
or what about if I discarded the "Trace Ground" Function and just used the code inside of it? though that would be alot of work and not sure i'm know enough to implement it properly
Na you should focus on getting that proper pointer there
I'm not sure atm what to do about it
all good, I appreciate the help none the less.
@surreal peak I wanted to show this b4 i go. I changed the Set to PlayerMesh Instead of BP Player Pawn. And it got rid of the error, but instead I lost all functionality and the error changed to Access none BP_PlayerPawn. So i think i have to Make an extra Cast just for the PlayerMesh, not sure where but i think that might solve it.
@surreal peak Thanks heaps, I'll tinker with it tomorrow. Catch ya mate.
hey guys, how do I add an anim notify state in UE4.27? It looks like it disappeared from the anims I'm currently using!
\
hi guys, anyone can help me with this?
i want that my main menu cinematic button will play a video and when it finishes it takes me back to the main menu
but unfortunately it is not popping up when i click. i have tried running print string every step of the way and showed that the flow is working so i dont know why its not working
would really appretiate it
@manic wigeon I'm not a bp expert but Either make a new InputAction for the play button. or your FlipFlop node needs to be swapped around, A should be play and B should be pause. I don't see any code here that indicates your media player will close when the video is done, only that it will be visible when clicked.
yes but atm its not even starting which is what im trying to fix. because either its not starting or its playing behind the main menu widget. but i dont know how to fix it
all i can suggest is what i said before. A normally gets preference over B so you might want to put Play in FlipFlop A and pause in FlipFlop B but i don't know if that will work
I think if you had a new InputAction Dedicated to playing the media player it would work.
i just wanted this button to do it tbh
Try YouTubing a Menu Widget Tutorial, sorry i can't help further
@drowsy ridge Is this what your looking for?
This is in an anim montage btw
@drowsy ridge https://www.youtube.com/watch?v=A0rkOSDp_jQ This guy has some really great tutorials for animations, it's mostly C++ stuff but also has editor stuff too. ๐
Today we are going to take a little break from our regularly scheduled series and go over a few Unreal Engine C++ Fundamentals.
This tutorial is going to cover UAnimNotify and UAnimNotifyState (s)
For this tutorial you will want to grab the started project from the links below as well as see a bit more detail in the blog post.
Jolly Monster ...
From an Editor Blueprint Utility, is it possible to access this collision data for a StaticMesh? I don't see anything.
I answered this the other day on #gameplay-ai when you asked about it
What is the consensus on Git Flow branching and blueprints?
Is there a "best practice" for configuring a reusable variable, such as "Health" that can be set for each npc, enemy, etc.?
For example, if I create a node flow that controls how health in general should act, and where it should display for each type of actor, what is the best way to avoid having to do this for every iteration?
I've looked up global variables but there seems to be mixed feelings with those. I think I may need to utilize the cast system but I'm not sure how it would apply to this case specifically.
guys sorry if it'll sound stupid but how can I recreate the mechanics of the first resident evil games? I can't find a tutorial that does something like this.
Im using components and they work like a charm. All I have to do now is give whatever I want to give health to a hitbox, add the health component and thats basically it
@eternal reef Oh sweet, I haven't even seen something called components in the editor yet. I'll look those up and try them out. Did you follow any specific guide/tutorial?
I've got a player pawn that I want to attach some child blueprints to does anyone know how to stop these blueprints for moving out of sync from the player? essentially when the player turns they turn too but move beyond what the player does almost like they are separate
I think DevAddict has a video about it, but cant remember which one
how do i insert a enum / int bitmask into a data table? i can add integer variables to a data table but i cant find the option to make it a bitmask
Thanks!
Quick question if anyone knows.
My blueprints no longer show a thumbnail of the object in them. Anyone know why? Or how that works?
I think you just need to add whatever Enum you make to your struct. In the dropdown where you select your variable type, you can use the search bar to find your enum.
but thats just the enum itself, i want to create a bitmask flag based on the enum
Hey folks, what would be the best way of making an observer pattern system in blueprints?
event dispatchers are just that
Hmm I couldn't get it to work tho
I'll wait for the UE4 to install on my home computer and show the blueprints I made ๐
generally you have to bind them manually if you want them to work
there are certain exceptions that are really useful where you don't have to bind them manually but the general idea is that they are working dynamically
doesnt GetCollisionUV work with skeletal meshes?
works fine on static ones but returns false on skeletal meshes. Even with per poly collision enabled
@odd ember
Lets say I have 4 actors of class BP_Broadcaster in my scene, then I have to bind each individual actor on my listener blueprint?
Yes, unless you have a some other actor that your BP_Broadcasters can call to which executes on a more global event dispatcher. Eg. You could have it so you have an event dispatcher in your gamestate that your actor can listen to, then when any of your broadcasters need to send the message, it does through an event on the gamestate which calls that event dispatcher.
order
not use get all actors of class
notuse begin play
generlaly you need to setup an architecture for an observer pattern to work best
beginplay isn't deterministically ordered
Hmm, would an interface be a better solution in this case?
an inteface isn't going to solve your lack of architecture
you need two blueprints to communicate in some way
so you need to understand how they can get to a place where they can communicate
So apart from my broadcaster and my listener, I need a third blueprint?
no, you need to figure out how to get two blueprints to communicate
Well, they can communicate with each other already
then you shouldn't have any issues
But I cannot have multiple actors of the same class assigned to one event in my listener
And a single reference to the class will only make the listener respond to the one reference of the class I have...
each class should have responsibility for itself
Red = broadcaster,
Blue = listener
generally you should have a relationship that is something like:
- parent (that has the call)
- spawns children (that hook up the call to events)
then when parent makes the call, the children already have their responsibility set
How do you get a "static mesh" variable to change the "Static Mesh Component" of an actor?
Using an array of meshes to dictate what the static mesh component is.
It won't let me use a "Static mesh" array/variable to input the set static mesh component.
If I convert the array to a "Static Mesh Component" array/variable .... it won't let me set any values..
I assume there is a simple explanation that I am just not familiar with.
bad naming convention I think was to blame... though.. nvm.. but i knew i shouldnt of named this test event "SetStaticMesh"
Thank you
im anxiously excited about the issue I am sure I am going to face very soon ๐
Why are you using a float for an item ID @_@
Laziness while testing.. lol The message was made first and I per habit used a float then my first idea with in the builder was get index etc etc...
Another probably easy thing
Some reason the message isn't sending. Did break testing and.. im lost.. no clue what I am forgetting.. idek how to ask a question.. fuck me
the interface itself and the interact function is working everywhere else
i followed the docks of ue and yea
Don't reference variables across execution paths - you're bound to run into trouble.
Yep
Because if you happen to click continue, before clicking new, then the reference to that save game object doesn't exist.
So when clicking continue you should be trying to do a load save game and specifying the values you want to load
that doesnt exist
yes?
but then how do i acces the .sav file?
as im new to the saving function
You can't really rely on saving the slot and index into the save game itself, otherwise you won't be able to really reference it it any meaningful way as your game needs to know those values first before being able to load it.
You can have a variable within the save game to store the "name" of the save that is displayed to the player.
But the slot name and index are something you have to control yourself.
hmm thanks for the help
Here's an example of something you could do - if you wanted to display a list of save games to the player. The Create Load Game Widget would be where you'd create the widget, and you can feed in the index value to it, so when the player clicks on the button or selects that widget, then you can load that particular slot number.
and then when actually loading:
Is your "Collectible Obj" reference set to something in the screenshot there?
When one uses creates a child actor in the editor using the green +Add Component button in a blueprint actor the Child Actor Template automagically appears (below). If one adds a child actor via blueprints using the Add Child Actor Component function there is no child actor template (next post)...
Is there a way to add a child actor template via blueprints?
yeah. I realize that it needs an instance of c_obj.. which makes what I was hoping to do not work.
I think in cpp it would be called a "constructer" or "builder" and I am trying to get it set up where when an event triggers > sets/updates c_objs values > then spawns an instance of c_objs with those values. im hopeless..
I think this might be what you're looking for?
I was using the Set Child Actor Class (what you proposed) but that doesn't permit one to add a template (at least the options are not visually visible of course). If you click on the Add Child Actor Component and change it directly there than the template options are available.
Anyone know how I can use blueprint editor utilities to create a new asset?
Ok I see, I'm not really familiar with using Child Actors, and I've actually never noticed the template option. From what I can tell it's supposed to be an easy way to pre-define and set values within the child actor. If you're doing this at run time, then it doesn't make a lot of sense as you can't really define a template on the fly.
To achieve what you're looking for, I think you would need to:
A) Subclass the child actor class you're using if you want it to have specific predefined values and then use that class as a "template" when you "Set Child Actor Class"
B) Manually populate any values within the child actor after using the "Add Child Actor Component", which would allow you to calculate and specify any values you need to feed into your child actors however this seems like it would be harder to manage if you had to populate a lot of values.
You can set variables on actors to "Expose on Spawn" so when spawning the object you will see options for values.
Thank you! Man I have never once seen that. Really appreciate it
Hey all, I'm trying to setup a way to configure import options (like Import Textures) based on whether the source FBX is originating from a Character folder on disk. Right now I have a functional editor utility blueprint that is enabled on editor load and when a user imports an FBX file, OnAssetPostImport and OnAssetReimport (from the Import Subsystem) fire off accordingly and do some things. For what I'm trying to do, I added in OnAssetPreImport with the intention of using this to detect if the FBX mesh is coming from a Character folder on disk, and if it is, configure all the properties in the Import Window appropriately (that, or bypass the import ui window and just automate the import with the properties set).
What's eluding me is how to get the path to the FBX file on disk (i.e. C:/Users/Me/MySourceFiles/Characters/SK_MyCharacter.FBX). I need this information to set the AssetImportTask's filename property to do the import of the FBX file. Does anyone know how to retrieve this information in Blueprint? (I believe this is the const FString& InFileName variable found in the FbxFactor.cpp file, but I don't know C++ very well).
Hi! I have a quick question about my multiplayer game. So, when someone hits an object that is in the map, I want them to possess another character. However, whenever this happens, the server host is the one affected. Please Help.
Game Instance BP
Perhaps stupid question, but how do I allow the mouse to interact with my Tank Commander UI widget (drawn as an attachment to the Widget component on the actor)? My blank canvas widget drawn to player screen used to allow panning and zooming keeps handling mouse events, and I'd like to somehow order it behind any tonk commanders.
Before you say anything, no, Z-order being changed when adding to player screen doesn't affect the end result--it seems like anything added to player screen will inherently be layered above anything rendered by an actor.
Hi!
Can somebody please explain. Im undergoing training by next link:
https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/Blueprints/QuickStart/
In the last point there is exercise "Using Timelines, add some animation to the Box Mesh to represent it launching the character."
So I add timeline and create vector curve. But if I do not connecting "EventTick" to "AddLocalOffset" the box isn't returning to previous (correct) position. As it should. Even if values from Timeline is correct. I've sat for several hours until understood that reason may be in ticker.
As I understand "Timelines" is working by ticks. But if I don't connect any function to ticker it will be not synchronous? This is so unobvious behaviour for novice.
Video under spoiler.
Thanks.
This one looks like a simple fix. Show me the vector curve inside the timeline?
So, I've identified three possible issues.
- You're adding relative offsets, which isn't a problem in itself. However, you're starting this animation from the very beginning each time someone steps on the launchpad.
If you very quickly step on the lanchpad multiple times in a row, you can start the animation (so that it raises up)...
And then you step on it again and it plays from the beginning, so instead of lowering back down, it raises up further (like what you've seen).
So what you can do to fix that is make sure that it's hooked up to Play and not Play from Start.
And then reset it's position once it finishes.
- Your vector curve is unbalanced. You want it to fly up and then drop down to the same height it was at before the player stepped on it.
Again, this is fine, because you have it set to relative.
But to iron out any potential wrinkles, you could make it an absolute offset by grabbing the actor's location at the start and then modelling off of that.
- Lastly, minor optimization here, but if you're only affecting the Z value, you could get away with just doing a float track and breaking the Location's input pin.
This isn't working. Unfortunately
Here's an idea.
Now, this is stupid, but give it a try.
Hook up "finished" to "set new time."
You can type in "rer" to add a reroute node while you have the pin from "finished" dragged off to the side.
That lets you twist it backwards.
Nope ๐ Don't work
What do you mean?
Instead of doing a vector track, which messes with three floats (and you only actually use one), you can do a single float track.
Then you just break up your Delta Location.
This one is really basic.
Minor FPS boost. Probably 1% of a frame.
Anyways, give me a sec to focus on the meat of the matter.
Got it.
It's the curve.
There is another behaviour. That why I use local offset.
Anyway it works crookedly w/o ticker
Is there any way to speed up adding / removing HISM instances? I've chunked them into multiple HISMs but each time it gives me around 2 seconds of lag. I'm assuming making the chunk size smaller would help but that'd increase draw calls.
Would adding / removing in C++ help?
Okay, I have it.
Ready?
Yep
First things first, for this, I just used the simple collision (box) and the platform (cube).
Beginplay, you get the platform (cube)'s starting Z.
So, you just do "Get actor relative location".
Then right click on the vector output, split structure, you only need the Z.
No need to waste data.
Next, you have the actual overlap. Upon Box begin overlap, you play the timeline.
Which just looks like this:
Length of 1 to make it one second long, and the values can be whatever.
Next--
Every time it updates, it moves the relative location of the cube. This offset is multiplied by 25, but this way you can change how much of a bounce you get just by adjusting this one variable until you end up with something you like.
So at any point in the animation, it's just (where the box was before + how high the box is at this frame in the animation).
And that'll do it! As for me, I like it when jump-pads keep bouncing you if you somehow land on it before it finishes resetting, so this just prevents you standing on the pad and it not bouncing you.
When it finishes the animation, it just does this check-- Did the player somehow step back onto me before I finished? If so, launch again--don't wait for him to leave and then begin overlapping again."
I've tested it and it works splendidly.
All good?
Yes. Much thanks!
As I see there is additional calculations and Function calls. So I not sure which decision is faster.
Guess this depends on situation. Cause you can set external variables. For your case
Additionally I suppose that "Lerp" can be used in your variant
Yeah, that's true.
And to answer your original question of "Why is it that this only works when Tick is used?"
I think it's because Timeline's default value for your original curve is -1, so ever tick, it was adding that -1 to the offset.
Whereas when you remove the tick, it's only adjusting the offset every time it updates the timeline.
Now that I've resolved his issue, bump.
@glass crypt if you're creating so many instances that you're inducing several seconds of hitching, maybe look into Niagara mesh particle systems? Sorry I don't have a direct answer to your question
Another approach is adding instances gradually over time on tick or whatever. That might work
Question - is there anyway to stop my streamed level from causing slowdowns? I don't have "should block on load" check - I don't care if it takes longer, I wish I could tell it, "load everything slowly and gently' but I'm not sure how to do that exactly
[9:20 PM]
To be clear - this is a packaged build - while these are not "small levels" they are not huge world style either - the hitching is occuring
Hi! I need some help with my blueprint. This is for a multiplayer game so keep that in mind. So I have an object in the map. Whenever a player interacts with it, I want them to possess a new character. However, when someone interacts with it, it doesnโt make them possess the pawn, it makes the server host and them only. I am confused why and I ...
Can you just delete assets from file explorer that are not referenced in any levels / other assets and have it not mess things up?
or is there some metadata database that would still have records of those files and it would cause problems down the road
Hello I have a question about a special jump im trying to get would that be posted here or under gameplay?
Hmm anyone know why setting a cast's object reference to itself within a totally different class' blueprint would solve an error I was getting about not inheriting?
Specifically the Cast To Attributes_Characters node...
why wont my animation roll?
Because you didn't ask it nicely to roll
animations generally are not replicated btw
might need to do a multicast event or somethigng
*something
Is the image you've posted of the system working or not working?
Because the cast appears redundant, which is why you have a NOTE there - it's already an 'Attributes Character' object.
That's probably true but without it, it was giving an error. That graph is meant to convert a health value to a percentage and represent that in the UI as a progress bar. The Attributes_Characters is a separate actor component that I'm basically just trying to reference so that I can be flexible with the variables stored in it.
What was the error you were getting?
These were when I had nothing connected to Object:
That got rid of the errors, but now it's not outputting to the progress bar hmm...
Type "*"
oks
ill try
@woven wing You are a champ. I'm dumb for not reconnecting the white line. Thanks a bunch, that makes things a lot cleaner.
๐
Usually it's best to delete assets through Unreal's content browser, to make sure you're not damaging references.
If you are absolutely certain there are no references to the files you're deleting, or they all only reference each other, then you can delete them off the disc without breaking anything.
But you'd have to be very certain.
And it's best to use the Content Browser.
Yeah it's best just to NOT delete from file explorer. Especially if you use GitHub / other version/source controls. It screwed up my project in the past. Just when you think there's no links, it'll come back to haunt you.
How are your booleans being handled ? Have you tried running debug in the BP at runtime to see what's executing ?
no i have not look at that. i will ty
๐
Anybody know if there's a way to apply a mask using the custom stencil buffer to a particle system?
(I have a desaturation post-process material which applies a mask to highlight certain objects. I would love if I could also make a particle system be exempted from the desaturate)
I think you'll have better luck asking that up in #graphics
Alright thanks!
Can someone point me towards a tutorial on multiplayer character system. I am missing a simple thing, i know, but i cannot seem to get over this particular hurdle. I am having trouble keeping the settings for Char1 seperate from Char2. I just need an overview of a multiplayer character selection system. Conceptual level is fine. Thanks
This should help to better understand ownership, etc. https://youtu.be/JOJP0CvpB8w
An overview of the essential concepts for writing multiplayer game code in Unreal, in under 25
minutes or your money back.
Sample project: https://github.com/awforsythe/Repsi/
Patreon: https://patreon.com/alexforsythe
Twitter: https://twitter.com/alexforsythe
00:00 - Introduction
01:24 - Net Mode
03:33 - Replication System Basics
05:13 - Acto...
Thank you, i will go watch that now
Ownership section shows an example of a weapon. It's easy to understand. Dude did a great job
Cool deal ๐
@civic briar You were'nt kidding, that is a great presentation and was very helpful. Thanks again!
Why can't client shoot dead bodies (no ragdoll), but the server can. When hit blood vfx splat shows up.
hey there i'm trying to add a little color per liquid drop collision with my liquid plane but it's not working it's completely ignoring my lerp and timeline and instantly adding a color
can I not smoothly update with the set vector parameter node?
What's in the timeline, just a 0 to 1 timeline over the course of a second maybe?
Very simple, doesn't work, it's killing me
yeah just a 0 to 1 timeline using a float basically
well ur first branch isn't connected....
I made it 5 seconds to be sure but it still happened instantly lol
What do I connect it to I thought the boolean would activate it :' d
going to try and use a lerp inside my material now and see if that works better instead of the blueprint
Post the wider BP
if this is a health check/death check a tick or event timer generally works
I think I saw the last time too haha
Well thank you lol :>
hmm so this timeline isn't working either
figured i'd try a lerp inside the material
but nothing
๐ค
put a print string in the output value to see what the timeline is giving out
then if its correct, you'll know its a problem with the set scalar param value
yeah idk what's up lmao
it's basic af
oh wait i think I know what happened
I have multiple bp's doing it
must be someone in the background also triggering
muddying up the print
but it seems to work fine then
idk why it isn't working
timeline on it's own is fine
it works in the material preview
so for some reason i'm just not changing it?
so it doesn't start?
from here, it looks like it was triggered twice at once and tried to do the same timeline twice
so it was set back and forth between two timelines, causing problems
I think I finally got something to happen
hmm yeah that could be it
the timeline or lerp seems to be the main issue
I can instantly change a color but the lerp seems to be messing things up
I used a do once node to try and avoid the timeline running multiple times
yeah that means that probably you have that BP two times in your level, or you have the same blueprint section in another BP elsewhere
I need to change some math but finally got the lerp to work somehow
it just keeps becoming whiter over time which makes sense
not sure what exactly went wrong but thanks for thinking with me lol
is overlap more expensive than sphere trace?
@sand bloom On an unrelated side note, your color setting is very complex. Could be pretty simplified with many less lines.
Thank you, you're absolutely right. I'm still experimenting how to change colors properly while avoiding making things turn black or white
Considering a hueshift but idk what i'll do yet(i'm an idiot who wasted about an hour or more on something that could have been done in 5 min but hey I made it work, I need to stop trying to overcomplicate things lmao)
how do i fix the delay in the shell eject?
we would need to see your blueprint
How can I make it so that if 2 different player characters run into each other they can push each other around? Trying to make a third person brawler type game (a little like stick fight and smash)
I'm using the default third person project
That's really hard to do with prediction.
You mean prediction to make it multiplayer compatible?
Late answer but wait
@faint pasture what do you mean by prediction?
So far I've been trying to add force to what ever player you run into but it seems you can only add force to the blueprint itself or the player, which in this case is both the player lol. I would like to use the "Other Actor" from the EventActorBeginOverlap but it doesn't seem to be compatible @faint pasture
so unreal predicts where's the the other players to make the gameplay look smooth, you can notice it in games like splitgate if you turn off your wifi mid-game you will see people just drift away
planning to animate the charging handle and recoil with it
im still new to BP so dont expect anything good
could it be your spawned system has a delay inside itself somehow?
wait lemme check
maybe if you go inside the shell fx you can see whether it plays instantly vs taking a bit
@kindred tinsel I mean movement prediction, where you move instantly on your own screen even though ping exists. It'll be very very hard to do something like that with prediction. If you don't care about prediction (your movement is already pretty slow) then it can be done pretty easily. I'd make things physics driven in that case.
Could you make a physics driven player character from the default thirdpersoncharacter blueprint?
I wouldn't, just make a new pawn and give it a capsule and skelmesh
Character and CharacterMovementComponent are very tightly linked.
wait lemme send a pic
i sort of check, i dont see/know if anything causing it to delay
@dreamy solstice just play the FX, does the shell eject instantly at time 0?
nope
i thought it was loop duration but when i set it to 1 it just stucks at 1 second
the time for the fx is 10 seconds
What time does the shell eject?
actually wait a minute
Last thing, for this new physics driven movement system i'm now creating how would I lock the rotation specifically so that my character wont start doing backflips while im trying to move him?
it just spawns at 1 second
the moving is right after spawning
Look at the physics settings for your capsule. You can lock rotation
ah, cool thanks!
@kindred tinsel I would think carefully about going down the physics route, it all depends on your game design. Physics is great because stuff just works the way you want it to regarding forces and impulses and stuff like that.
Well my plan it to have physically animated third person characters which can punch and bump into each other all using a smash bros esq health system with the same falling off the map to die mechanic.
sort of a FallGuys/StickFight/SmashBros type thing. Do you think physics would be a good route for this or nah?
That'll be very hard to pull off online. For couch co-op it'd be very doable
currently i'm only focussing on local multiplayer
Yeah for local things are a lot easier. I would go with physics
out of curiosity, later down the road when I'm using physics for my characters, how hard would it be if I then wanted to add online multiplayer through steam?
Pretty freaking hard. Online physics is very very difficult to do well, and it's harder the more fast-paced your game design is. It multiplayer flight simulator would be super easy compared to a physics based fighter or something like rocket League
damn, would unity handle multiplayer physics things like this easier?
or are there any marketplace assets that can handle most of the multiplayer physics integration?
Not really, if it's your first game, do not try to do multiplayer physics unless you want to spend 4 years getting the thing to barely work.
I've been learning UE4/blender on and off for a little over 2 years and I'd say I can navigate and create some basic games but nothing special
There's some stuff coming down the pipe in ue5 to make physics replication a little bit better but it's fundamentally a very hard problem. If you don't care about ping, it's easy. But nobody wants to wait 100 milliseconds to punch.
so are games like Fall Guys, Stick Fight, Human Fall Flat, and all those in reality very hard games to make? I've always thought because of their simple design that they would be in some ways very easy
though it now makes sense that I'm wrong
It all depends on how much prediction you need. That will depend on your game design. I'm not familiar with stick fight but something like super smash Brothers in terms of speed would be way more difficult to design its net code than something like human fall flat.
gotcha
anyways is there any way I could add players moving each other using add force or anything?
With the CMC it'll be tricky. Go with physics. Using physics, it'll just work.
At a minimum you'll need to tune your friction and also have the applied force on your capsule depend on input and current velocity(so you have a speed limit).
Something like
ForceVector = InputVector * MoveForceScalar + VelocityVector * DragForceScalar
Would be a good start
Moveforcescalar being positive and DragForceScalar being negative.
2 characters pushing at each other would respond correctly.
And a punch could just apply an impulse.
Jumping would be an impulse.
hi guys. so i have a scenematic that plays on button pressed in main menu game instance. but when it finishes it does not hide the image widget that runs the media player in order for the menu to be visible again. here is my main menu widget and code for the video to run
How would one bind a C++ implemented event? Like how would it look like in BP
oh is it like bind (listen to) it in Event BeginPlay?
like this?
can't tell you about the C++ side but yeah that's how you bind events in BP. Drag out the "Event" delegate pin and type create new event or something.
yeah something should show up
hmmm
I'm not sure if this is where I should ask this, but I have an issue with animation blueprints, I'm trying to make it so that when the AI Enemy crouches, it plays the animation for crouching, and no matter how much I try, the cast to will always fail. I've tried using Cast to Character and Cast to AI-Enemy1 in both pure and impure cast, I've tried plugging basically everything into the object port, I've tried variables for the crouching in my enemy blueprint, Variable for the Pawn in the animation, I just cant figure this out. (Sorry for the length of this message btw, image attached is of what I'm trying to fix)
yeah you can either make a new custom event, or use that Create Event node, and then select Create a matching xyz in the dropdown
you mean add the set visibility after open source instead of after the media player ?
not sure i understood
for example here's Add Custom Event from dragging out the delegate pin. Depends if you want the red wire or not.
and the "create event" method...
Hi, I'm using a spring arm's camera lag options
but it seems to also affect rotation on x-axis
is there a way to constrain it?
@languid lion so you want rotation lag on z but not other axes?
I want it on y and z
but not on x
since x doesn't get altered at all but spring arm camera lag is somehow affecting it
OH right thanks!
how do you restart the game again?
oh wait
I think I did it ๐
hi, I lost my Event Bind on button when I package for android
Any good idea for fix this
I had try on launch mode and package on my phone Samsung A42
And I both try this two
does this make more sense?
its not working ugh
So I'm using launch character to blast enemy players away with the projectiles from my fps gun. I noticed that the blast would be too strong in the air where theres no friction, and too weak on the ground where there is friction. I fixed this by having 2 different amounts I launch the player, 1 for the air and one for if they're on the ground. Only problem is if they transition from being off the ground to being in the air (like they get hit off a platform), they go flying at a million miles per hour. How could I fix this?
I would just call it a feature but since you can't tell how close a ledge is behind you in first person I feel that'd be broken.
Are you using physics or no?
I'm testing the same basic "smash bros" esq system but now using an FPS project I had already made. The main goal of this thing was just to see if I could recreate the smash bros health system with people getting blasted farther depending on their health%. I also wanted to at some point make a physics based (possibly multiplayer) game but I guess 1 thing at a time would be smarter.
You'll have to really fine tune your air and ground friction settings to get the CMC to behave the way you want it to for something like this. I would honestly just start with a physics Pawn from right now.
hmm, for this specific project I'd have to redo alot of movement mechanics. I might just check after a second to see if they are still on the ground or not and if they are not then add a counter launch or cancel out some of their velocity. Weird work around but just to get this health and damage system working, it'll be fine I think until I figure out something else I think.
If anyone has any good ideas thanks I'll check back tomorrow but im going to bed.
I will put down creating a playable physics pawn as something to try in the next day or two and if it works out ill go with something more in that direction.
hi guys. so i have a scenematic that plays on button pressed in main menu game instance. but when it finishes it does not hide the image widget that runs the media player in order for the menu to be visible again. here is my main menu widget and code for the video to run
thats the video image widget
Can anyone help with loading/unloading levels? I've been stuck on the same issue for several weeks now. Keep coming back to it hoping to find a solution, but so far nothing has worked.
I've posted the full issue with screenshots of the blueprints on the UE answers site, to save blocking up the channel here.
https://answers.unrealengine.com/questions/1051607/character-not-triggering-anything-in-level.html
Basically, my characters isn't triggering anything in the level (streaming volumes, trigger volumes, trigger boxes, etc). I don't know how else to get the level maps to load. And the game is too big to have as one single map.
bind to the branch you mean?
The branch is just bogus as it is right now imo
So in the widget, when "play cinematic" is pressed, you want to start the video, AND bind to event "On End Reached",
which will go to a custom event, removing said widget
Not sure why you have the Mediaplayer in the pawn in the first place, but it could make sense i suppose.. Havnt played much with it
the reason was that i needed to call input actions from character bp and couldnt do it in level bp
so i had t call the action into the character bp
Not sure why it'd exist in the level bp anyways
So somehow you need to use a response event
If you encapsulate it in a function, you can always return the event aswell
The mediaplayer has those event delegates integrated,
so it knows when it reaches the end of the media file
If the media player reference is correct, sure
after the cinematic its stopping like this but not sending me back to the main menu. since technically the vidoe is an overlay widget
it should be removed and display the main menu again
You need to do something in the finished playing event
If you add a print string to it, you should see that it fires correctly
but you need some logic on it
Sort of the reason why i prefer the callback method via the passed by reference to the end event is easier to work with, since whoever called it can get the return delegate
it stopps like this
i added that event to the end reached
since i cant reference the media player from the character
i used it after the set visibility from the main menu bp
If you try to follow the logic you're using,
you should see that the event ur binding to probably is on either not a player, or a different player altogether
since you're not fetching the characters mediaplayer
nor can i see you updating the variable
cast to firsperson character isnt it fetching it like that?
You're not getting the mediaplayer from the char as the code is now, no
the media player is running inside the character blueprint. the media player component there is in this one is just calling the function for it. or am i not understanding what you mean?
Right, but that media player reference is not the same as ur using in the widget.
Quick question
casting doesn't make any variable used after that suddenly originate from the casterdobject
is there anyway to get the response to an executed console command?
sounds like something you'd need to get through cpp
yepp
I somehow doubt that its an actual instanced ref
but i could be wrong, havnt played so much with them as i mentioned
But If they somehow are the same, then adding print to the finished event should print perfectly
does it?
it prints fine. somehow i need to reference the main menu to somewere i think
No...
wrong
Add the print to the event that comes from the delegate
the "finished playing"
Still prints?
no
^Case in point
Correct.
Thats why encapsulating it in a function, like i showed you, gives you an easier handle to this
im not sure why. because in the outliner its chosen the same media player
returning the delegate through the event called.
that way the "caller" can get the event when the player is done.
Its probably some base class which is instanciated...
Not sure how that's related
ye nvm
so tha caller needs the red one which is the delegate
some how linked to the media player thats references in a differnt bp
i assume copy and pasting wont work
this is the ref im using for the video / image widget to start
yes but i didnt understand you clearly in text format
@manic wigeon
How make that mesh (skeleton with animation) follow to the player ?
but now i cant connect the input action event to pause and continue to the function.
because the media player ref is not compatible to target self
. . . . . . . . . . . .
Remove that custom event.
Call the function directly from the widget.
im trying to remake valorant character flashbang does anyone know what could i change to make the actual sphere in the middle of the screen like they do?
thats how mine is atm
which widget? only in the character bp i am able to call input action set
In this widget.
Instead of calling the event "media player"
call the function you've created
does the event go to finished playing ?
yes
After Set Visibility, remote the "Bind event on on end reached"
you dont need to plug the media ref into the function, its already there..
but remove the entire event.
delete these two
endless loop callback.
no but this is so that the pause action connects to it
on the right its the action to pause and continue the media
not sure if it works without it connect to the end of video main menu
You still havnt deleted the custom event.
then what does it start form?
It starts from the widget
inside the function you get the media player reference, and start the video.
but dont i need to connect the media player to the input action space to pause and space again to continue?
that media player ref
the stuff on the right, sure.
ye
the function itself uses the same meda player ref.
inside.
so nothing to connect there.
so il just remove the end of video from character bp and leave it only in main menu bpo?
y
.
that's to my knowledge the only affected party that needs it
ok so after the scenematic ended the print said that it worked and it should have read wwhen it finished
but stays like this
the thing is i cant remove from parent because that would remove the main menu from it too
So now you have the proper event callback once its finished
yes when it finished it poped up that the print worked
So now you just need to add the logic needed.
i need it to hide the specific widget layer
to collapsed
without hiding the other layers from the main menu
would this work?
nvm
nop
the set visibility collapsed connected to finished playing?
Hi! I need some help with my blueprint. This is for a multiplayer game so keep that in mind. So I have an object in the map. Whenever a player interacts with it, I want them to possess a new character. However, when someone interacts with it, it doesnโt make them possess the pawn, it makes the server host and them only. I am confused why and I ...
Yes
it workssss
thank you so muchhh
so why was a function good and a custom event not in this case?
so i can understand it
Mostly because Events dont return anything
return meaning allowing an action when it realizes it has finished?
For example. Or if you wanted to return a result
like you've created this extensive math operation for when damage is taken ,
then you might want to be able to return that info to the "sender" aswell, so it can know how much damage was actually dealt
Or if the player died from it or whatever
so like i recieve 10 damange and my ui shows me 90 instead of 100 u mean
could be
so its giving me a return of what just happend
it can , yes
appretiate learning these things so i can impliment them next time
You should first try to understand the flow of execution and data,
always question your variables etc
like this reference issue.
Hi. can anyone recommend a good book to learn blueprints?
Not books, but a lot of online articles and YouTube videos, and Unreal's official learning courses.
The rest of which are free.
So I tried a few more things, and casting with an array kind of worked, but all bools returned as false and a test string crashed the engine. All I'm trying to do is make my AI play a crouch animation when it crouches, if anyone has a solution it'd be appreciated if you could show me how to fix it.
See the pinned messages on either this channel or #ue4-general
does anyone know how can i do this in blueprints? a attached orb on my player character
Can anyone help with loading/unloading levels? I've been stuck on the same issue for several weeks now. Keep coming back to it hoping to find a solution, but so far nothing has worked.
I've posted the full issue with screenshots of the blueprints on the UE answers site, to save blocking up the channel here.
https://answers.unrealengine.com/questions/1051607/character-not-triggering-anything-in-level.html
Basically, my characters isn't triggering anything in the level (streaming volumes, trigger volumes, trigger boxes, etc). I don't know how else to get the level maps to load. And the game is too big to have as one single map.
My thirdpersoncharacter and playerstart are saved in the P level, as well as the trigger volume and trigger box (gave up trying with the streaming volume in the end). So at the very least they should recognise them on collision and return a print string. But nothing happens.
This has probably nothing to do with level and more to do with collision/trigger volumes
Can you get any trigger volume to work at all?
One thing to see, is your ACTIVE level - are you sure the trigger volumes are placed in the persistent level?
does anyone have any ideas of how did the developers do this? its in ue4 the game btw
Does anyone have any thoughts on how I might create a spinning attack that is triggered if the player rotates the joystick clockwise a few times
literally have no idea how to input that
i assume your character rotates too?
i would probably be looking at character Z
@open rose It is very likely that you're looking for TryGetPawnOwner, cast to AI-Enemy1
idk if this is possible but here goes. i want the box to not collide with the third person player but rather the katana(static mesh) in the third person player bp instead. How do i do that?
@pale orbit Couple different ways you could do that. You could attach it to your pawn in a position where it's visible from the pawn's camera, or you could implement it as a UI widget that you add to the viewport
@distant void yes, the character rotates, but how do I determine if he's rotated quickly in more than one circle? I assume the player would have to spin the joystick more than once 360 degrees in a short space of time
anyone has an idea?
Whats the problem? Your code/question shows us nothing.
Yep, they are definitely in the persistent level (just triple checked again). And I can't get streaming volumes, trigger volumes or trigger boxes to work.
For something like weapon attributes (like damage output) that will be used by a bunch of different items, is it better to use actor components with int variables or structs? Or something else?
I tried setting the trigger box collision preset to OverlapOnlyPawn, but that didn't do anything
I usually go with some master weapon (or more generical master attribute container) and go from there
Theres usually no one best way
Hey guys, I've been creating my dynamic material instances in BeginPlay for a long time now. A friend of mine says it's fine to do that in the construction script but I have some concerns, yet I can't really find a definite answer online. So I'm wondering, what is your preferred way to do it?
Thanks @gentle urchin I don't know why that option didn't occur to me haha. I think items might actually be "easy" then... Now my biggest challenge is setting up a character species chooser and visual customizer. ๐ค
One challenge at the time! If a task feels incomprehensible, divide it up into smaller tasks^^
That's something I struggle with. I'll typically spend 12 hours banging my head against a problem, finally solve it, then not want to touch that portion for a long time. You're totally right though.
@paper quest The only thing I'm aware of that's affected by creating them in the construction script is that you may get lag when moving the actor in the viewport, unless you turn that feature of the construction script off
Hmm yea I see, but it's safe otherwise? No weird issue with serialisation?
I can relate. Sadly the code then often ends like a massive beast which as you say dont ever wanna touch again (especially if it works, even by tooth and nails)
Integrate the input on tick, average it for the last 1 second. If over 2 or under -2 you did 2 spins in the last second
It's probably a lot easier with the new indev input system
I'm already starting to see that. I understand the gist of class hierarchy, but I feel like I'm often not using it correctly and it's hard to ask the right questions, or I run the risk of asking 50 questions.
Its confusing in the start, but man can it be rewarding later on ! Just recently startee using a master widget class to handle all input actions a player can do while in menu. Works out pretty well so far. Basically everything is a function by some extent
So there's no need to check and direct player input actions based on the widget that is currenty displayed etc
That's clever, any guide/docs you're going off of? Sorry to talk your ear off.
Just trying to think practically, dont have any tuts or docs for it
Can share some inside info when i return to the pc tho
Sweet, I'd appreciate that, feel free to ping me!
Ive tried that, it always returns as false though, I'm not sure what's messing it up but no matter what i do its always false
Ill DM to avoid flooding if thats ok. And be warned, its quite raw so far. Unrefined ๐
Noob question... is a trigger box considered a 'trigger actor'?
No problem at all, thank you.
My thirdpersoncharacter is ignoring streaming volumes, trigger volumes and trigger boxes. Someone on another group suggested I use a 'trigger actor with collision setting OverlapPawn' (then disappeared so I couldn't clarify). However I thought a trigger box was that?
I already have OverlapPawn set on the trigger box. So I'm not sure if there's a different alternative I haven't tried aside from the above 3 methods to load/unload levels?
Do the pawn have the correct collision setting aswell?
What should the collision settings be on the thirdpersoncharacter? I thought they were correct, but now I'm doubting everything!
I currently have: Simulation Generates Hit Event: (unchecked)
Phys Material Override: None
Generate Overlap Events: (checked)
Can Character Step Up On: No
Collision Presets: Pawn
And the setting on the trigger?
put a sphere on top and set it to simulate physics in the details panel of the same world - have it drop into the trigger box and put an event on your level blueprint with the trigger volume reference, and put a break on it Event TriggerVolumeOnOverlap
On there it's:
Simulation Generates: (unchecked)
Phys Material Override: None
Generate Overlap Events: (checked)
Can Character Step Up On: Yes
Collision Presets: OverlapOnlyPawn
Generate Ovelap Events During L Streaming: (unchecked)
Update Overlaps Method... : Use Config Default
Default Update Overlaps Method... : Only Update Movable
might be that it's thinking you are a character and not a pawn - it doesn't mean you don't have a pawn but the physical mesh itself might be classed as a character
How do I get around that? Overlap all?
Would be a start
I think I had that previously and it didn't fix anything.
No, it's about 9 months old
Collision channels is one of the hardest new concepts to grab and it gets me everytime - you really should start a new project to just test this
Otherwise I'd scrap it and start over. But can't really afford to lose all the work (had to restart several times already for other things)
and watch a video on it
once you make the trigger volume happen in one project, open up the other one and compare the collision channels on both trigger volumes and both actors
oh I've got it working in other projects. It's just this one that seems to ignore it for some reason.
remember that a character has a mesh but it will usually have a collision box/sphere/capsule (usually a capsule component) and THAT is the thing that triggers collisions (much cheaper)
so copy the ones that work over, and make them work in your project
then compare the actors that do work with the actors that don't
I did that to begin with, but it just ignores it
like literally open up both windows and look at the collision channel for each one side by side
the odds of this being an engine bug are very, very low
in my other projects I could get both level streaming volumes and trigger volumes/boxes to work fine
the odds of this being a lack of understanding or the wrong tick boxed are extremely high
yeah, I don't think it's a bug. I think it's something to do with the actions that happen before the level even loads. At least that's the only thing I can think of that's different in this project.
The other projects don't have other levels being loaded in and out before the game begins
ok
then you can see in the world outliner and actually click on objects there
if they don't exist, then your references might be thrown off but as far as I know, if the overlap event doesn't even fire it's because
- The volume doesn't exist at that moment
- The collision is not setup correct on either the trigger volume (less likely) than the collidING actor
now my character isn't loaded!
ok, ignore that. It loaded it a long way off from where the level POV started
but the trigger volume and box hasn't loaded
use "Simulate" you can actually click on the object in your world outliner and hit F to focus on it
that's why simulate is so important
the trigger volume and box aren't listed at all
it's extremely common to have this bug happen-it's one of the first things I checked to make sure that I've spawned the actual object in the world before actually see if anything is wrong with the blueprint/code on it
so they do not exist so they are either being deleted by something or they are not really in that level
show me your levels details panel in your editor, a screenshot
how does that happen? I mean, outside of simulate it shows that they are saved in the persistent level.
1 min...
you want to make sure that absolutely no other eyeball is on - if none of the other levels are visible then when you look in your world outliner, the only objects you should see are the ones that are listed in that particular persistent level
drag that to a new tab so you can see that and the world outliner at the same time
it shows objects that are in another map too (despite that map not being visible).
although I think that's because that map is loaded when the main bit of the game runs
ok
no, right now do it WITHOUT simulate on. stop the game
we need to see for sure what is in your persistent levle
toggle off those two lower levels there, click the eyeball - I guarantee your trigger volumes will disappear
to fix it, you need to make sure you have your persistent level active (double click a level to make it active, yours already is because it's in bold) then you make the other levels active (so you can find the trigger volumes) right click on the trigger volumes and look for move selection to active level
if they are there when the game starts (hit simulate then hit pause) watch the trigger volumes - otherwise you need to use a FIND IN ALL BLUEPRINTS and see if those are getting deleted somehow
ok...
did a search for both the trigger volume and trigger box. Both only came back with one reference - the onactorbeginoverlap that's in the persistent level blueprint
is there anything that can override the persistent level? I mean, when the game first runs, it obviously loads the persistent level by default. But then I have other things loaded (level maps + widgets). Would any of these throw off what is/isn't displayed on the persistent level?
I've got screenshots of all the blueprints at: https://answers.unrealengine.com/questions/1051607/character-not-triggering-anything-in-level.html
put another new actor, a sphere, anything into the persistant and make sure it is there, that will tell you
ok..
created a trigger sphere in persistent, ran simulate again, the sphere doesn't show up on the World Outliner objects list : /
you are loading another persistant, find it in the content browser, the one you are currently using
So for some reason it's either not saving things in persistent or not displaying anything other than the thirdpersoncharacter and player start (but then why would those two things show up)?
or search your BP for "load level"
another persistent?
ok 1 min...
there are several load levels... not sure what you're refering to? If you look at those screenshots (on the unreal answers page) I have several levels loaded via blueprints before the first 'playable' map is loaded.
when I search in the Content browser, only one 'Persistent' level map shows up (plus the BuiltData for it)
Hey uh im using the TutorialTPP and when i enable the physics on it it erratically twitches non stop
so my anim bp can get the rotation of my enemy, but it cant get the crouching, it always outputs crouch as false? i cant tell what im doing wrong, if anyone can help itd be appreciated
You're crossing execution paths. Your set should come after the cast somewhere.
@open crypt thanks for trying though
ive tried that as well and it didnt work
also its on a sequence rn so it should work
but it doesnt
Are your other sets working? Speed / Direction?
yeah they both work, but the crouched is always false
Have you allowed crouching on your CMC on your character?
and when i try to test it by clicking this on the anim bp, it doesnt check it at all
yeah ive got can crouch on, the hit box changes, the animation doesnt
That's all there is to it. Having "Can Crouch" enabled on the CMC, Having Player Actually crouch by using the "Crouch" node on the character, in the anim graph getting the character and getting it's CMC and checking if crouching should tell you the value.
hi, why does my AnimNotify not trigger if I place it near the end of my montage but triggers if it's at the start?
its just strange because its all done right, its just not actually setting it to true when the character crouches, maybe its because its an eqs ai? but that wouldnt make sense because the other values work...
I think what Lorash said may be it - if you're looking at the debugger, you may be looking at the Anim_BP's instance. Make sure you select the right instance:
Oh its real bad.
It's the ALS character anim. It's huge.
it was set to this preview instance which looks right, but no matter what i select its the same, and its not just the anim graph that has the crouch issue, its also ingame where it doesnt play it.
Yea that's the one you don't want selected.
Run your game and select a different instance.
ive done that and it still doesnt crouch
the only difference is that i can now preview the crouch in editor, when running the game the ai still doesnt play the animation
Is it better to use LoadLevelInstance instead of OpenLevel? Or LoadStreamLevel? Or will that make no difference and/or screw things up even more?
Where are you setting your AI to crouch?
You're sure your enter cover event is being called?
i mean the hitbox changes, which only happens when the ai crouch happens
so im pretty sure it gets called
i tried making it only call the get into cover, and it doesnt play the animation then either
wait nvm it doesnt get smaller
thats odd
get into cover doesnt seem to activate at all
oh
its because it needs the findcover to work, so its still broken
yeah cause move to cover uses locations from find cover
so the getintocover is called and the anim is still returning false ):
Hello Slackers. Is there a way to script a projectile that is blocking but may pass through an object on hit if it meets certain conditions?
I have a projectile that is meant to pass through the first 4 pawns it collides with
Yeah, and have it count how many pawns it has passed through.
guys do u know how can I make a ping counter
i've made a 2d noise with trial and error, i know thats not how to do it, but it worked, and i wanted to know what i did wrong that i can improve
if my code was so spaghetti to understand what i did:
random value for X and Y,
a var called (Was) that saves what X was before, and a simple 1d noise based of X+Y that when it hits a wall:
X reseted to (Was) Y get changed a little bit and it move to the right a little bit, and var (Was) get changed a little bit too.
Loop 500 times and i got this:
I am trying to set a variable and then get that variable in a different blueprint class. But I am getting an error telling me essentially that it cannot find the variable . I'm lost. Seems like this should be working
@winged thicket
- Use a for loop. Not this weird cyclical exec loop that has Do N on it.
- Exec pins should basically never go right to left. Only left to right. Reroute pins are generally a bad sign.
- Graph is too big and is not labeled. Collapse nodes to identify individual tasks. Give them clear names. Graph should not require someone who is new to the codebase to parse the logic in order to understand what it does. Nicely collapsed tasks are better than big giant comment blocks.
Is that "BP ambient base" variable in your first screenshot valid? Like is that variable set?
But is that the variable that's producing errors?
Yeah, so it's not set. Accessed none means there's no data there.
hmm
An actor reference variable points to a particular spawned actor in your world, but somewhere in your BP it needs to be set with that data
it was just for a test, so its ok to spaghetti, i mean the logic. is the loop right or did i do something wrong?
how do you set it?
i must be way off in how i thought this works
i.e. getting references
@lyric holly is your BP trying to fade out the audio of a BP Ambient Base actor upon overlapping with it?
yes
Hello
I have an inventory system and slots are swapping -1 when an item removed.
I suppose in blueprint system the arrays work like linked array logic.
What should I use instead remove index?
I tried set array element and it works but it obliges me to insert an empty slot for new one.
@winged thicket I can't comment on the specifics of what you're trying to accomplish. fwiw I would strongly recommend using a for loop instead of this loopy pattern with Do N instead of what you got here even if it's just a test.
@lyric holly on the overlap node you got an "Other actor" data pin. You take that, and then you need to do a cast. A cast checks the class of an actor. The node in particular would be "Cast to BP Ambient Base"
If it passes the cast, you can use the output of the node to then get the Wind Rain Audio component and fade it out
ok trying
(You can also save the output of the cast node to your variable if you want to use that reference elsewhere)
So yeah, overlap events are one way objects can pass references to each other
how do i use it?
Connect Begin Overlap to the Cast node (execution wire). Also connect "As BP Ambient Base" into the target pin of "Wind Rain Audio C" @lyric holly
@winged thicket Your for loop node should look like this. I don't know what you have.
hi someone have idea why return from consume input is always 0,0,0
wtf happened to my for loop xd
But basically you tell it the first number and the last number, and then it will run the Loop Body logic that man times, with the value of the "Index" pin changing accordingly.
When it's done it will run the Completed pin.
wow that was so much more complicated to get a reference
@lyric holly you should look up a primer on "blueprint communication" to learn about references, casting, interfaces and whatnot