#blueprint
402296 messages Β· Page 455 of 403
I have a BP with a plane in it, i want to spawn little AI BP's to move on this plane on 2 axis
how can i set up a small dynamically generated navmesh/or siomply use the plane for the navmesh?
tried around and searched on the webs but seems like im stuck
@heavy lion that looks retarded tbh
now find a way to set the new enum variable. maybe in a timeline with a "event" pin
haha cheers @calm dock
@heavy lion you can also use map variables to do that
would make things simpler
but just my noob programmer opinion tbh
I cant understand why this wont work can someone help
yeahhh
what error?
@indigo zenith That looks a lot better. I'm just struggling with picking a random type and checking if its already active
i dont see anything
@heavy lion like that, but idk
the error is next to the set node
@trim matrix the variable fuel, is prolly not inside that cast
how do i fix that
where did u implement "fuel"
in my player character
is it the correct character? ur casting to
yep
@trim matrix point at the error and it will tell you what is wrong..also try recompiling π
thanks
@heavy lion the check is doen by the branch
@thin rapids I cant even create that find node. Well i can, but I then cant connect an int to it
@indigo zenith yeah I see that
recompiling wont help and it says property is not assosaited
its because the variable needs to be set to a map variable
I have done that
@heavy lion you have an execution order error there again π
It will "find" and check a different "random" than it will go to the switch π
the "Find" is executed twice
so the "Random" is executed twice
i.e. for the branch it will find one Random Weather ...and for the Switch it will find a different random weather
Save the Random Int to a variable and work with that... if you had it in function you could use local variable:)
nvm, guess i found it
@marble folio https://cdn.discordapp.com/attachments/221798862938046464/705403798402629672/aaaa.png
I didnt make this btw
I cant...
ah π
thats even more retarded
ok
the real question is, whats a poseable mesh component xD
@indigo zenith i tried making another project
it still crashes when trying to steer
maybe it's the mesh?
i don't think Victory messes with vehicle movement
if a "template" working fine. im not sure where to look m8
i seen some crazy meshes in unreal engine. akira like
the whole world filled with 2 eyes for example ^^
@indigo zenith Howd you create that select node?
i just right clikced graph
and searched select with the left top icon, there are a few once
This is all I get
So how do you add entries to it?
read
in the Add Pin button
Yep. But the one he posted has drop down selection boxes
If i change the wildcard to my enum, I then cant plug in an int to the index
If i change the wildcard to my enum, I then cant plug in an int to the index
@heavy lion if either the return value or the option nodes connect to an enum it will show the drop down menu
how can i bind a guis images rotation to a varaible
Oh my god. Its backwards
yes
question: event dispatcher and interfaces: main difference seems to be that eventDisp are triggered by the one actor who's generating them, and many other actors can listen to it.
while interfaces also allow that many actors trigger the interface, and any other actor recive the interface trigger.
am i right?
it seems that interfaces are more flexbile
Interface allows you to call event on an actor that you are not sure can perform the action..you cannot subscribe to an interface to be alerted when it is triggered ....
Interface is something you call on an actor... dispatcher is something the actor calls on anything that is subscribed to it
"call on an actor " is a bit difficult to understand, can you use different wording?
an actor call an interface?
the inteface call an actor?
somethign call the interface to get to an actor?
who calls who?
@wise jewel you get an actor reference and from it you execute the Interface on it....
or you get an actor interface and from it you bind the Event Dispatcher
not at all the same thing
ok thanks
Dispatcher is = to whom it might concern ... i.e. anybody who wants to know about this please bind an event to this and i will tell you when this happens...
Interface is = Hey can you please do this, if not ignore me....
so like opening a door would be interface
yes but you can call it on a window
How do I make it so that the Bone Name will not display as none? The hit component print string tells me it is SK_Mannequin (default ue4 model), but Bone Name is none
no? i understood that the implementation is done inthe door or in the window
example: can you open?
@sick sapphire its highly lickely collision settings, ur capsule blocking the hit
Apply Point Damage
the door open, and the window open in a different way
@wise jewel yeah that would be right
or you can have "Open door" and if the window does not implement it it just ignores it
yeah your hit info might not contain the bone
as @indigo zenith said ...also you have Overlap event not Hit event... pretty sure overlap event does not care about bones
hit event does? ok hold on
yes but you can call it on a window
@marble folio i've read can't
ok
but anyone can call an interface right?
Not rly
they are two very distinct things
I use event dispatcher in my day night manager... All my lamp post subscribe to the manager for the daytime change and they get notified by the day night manager of the day/night change when it happens
as an example
the other way would be the day night manager would get all actors and call an interface on all of them
that would be potentially very ineffective
slow
yes*
it's a matter of pick the right one
but in a very different way
I mean just because you can make a Pigeon protocol does not mean you should... for reference https://en.wikipedia.org/wiki/IP_over_Avian_Carriers
I thought I had it. This is sort of working. But it never displays the message about the weather type already being the active one
well because you set it...and then you check if it is the same one you set
you checked it and you checked if the variable is different than itself
Please... I.... its been a long day I swear
Would I need an extra variable for it then?
yes, it will store the old weather value
local variable please
local variable please
@marble folio that
oop
oops i meant to mark mordynak
my bad
i forgot quote auto-tagged someone π
see I did not know that π
why is my navmesh generated diferently on an object depending if i spawn it at runtime or have it in the level from the start
?
runtime
because navmesh is not set to dynamic generation
@marble folio it is
i also amde sure that every single setting is the same inside the project settings & on the recast anv thing
@indigo zenith I didnt realise what you had posted before but I think thats got it
As far as I can tell this is working as expected.
could be just me being a moron, but i don't think you'll need the switch if you're gonna do the same thing in all the conditions
he is doing just proof of concept now
yes, just saying
he will be adding functionality later π
That was the plan this morning haha
π alright
I will still need the switch if the outcome for each will be different
I was planning to use a struct or some shizz to blend from one weather type to any weather type and so on
So I need to be able to blend presets first
I will still need the switch if the outcome for each will be different
@heavy lion yeah, that passed right through my head, i can be dumb sometimes
ahh ok
Second guessing myself now
any advice on the navmesh problem? (just bumping)
any advice on the navmesh problem? (just bumping)
@blazing ridge would love to help but i'm completly inexpirienced in nav meshes
is there any ways to set rotation of only one angle without changing other angles?
is there any ways to set rotation of only one angle without changing other angles?
@golden kite you could break the rotation into that one angle
but it sets other rotations to zero then
@golden kite
I know that
Then you would get the existing rotation
you need to get the old roation and plug it into the axes that should remain the same @golden kite
but it sets other rotations to zero then
@golden kite you make the other angles the same as the old ones
its still broken for some reason, even tho I connect the other ones, it still acts weird
then the error may be somewhere else
Im changing the Z rotation only
its still broken for some reason, even tho I connect the other ones, it still acts weird
@golden kite can you send a screenshot?
@golden kite
that adds value to the old rotation
so you can split it and add only in the axis you care about
Im getting the rotation of another actor, because they are attached together, and all I want is to only rotate the Z angle
then do what @blazing ridge did π
hm
bumping once more to get advice on why my navmesh is differently generated at runtime than in editor
maybe someone also has another workflow for my idea that doesnt involve navmeshes.
i want to be able to spawn some AI blueprints on a plane - the plane is vertical and looks at the player camera.
then i want to generate coordinates for the AI to move to. sounds simple to me but im having trouble with the navmesh approach
so do u create another navmesh at runtime or something?
not really, everything the same @indigo zenith
dynamic gen enabled, the object has all it needs to be recognized by nav
the actor Im trying to rotate is a turret actor for a tank, I want it to rotate to the location Im looking at, when going up hill, it still rotates the thing weirdly
when Im on a flat plane, the rotation works perfectly
@golden kite use relative rotation/transform
why not leave the default nav mesh at it is and set to dynamic, not rlly sure what u trying to accomplish
and what the problem is π
@indigo zenith thats what im doing π but the navmesh is different
it is smaller at runtime
whn i place the object in the editor pre runtime, its like i want it
when u simulate what happens then?
@indigo zenith it definitely has something to do with my mesh
the issue doesn't occur if i use the sample advanced vehicle mesh
i don't know what's wrong with my mesh though
in ur log it says out of world bounds
so im no expert, but it seems ur vehicle is flying in less then a frame towards the sun m8
LOL
possibly collision issue there π
use relative rotation/transform
@blazing ridge
when I use relative rotation and turn the tank, the turret doesnt look at the point I want it to look at
let me record a vid
than adjust the relative rotation when the tank is turning π
yep collision issue
are u able to drive that thing at all?
yes
this is the issue
@golden kite but you want the turret to turn relative to the camera z axis?
watch the end
oh
I want X and Y to be snapped to the main body actor, but when I turn the Z, it effects the X and Y to need changes
so it doesnt turn down is the problem?
the problem is I take the X and Y of the main part, okay, but when I rotate the Z, it rotates the entire thing, causing X and Y to not be relevant to main body anymore, because they are taking the same value over and over again
so is the mesh a static mesh or a skeletal mesh
cause in the template they using physics as collision
it's a skeletal mesh
i cant find any collision like the one ur showing inside the skeletal mesh
im comparing template with ur issue
@golden kite you're setting the cube X and Y to the cylinder X and Y, didn't you mean to put the cylinder current X and Y to its respective nodes?
it seems it somehow has collision with urs. no idea how it got there
Im setting cylinder X and Y to cube X and Y
what happens if you turn X and Y with Z?
it wont have the same rotation
what happens if you turn X and Y with Z?
@golden kite i meant that you're getting the cube's world rotation to set into the cylinder rotation (X and Y axis)
the car's physics asset
@golden kite i meant that you're getting the cube's world rotation to set into the cylinder rotation (X and Y axis)
@thin rapids yes, when I try to rotate them by Z, they are not the values I need to keep the cylinder relative to the body anymore
Just a quick one, think i know the answer but brains gone a bit to mush today so just want to double check, This function if its called while timer still active it will just restart the timer and not make a new one correct?
oh god I just fixed my issue, set relative rotation doesnt need x and y to be filled
Im dumb
glad you found a solution
the issue at the start of the video remains
@golden kite wich is?
rotating the main body causes Z axes to be disrotated
oh so its what i thought it was
If the branch is true or false the function still completes both paths
It shouldnt reach the return node if the current weather is the same as the weather selected
hello can someone help me?
im trying to make a topdown shooter, and i have my character create line trace onto where my mouse is pointing
but the problem is its going up and down too
i only want it to go on the z axis, left and right
how would i do that?
Hi guys π Can some one clarify some situations. I have BP with print string on EventBeginPlay. Print string gives me 2 Hello when i hit play. Why printstring shoot 2 times?
turret needs to always look at the the camera point
@golden kite why don't you set the turrent relative rotation to the camera's z axis?
@indigo zenith So how do I stop the function executing if the existing matches the one to change to?
@past swan You have another print string somewhere
Hi guys π Can some one clarify some situations. I have BP with print string on EventBeginPlay. Print string gives me 2 Hello when i hit play. Why printstring shoot 2 times?
@past swan it happened to me once and idk how i fixed it
@void cobalt When doing your trace, dont alter the z axis
@past swan You have another print string somewhere
@heavy lion yeah, generally the answer is - because you're moron who forget about second duplicated BP in the level π
@golden kite why don't you set the turrent relative rotation to the camera's z axis?
@thin rapids its attached to the main body part, I want it to be rotated with the vehicle, but also need it to look at the position again
i used a tutorial, but the creator of the tutorial didnt explain that
@void cobalt Disconnect the end. Right click on it and split the pins
then from the minus, break that and just plug in the x and y
@thin rapids its attached to the main body part, I want it to be rotated with the vehicle, but also need it to look at the position again
@golden kite exactly, if you set the relative rotation to the camera z axis rotation, it'll be at that position no matter if the vehicle turns
Hello!
I have these two machine widgets, they run on the same code and everything. But acts up differently when they get placed on the screen
ooooooooo thank you so much @heavy lion i completely forgot that you can even split pins haha
hm, let me try
make sure to set z to something though
@indigo zenith I dont understand why the function is able to complete at all if the two variables match
You might want to go up and down ramps?
@heavy lion might have to convert it towards a custom event so there wont be an default output pin. but u can use the condition value - not equal to enum toward the exit node and branch after u did the set weather enum inside function
Or not shoot just at feet
@void cobalt you could run into collision issues if you put say the floor at 0, or if you decided you need to change heights
@golden kite exactly, if you set the relative rotation to the camera z axis rotation, it'll be at that position no matter if the vehicle turns
@thin rapids it didnt
ah i see
@indigo zenith This exists in a function currently. Would you just put it in a custom event?
@thin rapids it didnt
@golden kite my mystake sorry
@void cobalt or if you want objects that you can shoot over and stuff, depends really on what you want to accomplish
it rlly doesnt matter, its ur story ^^ coding π
my game wont have any verticality
so all i need is for the character to shoot straight
@void cobalt Get the character capsule half height. That should do it
@indigo zenith Did that. It made no difference
@void cobalt basically shoot it from your middle of character
@thin rapids it didnt
@golden kite try setting the world rotation of the turret to the camera relative z rotation
Regardless of where he is in the world. @void cobalt
its currently shooting out of the barrel of the gun
if it doesnt work idk what could be causing the problem
@void cobalt Its not ending at the barrel of the gun though. It will be ending at 0
yea defo will want to update that z value then, because your shooting at an angle
the line trace starts at the barrel
You want it to end parallel to the barrel
and ends at where my crosshair is
Not if its 0 on Z
@golden kite try setting the world rotation of the turret to the camera relative z rotation
@thin rapids nope. setting the world rotation is the problem itself already
but thats WIP
@thin rapids nope. setting the world rotation is the problem itself already
@golden kite well, i'm sorry but i'm afraid i can't help you any further. I don't have any more ideas in mind on what can be causing this
@void cobalt Yea it will work but its odd your character will look like this from the side
:l
so you want me to have the z axis from the end to the barrel parralel to where the linetrace will end in?
so that it will shoot straight
exactly that
i see
I outrealed the unreal engine
so in order to do that i will have to get something like a socket location and connect that to the z axis on the linetrace?
@void cobalt With your line trace debug on, shoot a few times, then press F8 to eject from player and move the camera around
i'm sure you'll be able to find a solution though
@void cobalt You already have the location of your gun muzzle
Just break the start location and grab the Z
ahhhh
omg this is so much better actually having someone to ask questions
for the past month ive been trying to figure stuff out by myself and/or thru comments on youtube videos
idk why i didnt join the discord earlier
you mean this start location right?
yea so where that pin comes from, grab a wire out and type break
break transform?
yea
that way you can leave it plugged into the start as it is without splitting the pins
then grab the z and feed it into your end z
but its not letting me connect both socket transform and the break transform at the same time?
neeever mind
i figured it out
had to put value location into in transform
is that it? cuz it didnt work
if you drag off the return value location and in the context menu type break, you'll get a break vector, not transform sorry my bad
nvm i got it again
i forgot to struct the pins
now it looks like this and it works
btw if i wanted the linetrace to come out of the character rather than the gun barrel, would i have to move all this BP into the Character BP?
bcuz currently this is in its own hitscan BP
and i can only use the meshes from here, which is the gun
or could i just add a component and somehow attach it to my character?
@void cobalt It really depends on how you organise your project, I always put things that are related on what makes the most sense to me, so shooting I would put that on my player character as thats whats performing the action
lets say if i have lots of weapons
differnet weapons, like idk a shotgun, sniper, machine gun
if it was all in my character bp then i could only have 1 type of those right?
Whos idea was it to use enums
or bcuz they are variables i can always change them in child blueprints
enums?
idk i just followed the tutorial, im still very new to unreal, let alone coding in any form
I don't suppose anyone has specific experience with AR image tracking here
Not you, some problem i have
ah ok
again its really dependant on how you want to organise but no you could have as many weapons as you want and just grab details off the 'Equipped' weapon
i see
is it possible to convert world location to relative location?
jk
Get vector Relative location?
lets you input a parent and a child location to get the relative location
pretty sure it does π
@golden kite Hahah my bad, its from the victory plugin from rama π
its free and well worth the pickup
what is its name
victory plugin
lemme check for you
the ue4 built in function relative to that is InverseTransformLocation
probably in the unreal launcher marketplace right?
Dear Community,
MIT Software License for The Victory Plugin ~ License (https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/4014-39-rama-s-extra-blueprint-nodes-for-you-as-a-plugin-no-c-required?p=1718286#post1718286)
I've decided to create my ow...
Hi, I'm trying to get a select node to update which row of a data table is being called for a specific event but for whatever reason, the select just never updates, it always stays on the initial index I set it on, any idea why that might be?
(the index input does update, I checked it individually)
Edit: worked once I took it off the macro and made it a collapsed node instead
Hi guys can anyone explain on how can I divide my procedural mesh "sections" to get better performance, or can someone just give me an idea on how this section thing works. thanks.
i managed to make interfaces to work in a simple case.
so, i still require setting a variable, and have it to point to the right actor i want to send the message to.
i mean, it's very similar to say hey you actor, do this. the only thing is thtat the code to decide what the actor do is put in the target actor and not in the source actor, the player in my case.
@wise jewel Sorry did you need help with some thing or is a response to someone else?
i want to know if i'm understanding correctly
yep, thats correct, to call an interface event you need to know the actor you want to have the event happen on
so if i mix interface and event dispatcher i could get a system that works like this: i have a bell that anyone can sound, and whoever is listening could react to that bell
yea, they work the opposite way round in terms of what needs to reference what
yep, only 3 real ways for blueprints to talk to each other, direct calls, interface messages and event dispatchers
why ?
They have a very speciffic use cases π the event dispatchers... most people will not need them π ever π
the example of the boss dying and other stuff happens around him for example?
not dispatcher
ok
I use event dispatchers for UI elements find there a good fit but not for much else.
The actors who are affected by the boss dying are countable and well known/easily doscoverable, if you need a world changing event based on that...world manager π
i'll have to get confidence with all those level blueprints, world controllers... player controllers...
I'm assuming you've watched the live training series about blueprint communication?
not sure when i need to use them or how to structure something yet
just scratching the surface
yes
but i found other video explaining better for my taste.
maybe because i'm still starting
well, i understood how to use them at least
documnetation itself is not very helpful
yeah that is a definition of any documentation... not very helpful π
haha well no, other software's doc is actually explaining things
@white lynx I do not 100% agree with that... there is a time for propper design and there is time for just "messing" around... the learning part is the time to just mess around and figure out how to NOT do things π
i do vfx, i use houdini and i always wanted to try unreal, and now i find this game logic is fun
Hm I skip the documentation most of the time and go for the source code... π
I use the docs to figure out where in the source to find stuff π
same for me in houdini for some stuff π
to see how some things are implemented is better for me
but i have no c++ coding experience, i know vex, some python.. used to do mel with maya...
so for now i'll stick with blueprints, i still need to understand basics of games
that is fine.. π stick with BPs as long as you can π they are powerful tool for learning
well ok, thanks a lot for the help, i keep doing tuts and testing out stuff
Anyone know how to set the default font size for comments in blueprints? Right now it defaults to 18. I Googled for this and it told me to change the "small font" in the project settings, but that had no effect...
How can i make this ship more floaty, right now its to sharp and abrupt, i want to make the user feel as if its actually floating
What can i use to achieve this?
Thanks
@unique flicker The child is a parent.
e.g. Vehicle -> Tank, and you spawn a Tank, you're still technically spawning a Vehicle
so, to answer your question, yes. I do believe that should work
It may depend on how the event is fired, however. You may need a call such as this in place:
it will inherit the interface so will still be able to use it fine
If you want to use the same interface event, but do somthing else can just override the event
What is the difference between these? What are these transform variables? I never set them up, so they must be automatically generated...
Hey guys N00B question but is there a way for one BP to call another?
What do you mean, call another
Let's say I have a BP that has a common behavior (equiping a weapon)
Then another BP tries to fire my player weapon, and when it's out of ammo it will equip the next weapon in inventory
I'd hate to move all that behavior into the firing BP
Well, it sounds like you need a parent class with an interface
Any behavior that two or more BP classes need to implement, it's a good idea to make it an interface of the parent class
That way, when you call EquipWeapon(), it will fire whatever implementation is appropriate, depending on which child class called it
@tight venture Trasforms just hold all 3 of the others in container, so if you break a transform you would see a location a rotation and a scale value in it
@tight venture if your talking about what relative is, is a childs location in relation to a parents so say if you moved something in world location to 0,0,0 it you be at the center of the world, if you moved it in relative space to 0,0,0 it would be moved to the center of the parent pivot point. if that makes sense
okay, so it's just a convenience set up so that you don't get access to rotation, scale, whatever, if you don't need them. gotcha, thx
@tough oyster you just need to get reference to that other BP somehow then you can either call events directly on it or use a blueprint interface for more general events, if you check out the unreal youtube channel theres a live stream about blueprint communication worth a watch if you get chance will help explain a lot
is VInterpTo the only way to get actors to move smoothly from point A to point B?
Hey guys, is it possible to get a reference (variable) of a landscape in a custom blueprint? The landscape is available in world outliner and i created it manually
Question, how could I separate the tens and one digit from an integer like 60
uhh, divide by 10?
@trim matrix If your creating it at runtime manually just get it to store a ref in somthing like the gamemode or state then you can use that to get the reference where ever you need it
Or you could use get all actors of class landscapes. and store that once at level load
Does anyone know how i can have custom events with the same name in different blueprints?
@sly mason if i understand you correct it would be
that will only work with 2 digit ints though.
@halcyon zephyr you can just set them to have the same name
Thank you, Im basically trying to make an ammo counter with materials, I just created dynamic material instance and im trying stuff from there
@tight venture you could use a timeline to do the movement which uses a curve so could get a bit nicer result
@tight venture plus that gives you access to other cool stuff like reverse stop and play from times
Is there any way I can enable and disable cull distance volumes in blueprint?
@loud cipher depending on what you want to accomplish you may want to look into leveraging behaviour trees, they are really useful but its another thing to learn
anyone know how i can make my mouse movement rotate the character? like a top down game?
hey guys did anybody already use "Editor Apply Spline" and got it working?
nothing happens to my landscape I want to adjust to a spline
@ocean radish Thanks. Yeah, I think I'll try a timeline. So, those are the only two methods of smooth movement?
I guess, why else would you need any other method...
anyone succesfully got the twin stick shooter template to get the player to rotate based on mouse x movement?
@loud cipher bare with will open an old project I had using topdown mouse rotation
Hi! IΒ΄m using mouse x to give me a value for speed for an object. But I want the βlastβ value from the mouse to keep firing until I move the mouse again and give a new value. How do I do this in blueprint? Is loop a good way?
@loud cipher thats how i did it in a project
@trim matrix your using mouse x axis to fire an event and want it to continually fire the event when its not moving using its last value?
@trim matrix you could use the xaxis to set a variable, then just use a timer or tick to perform the event
@trim matrix if x axis != 0, set x-axis var
@ocean radish the mouse is my throttle control for a boat. I want to set the speed with mouse moment. So if i move the mouse 2 times the boat shall increase speed two times
that sounds like the worst control scheme ever
problem you have is with mouse axis events they fire constantly as fast as they can when you move the mouse, there basically on tick you would have to do somthing like an increement of a var and use that to set the so if mouse x is >0 increement var if < decrement
are you trying to lock it into positions like full speed, half speed, stop half reverse etc or have it in a scale so can be at any point?
https://gyazo.com/21be38a99d4bbd790d2b565f149f6947 https://gyazo.com/d5d00d689f25f6fa7ec9327a595c6e91 Why can't the client shoot??? π’
@ocean radish i would like it to be in scale
@ocean radish iΒ΄m using the OceanProject so i have to implement it here i think
@ocean radish can i store the value and keep sending it some how (my scripting knowledge is the worst)
somthing like that will need to mess around with the numbers, and will be very difficult to actually get to 0, so will have to improve on it adding dead zones or somthing
then call your boat move on tick, I do agree with Zanet though seems like a very odd movement system, but ofc your game your rules :d
and feed it the throttle var
might be mouse y too for up and down
@ocean radish thanks!! i will try this. the mouse input is because that i have an idea to take an old optical mouse dismantlement it and take the optical senor and put it in a real control stick for boats. but i might have to reconsider if it wont work.
@trim matrix you would prob be better off using a joystick π
@ocean radish when i got an idea i have to pursue it......not always a good thing π
@trim matrix can't blame you, do the things you like to do
@ocean radish have to go, see ya and thanks
no worries, gl
yo, i've been pondering this for a while now, but does anyone know how to handle simple delayed jumps?
just to the point where no one would be able to immediately get back in the air after just touching the ground
i've already looked online and there hasnt exactly been anything detailed on that afaik, so if anyone has any idea on that and wants to share that'd be aight
Hi guys I've made a player ability class and I'm in the early stages and just testing features and for some reason the anim montage isn't playing but all of the prints successfully print out the correct statement, The animation is set to upperbody btw!
@ripe plume That would be pretty simple to do. I'd just save the time of the last jump and run a branch at each branch attempt to make sure it allow a jump within a certain limit. Use Get Game Time in Seconds to save and check the time. it's a float. To check it just take your saved variable - Get Game Time in Second
If you want it saved the moment you hit the ground you'd have to run it through the movement component, ideally in the animation blueprint or something that runs a tick that won't overwhelm the cpu call stack as there is no event for 'landed'
@ashen edge Have you hooked up the montage in your animation blueprint?
@carmine thorn Yup, super annoying haha
@ashen edge That's odd then. if your prints are running it should be doing something at least
Is it possible you created a duplicate anim BP and forgot to set the right BP on the character mesh?
I had a student who did that once
It's an easy thing to miss
The Anim bp is set correctly as I can see the sprint anim as well as see my jump animation in effect
really weird
Can you show me how you hooked up your montage in the Anim BP?
I'm spawning and attaching Thruster components to mesh sockets.. if I use automatic attaching with a transform the thruster works.. If I use it as in this BP.. the thruster is not working.. seems to be only when I directly attach the component to the mesh socket that it stops working.. the particle component works no matter what... any thoughts?
Is there any reason you can't preattach the thruster to the mesh and just enable and disable it as needed?
You might want to snap to the socket if you are attaching via BP
@carmine thorn So i think I found the problem in my montage there only exists 2 slots, the tutorial I'm following has many many more. Im using the default maneequin btw.
That might do it.
And the person running the tutorial picks UpperBodySlot
where is I only have upperbody
I can recommend getting some of the free EPIC paragon characters as they have montages set up properly and it might serve as a useful reference
Thank you I seen greystone itll server as the knight! haha Thank you very much !
is there a way to lock the pose/animation in a skeletal mesh character with a BP?
other than time dilation
Yeah, you can just set the mesh to use a specific animation asset
Is there any reason you can't preattach the thruster to the mesh and just enable and disable it as needed?
@carmine thorn it's a skeletal mesh.. so it would be nice to have the thrusters follow the mesh..
Well yeah. just attach them to sockets
yeah pretty much.. just can't figure out how to make the thrusters effect the character now
Hey, (relatively) long time member, first time messenger. I was wondering if anybody is pretty good with Blueprints that could help me with something?
I'm working on a waypoint system, essentially like Diablo 2.
This is what I've got so far.
I also have an Enum with a list of the different Waypoints that you can go to. I'm trying to figure out how to hook up the Enum to the Widget so it will populate the Text Fields on the buttons and transport the Player Character to the selected Waypoint when the corresponding button is clicked.
So I was asking in another chat and they said maybe i should try asking here xD
but lets say (and im playing an old fan game sonic souls) that uses this engine
and I enabled cheats and all that, If i wanted to change from lets say sonic to knuckles INGAME, if i were to use the console commands what would that be
basically switching from one model to another
is it the one that says Avatar [Classname] ?
anyone know why changing my agent radius for Navmesh does literally nothing? XD
it generates a "recastblahblahblah" which has some default crap in it instead of using my project settings and if i delete and rebuild it just regenerates a default recast crap again xD
even if i try changing recast settings instead it temporarily works in editor but as soon as i hit play it doesnt use it anymore and rebuilding leaves old one and regenerates yet another recast so then i have multiple π¦
@jovial elk If you want to change the character with different Mesh, Animations, Abilities and so on, you would probably want to change the Character BP or Class you're using for the character, not just the Mesh.
Oh, it's a fan game. I'm not sure about that.
So Iβm new to Blueprint and coding. Iβm currently working on making my character move with WASD. Which I did. I am now working on getting the character to follow the cursor he doesnβt. He just moves all weird.
Jk. Figured my mistake lol
@covert stirrup This is what I was talking about the other day. I think this was added in 4.24. Right clicking on a spline point in the viewport gives some new options. One of the options is a Spline Generation Panel where you've got options to generate some basic shapes.
Is there any way to attach a component by component class?
For example, here I'm attaching a component BPC_Bounce. But how do I make that BPC_Bounce into a variable?
@deft ingot but is there a general console command that can swap a mesh even if it dont have same abilities etc.
like a while back i used to play a star wars game called jedi academy and in the console command you can just type in "playermodel nameofmodel" and it works...and that was a way weaker engine and almost 20 years ago so im suprised something as advanced as unreal engine doesnt have something similar to that
Oh, yeah. I see what you're saying @jovial elk.
I would think that would be there.
@pure heron Can't you just Right Click on the Return Value and Promote To Variable?
That would promote the projectile reference. I need the component I'm attaching to be a variable.
Dur, urrrhhhmmm, I dunno.
What is the definition of Mesh. Sorry. Just started to learn
Mesh = 3D model without textures or anything
So if the character is a mesh. And you add a βskinβ is it no longer a mesh?
Oh, that one's easy. It's the visible model of something. It can be a Static Mesh that is just that, static or a Skeletal Mesh that has an Armature that can be animated in complex ways.
No, it's still a Mesh.
If you add a material to a mesh it's a mesh with a material
If you pour gravy over your potatoes, it doesn't stop being potatoes
The skin could just change the Material applied to the mesh or it could change the Mesh and Material but you'd still have a mesh.
Oh ok thanks
Mmmmm, now I'm hungry.
Have you guys made any games in the past?
like 1 small game
I have a bullet that uses overlap, when I shoot it towards the cylinder, why doesn't the print string print the name of the cylinder and instead prints the name of the Skeletal Mesh?
Probably collision settings? Iirc that's also not how you check for headshots
@sick sapphire
@surreal peak collision on headshot cylinder thing: overlap all
skeletal mesh: block all
bullet: overlap all
it seems to only work if it hits on only the headshot cylinder but not the mesh
i tried to use bones but i think overlap doesnt give bones in the hit info?
It does, that's what the Sweep is for
Headshots are usually done via the PhysicsAsset of the SkeletalMesh
That needs proper collision setup for the important bones
And that hitname for the bone should be part of the sweepresult
@surreal peak ah ok ill try that hold on
bone name return is none though
hit component is SK_Mannequin
Btw @sick sapphire I'm working on a game project. Never made on myself.
What type of game?
Well I made a small 3d platformer hehe
no one bought on itch, might give steam a try but im not expecting much, maybe only for the experience
Well, it's something
It's called slip n' flop, if you want to check it out hehe
I'm now working on a strategy game
Got a link?
I'm not sure what the rules are about sharing that stuff here, might get some one angry for self promoting
can't figure out why this variable won't set
I'll look it up.
it was originally a variable from gameinstance, but made it local and it's still refusing to set
Strategy game sounds cool.
yeah, it's an insane step from a platformer but Im going at it
@sick sapphire Hm, how are you moving the actor?
@native dust You can share your work in #work-in-progress , or when fully released, in #released .
@surreal peak bullet is projectile movement
the actor getting shot does not move but has a character movement compoment
thanks @surreal peak
Strange. It should give you the BoneName.
Iβm attempting to make a Diablo style game haha
Nice Flacyd. I'm actually trying to make a Waypoint system similar to Diablo 2.
pretty cool
I'm waiting on a reply from someone in another Discord so I can hopefully get it working.
what are you trying to do with waypoints?
Just get the stupid thing to work. I posted a short video of my progress above.
I have to work with a huge nav mesh on a huge map, I've found that I cannot use dynamic nav because actors have to go from one side of the map to the other
Hey, (relatively) long time member, first time messenger. I was wondering if anybody is pretty good with Blueprints that could help me with something?
@deft ingot this one?
Mmmm, that sucks. I'm not knowledgeable with nav meshes. Heck, I'm pretty much at noob at most of this stuff.
Yup! That's the one.
2 below that post.
It's ok, I am too, but i've learn a great deal just working on the strategy game
trial by fire haha learning as I go
@surreal peak strange, it does work when i use linetracebychannel to debug though
Mmmm, that sucks. I'm not knowledgeable with nav meshes. Heck, I'm pretty much at noob at most of this stuff.
@deft ingot It's ok the only drag is that it takes a long time to load the map in the editor, on a cooked build it loads up just fine
Hmm, weird.
hey does anyone knows if there is a way to make a spline work with a nav modifier? or do they only work with collision components?
Im looking to add navigation cost to a spline
@surreal peak nvm i just made a horribly convoluted system where the bullet would shoot out a short line trace
is their a template that shows what size the graphics need to be on everything? like say shooting a projectile. whats the size it needs to be?
I can't for some reason move my character. I have this set in the Character class. I can look around, but not move. What gives?
I googled everywhere but I can't find anything relating to my problem. There's also no gravity, which my character is supposed to have.
what does min and max actually mean in make box?
Hi, I'm trying to make my ai spawn from ground. When I use the component move to on mesh and have it going upwards it works fine single player but on multi they raise up and just stand there. Anyone have any ideas?
Holy fuck after several hours I finally figured it out. I had the gamestate set to "GameState" instead of "GameStateBase"
Really confusing and had to watch a youtube video to explain it to me.
I have a widget switcher with 5 choices and a load of buttons in each choice. I am thinking of using a new graph for each choice - how does it work? Should I put the button responses down in the primary graph and then just cut/paste them to the new graph? Does unreal keep track automatically of where everything is or do I need to do something more? Can't find any videos on this
On the top down game. Can you only have that default camera angle?
Jk. Iβm just a noob and should have messed around more lol
@hybrid topaz The Min Max in the make box are vector points in space. You can draw any eight point box using only two points in 3D space
@stable plume New graphs are just for organization as far as I know. With the way it works, I'd assume that when the blueprint is compiled down it likely treats everything in different event graphs like there's just one graph. You can move them between graphs, call events from different graphs, etc. So whether you use different graphs is just a personal organizational choice mostly.
@maiden wadi yer that is why I want to use them - to keep it organised and easy to return to and understand. So I guess I'll give it a try. Thanks as ever!
On making a double jump is their a way to set a cool down? Like say after double jump you cannot double jump again for 5 seconds?
anyone know why if I launch in stand alone
https://gyazo.com/d8139321df37561dd90f7173d8d29c40
this would sometimes cause the widget to get stuck on screen, but the player will have full control?
this is called in the widget
@glossy canopy Easiest way is to set a timer by event or function name. Set a bool to false when you successfully double jump, and in that event that you're calling after the timer, set the bool back to true, then on your double jump put a branch in that checks the bool. If true allow the double jump. Set the timer to your five seconds and you're good.
Sweet thanks
Anytime.
Hello, i am trying to implement swimming into a third person character project. I have setup underwater swimming when the character jumps into a water physics volume but would like to know how to setup surface swimming with a different animation to the under water anim. Any suggestions?
@brave citrus Hard to say. Where are you calling that event from? My initial guess is that you have multiple versions of the widget. So closing one gives back control, but a second widget gives the illusion that it never closed.
Well, being a local controller should only call that once. Can you make another input key really quick and just do a get all widgets of class, and print out the length before and after removing the widget from screen?
The thing is that is only gets stuck sometimes
no everytime, which is the confusing part
and so far almost all my in game widgets that open and close now do it
is there a node for removing one widget
@trim matrix Remove From Parent.
thnaks
OK. Every time an event fires in one blueprint I want it to fire in another. Interface?
@heavy lion Dispatcher
Allows a Blueprint Class to report on its state to the Level Blueprint.
Just reading this. Its only mentioning using it in one blueprint and the level blueprint. Not just another blueprint
@heavy lion Do your two instances of the blueprint have a way of referencing one another?
Not that I know of. They are just two classes based on actor
How are you spawning them? And what are they for?
They are placed in the level.
One actor controls the calendar, day and night system. Updates the rotation of the sun and moon.
The other is a weather controller. It will just alter material properties, spawn particles and such
Your easiest method is going to be Direct Communication then. Which one is the one that fires the event and which one receives it?
The one with the calendar. I wanted that to fire off an event every two hours. The event should be triggered in the weather blueprint
Does anyone know what is the best way to connect the post processing volumes of the game to settings ? Do I have to manually send a change to each one everytime the options are changed by the user ?
@heavy lion So, in the Calendar, set up a variable that is an object type for your weather blueprint. It needs to be Instance Editable. Then you can click on the Calendar one, it'll have a "Defaults" variable area in the details. You can click on the little dropper and select your other blueprint to set the reference up.
Thats not a bad idea actually
I already know how that jazz works. I use it for other stuff that exists in the level
@maiden wadi could you check dm for 1 second?
Hey guys, I'm following a course in which the mentor does the following: https://gyazo.com/974e9d48acd5fc1b6c072bc06513f56c So i tried doing this: https://gyazo.com/e914ea8615f4cd53a2256d09a2fe05f6 https://gyazo.com/ed08570de5ad8ed0d6a966fe87865340 but this didn't seem to work. Any idea what i'm doing wrong?
How can i get this ina structure
@halcyon zephyr can't comment on the #cpp but you haven't set a target for those Fire function calls. It wants to know which BP Rifle actor to call it on.
Hey guys Im creating my blueprints exposed from cpp classes and when I search for a blueprint two blueprint classes appear have any of you guys seen this or have a fix?
Ive created a cast too test and they are two seperate classes that cant be interchanged
@halcyon zephyr Honestly, I strongly recommend that you spend a few months learning singleplayer things and get a grasp classes and event/function calling before you go adding multiplayer aspects.
is there a way to like collect data into a database and when i need to pull stuff out of it? so like i have two variables - days and infections and after i click on a button the day passes. is there a way to save the infections at the end of the day and that day somewhere so i can later pull out of data from that database?
@weak hound Afaik, you can't write to data tables, they're read-only. However, you can have array of structs or a map which stores your vars, and you just add one more element to the array at the end of the day with the desired info.
Really weird thing about it, is it lets me access variables but then gives me a error when I try and connect them saying there incompatible
@trim matrix you create a blueprint structure and add a new variable... And type "texture2d" it show show up as a type for you
thnkas
My client can't see the shooting, only the server can. Am i supposed to make the startfire funciton multicast? https://gyazo.com/06b0fa82b44aeda27d4cf827ceb7978b
What is the better solution to control a "tick gate": An interface or a boolean in the game interface with a branch?
is there a setting i can tweak to get the navmesh to connect?
@halcyon zephyr you should multicast from server and call from client to server to multicast the event
@hazy igloo what is it you are trying to do? if tick is a must, i'd do a bool; if it can go lower than tick, use a looping timer
I want to implement a ticked turn based system: I want to use a UMG button to stop the turn for all actors.
ticked??? as in timed? like chess turns?
Like in Neverwinter Nights
could you give an example
lets say you have 180 seconds a turn
and you want to finish your turn earlier or smth ?
NWN used time for turns. 6 secs are one turn. I don't use time, I use ticks. But I want to stop the turn by the UI. So you can change commands for the actors as example
you're better off using timers instead of ticks for several reasons, such as lag.
@zealous moth Yes, this can be true.
the other reason is performance, on tick you're demanding every frame for a computation; using a timer on a 1s interval reduces your load up to 30 times
But how can I stop all my units in movement?
Hey y'all, been trying to crack a problem for more than two days now, and thought to ask, if someone could tell me what I'm missing. I've an actor placed inside a level, pointed at a camera, then turned into a 2d texture, to finally become a cursor. Now, the issue comes when I add a variable to the actor's BP, which I'd wish to call for its animation (from an interface). Must be missing something really simple, but for some reason the interface message does nothing (although I can see it getting data I think), when I try to call it inside the animation blueprint. Check out the image for more. Any ideas?
@zealous moth I will try an other approach. Thank you for your help
@teal spade your message has to be sent to your actor anim bp, not self
@hazy igloo make their movement either get checked on a timer or using the AI controller, stop their movement tasks
@zealous moth and how can I do that? can't find a target object for that
first hit on google: https://docs.unrealengine.com/en-US/BlueprintAPI/Components/SkeletalMesh/GetAnimInstance/index.html
Get Anim Instance
Can someone see any problem with this function? It sometimes returns infinite loop. it's an initiative roll for a NextTurnEvent for turn-based game mechanics.
@zealous moth still nothing
@round idol how in the world does this even work?? you remove map keys and then... what? no more keys?
@zealous moth π yes
and only returns infinite loop in certain situations ...for some reason
so how do you remember what the initiative was? you rebuild it?
@teal spade then somewhere in between you are not connecting a step. Add print strings between all your steps numbered 1 to x
@zealous moth I've noticed that the actor's event tick stops after a few milliseconds, after launching the game
never seen such a thing
thought it was only just a bug, as the editor not always capable of showing the active progresses/lines of code
@zealous moth Yes, sry had to afk for a moment there. Yes, I repopulate it. If it's empty, I retake all living actors and remake it, then restart the cycle
@zealous moth But if it's not kosher, how would I go about it? π
@round idol well the only reason it may loop is the fact that you put a loop in it to begin with; your "remove" has a boolean to say whether or not it did anything. Add another branch there and if false, return an error and see if you can track it.
@teal spade how did you check if the tick stopped? did you put a print string right after tick?
@zealous moth it stops printing the string, and can literally see that it stops (have windowed mode on), however I managed to make it tick continuously, by setting the Auto posses to player 0, instead of disabled. But the problem is still there... guess will have to tinker with this for a day or two
@teal spade is your mouse input being consumed by a controller
ah that's a good point
Also what is the type of the object
Cause only character and pawn can except inputs
Actors ignore it
Character and up....
nope, check the consume option
So, a seemingly simple problem β player picks up an upgrade, and now all of his projectiles leave pools of fire on bounce, explode on despawn, etc.
How to modify projectile's behavior? Simple. Add event dispatchers for bounce, for despawn, and call them. Then create some actor components that would bind themselves to those dispatchers and do the job.
Component's been added to the projectile, and it works. Thing is, how to do it on runtime?
Easy! When the weapon spawns the projectile, I get a reference to it. Grab that and add BPC_BounceFire and BPC_DespawnExplosion.
Now here's something I can't figure out β how to make them variable? Do I just chain branches if (hasBouceFire) AddBPCBouceFire(), if (hasDespawnExplosion) AddBPCDespawnExplosion()? I would hope not.
But you can't attach components by their class, you can't do it by a reference to them, the only way is those hardcoded nodes.
What am I missing?
Are "gameplay tags" and "tags" the same thing or different?
But if you have a character or something else in the stage listening for mouse input it could be consuming it as resolved
@round idol Fair enough, i'll look into it π u right, I keep ignoring those built-in debug bools. I'll give it a try ty π
@frozen spear yes, but if I set the variable to 1, by hand, and just send to the interface, it still does nothing
I've a print node for the animation BP, to check if the variable went through the interface
so far nothing
@round idol why not a for each loop with break instead of that?
@teal spade remove the return node from the interface
@pure heron have you tried a switch? Make an enum var as default for those "effects". Get the var and run a switch.
What if I need multiple effects?
Do I just chain branches if (hasBouceFire) AddBPCBouceFire(), if (hasDespawnExplosion) AddBPCDespawnExplosion()? I would hope not.
@pure heron Perhaps you want a Map that maps effect flags to effect classes?
Should just be the entery node...it enters with the info to pass along
Adding a return node makes it pass nothing along instead
Also, I could map whatever to the component class. Thing is, you can't attach an actor component by class, far as I can tell
@pure heron No, you can't I had this problem when I was designing my own skill/ability system
@frozen spear there's no return node anywhere in the bp
There's AttachThisComponent() and AttachThatComponent(), and AttachMeshComponent(), but no AttachComponent(ActorComponent component)
@round idol How did you solve it? If you did, that is
@teal spade
@pure heron Just transfered complex logic to BP actors and I spawn/despawn them accordingly - mostly data-only bps. Advantages are that you can have particles/decals/complex effects attached to them so...I just went with BPs
What are you doing there @round idol ...cause to me that screams for each loop with break
I was afraid I'd have to do something like an array of classes that activate on bounce, and on bounce the projectile would foreach over them and activate them in order
That's a bummer
@frozen spear you lost me there. whats there in the interface?
That return node
@frozen spear Yea, I'll look into it, just got caught-up here π Sec, i'll get to work right away, ur right! π
ok, no idea what a return node is then
The bpi should just be an entry node that contains the float to pass along
yes, it has one input
@pure heron I think you can call "add component" with your component, it says "DO NOT CALL MANUALLY" but IIUC it's safe to ignore that from blueprints
Lol it literally saids "return node" on it
I'll look into that, thanks
oh, that. I didn't add that
Create a new function in you bpi...call it whatever, give it just a float as input
@pure heron or you could try adding all the possible effects and disabling them by default
That seems like a performance nightmare
And add the bpi event for it to the bp
And I might want multiples of each
yeah doesn't seem ideal
Can't see a bare AddComponent anywhere
@frozen spear I see, because I've been trying to make it work, it put that node there... sorry about that. However, creating a new one, and replacing the message and event nodes, did nothing
Ok repharsing
: )
The message is sent to actors that use the bpi
In the bp youre sending it to itself
yes, but now I switched it to anim instance > mesh
It would need to be directly targeted to the classes that implement the bpi
In your case the animbp...not the mesh
Add a variable of type animbp in your graph for the sender....set it to the animbp of the actor with a get from beginplay
Then at message send it directly to the animbp
You can also set in the graph of animbp
hm
My unreal engine always crushes; anytips on how to make it work without force closing
Just store a ref of the animbp self on your player
think the actor's class is messed up somehow
it was set to character, but changed it back to actor
Or use any method you know best... But the messages from bpi have to target the objects that use them directly... Not indirectly
Targeting the mesh that has the animbp will not send the message to the animbp
@frozen spear Ok, weird...I debugged it and I know what happens. Somehow, THIS (see SS) removes the KEY but not the VALUE...
@frozen spear will try to make it work, somehow. thanks anyways!
That's all you're telling it to remove
So what happens is, the map is >0 but the entry is [none]>[# (value)]
@frozen spear
nope
or, the node description is broken (outdated/something)
So you're pulling the value and keys from the map and leaving behind garbage why don't you remove from the map itself rather than from the keys
I'm removing from the map itself man
look at the cord, the remove is connected to the map not the array, it just gets the key from the array
Chill dude, I'm still not even understanding why you're not using a for each loop with a break here... Kind of following through something you would never actually do is tough
But you would literally never do that like that
Chill dude,
@frozen spear Don't get me wrong, I'm not angry or anything π
The call to Remove absolutely does remove the value
My guess is that you had duplicate values (which is allowed)
I just don't see how I'd go about implemmenting a withbreak in this scenario. Break when actor is not valid?
Or you get the value array and store that as a variable
@sand shore I do get duplicate values
The isvalid checks to see if the actor wasn't "killed" in the turn so it shouldn't exist in the map anymore.
But I guess I could just "report" it's death and remove it from the map during the turn
The only weird thing is that it only leaves that "garbage" behind sometimes. Most times it runs fine, so I'm wondering if it's not some kind of bug with the node...
Did you try the removecurrent node
@frozen spear didn't even see that node π
I wanna see where you see that "garbage"
I'll run it again and hopefully get that. Lemme try and catch one π
Yeah RemoveCurrent is a nonstandard thing, never heard of that outside of iterators (that's C++)
There's a limited subset of things you could do in BP
That's also why this function is O(N3)
Gotta loop over the map to get the keys, then loop over it again to get the values, ... and that's a direct lookup instead of the common pattern of then looping over the keys and getting the corresponding values.
@sand shore 5 times in a row and doesn't break...Like I said, It only breaks sometimes. The "scenario" is the same: 4 units, one dies in first turn, sometimes the loop breaks...I'll try some more xD
sometimes it "breaks"?
What, you mean, you have a unit you'd expect to find but you don't? You get nothing back?
is it possible to use another actor's camera without depossessing the current pawn?
Looking for SetViewTarget
cheers
Youre also comparing for less than 0 on the map ...pretty sure a length of exactly 0 is empty
!?
Maybe tou meant less than or equal
That's not what I read there
Im on my phone
@sand shore Ok, sry, was still testing. 5 more tests and didn't break. By breaking I mean I get an infinite loop
I see it now...i should screenshot so you all can see what i see
Indeed
Yeah so I don't see that being infinitely looping
Is ue4 detecting it as infinite?
Yeah that's definitely possible
Or are you actually seeing it
If you go over a particular amount of "terms" without hitting any of a particular known set that have been whitelisted, the editor will freak out and say "Hurr, you've got an infinite loop"
What I actually saw during debug was [none] for key and 5 for value...
Oh, yeah, that's okay.
Ok so you are actually seeing it
That just means that your map was tracking a unit that got garbage collected.
It's fine, that's expected behavior when the unit is GCd
The ue4 compiler tends to be very very good at catching inf loops before they even have chance to run
Yeah but that metric is pretty limited.
It'll find your inf loops, but it'll also catch things like this?
But is his unit being destroyed somewhere before this code runs?
You'd need a large set of units
But I actually wenth through the loop like 5 times after and the key - obviously - didn't get removed since it didnt "exist" but still, the value was there in the broken map
@frozen spear Yeah he calls Destroy manually. That's why it gets GCd and he has a nullptr entry
Ok, so it is sort of "a bug" in my exact situations and should just remove from map on dead
I wouldn't say so
I report death anyway to the same bp which handles this function so I'll just add a remove from map there
you can remove a nullptr entry by saying Remove(nullptr)
You could remove him from this units map before calling destroy
That's probably wise anyhow
π€ I wonder if you get this odd behavior because multiple units were garbage collected before this function ran
@frozen spear Yep, Doing that for buffs/other mechanics already so I'll just remove from map through that function so this one can run clean π
TMap probably makes assumptions about only having unique keys
Very possible...
Just wanted to understand so I don't use this type of functionality in the future π
Either way, later calls to Remove would clear it up
Anyway, thx alot for ur hlp and time guys π i'll just report unit dead and run this one clean. ty!
But removing nullptrs is pretty janky...you should handle it correctly...so you are never having to remove garbage yourself
You're going to be null/valid checking anyway, even if you strive to keep it clean
(not to say that you shouldn't clean)
That's a nice safety net yes... But if he ends up with 20 to 30 different nullpointers each loop he clearly hasn't set up something correctly
Do I need to do anything else besides specify a transition map, and set UseSeamlessTravel to true in the game modes for each map to use the ServerTravel console command?
i have this bp i made where my weapon spawns with the character, i made a menu and i want it so the player can choose his weapon on the main menu
how can i achieve this through widget bp3
i have no idea on how to start with this
Any help is much appreciated
I would like to know this too, as my difficulty will be based off weapon choice (maybe)
You could spawn a "weaponbp" instead...make sure the weapons are all children classes of the weaponbp...from the widget using a stored ref to the player if its not attached to the player character...set the weaponbp on the character to the choosen gun
Make sure to do an isValid before spawning weaponbp tho
I have made a weapon base, which contains all the data and variables, and the rest are children of this, i would spawn the base?
1st or 2nd image?3
you can also look in to game instances, in you menu you you can store it here then when you load the new level you call the weaponn form your game instance
You make a varible on the char of type weaponbp... in the menu you set "riflebp" which is a child of weaponbp
Add a variable to playerchar...of the base class of weaponbp
Yeah got that
Then make a guns out of weaponbp by right-click create child of weapon
Yup
Then where you spawn it...plug in the weaponbp variable from the player
After an isValid?
Then in menu, you store an array of weaponbps
Based onnthe clicked button or page or however you handle you menu...have the menu "setweaponbp" on the playerchar
To one out of the array of weapons
Which you populate
Is that picture correct?
Take the weaponbp variable from playerchar and get it...drag off and type spawnactor
You want the version that spawns bp actors
As long as that is using the ref of the weaponbp you set as a variable on playerchar yes
Otherwise no
The menu can set weaponbp children as you need on to the playerchar at clicked or selected buttons...or whatever you choose
yup
When he spawns in it will create the weapon
You should do isValid? Check before attempting to spawn it tho
Oh yeah
Here you would grab the playerchar....and castto his class if you havent yet...then as playerchar---- set weaponbp .
i have already set weapon bp?
Youre not setting it on the playerchar
The player needs that variable
And from the menu you set it
do i cast to weaponbase in playerchar?
Is your character a weapon?
No
Is reference the player pawn?
No the reference is weaponbp
(thats a terrible name for that variable)
Have the menu grab a reference of the player pawn...then cast it to thw player pawn class...then as player pawn class set weaponbp variable
Now plug in the weapon of choice there
From an array of "weaponbp" type....
You should fill it with bp guns that are children of weaponbp class
do i have to cast to them in the menu to get the weapons then?