#blueprint
402296 messages ยท Page 796 of 403
by enum
hrm theres a lot that come up with enum
well make your own enum for them
ok. yea lemme try to get the dash working without the statemachine and instead just do it in animgraph directly
basically your enum becomes your state. you can then make it concurrent by blending state machines with other state machines, as simple or as complex as you want
anyway not really blueprint material so I removed it
just gotta wrap my head around it. funny enough i do this stuff at work all the time but we have a layer on top of unreal that lets us handle all the transitions. so you dont really have to set much up in the state machine for the core elements
have to get a lot more in the weeds without all the fancy tools created by engineering lol
Hello, I'm just wondering why this code wouldn't work with multiple objects that use this same blue print
@odd ember thanks for the help btw (and duke too). gonna try some of the suggestions and see if i can get what im looking for ๐
@odd ember i created an enum. how did you manage to get a blend poses by enum to show all the entries? mine only shows one entry. was trying to show all my options in one node
@golden vessel By default, the first thing to consume input is the first thing to use it and then nothing else can. To stop that, you need to disable input consumption on the event.
So if you have 50 actors all same class, all with input enabled in them, and you press W, only the most recent one to have input enabled would run the W key press event. If you disable Consume Input, all 50 instances would run the event.
in the details panel you can expose everything as pins etc.
click the node
yea i right clicked on the lil man and added the pins from enum
cool yeah
ill def have to experiment with this
animBP isn't true bp but a weird amalgamation
so different rules apply
also because it runs on a separate thread from the game thread
that's why the lightning bolts are important for performance
if you don't see them your animations are running on the game thread
ahh ok. interesting
i think im understanding it more. now i just need to figure out which way to go to get the result i was originally looking for (trying to get duration of anim). i guess i can use montage and call certain ones like dash in the animgraph directly, and then just use statemachine for the idle/walkf/walkb hmm
time to experiment ๐ฎ
hmm
so dont call the animmontage of the dash in the animgraph? interesting
i need to see if i can find a tutorial for the sorta thing im lookin to do
yea i have all that setup. dash works perfectly in regards to movement in the right direction
so now i have a valid call, just need to feed it into stuff
my current setup is sending the bool to the statemachine that allows me to go from idle to walk, or dashf, dashb, or walkb etc. that all works. my original goal for understanding all this better was to specifically get time remaining on an anim (or montage) so i could feed that into a lerp or a timeline for the movement, so i could get a cleaner movement over just launch player
I am using Animation Starter Pack and I can't seem to be able to change jump z velocity. Why is that? Any pointers?
normally id use root motion and ignore all of this. just dont have that option atm ๐
Figured it out
doesnt play a sound
on collision
it previously worked when the shells glitched inside the gun and hit each other
but at no other time it plays a sound
ive tried breaking result and using that hit location, same issue still occurs
ran thru debugger and its not registering any hits at all
ive also turneed on simulation generates hit events on my static mesh
nvm figured it out
needed to be turned on in my object parent
as that was a child class
@smoky rivetSimulationGeneratesHits is for things SimlulatingPhysics = true.
I have a bp which is a child of another bp.
I have a component that has a variable (of the parent bps type) i want to set a default for.
my child bp doesn't show up in the list. If I change the variable type from parent bp to object it allows me to select the child bp, but not when i select parent bp.
Any idea as to why that's the case?
@ornate linden For Classes, or Pointers?
Like here. i've made battles a variable, but i can only find my BP_HallwayBattle in the list when Variable Type is Object.
even though it's a child of BP_BattleBase, if I make the variable type BP_BattleBase, BP_HallwayBattle doesn't show up
setting default for objects doesn't make sense
it's a pointer to an instantiated object
How do I get the difference between two world space yaw rotations? I don't get this -180 / 180 degrees system.
you can set a class variable and construct/spawn the object from that
My intention was for this object to just be a set of data for this battle so i can just set a default variable on a npc and their dialog will be able to use that battle data to construct the encounter.
the same way my behavior tree does.
but i suppose they work differently such that i can't just have a collection of data i have as a default parameter?
it's fine to have that
but you have to understand that an object class and an object instance are two different things
what you're asking for is an object instance
that's a pointer to a reference that has to already exist somehow
so either you make it exist, or you grab it from somewhere else where it already existed
setting a default object instance doesn't make sense because the BP doesn't know how to construct one on its own, especially if parameters are required
but try and change it to a class variable and you should have it available
That did indeed work. So using it as a class with defaults preset and not an instance of the class is the way to do what I'm wanting.
well the class is just a template. it doesn't exist in the world until you construct it
or spawn it, if it's an actor
constructing it makes an instance out of a class
Utilizing a class without instantiating it is just kind of wild to me, but it works i suppose. since i'm not actually ever instantiating it, im just using it as a default data set to construct a battle later
is there a better way to do that? a static data vehicle? Like it's just a holder of strings and actor types and lists of npcs. I'm not actually using it to achieve anything other than providing data to something else later on
a struct
a data asset
but a data object is completely fine
it's honestly a good way of doing it
as long as you remember that you have to instantiate it
data tables as well
but data tables can't be written to
most static data in BP is made to be read from, not written to
DataAssets are really nice if for nothing else than the fact that you can put static data there and then also create functions that you can use to sort or pull data from.
they do require cpp though ๐
they do? what part of them requires cpp, i've been using them with blueprints only
creation of new ones
do you have in instantiate the class if you're never writing to it or using some custom function it contains?
I've been doing something like Class > Get Class Defaults > and then just using the data.
well if you just have default data and it works, no harm
I've been making primary data asset blueprints to create new ones that define the variables, then data assets can inherit from it is there something wrong with that?
nothing wrong if you can
I'm curious how though
ah
primary data asset is exposed
fair enough
okay, was panicking a bit x_x
How would one align a landscape to a splineComponent within an actor BP (not a landscape spline)? I'm trying to create a custom road tool, and I'd like to be able to adjust the behavior of the landscape on a specific landscape layer based on the spline within my road actor. I'm not using a landscape spline because their data is hard to access and modify without opening up the engine entirely. Any thoughts?
you're probably going to face the same issue with a regular spline
I don't know that you can access terrain data like that
I would recommend asking in #cpp perhaps
Pretty sure half of the discord just got blapped.
what happened?
Well I messaged earlier today and now just got told I need to verify by phone to "confirm my identity" before sending messages.
Which seems really dumb given they asked for my phone number when doing this and I'm sure anyone who wasn't me could've used theirs if they happened to be logged in at the time.
anyways irrelevant to what I wanted to ask
@astral epochikr? these "verifications" are more a pain in the arse for legit users than impediment for frauds pfff
So you know how when you create a class you can specify things to be exposed on spawn, allowing certain variables to be filled during initialization?
Is there any way to do this for classes created by the game mode (i.e. controllers/player pawns) when a map is opened?
Yup, though other channels here seem to imply it was enacted due to a spam issue so makes some sense. Its like anti-piracy measures, there to slow down annoyances rather than prevent them entirely
@astral epochafaik no, and it wouldn't help too much either since the order in which anything under game mode spawns differently after cooking. If it's what I understand you want to do ๐
you want to ref some other stuff inside the gamemode bps - right?
what was the question?
Hmm, I'm not hugely familiar with the spawn order but I can give a rundown of what I want to happen. I'm not doing it yet but its good to know when I get to that point.
The player moves around a world-map and upon selecting a location can go to a local map that naturally uses a different controller to handle gameplay.
My idea here was that when the player chooses a local map location, they are prompted to select what units they want to bring with them.
When the local map opens, that selection is used to fill variables in the player controller (specifically, a list of units they control)
I figured the controller would be the best place to store a collection of different pawns the player could control but isn't necessarily possessing at that moment.
And since a controller is made via gamemode at level instantiation
If that makes sense?
Eh... think of it like Total War's grand campaign maps?
@astral epochI think I get it, but I would store all of that in the GameInstance instead. I'm abusing that blueprint too much lol ๐
Oof, I did that in my last project. Mostly for save data tbf but I get your point.
That might actually be a good shout though.
I have about 50% of my game implemented in GI because I switch maps for every encounter and instead of tracking 195109 bps for their vars, I just keep everything in GI and pull it to other actors whenever/however needed
so I kinda' do what you do there, but the other way around-ish ๐
I'll give it a try now, just a quick throw-together to test the theory.
I am using Animation Starter Pack from the Market Place. Can someone give me pointers about how this works? (Picture) I've seen other ways of implementing Crouch, but this is going over my head. I am guessing it has something to do with the Animation Blend Space
Hey, can anyone explain character controllers and characters to me? All the example projects I have to look at just use the default controller which I can't find a blueprint to look at. I could make my view spin, but not look up or down. Is the Player Character Class supposed to be used only with the default controller or something?
I'll be in unreal hangout if its easier to chat
@astral epochAaand about the spawn order (which for those bps under gamemode is random in the end btw)
https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/Actors/ActorLifecycle/
I've tested it and it will spawn in one order during this UE session, close the engine and will spawn in some other order in another - totally unreliable ๐คทโโ๏ธ
@pastel terrace I strongly recommend just using the already implemented Crouch function in Character.
A controller is used to interface between the player (or AI) and the game systems. In terms of players, it basically reads all your inputs.
A character is a special type of pawn with additional things in it to make it easier to set up human/humanlike creatures to control.
Player = brain
Controller = nervous system
Character = human body
Well for whatever reason I can't seem to find any tut on how to make a custom controller talk to the character, or any concise way of telling which blueprints should be in the pawn vs the controller
Do you know how to set up game modes?
Your controller won't do anything if you aren't using it.
In Blueprint, you don't do that. You put the input controls in the character. You get access to those inputs when your pawn is possessed.
As for what goes in pawn and what goes in controller.... it varies and frankly I've seen people put everything into a pawn before if they don't plan on swapping characters during gameplay.
If the inputs relate to the pawn, like movement, jumping, and such, they go in the character. If they don't, they may go in the controller.
What Authaer said honestly.
Great example if you play shooters is the tab menu. WASD moves your soldier. Tab opens up a KDA screen. WASD goes in the soldier pawn. Tab goes in the controller. Cause you can kill off and unpossess the pawn but still see the KDA screen.
you can use inputs in the controller
nevermind you said that
This... sort of.
What I'd do is have it all in controller, but for something like WASD it would check if I'm paused. If I am, it sends messages to the pause menu to move around it, and if I'm unpaused it will send messages to the solder to move his body.
That way I can use an AI controller as well to send messages to their controlled pawn in much the same way.
That way same soldier could be possessed by player or AI, ya know?
entirely depends on what they're doing with their game
True, though I think that applies to everything we'd discuss here really.
Its all down to your design approach.
I like to put camera controls in controller
That also only works in singleplayer. You can't send controls to an AI controller from a client. Doesn't exist there.
Wouldn't the server be the one handling the AI entirely anyways? I never said the player would control them, only that the player and AI could control a soldier.
It's worth noting that you can enable inputs in an actor without possessing it as well. As all Possession does is call EnableInput at some point on the client for their Pawn.
pretty sure it also possesses camera, no?
Yeah tbf I've always found the whole possession... a bit weird.
I get where its coming from from a certain perspective but it doesn't work for all genres or designs.
which genres does it not work for?
RTS?
Possession will find the first enabled camera on the actor. Pretty sure if just calls SetViewTarget.
Technically you'd be possessing the god-eye looking over the world.
in rts your camera isn't a pawn
But that's just for moving around the camera. The real interaction with the world comes from selected units.
So trying to replicate the third person template using my own blueprints, and then add a second camera for first person.
I'm not sure what I did wrong but, if I had camera pitch working, then yaw didn't and vice versa. I tried both in the controller and the pawn
okay...? any particular reason I got tagged?
You seemed like you might know from the things you've said so far?
ah
fair
take a look at the springarm settings
there's something about control rotation there
Thanks for the tip
if there isn't a spring arm, your camera follows the movement of its parent actor
Okay so I'm trying to add an emissive color that IN NO WAY changes the material (as a sane default so that instances can add emissive color if they want to but don't have to)
But whatever I try, it changes it.
0 alpha, it still changes the material's appearance. Tried it with max brightness, zero brightness, kinda out of ideas.
probably more a material question than it is a BP question
I oculdn't find a channel for that
Oh hot damn, there we go. I'll take my business there then ๐
As far as how Input works in general. The APlayerController class has an array of InputComponent objects. This array is the InputStack. When you call EnableInput on any actor, all it does is create an InputComponent on that actor and then have the player controller add that component to the top of it's input stack. When controls are processed in the controller, it uses this stack to determine where that control should be routed to.
Heh... how would I do this?
I have this setup - but instead of the print string, i want some node that would break my game - i know how it sounds
I have blueprint break on exception enabled, and in case I forget to put in the actor type, I want the blueprint to break so I can catch it before debugging for two hours again only to find out I've forgot the ActorType
Oh interesting, you need a Throw statement. I dunno if BP has that
What node would break the game? Something that is supposed to always return accessed none or something
If you're using C++ at all, you could just make your own static.
๐ญ I'm not @maiden wadi Just said like 3 hrs ago, I just can't learn that matrix stuff ๐ฆ
I mean if you can learn Blueprints you can learn C++. Code is code ๐
But to answer your question more specifically, I bet if you created an array with 1 element and then tried to access index 2, it would crash right there
Lemme check! Gimme a sec
I've got a shipped title on bps, turn-based strat+rpg, so i'd say I'm decent with bps. Can't understand more than 2 cpp lines tho lol - I've tried (not hard) but I have :P@flat coral
thats IT! Thanks! Perfect - of course ๐
I would probably just do an EnsureAlways.
Nah sorry, runtime error but doesnt' crash
You can pass a string to the function through the BP node, ensure always. When running in debug mode, you could see the string, and also f5 past it.
you don't need to learn matrices to code
I stay away from that can of worms
I'm too lazy to learn that. Rotators work just fine.
no no, it's enough - thanks! ๐
@odd emberlol Craz ๐ wasn't talking about matrices, but rather the movie - but I guess you knew that - good joke. From what I remember from school derivatives & integrals were way crazier than matrices but meh, I'm bad at math ๐
Matrices are on my list right before learning basic C++. Classified under useless information I'll likely never care about due to it being unncessary.
Honestly you only need to learn enough C++ to realize it's what you know already, more like the same language with a different accent than an entirely new thing. Then it all clicks.
I'm pretty sure of that, yet I never touched script/code before blueprints, so it is how my logic works - only. So far, haven't found a translation, that's exactly the problem ๐
BTW in case it'll save you a moment or two, this is the quick and easy code to get a runtime error
I still don't understand why
Word though that WILL print 0.0
isn't a breakpoint going to do the same?
@flat coralI did it like this:
Great idea! Thanks! ๐
missing the insults at the back end of the latter line
Yes, it will. I'm just going to continue making stuff, and at some point, I'll forget to properly set the name/tag of the stuff I make and it'll take me two hours to figure out why some stuff is behaving weird. I want to avoid that.
But his point is it'll hit the breakpoint on that print statement hte moment you do
all you're making is a spicy breakpoint for yourself
Like dont put the breakpoint on the branch or whatever for temporary testing, put the breakpoint on the print statement AFTER the branch and just leave it forever
@flat coral I wasn't testing anything, and I don't want to visit this ancient code ever again - that's the very point of it. I know how it works, just forgot to set the tag properly for one of the bps inheriting from this. Then it doesn't get indexed properly for tracking, and some spawns/spawn locations get out of hand. So, I want to make sure I never forget to set the tag, and if I do, all of a sudden, this happens
But you don't have to. Just put the breakpoint and leave it. You won't revisit the code unless you trip that switch, same as if you made this function
I often intentionally leave taxing/game crashing code (like not checking for validation for instance) and I want my game to crash whenever things aren't working perfectly ๐
A debug is like an intentional crash except it wont accidentally crash the game for release copies
@flat coralwhat?! I've tried that, and as soon as I close the engine, the breakpoints stop working (become yellow)
truth is, it was way back, maybe an engine bug? are they not supposed to work like that? only for current session?
i assumed they just stop working once you end the session
had that btw, but it was still good, couse I knew exactly what happened and where to look. Made it perfect. I find pride in the fact that after release, the community only found two bugs - once of them I can't reproduce to this day so yea - not so good that one.
Mark my words, if you keep doing this, you WILL ship a bug where you're crashing on recoverable issues because you tripped one of these deadman switches you're leaving for yourself
Where can I get that test material that measures distance? It looks like a grid.
I'm sure you are right, especially since it already happened. Need to find better solutions ๐ - keep the traps for myself only somehow
I'm using this aim blueprint for a turret in a vehicle the problem is that it uses the third person camera view instead of the vehicle i posses and it no longer tracks the aim. What can i do to fix this?
My solution for this was to put an IsDebug flag in the controller or gamemode, and then hide all my bullshit behind that. It's hacky, but it's a super easy way to manage a debug / release delineation
Of course, I'm not doing any bullshit as bad as this. I'm talking, like, skipping long dialogs or the control splash screen, or a bunch of screen prints.
@flat coralI remember I also found some "hidden" stuff about marking certain functions/nodes as editor only. The problem is that the engine crashes so much when you activate/deactivate those that I just dropped it.
Ok my turn to have a question. I've got this cute little function that gets my player controller typed because I do that All The Fucking Time
And normally when I use it, it looks like this
But I just tried to call it in another BP and it's suddenly demanding the World Context Object when it doesn't usually?
What's going on here? where do I get a World Context Object?
This isn't a multiplayer game, so if you get a controller it's the right one.
I would expect that to be called on an object
because objects have no conception of "world"
so they need some object that has a conception of world to tell them which world
I have a similar type of controller
but I never use the GetPlayerController function
I get the hard ref pointer that I've stored in a game mode from when the game session started
I haven't fucked with my game mode at all. Is it safe to store new variables in there?
the game mode has interesting functionality that is completely overlooked when it comes to spawning controllers and players
game mode gets flushed per level
Sure but you still have your defaults right?
I dont mean store it there at runtime. I mean "Should i put my 'isDebug' flag in the GameMode instead of the controller"
Reset to what though? The default value, surely?
yes
That's the only way I ever set this ๐
should be fine then
So how do I get a reference to my current game mode?
GetGameMode
Nope?
yeah
.
what is your intent with this
I'm just trying to scoop my IsDebug boolean so I can change the behavior in debug mode for something
so where is this class?
what is it?
like one boolean isn't answering the question
you wouldn't need to reference game mode in an object for that
Well except that's where the debug mode flag is stored
in an object?
In the game mdoe
doesn't explain why you need to reference it in an object
that's the part that doesn't make sense
But this class is a bullet decal manager. It handles reading the physical material from a hit object and returning the correct bullet impact decal for that
You can GetWorld in a UObject, but it requires an outer. I believe you also need C++.
the outer is the same as world context
What I'm trying to do is have it spawn a crazy bright glowing bullet decal in debug mode if the hit object doesn't have a known phys material
But I can just make this an Actor that just seemed really weird to me because this will never be placed in a world
is there any reason it's not an actor?
ok I see
you're trying to make a subsystem without a subsystem
Yeah the idea of it physically existing or having any physical properties at all is... wrong for it
game mode doesn't exist physically either
That's why I thought I'd be able to get game mode from the object
yet it is an actor
all the objects that needed a world were originally created as actors
because subsystems weren't a thing back in the land before time
What's a subsystem? That might be what I want
This is a bit of a weird class because in THEORY it's a component attached to the gun that's making these decals, but in actuality I need it to outlive the gun actor itself (so that the bullet decals it tracks persist if that character dies and the weapon despawns)
Man, it's rude that actor isn't on this list...
How does the Sleep Family work for a physics object? I can't seem to get my physics object to go back to sleep. I've tried the custom family and jacked up the Custom Sleep Threshold value but nothing seems to work to put this object back to sleep automatically.
have you asked in #legacy-physics ?
Didn't even see it there. I'll check there.
does anyone know how to add a random integer from 2 ranges
so you're getting two random ints from 2 different ranges? just add them right?
yeah
so i can add a random int from range 1-5, meaning i have a 1/5 chance for it to be 1 or 5
i get this part, but something tells me you're trying to do more
im trying to make my coin pickup return random values
im trying to make a store system but im having such a hard time
sounds like you are doing it though? or at least understand what to do here.... GetRandomIntFromRange > the output is your random number, where's the issue?
are you writing your own random?
lol, its a node that allows you a random int in range, shouldnt need to write your own
oh yeah it works
now i need to figure out how to increase the cost of upgrades with each successful button press
i appreciate the direction conrad!
and i figured that out too
damn
things usually dont go this way for me
does anyone know if you can set the visibility of objects independently from a widget
Set Visible or Hidden In Game is not tied to widget BP, ever.
is it possible for it to be?
I don't know what's the hold up here, being it's supposed to be directly executed on the actor.
i was able to set my player character to an invisible state when transitioning to a different camera
is it different because its the actual player controller
use collapsed to "hide" widgets
collapsed node?
sort of, its not called collapsed, but its a node for controlling widget-specific visibility
SetHidden node
Set Hidden in Game from the component directly, otherwise I don't know what's the hold up.
thanks guys!
not sure what you're doing it for, so to add in, you may also need to use SetCollisionEnabled if the mesh has collision, since hiding does not turn off collision
ill explain my idea if you dont mind
sure, and it might help to do so in the future, kinda depends
i collect parts and bring them back in order to repair my vehicle, i have set upgrade levels at predefined costs etc. Im wondering if i can add a visual update within every upgrade level
so if it was a car, it would be split into 4 parts. level 0 being fully invisible, level 1 being the car body with no wheels, and the next 4 levels being each wheel
if you get what i mean
based on this idea, i would setup all the meshes and then hide them, then have the code to unhide them when the upgrade happens, i assume an int that increases after bringing parts
yes
so i shouldnt add them all to an actor BP? but i should place them in the world as individual meshes?
you could make it a bp
build it in the bp, then place in level
they could be just meshes in a level as well
you'll need bp logic, so its up to you, but that is the option
depending on further ideas, it might be better one way or another ๐
however they get placed, you'll be adding them to an array so you turn on each one as the upgrades progress (meaning the array order determines which unhides first)
if its through a bp, then you'll be using a make array to add all the components into on begin play - then reference them whenever the upgrade bit happens
i see
if they're in a level, then you'd have an array var thats editable and then you can add those meshes to that array through the level editor side (instead of bp)
im not too experienced with arrays when it comes to unreal
in general, its a harder programming concept to work with when just starting
but they are just a list
You mean the instance edible?
i wonder if i can just set the object to invisible in the instance, then calling it to become visible after all my upgrade checks
the functions and methods around them are the tricky part
the eyeball icon ๐
Yep
lol, i guess thats what its called
not sure exactly what you mean, if you want to avoid array, then do it how it makes sense to you ๐
sorry if i seem ungreatful with your explanation
its hard for me to put your advice into action with my inexperience
and i have a deadline
nah i getcha, you're fine
looking for an easy way out :p
you helped a lot though
gave me an indication of the logic needed
trying to see if i can reference my static mesh in a widgit through a cast to
I recomend test a concept something simple like just using an array to make a list of strings or something. Test what you know. This way mistakes are a lot more clear.
yeah, that part im not to clear on but sounds like you have some UI elements in addition to this that you're trying to get working together
i will do that, but not right now
yeah thats the plan
gl ๐
32
I made a topview game, I would like the mouse pointer change uppon it position relatively to the player, like I want to make it change on all position around the character.
if the pointer is at the right, the pointer arrow change to right etc...
So an arrow facing away from the player pawn?
sounds cardinal
something like htis
this
if the mouse is at arrow position then change mouse pointer
You have to make your own cursor widget, and use it in Project Settings.
Well, the math for rotating the arrow is simple.
yes it's already done this
it's the BP math for this I just don't get it... I tried many thing without succes lol
GetPlayerPawn, ProjectToViewport. Use Point to find point relative to widget's center location. Find the look at rotation from widget center to that new point. Use Yaw to drive the angle of the image in the cursor widget.
is there an easy way (or tutorial) on how to pass a value from an anim notify or notify state to the animbp so i can use the notify to enable certain transitions? seems simple in concept but you cant set variables in notifies, so i think im missing something obvious
sounds like you'd want to use anim notify events to set a variable for your animbp
hrm. thats what im trying to do i think.
been looking for tutorials that cover it. lots of notify and notify state tutorials but cant seem to find one that shows how to pass a variable to the animBP
i guess you could cast directly to an anim notify?
anim notify states run on tick, but i dont think you can set vars in them. Im talking about anim notify events which you create in the animation itself
i couldnt seem to set a variable on the notify either. let me check to be sure
yea i cant set a var within the notify either hmm
you cant set a variable directly in an animation afaik, but to have the notify event
in your anim's graph, you can then get that event to do whatever you like when it fires
thats what im tryin to get, nice. do you know the node for that?
not the network of states but the logic graph of the anim bp
i couldnt seem to find it
when you right click on the animation timeline, there is an option for notify events and you can make a new one
so you make a new one, then you can find that in the logic graph
thats what i was expecting but i can only find the on start/end/fullblend ones (if used) when i rightclick
a visual aid may help here
logic graph being event graph or anim graph? i only see Cast to Anim Notify node
yes, event graph
yea i have notifies already created
i have a bp created for a regular notify, and a state (was testing both)
created from blueprint > notify class (and notify state class)
@brazen merlin sorry for the unnecessary tag, but i feel super proud of myself
your anim bp will be using these notifies, not another bp
yo thats great
conrad yea im in my anim BP. they just dont show up lol. cant figure out why
and your in the event graph of your animbp?
yeah 100%
and you right click then type the name of the notify event that you made?
gimme a screenshot
ok sure
those 2 being referenced at from the actual events on the node in the state machine
ok so heres the issue i think
if i right click on the timeline, and then make one (as mentioned) it shows up as you said. i might be mistaken but i was under the impression i could create a notify that could be shared / reused. so i could just call the same one in diff anims in same animbp
you sure you made notify events and not notify states?
yea
yes which?
yes to notify event only not states
okay, because earlier i was reading you saying states
i created both to test but neither show up as reusable. only the in-timeline created ones show up
yea i did both to try either outcome
err either option
alright, well anim notify events will appear for all anim bps so long as they are the same skeleton used
might actually be across different skeletons come to think of it...
but the point is that they can be shared ๐
i right clicked my anim, created notify (not state), local_test, i go to my animbp, right click, it shows up. which is great, that always worked. however, when i go to another anim on same rig, and right click, it doesnt show up (because i created locally, which i understand). so then i manually created one in bp (notify not state) and it wont show up ๐ฆ
creating from there
yeah dont make from there
if i do it on timeline, it wont show up for any other anim on the same skele
so you want to use an event you made on another animation?
yea the use case is this: i have a dash F, a dash B, a roll, whatever. lets say those 3 anims. in each of those anims i want to enable movement lets say halfway through, but only if input is detected. so i wanted to use a notify for that. the thing is, the notify would(should) be the same (AnimNotify_EnableMove) for example, but i just cant get it to show up like that. i thought you could reuse them by creating them manually.
ive only ever made notify events from the right-click menu via animation timeline (the picture i posted earlier)
and they show up for all other animations i have
hm somethin goin on. weirddd
yeah...
watching tutorial said the right click variant was only local lol
oh... hmm
maybe its outddated ill try to find another. cause this would solve all my issues if it worked lol
well, i am making notify events in montages specifically - but the "local" only makes sense if it means the skeleton, since the creation of the notify event is not a part of the anim bp. It's made in the anim asset, not the anim bp.
oh montages hmmm im doing it on a pure anim. let me try to be sure
i doubt thats the reason, but maybe it is ๐
hrm yea doesnt seem like it. tho.. i think that helped a bit. i noticed when i went to right click. the ones i went to add were listed as skeleton notifies
but i didnt create skeleton notifies
skeleton notifies are the anim notify events
reinforcing the idea that these are tied to a specific skeleton
ok i see. thats interesting. im so confused why the manually created one doesnt work. wonder if it has to a skele or something to show up
cause i just noticed the notifies DO show up under skele notifies for other anims. i was looking in the list.
let me test real quick (appreciate the help btw)
Is there a good way to write a comment in BPs that isn't attached to or containing nodes? If I just wanted like a big text block to ramble about why that function got so fucked?
hmm. in the tutorial it showed how that could be reused (and you could have stuff inside it of course)
like they have actual bps
select your comment, you can change it so nodes dont go with it
Hmm true but then it's still got this empty grey space under it
wait a sec. this is uh... weird. now some other notifies are showin up hmm
write out your deally then resize it
its becoming aware
lol
Hmm, fair enough.
Working for yourself means going from starting these comments with "This approach is obviously not ideal" to "Ok so this fucking sucks but"
yeah, i have a few comment blocks that are around a paragraph to remind me the idea behind it and such
The honesty to realize that the next time you look at that code, you'll wonder what the fuck you were thinking
ok hmmmmmm
the code from 2 weeks ago always looks like it was from someone else
yea this is def confusing but ill try the way you suggested. this tutorial led me astray! normally id blame removal of dislikes but.. dude does great tutorials so i must be missing something
how would i do something 10 seconds or so before a timer ends?
get the time remaining or the time elapsed of the timer
would this have to be event ticked?
yes, most likely
ah gotcha, i may try to do this differently then
you could fire another timer off that is 10 seconds shorter
timers are tick based too, so either way...
damn i def must be missing something cause being able to create my own notify would be perfect. must be a setting somewhere lol. i can get function of notify but i cant run it inside the animgraph lol but if i could make it pure/const i could just check the value
apparently the ones you create manually (via bp) can be used on other skeles too. hmm if only i could get reference to those in my animgraph once placed on the timeline
the ones made in the anim timeline should be accessible for all other anims/montages
and the events callable by the anim bp event graph
yea they are but i cant set any script inside them like i can with the custom ones. like i could make a call directly to it in animgraph to see if its been called. right now i think i haver to call the anim notify, then use it to set a bool (or whatever). which is fine. it will work too i think
and you can color code them
alright
i appreciate the help! ill get to the bottom of this! lol
lol alright, good luck
lol
i can definitely cast to it from the animgraph
not that i want to but interesting lol
looks like its a bug thats been happening for quite a while lol
how about anim notify states? ๐ Found those fun to play with
Wait. what's a bug?
being part of the conversation, im not entirely sure, i think it has to do with anim notify events
not showing up somehow or maybe its PEBKAC i really dont know
googled it and there were quite a few bug reports on custom made ones (manually made via bp) not showing up on animbp eventgraph for as an event
i dont think we need to start this again
i created like 5 or 6 of them via right click, create blueprint, then went down to anim notify. i can set the notify in the anim, but cannot call it in the animbps eventgraph
can right click on anim timeline and create them and they show up
as i mentioned before, you are making a class child of it. Which is why you need to do it through the anim timeline.
being templates i assume logic is ment to be done inside it?
this makes alot of sense imo atleast
yea and you can do some logic, customize it, etc
tried for like 2-3 hours, just wont show up when i rightclick animbp eventgraph no matter what i do lol (as anim notify). i can cast to them since they are bps lol
anim timeline?
sorta off topic for bp tho
figured it was eventgraph bp
dont tell me that, sounded like it had to do with anim events ๐
wasnt ment for you, was just a general comment, to myself included xD
here's where it started if you want to understand it differently #blueprint message
Right right
so that part worked straight out of the box
but when making a notify bp in the content browser
these are different
I imagine they are ment to just internally handle the logic tho, and not fire events elsewhere
ofc, if you need them to, it can always happen
yea those are the ones that wont show up in the rightclick add animevent etc
ill keep experimenting
so this one is made using the new class 'guide' , with AnimNotify as parent
I believe its only ment to handle things in the class tho
atleast thats what i get out of it
when added to the anim montage, it wont show up as an event in the animbp
I believe this is by intention tho.
hrm i watched like 10 tutorials that shows it working. damn hmm
read a bunhca bugs about it as well. how some wont show up unless you make a new one, or close editor and reopen (all of which i tried)
i mean, thats technically an extension of the class, but not the class itself which has no interface for it
right, but as an extension, wouldnt the inherited interface still exist?
lol i guess not, did you search for test2?
ofcourse ^^
did you try creating one with montagenotify under parent anim notify? i didnt try that one. though im using regular anims not montages
test and test2 would both show
well why would test2 exist as an event call? its contained in its own class.... it would all happen there then right?
Thats what im also thinking/suggesting
the first anim notify was made and somehow connected to that skeleton, whereas the custom anim notify is just a class
suppose it wont show up if it doesnt know which skeleton to work with
ill try to watch a few more tutorials, see if they say the same thing. the first like 5 or 6 all said it works and showed it working lol
ill go watch em again to be 100% sure
the same goes for the default classes aswell
they behave differently
thats a default class
same behaviour
hm
ill watch again. but ive seen it work in a few diff vids, and read some bugs on it as well
so who knows whats supposed to happen anymore
its crazyworld!
hello so im stuck on a door im doing for my new game I want the player the hit E and it will send them to another level but it is not working
here is my coding
I deleted it and it is still not working
is the overlap triggering?
yes
and are you using the default thirdpersonchar?
yes
the widget is showing?
yes
do you have any onconstruct event in the widget?
and are you sure the input fires?
I dont know how to see
Print string
should be your go-to for tracing logic.
Atleast i prefer it way above the debugger
its not printing
somthings wrong
do you think that cause the code is in a different blueprint it would cause that?
who knows
widget bp could have some silly stuff to consume the input
so i'd check there i guess ?
But
nvm
the door has no input enabled
๐
OnOverrlap -> Enable Input
OnEndOverlap -> Disable Input
assuming your input call is on the door bp, id assume it is not allowed to fire in the bp
how do I fix that?
well its an assumption, i wasnt clear on what, but did you try a print string from the event?
so pressing the input doesnt fire the string right?
or was this a print string about the widget
instead of a widget they just get teleported to the next level
I dont know what was wrong with it
and no it dose not fire the string
maybe Consume Input on the event needs to be off
well I got a work around might have to fix that later
alright got it to work. got my custom notifies to show up lol
I think that messed it up cause now I cant move when I move away from the door
as long as you dont use the move events in the door bp it should be fine
uhm.... where is this input being called?
I have a question, does this work? Will the array actualy change.
Oh this is a question of its own.
Remove items from the array.
oh I dont know much about arrays
it has to do more with the array being inside of a structure.
Did your question get solved? @obtuse dawn
It shouldnt work unless you save it again
yes I ended up fixing it with my cave man brain
nice
side note if I wanted to save the game after the player got teleported to the other level would I just use save game?
The two ways to transfer data between levels are: 1. saved games
- putting the data inside the game instance
You would want to save the game before the player got transported if you are using a save game
but would that just put the player back there?
depending on the data you need to transfer, the game instance could be a better choice though
If you used a save game, you would need to write code to load from that save game once you entered the new level.
If you put the data in the GameInstance, you would not have todo anything because the game instance would be intact after a level transition.
so say I wanted to save would I need to write more code after that to load the save?
yes
do you have a screen shot of what that would look like cause I have no clue how to do that
I mean
- Load save game
- Cast to the custom save game class you made
- Retrieve variables stored in that custom save game class
- Use those retrieved variables to set data for the new level
I just want a save game quit, start and load
I think I have somthing that might work
gl
Anybody know of a node which acts the same as a Lerp except instead of the alpha being between 0 and 1, it would be between -1 and 1?
just do that manually
from range -1 to 1, add +1 and * 0.5
that makes it 0-2*0.5 = 0-1
You can already pass negative alpha to the Lerp node. You're not limited to just 0-1
You can pass 2 to it as well and go twice the distance of A+B
yeah my example is just in case you want to have that -1 to 1 as the normal range
but I guess there would be no point since it's linear ๐
didnt know it supported extrapolation aswell ๐
huh.... I did not know this. Thank you
keep getting this error can anyone help it doesn't recognize anim instance of my mesh , using modular character , head is the master of my master pose component
your either casting to the wrong type,
or using the wrong input
warning says it all really
you are trying to cast the instance to a different class
Char_TPS sounds like CharacterThirdPersonShooter
that's not an AnimInstance
i get the anim instance from mesh in my character bp which is the Char_TPS_BP
Looks like you're already inside the Char_TPC_BP aswell, seeing as the mesh is avaliable?
I would think you wanted to cast to something like "MyAnimBP"
sorry , you were right i should cast to animation blueprint instead of character blueprint
Hi, Here is a question I'm facing:
I want to disable CharacterMovement when the UBlendspace1D is activating, similiar like the behavior of montage. What's you easiest idea to do this? I'm not sure if it's a good idea to make animNotify to interrupt the movement component. I wish there is easier approach.
Well. Something else is driving that to change. You could rely on that in the character as well.
It's the standard CharacterMovementComponent that I wish to suspend. It's just I'm not sure in what manner is easier.
What changes your BlockBlendAlpha?
it's a tap position, user input.
the position is converted to polar coordinate and the angle is the input BlockRollDegree.
anyone have any help on this?
@final pythonDon't reset state.
ahhhh thank you, I had the fade not keeping state, everything else was, so I didn't think of that. Thanks
Maybe I can try override the UBlendSpace1D node? Is there a "Node activated" where I can add a custom event and "Node deactivated" as well, so I can toggle the movement on/off?
By doing so, I don't need to worry about if the character is hit suddenly and switch to a AnimMontage without restoring the movement capability?
am i able to get a scene component array to appear in the child of a class similar to how a customfloat or bool can be modified on a child class in the details panel?
If you mean regular instance editable array, sure, why not
Which node is that? It looks kind of like a subtract, but I don't think it's the case.
dot
Thanks
I want to make a system so that if 2 enemies are engaging with the player other enemies dont engage until they are dead or disengaged. My idea was to have an int represent # of enemies engaged. I want this variable to be accessible by all enemies where would be the best way to store it, level blueprint?
your enemy controller
probably
but it may have to be on the player controller instead, since then you can increment that variable in the enemies when they agro to the player, then the player controller can store it.
either way, one or the other, I'm pretty new as well, but the level blueprint is for a few things that only pertain to that level, and I, for the most part almost never use it, except for main menus or something like that
so if you go to a new level then that variable will not transfer
Player controller would probably be best I think
Yeah its only 1 level but you never know if you're gonna make more anyways
Gamemode maybe
Could increase difficulty
Have more enemies engage
Depending on which gamemmode you're in
exactly, and it could also potentially maybe be done somehow in ai stuff, which would be a hell of a lot better than both those ways, but I'm not quite sure how.
using an AI director
Ai registers to the director at beginplay, director handles all cases of "what to do when... X"
How Would I set up a Multiplayer Widget ?? Like health bars ? I done most of my work in C++
widgets are client only tho
so as long as the rest works, picking up the variables should be pretty straight forward
No clue about BP's BRO I am a C++ develeper Ill figure it out through C++ Never really touched the BP system why i asked and I asked the multiplayer thread 10 times last night been up 13 hours trying to figure it out
They keep linking me here so whatever
Widgets are way easier to handle in bp according to sources
most of us have been there ๐ with that feeling
Ill try another 4 hours but might go C++ route I thought this be so much easier
Well Had It first then I f^^^^^^^^^^^^^^^^^^^ with the mutliplayer video by ryan now I cant even find stuff that was there before.
If i figure out how to get the widget back up to my health system Ill link a bp and ill see where I have to go next
Just place a BP class without a mesh in the world that handles that logic?
or is the director a specific class
correct. usually handy to have it in a globally accessible class ๐
its not super logical to have it in the playercontroller as a component, but in a singleplayer game, why not ^^
Or spawn a separate actor and somehow track that reference where needed
How do you set a class to be globally accessible? Arent all classes accessible through things like interfaces?
Not really, no
i mean... sure they can be but it involves somehow getting a reference to the actor in the first place
either by dirty methods like get all actors of class ,
or by some collision detection (or god forbid hardcoded references)
100% C++ in Unreal is nigh impossible.
Thanks Squize!
Even if you want it to be a separate actor, you can easily make it accessible by saving a reference in some global location like gamestate, playercontroller, game instance etc
So while all AI register to manager, manager registers itself to some easy-to-access bp ๐
If you were to need a ref to it from elsewhere, ofcourse. If not, then ignore that part
AI manager would most likely handle itself to a very large degree
how can I get all my foliage meshes from one level to another, like in the foliage drag and drop spot, I have all my culls setup, and I really really really do not want to have to redo all them in the new level, especially once I start streaming levels, since I am going to make a large scale survival game
Almost sounds like culling gone wrong
would they really have the same location in another level?
Sounds very unlikely
no
@icy dragon I might just have to try I don't understand Bp's At all I know how to get the hud to appear but sometimes like if I follow a guide like ryans , there is a different layout like I have a BP_Base I made with pure C++ so I work around it but there stuff when u convert or pull from a interger box that player char is not even in there.
For comparison, ShooterGame template still has handful of BPs.
But as far as widget goes, it's client only.
sry idk why they are that large, but how do I get those to the new level
without having to manually drag them all again, since I have culls on them
Ah. Probably easiest to copy the level at that point
not sure if there's another way
Yes why I tried to do Player_Controller Pawn and Player pawn to local controller however, They never showed up when I tried to pull from BP_Base or BP_Character but they would be in a third person that was just made
Anything that was not C++ showed up anything with C++ was not there
sounds like wrong meta on uproperty?
Maybe but followed his guide 100Percent
like..
I even deleted tags and stuff from the UMG side now I can't even pull anthing back up
I have those Squize
my Upropertys are fine
okay then
I been coding 17 years however, I am talking widget side nothing is showing up when I pull from a character that isnt bpC++ that C++ char shows just not widgets
Hi, I'm having some trouble with the destroy actor node. I know through testing through breakpoints and print strings that the object (build piece in this case) is indeed being destroyed. But it does not actually destroy it, or it is still visible at the least. The same object variable is used elsewhere in the blueprint and works fine, so I don't really know and why this is happening... anyone have an idea?
Those show up
I am saying the ones I make on the just forget it I am straight 13 hours past my sleep I will figure it out thanks
Is the variable valid in the first place?
You say its used elsewhere, but is that also pre-placed?
im sort of doing the same stuff ,
and it simply works really
Well you can see in the third picture, its doing the line trace (build trace) and then setting the location fine, that runs on event tick, and will only run when the bool IsInBuildMode is true.
and this is mine
its easy to check really
just add thje print to the top, as you probably did before
insert it during "IsValid"
before the next isvalid
What's reseting the DoOnce btw?
I checked via breakpoints, and yes it is flowing through there
This event on the end
So
could it spawn a second one?
in the building,
add a print to the Event Destroyed
It seems to think its been destoyed
Sounds more like its spawning twice, doesnt it?
Thats just me rapid clicking
daamn you right ๐ง
so its somehow just spawning it again after idestroy it
thats odd
Should only do that if IsInBuildMode is true
but its set to false here
you really should consider spawning the actor on click, and not on tick
apparently there's some race condition going on here
Yeah, honestly. I might try that
Not saying do like me but, its what im doing atleast xD
UI button
which handles the deletion of any old actor if a new is pressed while one was active etc
Thanks for the inspiration! I'll try come up with something
how do i detect if a player is inside a collision box or outside
nevermind haha solved it
simple question
thanks anyways ๐
although while im on the topic why does end overlap not have a bool like begin overlap
Hi, how i can fix/rewrite this?
Array with delayes : [1, 5, 5, 10, 10] trying to run it with ForEach
Actual:
Run at 10h 00m 00sec
Output at 10:00:01: "Array index: 4 Expected delay time: 10.0"
Expected output:
Run at 10h 00m 00sec
Output at 10:00:01: "Array index: 0 Expected delay time: 1.0"
Output at 10:00:05: "Array index: 1 Expected delay time: 5.0"
Output at 10:00:05: "Array index: 2 Expected delay time: 5.0"
Output at 10:00:10: "Array index: 3 Expected delay time: 10.0"
Output at 10:00:10: "Array index: 4 Expected delay time: 10.0"
Because checking for "sweep" (Set Location, but put into consideration collision checks between start and end point) is not necessary for End Overlap.
What is the correct way to do multiple options on an open level node? I need to do Listen and blsLanMatch
pretty sure u can't use a delay in a loop
@boreal scroll ForEach does not work correctly with delays like this. You need to iterate it manually
You can't, without recreating the macro and putting the delay in it.
@last abyss @earnest tangle Mmm... Thank you for the information
What you could do is if this is a one time thing, subtract deltaseconds on tick (or seconds on a timer that runs each second) and branch it
triggering their related event, and either reseting the value if its looping, or remove it
The loop macros uses Sequence node, and Sequence node disregards latent nodes like Delay.
adding the delay on the 2nd part of the sequence probably would work
Pretty sure it's just inherent to how delay works. There's only one delay per node active at any point in time
Doing this on tick or from a timer and comparing time would probably make most sense in a BP implementation yeah
@gentle urchin @earnest tangle I'll try to do that, thanks!
:no_entry_sign: Skrypt#1997 was banned.
Smoked
rip
if you ask what is very painful about blueprint, here's my answer, lol
At least it has nice cable aesthetics
yea
Or add additional custom events
Not a completely clusterfuck mess of cables
this looks like it could've been done differently
if nothing else, atleast stuff the actual stuff in a function and call that 30 times aswell
#multiplayer i'd say
Nah it's blueprint related haha
Well damn lol
i guess ill reput it xD
Has anyone done anything with matchmaking with find sessions and calculate if the current players is not equal to the max players... but it doesnt seem to work.... Any idea? Here is the blueprint blueprint pastebin: https://blueprintue.com/blueprint/axcm-f9q/
I apologize
Ive been doing some more research, might be possible through behaviour trees and a blackboard
let me simplify it, and get rid of all the widget stuff
For sure. But you need some intercommunication between the AI
arrays are the ugliest things to work with
If thats a director, or you wanna increment it directly on the player pawn is surely up to your discression^^
Love the reroute nodes
Why? They're so useful lol
^ I agree
Couldnt you intercommunicate by sending such data through the blackboard?
Maybe im misunderstanding blackboards lol
Yeah they seem to go haywire in the pastebin xD
Sure, a task could figure it out. But the task needs data from somewhere ๐
loop->sequence->DoOnce still is mad to look at
along with the reroutes and compactness of it all^^
I dont see why you need the do once really
it will only happen once
by nature
Yeah that true. Wasnt to sure what I was doing ig
Anyone willing to give me a few pointers in adding spline points during runtime? I can't seem to find anything relevant to what I'm doing. I have a line trace used to add the initial spline object, and then run another line trace to indicate where the next point should be. But I can't figure out how to implement it. Here are some attempts I've made:
https://d3kjluh73b9h9o.cloudfront.net/original/3X/9/4/94adb54ba0c5111c0c60304e1379b300e706d67a.png
https://d3kjluh73b9h9o.cloudfront.net/original/3X/5/4/5481fb09a00afc9f37c09c14c76a5ad5eba56dcb.png
ill take that out
Spline comes with 2 default points aswell , keep that in mind ^^
Weirdly enough I can't find much of anything when it comes to adding spline points in runtime
then i used a bool to track if it was the first point
after that its just adding them
which just seem to work
Ahh. So I have it set to create the mesh at construction (since it's a fence), and then I'd remove the points at begin play, and then re-add them? How do you determine the number of points?
Is it just the distance between points divided by the length of the mesh?
If this is in editor, you'd run some logic in the construction script i guess
im using it for something else, so i dont do any division (yet anyways),
I have this in the construction script
but when i did it's just knowing some limit you wanna pursue , and divide the vector length by <= target length
Wait wait
ah
well this seem correct ? Assuming the spline is made correctly ?
If I manually add it via the editor it works fine
the spline points?
Yeah. Everything is fine if I do it in the editor/viewport.
But I can't seem to add them during runtime.
And I can't find anything on it either
It's a player crafted item so I need them to be able to place it, if that makes sense.
surely there is
ye
Yeah
This is how it looks if I place it via the editor/viewport
But I can't figure out how to add points in runtime. I can't find any documentation or anything
I'm guessing these are fired from some event by the player?
I add the initial spline object via a trace, which works fine. But I need to be able to add points with the next trace.
Yeah.
I have a pretty system so far for placing objects and constructing structures, it works great. I just can't figure out how to add to spline specifically
So the flow would be place original point -> add point -> reconstruct object-> add next point -> reconstruct object... and so on
When this runs through its loop, once it finds a session and attempts to join. Does it stop looping? Or do i need a gate or something?
So would I spawn the initial object at the first point, or would I use the traces to get the two points and spawn the object using them?
^ I'd use a for loop with break
It should end since you're leaving the scope
Oh?
Also, for the spline, how does your construction script look?
And this is how it looks when placed view the editor/viewport/not-runtime:
It's ugly but it's a prototype
worked like a charm
What I would do is try and update mesh after each add of new spline point
It should be updating automatically is the weird thing.
Shad what are you trying to do here anyways?
Oh I'll try that, thanks
Updating the template?
requires the points to be correctly placed and spaced tho
The construction script should handle that, right?
Ahh
Oh hey! Yeah ive been stuck with this matchmatching stuff xD
Would I... get the distance between the first location and the second and divide by length of mesh?
I have numeric dyslexia so I'm especially dumb with math, I apologize
Would it be best to add a sequence to the break on the loop or off the first exe for the join sessions?
Not to sure if it would matter ๐ค
divide by desired length
This is what I did...
You could add a for each with break and on success break the loop
Mmmm
It should just leave the scope and ignore the other results anyways
if you want to sequentially try to join a match in order, you need a custom foreachloop with delay (or manual loop forwarding)
after a response , sure, but what happens when x matches are joined at the same time
Mmmmm I want to just test join only on a condition of player count then start putting in other conditions like pings and what not...
Set it to a do once
then the loop is wasted
It seems to only want to join the first viable server to me
throw it out, do get, and check validity on first index
So loop through all found sessions, get the first that meet x criteria, join it and close the gates
^that *
Reopen on next opening of menu or whatever
I was thinking about using a gate... Ill give it a try
You could also have all valid sessions thrown into an array
And then fire an event which randomly picks one to join
This way whatever arbitrar network code that find session does won't lead to some very predictable and biased server finding
Or list them, and let the player pick one ๐
I'm assuming there's a server list for that, the event name was matchmake so it sounds like a quick match functionality
Originally I had all the sessions get added to an array of session joinable based off current player count not equal to max. Then out of those get the lowest ping, then join.
good point. Clearly im not paying attention ๐
I was very confused originally why it wasn't adding to some list, hence why I snooped around. I'm familiar with shads other template so it helps
I have a serverlist setup, but this like you said is something of a quick match. As per the name, matchmake.
I see, yeah that helps ^^
you could check for the lowest ping on avaliable session during this quick matchmake ๐
Well I still plan on doing it. Just making sure I have a basic matchmake working first before I start getting a bit complicated lol
Well the ping idea sounds simpler since it ensures you have a sorted list before firing your event
Instead of worrying about sync
Ye, ill go ahead with it
This is what I had setup for the UI...