#blueprint
1 messages ยท Page 109 of 1
You dont have to explain source control to me, it has nothing to do with this issue.
It's your fix though
its not a fix
its a bad workaround at best
It is the fix though, because the actual solution is up to epic, and has no intention of being fixed.
So the only thing you can do is commit little and often, then devastating bugs are not so devastating
Insane take
Are you crazy?
The other fix is to avoid undo like the plague.
That's the bad workaround, because it's not the sole cause of the bug, and also is not so feasible
So that lands you back with source control
guys i really need your help, every time i try to do everything my engine stops warking. What could be the problem?
There's sadly a lot of things that can cause your component pointer to be lost.
No, this is a problem I've had and tolerate because I do what was suggested above, but you both have set an arbitrary threshold for what is "insane" in terms of frequency of commits. So if you don't want to readjust how you use source control what can you do other than try an engine you think won't have the same issue of catastrophic loss.
Outrageous.
You may want to try this tool, but I don't know if it works for this case. I only know it working for the case where it's caused by a cpp change.
https://github.com/Duroxxigar/ComponentPointerFixer
You'll need to build it from source though
just commit ur work when u close the engine, simple enough
I'm not the one with the source control issue.
We can trust the guy called source control :P
Since this sounds like a possible #multiplayer problem, you may want to consider moving that question there where the experts are ๐
alright!
Fix for data corruption bug: Save your shit ever 5 min :D. I hope you guys dont work in UX :p
wasnt he asking how to hide the mesh?
yep I was
Hey if you want a good UX why did you come to unreal :P
Have you seen our asset editors?!
i would create 2 arrays of type Actor
XD
one for FPS and one for TPS
and then put there all mesh that belong there
and just hide / show them
See above about the component fixer tool btw. I don't know if it addresses this specific bug, but it's worth a shot.
Thanks! will do!
welp I think this could potentially break all the stuff I did so far and get me off course, as most of the stuff I am doing following a course I bought
๐คทโโ๏ธ
also, the FPS mesh only ever needs to be seen by the local player, maybe that helps
hmm, how can I make that instead the third person mesh is only shown to other players?
just make the FPS mesh hidden by default
rn I have set that all third person equipables and the third person character mesh have the "owner no see" option enabled
however once I switch to the gun cam, it changes owner, so the third person meshes start showing
this is the ADS cam, it's stored inside each weapon
how can I exactly make that it's hidden only to the first person cameras?
so the camera in the first person character and all the first person ADS gun cameras
you hide it on the client when u enter FPS, then un-hide it when u leave FPS
maybe there's a bit of misunderstanding, there is no switch between first and third person
let me show you the issue and what I mean between first and third person
this is the first person
hold up I'm having another issue
okay solved
so let me show you
this is first person
and this is third person, from the other player perspective
this is what happens when I aim, both the first person and third person gun meshes are shown
@limber parcel
(sorry for ping btw)
the first person gun mesh or the third person gun mesh?
the first person mesh should be hidden by default so nobody sees it
then when you want to aim, you unhide it on the client, and hide the third person stuff
you can also hide part of a mesh by hiding the bones btw
it should always been unhidden on the client
it should not, because then u get the issue ure having now
alright so I toggled only owner see to the first person
no
and did this in event begin play
it was on before
now the first person mesh only shows in first person like it did before
now when I exit aim, this happens
ah wait I know the fix to this issue
well yeah, you need to hide it again on exiting
you mean show it
hide the FPS one and show TPS one
alright I did this when exiting aim
and the other mesh?
I did this
but now this happens
because I am showing the TPS mesh
in the BP_FirstPersonCharacter
yeah no I think you misunderstood
this is the message I sent describing the problem in detail
the only thing u really need to do related to multiplayer is to make sure this runs in client events
and u should hide that mesh by default in mesh settings, not with an event on begin play
that's what I did...
third person mesh
first person mesh
however
since the gun cam
is a different camera
on another actor
both meshes are shown
but if I do that way, third person mesh will be invisibile to all the players
thats why you run it only on client
how?
if it's a state which it is if it's a visibility, it can be represented with a bool variable
the one you use to hide/unhide shit
I don't have an event for that
well then make one
and where do I call it?
in the same place you used to hide it i guess
I don't have such place
also sorry if I am being dumb, but I'm a newbie in unreal engine
then u should totally start with single player game >_>
indeed
multiplayer is many times harder
welp I would like to finish this course, and so far I am doing good and have learnt a lot
nope
teachable
I bought it
it has an entire community based on it
many indie games on Steam are done throught this course
guess why most games releasing in recent years are garbage ๐คก
I doubt AAA games were done throught this course ๐
wouldn't even use pure blueprint for FPS game
at most turn based game like chess
for multiplayer
fair enough
yeah I know blueprint isn't the optimal but I am learning the basics and am not aiming for a full fledged product
its not just about being optimal
some things are just not possible in bp for multiplayer
I see
The Unreal Goddess paid us a visit ๐ญ
yeah like being unable to replicate an object class >_>
welp atp I will just continue following the course for the sake of finishing it, but for my personal experience, what should I do next?
grab that 100+ parts RPG tutorial series and finish it
oh wow
that's cool
welp I would like to do a first person shooter game
since it's my favorite genre X.X
u will learn more doing an RPG though
hm I see
that could also work
yeah fair enough
that tutorial i watched touched pretty much everything in unreal so it was quite useful imo
hmmm
maybe I have an idea to make a simple aiming system
the FP starter project doesn't have ADS at all
what if I made that when I press right mouse button, based on the weapon I have equipped, it will draw a widget?
I watched all of them, none work correctly with what I am implementing
there's always something wrong
look
that sounds cancerous
Hi guys, question is it possible in the UI to find the distance from one point to another in an image?
Like this?
The distance between two points, in two dimensions, is given by solving Pythagorean's theorem for the length of the hypotenuse of the right triangle formed by the two points.
and this doesn't have the issue I had before because the camera is located inside the BP_FirstPersonCharacter
but it does not have a functioning Y axis movement
you need to toggle it in your camera i guess
no such thing exists
it gives another issue
I don't have these options
its in the spring arm
well i did not have to
it just works for me
just attached a camera to my mesh and set it to use control rotation
and the main camera works for me
it's just the additional ADS camera
ohh
did u attach the camera to your weapon?
the weapon is a separate thing
How can I give him the points in the UserWidget?
I may attach it to the first person mesh
it doesnt looks like ur camera is attached
ohh nvm it is
but to the capsule
you want to attach it to the mesh
I just tried attaching it to the first person mesh
it gives the same issue
๐
๐ญ
what exactly is not working?
ok
making an ADS system based on animations is pure pain and may not work as intended
I would just have a second camera when ADS and interpolate between normal cam and ADS cam
animation is just a boolean in abp?
bru that's exactly what I am doing right now
problem is that its fake FPS
Making any not simple system is pain, and may not work as intended if you make it wrong. There is also a thing called procedural animation, for which you will still need the animation blueprint.
Nobody's gonna learn or make the system for you.
Nobody's gonna learn or make the system for you.
never said this indeed
ye that's probably what's stopping me to get an ADS system to work
try attaching the camera to your weapon instead
@prisma helm there should be a dozen of tutorials video for ADS camera
I think tutorials are fine just to see what node does what when you first started
u don't want to instant camera change as well
u want to interpolate
which isn't what u are doing with your sample
welp you see the weapon is a different actor which gets attached to the first person mesh
ADS is pretty simple imo, only a few nodes. As for the animation, it's just a boolean
the closest thing I can attach it to is the first person mesh, which is, the arms
well yeah, in that system you made, you need to adjust the camera to your weapon
or else make actual FPS models
wdym
ah yes that too I shall do
you are trying to use third person hands with FPS style weapon aim
nah those are first persons hands which I modeled
I modeled first person hands and a third person playermodel
ohh my bad then
it's fine dw :P
here you can see how it works basically
and you can also notice a smaller camera (I just made it smaller for better reference) which is the ADS one
yeah so basically the weapon needs to be aligned with the camera
or the other way around
but yeah, there should be enough tutorials for this, just grab one from youtube
you mean like this
I did but I keep always having some sort of issue D:
well yeah, but your camera moves independent from the weapon
ah you're right
so i guess u need to attach the camera to same slot as ur weapon
and give it an offset
and make it not rotate with player
Is there a way to possibly read the C++ Jump Function that is built in the engine?
for sure
you need to set up your IDE
it's open source, you can read everything that made the engine
then u can browse all the functions
Ok thanks!
I tried this but moves the weapon to a completely different location
try other location rules
just tried and does not work
you can make the weapon into a component instead of a separate actor
then u dont have to mess with attaching it manually
this would not work as there is an item system behind it, the weapon is an item
yeah i remade my inventory system like 5 times because of stuff like that xD
bro
you won't believe it
not only I just solved it
but it added some weapon sway
LMAO
I did this
by attaching it to mesh? ๐
bruh
thats cursed
but if it works, it works ๐
I hope it doesn't screw up the shooting which I am just going to implement :P
sure
yeah FPS cam looks good now but TPS is weird xD
yeah I'd call it a small weapon sway :P
also, that rocks u made look exactly like the ones i made xD
mine is a bit less detailed, but same concept xD
xDD
the texture looks very nice!!
its starter content
making a small survival game
the models are just placeholders until i can find an actual 3d artist xD
if you can't find one, I really recommend you try out Blockbench, it's a relatively easy to learn modeling software, for unreal I recommend that you model in generic model format and use meshes instead of cubes, you can find a lot of tutorials online that are very straightforward :P
I use blockbench for all my models
I'm also working on a survival game, except mine is focused on war elements :D
rather than surviving
Made my self a batman cave in 7d2d
that sounds very cool!!
it was soo fun with friends
the only downside is there are no players in Australia
everytime, I tag players, they just quit the game ๐ฆ
Im busy with making a blueprint and I want to force the lighting type by a public parameter but for some reason I cant change this? Is there some reason why this might happen?
well yeah, the graphics are kinda ancient by now xD
show your attempt
I want to have a moveable static mesh with this forced to surface
it is but the gameplay is like no other. We spent hours digging a tunnel to the city from our underground base
well its just if I type lighting type I can only "Get" but not "Set"
i played almost 200 hours in 2 weeks xD
the AI was kinda terrible though
Any idea what I should call or get from, I would assume I can just set this variable as what I want to have moveable/forced surface is the component coming from this
maybe ure trying to apply it to the wrong thing
I have no idea what you are trying to do
ure trying to do this on the component - try getting the object from component and do it on that
same story sadly
yeah i think that was his question
are u trying to spawn at run time and u want the static mesh to be moveable by default?
nvm static mesh is already moveable by default
I have a parameter to set the mobility
why do you need to change the lightmap type?
but I want to have the object moveable but also force surface so it uses the lightmap
basically our artists set stuff moveable if its for gameplay elements and keep it static if its just a regular static mesh
so the lightmap info gets used
for example a platform doesnt need realtime lighting
but still needs shadows so we force surface for that
so its for optimization basically?
yes we are developing for ios :p
will do
For some reason this line of sight to wont work. It's always returning the value as true even if i am not looking at the 'Other' Object
or maybe #lighting channel more suited for this
hi, in game mode i have save system, if first player == Local Player Controller then load save
this is ok?
first Player Controller always will be Local Player
and rest players no
because GameMode is only on server
loads data about players first in GameMode and when a player joins, I check if he exists in the save
this is ok?
should I do it another way?
Does anyone have any advice how to... Finish the animation made in sequencer. I have an WBP_UI interface with a button called Animation, but when I keep on pressing (button) it plays and restarts again. I want it to disable the button perhaps until it has finished playing the full animation then get active again(Button). In what direction should i be looking? Thanks
brand new type of bug just found : apparently references to editor only actors become wrong whenever another actor is spawned
get a reference to self returns the newly spawned actor instead of the actor the code's running on
if self is cached the variable holding it shows the right actor but for some reason using it for anything else ie print or passing the reference to something else returns the newly spawned actor instead
correction : the print is the wrong thing I'm dumb, but the wrong variable still gets passed to other actors
How to remove that sprite from TriggerBox? I want my TriggerBox to show some visuals but not the default sprite
Details panel isnt visible
For the component
the trigger box has no visual by default so I don't know which visual are you talking about as in your image it looks that's something you added
The trigger box can be made visible
yes by unchecking the property called "Hidden In Game"
But it starts showing that ugly sprite which doesnt have UPROPERTY specifier for editing it
which sprite are you talking about ?
Sprite
if you don't want it, delete it ?
If I could I did
Its added in cpp by epics
TriggerBox
And its details is invisible
Thats so stupid
then you will need to ask in #cpp instead of blueprint they would better help you I think
But wanted to see a better way just by editing properties
Thats 100% blueprint question bro
I know how to do it in cpp
I want to know how to do it in blueprint
why would a component added in cpp prevent you from deleting it?
Not related to my question but anyway
Epic games created a thingy called TriggerBox
TriggerBox is a hidden thingy by default (as most of triggers are intended to be invisible)
If you want your TriggerBox to be visible you'll see Collider outline and that ugly sprite
Collider can be hidden just fine (is has Details panel)
Sprite cant be hidden (no details panel)
Nvm, the problem solved - that sprite doesnt exist in release version of a game
Epics shouldve written EDITOR-ONLY on editor-only components, thats all
you can still just delete that sprite manually in construction script
Yes and that'll require using blueprint code
im sure it can be done in c++ too somehow
I've already wrote twice - I can do it in cpp (and so in bp code) just fine
The question was about details panel
hello everyone, I have a question about a weapon swing:
what would you use to make a weapon swing lets say 90 degree and stop on a event so it can restart whenever needed.
since it goes pass a certain point, the coords go into negative and i cannot figure out how i can smoothly make this happen, i need help please
here are the bp's i have for both objects, should i move them over to the playerController?
Can anybody critique my sensitivity set up? It feels a bit erratic and not smooth movement and I'm trying to troubleshoot if my blueprints are wrong.
@supple flicker you should have something like this on your player controller to add input mappings ( that you create beforehand)
you make IA_Interact for example and you add it to the Enhanced input local player subsystem
then when ever you press the corresponding button for that action, it will trigger the interaction event
no i its all in the actors them selfs but i have a pickup logic in the player controller
input mappings are for the pawn you control, not for the other actors you interact with
you control your pawn to interact with the actors (E.g Flare )
i dont know hwats going on with my code but for some reason I have a steam engine that builds up steam based off a "fire" value (train engine)
all works fine, but the values DONT WORK unless i use time dialiation
the values exist as they should, but dont set UNLESS i run the game as time dialation
or pause it
when you begin overlap with the said actors, you can add the IA_INTERACT to the player controller
when i play the game, doesnt work, when i breakpoint the value, and check it, ONLY THEN does the game work
some quantum mechanic shit
i dont really get it, what does the IA INTERACT do?
the new input system ( default one as of 5.3) is based on mappings
ok so i should learn how mappings work?
yes
great, ill check it out, thanks for the help @hidden yacht, really appretiate it๐
you add/remove Input Mapping Contexts to your controller ( you find it in file under name of IMC_Default )
Is the new input system @hidden yacht a solution to my concern?
I never used the old system as i am new to Unreal myself. but I see you already use IA_MouseLook which is an Input Action , part of the new input system
Every Input Mapping Context ( IMC ) is like a bag of inputs you give to your controller
the bag needs to be filled with pieces to work, these pieces are called Input_Actions. also known as "IA_ActionNameHere"
1/ You create an input action "IA_Interact" BP file, you open it and set the button that matches that action (Interact)
you can make other input actions like move, jump, crouch etc...
2/ then you make an Input Mapping Context BP file, and you add to it the above actions (can be done through nodes)
3/ You add the input context to the player controller
the advantage of this is that you can have E button do interaction in IA_Interact and have it fire grenade in IA_FireGrenade for example, that is done by adding and removing actions to the context
Why do you have world delta seconds involved?
Don't
perfect thank you
Do you think that's why the movement might not be as smooth as it could be?
Yes, as the mouse input values already will scale based on frame rate
the input values are "how far did the mouse move since last frame"
Can I share a clip with you and ask your opinion? My dev seems to think the mouse movement looks normal
I don't lol
I just want to make sure I'm not insane
Show your current code as-is right now, with the delta seconds gone
If I dont get paid enough on a commission, any bug seems normal to me.
I'm happy to pay a good commission to solve this lol
That looks fine to me but what's the rest of it, what else are you doing with those action values?
Why the hell does gravity depend on aim?
oh ok only when diving
whatever works. Anyway, this looks fine.
ok awesome thank you so much!
hi guys can we trigger button press ?
Ive got some logic that chooses a random actor from an array of different actors, spawns that and then gives it some data. All of the actors are birds and have the same vars but obviously I cant use a cast since it will always be a different bird. Any idea how I can set these vars in my actors without using a cast?
wdym "will always be a different bird" ?
oh i c you have different bps ?
of birds ?
Yes sorry haha
They are bascially idential other than their models
and names of course
so you don't want to have to keep checking a bunch of casts ?
do they have a parent ?
Yes since id have to have 20 different casts to check the right one
No I dont think so
well maybe if they had a parent class, you might be able to cast to that and put variables there
That sounds like it might work
does this look like it should work? im trying to get that anim to play when using the abilityu
ok so it works but is infinitely looping
Anyone know how to make like a little popping in effect with these objects that im spawning when i press a button?
maybe grow the scale from 0 to 1 ?
or give it some material thats partially invisible, and then it goes to normal
do you know how i can do that from within a Widgetbp?
i tried using a timeline but i dont think i can make one in it
your spawning actors from the widget bp ?
hmm
Yeah when i press a button it spawns in an actor
im using it for a tile builder system
maybe call an event on the player or something ?
oh so just like move all the code into the player and just have the buttons activate a function called like spawn actor 1 ect.?
ya if you can't do timeline in the widget
makes sense
and i would try to make it somewhat universal function
where you pass it some values
so you can spawn whatever you want
wait wdym by that?
like instead of 5 functions, SpawnActorX
one
where you pass it some values
for instance you want to change the speed of the scaling
you can just update it in one place
ok so i want to alter the location of the spawn points of the clones in relation to the main character what node allows me to add a tranform to the characters relative local
oops i put the part in between the button press and the spawn actor into a function
this could work too though right?
i just dont know why, i have a branch that checks if a tile is selected first inside of the function and if its true i can spawn continue the code and if its false nothing happens but it doesn't work inside of the function and no matter what still spawns an actor, when i had it outside of the function it seemed to work fine
Whenever I see something like this - with a lot of VERY similar nodes, I immediately think "this approach is wrong". Look for patterns in your branching and ask yourself - can this be handled in a loop? I can't actually see your nodes so I can't suggest anything further, but you will make your code more readable, maintanable and flexible if you remember to be vigilant for these kinds of anti-patterns
it's reading data from an ini, i probably could use a loop but i just read the string
and use the string to get the value is the function
so it's saying it's valid no matter what ?
On the weapon blueprint you should just create a new local Boolean variable called something like firstUse and default it to true. Then your logic can look for that. Once the character has picked it up, and you have initalized the loadout, then you can flip that flag to false.
does that make sense?
yeah its still executing the function even if tileselected? is false
hmm, it won't go to true if it's false
so the value you are reading is true if it goes to the true branch
something wrong with the variable i'm guessing
hmm weird it was fine before it was in a function
would i need to just put the branch outside of the function in the start?
you could try that, for some reason the variable isn't the correct one
atleast if you changed it to false, and it's still true, you didn't actually change it
or it's reading a completely different variable
it's basically just repeatadly reading an ini string, and getting the setion/key's value
and doing stuff with it
mostly setting variables
ok i seemed to get it to work again by putting the branch after the event is called
it's nice to have that function because think of all the buttons you might add
to spawn stuff
you want to be able to change that in one place
You might try to think about it differently. Instead of thinking "I need to find a way to simluate the user pressing all these buttons at once", think "I need all these events to fire". Let me explain.
Clicking a UI button triggers an event. When that event is triggered ("fired") then the actions associated with that event will take place.
If you have a "master" button that is supposed to trigger all the other buttons, rather than trying to simulate the user clicking all those buttons, maybe you just need to have that button fire all the events that those other buttons would fire.
An easy way to implement this is to create a function for each button's action. Then just wire up the button click event node to the corresponding function node. And then, wire up the "master" button event to execute ALL the functions.
Oh that can work! Didn't even think of that. Thanks!
QUESTION: Cannot access a variable that is stored on player controller, from game mode - what 2 do?
Context:```
โข multiplayer
โข goal: gameMode should keep a list of players
This happens on the game mode (GM):```
โข Event OnPostLogin - add the new player controller (PC) to the "allPCs" array, then call UpdatePlayerListGM
โข Function UpdatePlayerListGM - foreach loop through all PCs.
Cast to a PC object with each reference coming out from the foreach loop.
Get the "username" variable (which is replicated) from each PC.
Use that variable to populate the array "usersCurrentlyOnline".
Additional related information: The username variable is drawn by each player controller, from their game instance. Printing out the username from the player controller works. The variables are not empty.
Problem: However, the GM only gets the host's name, the client names are perceived as empty, despite definitely being printable from the player controller.
The idea is that the GM, which exists on the server ---> can grab information from the PCs (that exist on both server and on client) ---> and that the PCs grab client information ---> which can be extracted by the GM.
Question:```
Do you have ideas on how I can proceed?
Thanks for reading!
Gamestate already holds a list , fyi
PlayerArray
An array of Playerstates? Which replicates
Playercontrollers only replicate to owner
@tulip echo
anyone know how i can use this same timeline spawning animation for each actor i have spawning in without having to make a new timeline for each actor i want to spawn in?
No
make it a function
Definitely a good candidate for some refactoring.
I swear to god new devs are just not lazy enough! (https://yoast.com/developer-blog/lazy-programmers-are-good-programmers/)
ig i could just loop over the file, there would be a bunch of if's anyway
i feel like it's better than a straight line going left to right
it doesn't let you put a timeline into a function
oh ya, custom event ?
how can i make it only work for the return value of the spawn actor so it only does it for that specific actor instance when it is spawned in?
you can pass values to an event
yah the problem is though that when i plug all the return values on the spawn actor nodes into the set actor scale 3d whenever i spawn a new one it scales all of them
cause the event is activating and then all of them get scaled together and not separately
show the event, because you should be just using the one you spawn
also you shouldn't cross exec lines like that
you got them all plugged in so when it runs, it probably does all three
how do i add the return value as a input in the event?
oh nvm i think i got it
for some reason it was putting in an actor action utility instead
yep it works perfectly now, thx sm for the help!
what node would allow me to shift the world transfrom
you want to change all the values in the transform ? or just location maybe ?
Hello, I'm a little stuck. Is it possible to bind an even from a component? The component is attached as a child of the blueprint I'm trying to access it from. It just doesn't seem to want to work. I can't select it from the list when trying to create event.
what are you trying to bind ?
I'm trying to bind to an event I have created within a component. I can get the bind to even node by using the component reference. The issue comes when I try to select the even in the create event node. It doesn't exist.
oh that would make sense ๐
I assume you have a reference to the component available? ( not sure if this will work, I don't use a lot of components )
If it seems tricky, I might consider trying an interface as an alternative
I managed to bind to the event from another blueprint that doesn't have the component as a child. So confused haha.
events don't care about whose child it is. As long as you can get a ref to it, you can bind
just the x value
so clones spawn next to the character instead of on top
split the struct
and make a new transform, or just make a new location from it
unless you need it to be a transform
but you can split the pins, split location, then change the x
Thanks, I'll look into that!
so thats the clone ability
aint the pretiest
but i want the clones to spawn right and left of the character
ahhhhh
Okay. I can definitely get a reference to it. Will try a couple more things.
and would i do that for in lue of the get world transfrom
are you trying to offset each one of these ?
yes
i would probably make a pure function that alters the x value
takes in the transform, outputs the adjusted
and maybe you can pass in an offset
ok
if you want to actually just keep increasing instead of setting it absolute then you would do it differently
or use a float that you increment ig
so its almost all done thanks
few more questions can i break exec funtion lines into 3 so i can have all 3 pop up at once?
wdym "break into 3" ?
3 consecutive ?
you can use sequence
but you can't run it in parallel i don't think
if you do it fast enough there shouldn't be much of a delay
it'll run pretty quickly
unless other code is causing the delay
ok
in which case if you moved some of it c++ it might fix it
gotcha, not on that level just yet but makes sense
now the last thing i want to add is the main character to do a unique flipbook when using each ability
that flipbook affects the main character
so how would i get that flipbook to affect the flipbook on the main character
i don't even know what "flipbook" is
flipbook is the animation of the 2d sprite
well the issue is the bluepring i want the anim to play on the maincharacters component so would i need to cast to the main characters blueprint to
Are you asking how to cast into the character ?
If youโre in an animBP graph I believe itโs try get pawn owner and cast
yes that was what the question was i just didnt know how to word it
where do i post a crash report to try and get some help?
maybe #ue5-general assuming you are on store version of 5.x
ok thanks
What are some stupid reasons why my debug keys or other keys won't work in PIE? I'm not getting either of the strings printed
I'm sure it's probably something I checked or unchecked and don't know what it might be
so thats what imstarting with, however its not playing via the main character
what type of bp is this in ?
It's in a pawn that I've spawned into the world, also placed in the level
should I have the key somewhere else and cast to the pawn?
did you possess it ?
So getting a ship to float and chase my ship was fun..
It's moving on it's own using AI_move_to. I can try that though
OK, that worked, I at least got the print string, but there isn't any camera attached so I can't see the animation. No worries, I'll work on figuring out the boolean issue.
Thanks for the help
put the keys on the character, or add a camera to the pawn, but if it's an enemy you probably don't want the inputs on that
Hello my friends need an ezy implement...
Thats the bp of my enemy i want that after he gives me the DMG i fall/Launch back
Can some one step by step give me the right codes?
are you stuck on the vector math?
So what I put together doesn't work, the damage reaches me because I have a line trace beforehand, but what exactly is missing so that my character is also thrown back?
your character is not being launched?
hmmm ok
(launching is an impulse, so instantaneous)
Hi does anyone know how i can make a feature for the grid system i have, where once i place an actor on the tile i selected it wont let me place another actor there?
im not exactly sure where to go about implementing that into the current system that im using
OK IT WORKS NOW!
Thanks Engage and Scaith๐
For try to help
that should be incredibly straightforward, how are you placing the tiles?
optimally you'd be calling an attempt place function and the tile would check if that's possible and return false if not
its basically just a event that im activating when a key is pressed or a widget button, and then i check to see if its in the center of the tile i selected and it spawns the actor at that location and does a little spawn in animation with a timeline
not a fan
and then this is the whole code for setting the selected tile
https://www.youtube.com/watch?v=rtAR1HoNE_E&t=288s i was following this tutorial for most of the grid system
Support the channel through donations. Crypto accepted!
PayPal: https://paypal.me/reidschannel?locale.x=en_US
Patreon: https://www.patreon.com/reidschannel
Bitcoin: 1JFwWHr4X6uAeoZadukzqKjzFBj3Qjy7Sk
Ethereum: 0x2B2Bc108F1Cc0fF899959dEF3226637787d8C3dE
Dogecoin: DNQ33YnhpWoTBokBNVkZP5ub8KTLkpyjpv
Join our community discord!
Discord: https://dis...
can't you have the tile do the spawning and animation and just call that function/event
but he didnt cover anything with spawning actors in it
you mean put the spawning and the animation in the same event together?
ah so different grid setup than I imagined
i have multiple different actor types i want to spawn in so i just made the animation its own event that can be called from any spawn actor
oo ok
everything seems to work with it as far as spawning the actors and selecting the tiles, only problem is being able to spawn multiple per tile and i also wanna be able to have a different widget popup and tiles that have an actor on it
the thing is, you seem to have a system where every grid cell is an actor
and that approach makes me think of having every cell manage itself
I don't know about your game or which approach is right for it
yeah im not exactly sure, this is all the code i have for the bp_grid
its just one single actor so it doesn't affect performance too much
no i dont think so
got it
it just does some calculations to see which square was hit
then yea your current approach makes sense
ok
a manager or subsystem to keep track of these things might be the right call, but without it , given that you already have a position you can simply check if there is anything there
like a linetrace from the floor straight up
wait what is the position that i use to do that?
the same position you use to spawn things
like the grid x and y location that is the center of the tile outputted?
yea, presumably if you spawn your stuff there the trace would always be able to hit it?
(otherwise you'd have to run a box collision check on the size of the tile)
did i hookup the line trace correctly? It seems to show correctly in the game when i do it so i think its good
trace some distance up, I'm not confident a 0 length trace works
and then from that i'd just make it add a branch so if it hits something then it sets a variable like IsTileOccupied to true?
and if it collides with the ground push it up like one unit
oh nevermind
I didn't see the higher end z location
Hi all, I'm wondering if it is possible to access the list of Landscape Streaming Proxies that live "under" the landscape actor even when they are not loaded in (outside world partition streaming distance). I have been looking at the included functions / variables in Partition Actors, various Landscape and Landscape Streaming Proxies and can't find that list. Is it in the Landscape or World Partition Subsystem somewhere? Any tips or guidance appreciated!
ok it seems to work now if i click on a spot it says tile empty and then i can spawn an object and then click to another tile and spawn an object and then if i go back to that tile it says tile occupied and wont let me spawn an object, only problem is if i select a tile and spawn an object i can spawn multiple object there until i click off the tile and then go back on it
would i just need to set tile occupied to true once i spawn the actor?
I assume you are running the check when selecting the tile
and then setting the variable
if so yea it makes sense to update it
ok yeah that worked, Tysm for the help!
hey guys I'm having problems with I'm an object, i want to be able to press Q and make the item appear in my hand but only if I have that item on me, right now I'm not sure how to equip the item
I have an int >= bool that is returning not inscope. There is no casting or anything of the type. Both int operators return "not in scope". Did some searching all I find are issues with casting and so on. None of which I am doing. This is all within a single BP. Both int vars are public as well. Any thoughts would be great as I'm sure it's my dumb fault. lol
whats throwing the error ?
Both operators as well as the and.
what bp is this in ? and how did you get those variables on the graph ?
It is a function in a widget. I put the variables on the graph with ctrl + drag and drop.
Clicking the button runs the function
I figured out it has to do with being in a function I pulled the nodes out of the function and it works.
does a class need to be an actor to make a blueprint of it? Can i have uobject blueprints?
yes
Is there some easy(?) way for making multiple Blueprint actor mechanics that won't collide with each other? Cause what I'm going through rn is having 2 actors placed and when interacting with one, things happen on the another one too
It shouldnโt, unless theyโre both very close or you did something silly like using get actors of class
and that's probably the answer lol (get actors of class)
What should I use as a alternative?
variable of the actor?
Yeah, you almost always want to avoid that and use proper interaction events instead (beginoverlap, on hit, etc)
No, never that
That just gives you an empty variable
And it loads the entire class afaik
Try ActorOnBeginOverlap
Youโll need to make sure both actors colliding with each other have the right collision settings and generate overlap events is checked
I'm trying to do a actor that has to be connected with bp_thirdpersoncharacter and events are called like that, is it possible somehow to not make it work like I had written before? (colliding with other actors)
I would do the whole actor without the bp_thirdpersonchar but I can't use that type of thing, or I'm missing something out
Cause when I was using the E button that was placed in the actor, it wasn't working
and suddenly the E button works now on other bp than thirdpersoncharacter..
show the code that's calling "StartGenerator" plz
In blueprint, is there a simple way to smoothly change a value until it reaches a desired value?
I am trying to make my progress bar UI go up smoothly to the desired value rather than just setting it immediately
Hey there!
I wanna do something like For Each Loop, but only for a SINGLE actor within the array (The last one that got added)
I can't use Get a Copy because then the interface I have set up would not work
blueprints seem to run faster in 4.27 than in 5.3, do you people get the same results? i am testing with simple for loop that does tracing, some math and array manipulation
profile it
@spark steppe can i do that even if its a construction script?
Use the node start profile timer
You can use interp float on a tick or lerp. Can't ever remember which.
Okay thank you ๐ Iโll look into those
Sounds like you should be using find, and casting to your correct class.
Inputs are meant to be used with a class that is owned by the controller. This includes pawns, characters, controller, widgets, etc. If you wish to use inputs in actor components, you can still do this, but you need to use the enhanced input system instead. It still only works with components owned by the controller (The components added to actors owned by controller) also it's important to consider opportunities where inputs can be blocked if you are using multiple input nodes with the same key across multiple blueprints.
Thanks for clarifying!
is there a way to flag nodes as editor only?
guess i'll live with development only nodes
I think all you can do is development only nodes, but it's pretty easy if you want to have ChatGPT make the function and node for you and set it to editor-only.
#if WITH_EDITOR
void AYourClassName::YourEditorOnlyFunction()
{
// Function implementation
}
#endif
i wouldn't trust chatgpt on this ๐
LOL. nah its more than good enough and capable of doing this.
and thanks, but this wouldn't compile
I use it for much more complicated systems, not just functions.
well it's 6 lines and it f***ed up
๐.
void AYourClassName::YourEditorOnlyFunction()
{
#if WITH_EDITOR
// Function implementation
#endif
}
this would work on the other hand
You may be right, but Chat GPT works iteratively. So however you can work as you go is the best.
Did you change "AYourCLassName"
no, i haven't even tried the code yet
i'm just to lazy to close editor to compile a custom function xD
but i know that we can't have ufunction() within editor only macro (at least not for BP exposed things)
that's why the function body must be excluded instead of the whole definition
I've co-written at least 50 functions and probably over a thousand lines of code with it, things don;t always work the first time, but the things I'm doing are much easier for chat GPT to do in code than to do in blueprints. My GPT I made seems to help a lot and most of the time simple functions work the first try.
not denying that it can help sometimes, primary for things which are in several other code bases already so it could learn from it
just saying that it's often wrong and not the best solution for a problem
{
if (FSlateApplication::IsInitialized()
&& Widget != NULL && Widget->IsValidLowLevel()
&& DrawSize.X >= 1 && DrawSize.Y >= 1)
{
TSharedPtr<SWidget> SlateWidget(Widget->TakeWidget());
if (!SlateWidget.IsValid()) return NULL;
TSharedPtr<FWidgetRenderer> WidgetRenderer = MakeShareable(new FWidgetRenderer(true));
if (!WidgetRenderer.IsValid()) return NULL;
UTextureRenderTarget2D *TextureRenderTarget = WidgetRenderer->DrawWidget(SlateWidget.ToSharedRef(), DrawSize);
// Creates Texture2D to store RenderTexture content
UTexture2D *Texture = UTexture2D::CreateTransient(DrawSize.X, DrawSize.Y, PF_B8G8R8A8);
#if WITH_EDITORONLY_DATA
Texture->MipGenSettings = TMGS_NoMipmaps;
#endif
// Lock and copies the data between the textures
TArray<FColor> SurfData;
FRenderTarget *RenderTarget = TextureRenderTarget->GameThread_GetRenderTargetResource();
RenderTarget->ReadPixels(SurfData);
void* TextureData = Texture->PlatformData->Mips[0].BulkData.Lock(LOCK_READ_WRITE);
const int32 TextureDataSize = SurfData.Num() * 4;
FMemory::Memcpy(TextureData, SurfData.GetData(), TextureDataSize);
Texture->PlatformData->Mips[0].BulkData.Unlock();
Texture->UpdateResource();
// Free resources
SurfData.Empty();
TextureRenderTarget->ConditionalBeginDestroy();
SlateWidget.Reset();
WidgetRenderer.Reset();
return Texture;
}
return NULL;
}
Here's a function i made the other day that takes a screenshot of a widget including its child widgets. It worked the first try.
yea, that code is in the thumbnail renderer of unreal ๐
probably.
I used chat gpt at the start to code. Kinda gave up on it
Are you under the impression that Chat GPT likely copied that code? It doesn't work like that, but The way I go about it I explain exactly what inputs and outputs I want and what it's supposed to accomplish. Does very well. I wouldn't be doing a lot of what I'm doing it without it.
I'm building a runtime game creation platform based on a lot of how Unreal does things but re-created to be runtime. Runtime visual scripting, asset creations, maps, modes, player created content.
It doesn't do things well from experience and it spit too many non existence function
no, i bet the code for the thumbnail renderer in UE is better
because someone with a brain wrote it
Also it doesn't help me learn
Best way is just to dive in, read source code. Chat gpt is a broken clock atm . It may do simple things but u better off without it imo
I never touched code before Chat GPT and blueprints. Most of my foundational systems are built from it now.
The actual programmers that know codes, discourage chat gpt. Best to listen to their advice
another way to go about it is to check what the widgetcomponent does
as it already renders a widget to a rendertarget
and it's runtime code, so you can most likely access it at runtime, too
that is what i mean by saying that chatgpt might make a hit sometimes but not in an elegant or smart way
it has no fundamental understanding about the engine
I'm not arguing the benefits of learning how to code from its roots. If I wanted to be fluent with C++, it would be a requirement to not use something like Chat GPT and rely on it. The exact same things as blueprints. People who rely on YouTube videos to make things in blueprints will have a very hard time finding their own way. I've already spent the 4k plus hours to become fluent with Blueprints, and this is what I'm relying on, not C++. The C++ combination simply allows for more complexity.
Here's some of what I have on runtime scripting
Most programmers don't write all of their code without having to look stuff up, study examples, read documentation, ask questions. Is using a chatgpt going too far? I've had people say intellisense is too much. I'm very glad I learned how to program before this tech existed, but can I say that one should absolutely learn how to program without it? I think it would be incredibly useful to try and write code without it. It's like following a tutorial and then trying to go off script. If you're like me, you'll immediately realize you didn't understand something and that struggle is where the most learning comes from.
I think chatgpt can be used to teach you things, although hard to use it for that without asking it to generate you code. If someone wants to get better at coding, I think working without chatgpt from time to time would be valuable. Or try to avoid copy/pasting. But who knows, maybe this is the next calculator.
hard to tell atm where this is heading
the things i learned the most from are those that you cant solve and spend days, weeks or months to find a solution...
now, for a question I feel silly asking
My pawn's root is a SceneComponent with one child, a static mesh. The static mesh has collision and mass and I have a number of PhysicsThrusterComponent to move it around. Basing on logging, the actor doesn't seem to move at all, it's just the physics component under it. I've never done stuff quite like this before. That seems bad to me as you couldn't rely on things like GetActorLocation(). But what do you do about it?
I mean chatgpt is mildly useful for hard to Google information and if you're completely clueless about something and need a starting point for research
yeah, there are some questions google is really bad at and gpt can be good for
I had no luck getting advice on solving things I couldn't figure out yet
google can be rough if you don't know the right question to ask
you can make the static mesh the root component, but in my experience i would only ever recommend this for actors which you spawn at runtime
i had bad experience with that for level placed actors
the problem with that is I can't transform the mesh then
Its a bit like calculators
Should you learn the underlying logic
Simulated meshes should be the root
Or is it ok to just know how to punch it on calculators?
The point of the root component is that its transform represents the actors transform
The most valuable thing I feel I get from Chat GPT is in the iteration cycle. Sometimes I have absolutely no idea what is wrong or even how to do something. So at the very least, it's a more accurate and faster Google.
The other side to this is having something to talk to to encourage thinking through the problem. I can talk to it well beyond what any Redditor would be willing. It doesn't that it can get things entirely wrong sometimes. With experience, those things are understood. And if someone was already an expert, they don't need it. Just like how people who have spent enough time in Blueprints don't watch many tutorial videos on it. The vast majority of the content would be a lower level than they'd be at.
how do I scale and rotate my mesh if it's the root?
And scale the actor
can you do that at author time for the blueprint?
no
this all makes sense and or is something I've done :P
only scale afaik
these are spawned at runtime, not preplaced
So youd set their scale/rot at spawn
that won't make the mesh face forward though
Yea it makes for a great rubber duck
Though I tend to explain my issues to my non programmer friends usually haha
Guess i missed the facing issue and thought it was about thrusters
Always helps me figure things out
It helps to judt explain it at all ๐
it's been fine so far as I haven't needed to use the actor's location for anything, but I noticed it when trying to debug moving its center of mass and it felt really wrong to me.
this feels like a pretty serious problem and I can't think of any good solutions
I suppose I could reparent it at beginplay
that dude asking questions i kind of know the answer for, and i'm sitting here wondering why my physics body isn't applying setactor location -_-
does that code have reasonable outputs for why it failed?
mine? i just noticed that it isn't the root component ๐
so i got the same issue as you but in reverse
you want a reliable get actor location, i want a reliable set actor location
nvm me
Trying to figure out how to set 3 different upgrades from n upgrade options, essentially picking a unique item form an array and setting upgrade1, 2 and 3 to that. What i've done doesn't work and I dont understand, any insight would be epic
turn off physics, move actor, turn physics back on?
make sure that is actually the part where the issue is
because that is rather simple and looks fine to me
nah, just have to move the physics body instead of the actual actor
(though it'd be good to clean it up with a for loop)
it was pretty much the same issue that you have ๐
which is why i mentioned it as i was checking on that while you asked your question
so your question probably made me realize it sooner, thanks ๐
doesn't work how? looks reasonable to me
so glad I could be of service :P
take the result of your set nodes as input of your remove node
currently you pull from the random twice, which rolls 2 different random numbers
oh, yeah
Finally, that worked, thanks ๐
nodes which don't have an execute pin are evaluated for each input that you connect them to
Yeah I had no idea
most people hit on that when using smth that yields random results...
it's one of the bigger blueprint gotchas imo
So it appears you can apply thrust to components above your physics component
attaching the thrusters to my root seems to work.
although it doesn't appear to be moving the actor, just the physics comp again...
Update kinematic from simulation
Setting in physics section
also make sure the physics simulated component is the root component if you want to move the actor's transform
Is FText localized over network?
Hello guys. I have a problem I would like to find in a "Render Texture" I would like to find/make some points (those marked A and B) which will then calculate their distance for me. I have already given the size of the Texture and I would have the position of the points in Vector variables. How can I do it?
๐คทโโ๏ธ try #multiplayer
Thx
I'm trying to load levels through streaming. I have a "door" (a collision box, really) set up in a blueprint that runs the "Load Stream Level (by Name)" node. I made a public variable (an array of names) in the BP for the levels that I want to load using that blueprint and set it up as a for loop (see attached), but only the first level in the array is loaded when the begin overlap is triggered. Am I missing something here? Or is there a better way to load levels by streaming? (the level is not big enough for world partition)
that wouldnt make much sense now, would it?
Dont know
the localization just tells ur game what language to use
I have been making chat for game with system messages
well then just use localization as normal
I've used just string and system message were not localized
If I need to do a "delay/timer" inside of a function, what is the best way to do that? I know I can't use "Delay" inside of a function (the function is from a BP Inteface, so every enemy can use it). And I don't seem to understand the "Create Timer from Function". Sorry for such a basic question, but I tried googling and they mostly gave good examples but not when used inside of a function.
Use timer ๐
Yeah, but how do does work? I seem to be to dumb. ๐ฆ
Create timer by event -> create event -> select function
It will call function after some period of time
he wants to make timer from function, not event
You always can create event for you function
good to know, never used that lol
That doesn't seem to work, I get an error when I try that.
Because it can't have events inside of functions, and when I try to do Set Timer by Function Name, it seems like it never calls it.
Yeah, that's why I couldn't do it. But now instead, I call another event from the function, and there I add the logic for each enemy. ๐
So I have a custom event "WarningPlayer", and that is called from inside the function and can have a timer.
Wellllll, one of these days I will start with C++ again (I did it years, and year, and years ago), but now I'm scared of it. ๐
actually can put timers in functions now apparently
there is always this option ๐คทโโ๏ธ
not necessary need to be timer in this case, just any other event dispatcher like widget on anim finished, something spawned, etc etc
if you need a way to check if warning is active, if its by timer, you could always save the timer handle delegate, and check if its active
how could I make this work properly?
the logic I want to achieve is, I need to create a number of randomly place waypoints inside a volume using generated pcg points.
For everytime the engine picks a random point, it checks to see if there are other points near the chosen distance vector. If that randomly selected point is near other points, the selected index will be removed and the system will choose another random point and repeats the process
thing is, idk how to make those points check the distance between more than 1 selected point
I thought when I set the Use Pathfinding to false it would ignore the nav-mesh and just move anywhere (it's a flying enemy), but it's not working.
That woukd be sonethung huh ๐
What's the name of the node to get the player who hosts the game please ?
I assume that was for me. ๐ So it's not working like that. Got it. ๐
And if so, how big can a nav-mesh be until it's starts hating on me....... Since I'm not sure what the best solution would be for solving this.
Hello! I have some bird blueprints that all have the same variables but I need to spawn them randomly then feed information into those variables. I do not want to have to cast to each individual blueprint and am lead to believe that possibly making them all a child of one blueprint with those variables may be able to fix this issue. Any ideas on how I would go about that?
Is it ment to be flying in 3d or 2d
Does anyone know if it is possible to duplicate a widget?
Start by creating an generic bird actor class that will contain all your necessary variables, then right clic it in the content browser and create a child blueprint class.
This child will inherit from its parent all variables and events/functions that can be overriden inside itself if need be
why would that not be possible?
I can't find a node for duplicating
you just spawn a new copy
That would involve me creating a new instance of it, I want to just get a copy without having to create a new one and go through all the setup/assigning variables from obj1 to obj2
so you want to mirror it basically?
create your child widget on its own then add it wherever you want in other blueprints
it'll show under "user created" in your palette
i dont think there is a way to show widget twice without actually duplicating it
maybe it can be done in c++
Thank you. I should just be able to reparent current blueprints into the generic bird correct?
yes, either through the class settings, or file/reparent blueprint
note that some stuff may not work right away and might need some cleanup though
Hey fellow blueprinters, I'm having an issue myself.
I'm having trouble finding a way to get the position of some racing AI pawns.
Right now they're all using a AI move to to another actor location.
Is there a way to query how much of the path they've travelled? I'm pulling my hair on this one
how about saving their initial distance and comparing it to current distance?
distance to what? the track can make some zigs and zags depending on which one is loaded so I cannot get a direct distance to the finish line actor.
Then they can just follow regular pathfinding? And stay elavated ^^
Whats the track?
if you are using splines, there should be a way to get where you are on the spline
else, u will have to come up with a custom solution
Just simple pathfinding with assets blocking a single way to the objective
that's where I'm hitting a bump
as squize said, get nearest point on spline
Add a spline
I've tried getting their travelled distance trough Speed*Time
i thought that blue line was a spline
Nope, I drawn it myself ๐
lol
Hi ๐ I'm attempting to make a blueprint spline for a wall atm. I followed some videos to get the basics down and I now have a spline that works out the length of the mesh and the spline and then generates the meshes accordingly across the spline and stretches the mesh slightly if it needs to. But now I'm trying to add a second mesh to the spline that is a different size, is this possible? Can I have the BP work out the mesh length of both meshes and fit them onto the spline where needed? I'm also needing to be able to select where the other mesh is placed along the spline, I can currently do this with an array (as pictured) but the BP is then trying to squeeze the larger mesh into the size of the smaller mesh (the issue also pictured). Any help with this would be super appreciated! Thanks! ๐
You'd need to update MeshLength according to the one you just spawned and not according to the wall mesh
How could I do that without breaking the mesh length of the smaller one? Do I just update the length later in the chain before the larger pieces are added?
You could use a select based on the same bool used to chose wether to spawn a wall or a tower. Promote both meshes length to their corresponding float variable (WallLength and TowerLength), then pick a or b depending on your boolean
The issue with the spline is that I need my actor to move using their movement component and not just a simple lerp, it's a race wheir each racer has its own stats of accel, max speed, etc.
Just pathfind -> get path points -> use them to lay out a spline
Alright, I think I understand. Blueprints fry my brain ๐ But thanks for the help
And use that for distance reference
I've tried that, but perhaps did it wrong... Could you elaborate?
I'm guessing the end goal is getting position along spline, that was my original idea, but I couldn't make it work fsr
The first issue I faced was having the spline inside the pawn itself, as the spline component just moved along as the pawn started moving... So I created a simple actor with just the spline component, placed it at the race start, added the points comming from the array of PathPoints but never got the pawns to follow it instead of the default pathfinding result
So, should the path finding be done in a sperate actor, containing just the spline, then passing the result to the pawn and feeding it to the AI move to ? What was I doing wrong?
Id make the spline actor (placed at the start) pathfind to the goal. Then id get the returned pathpoints and set each spline point to its correspinding location
And then the AI can (or whoevers in charge) query the AIs location vs the spline to get the current distance
Oh, so I should keep the pathfinding, but just use the spline to query location along it
The goal was getting distance inti the race right ?
I would guess for figuring out who's first etc?
To make it look more dynamic
Id probably let the AI find path point randomly spread across the width of the track
So they'd look a bit less.. linear
(Id actually make the track with a spline instead, So it's centered. )
I've used turning boost to have some of the AI "drift" more and give this non-linear effect
But yes, querying who's first is my end goal here, the rest is good enough for its purpose
Cool cool
hello @tired whale
Sup?
ui
How do I make a spawned actor a child of another?
Is there a "Set child of" node or something?
How do you spawn this actor?
Via the SpawnActor node
then you can set it's class right here, just point to your child actor class
i think what you want to do is make the parent class, then create a child of that, then when you spawn it it will be the child, i'm not sure you can just assign it as child.
So how'd you go about querying pawns location against the spline? I have 0 idea on how to do it
I may not be understanding something correctly at the moment. When I make an actor a child of another in the editor then spawn the parent and make changes to its variables it doesnt seem to reflect that when I get that variable in the childs blueprint
It seems to be reading the default
The child might have overriden said variable already. Check your "class default" in the child
why are you spawning the parent ? why not the child ?
also you can show inheritted variables (which are hidden by default) here
Yeah, I missed this part out, but it's way more relevant ^^
Do I not need an instance of that parent so that I can change its variables?
I need the child to take those variables and use them
In the editor, if you have created your child class actor, then spawn it
it should have all the values from the parent's variable as you've set them in the child
I have the ability to get those vars in the child actors however when I go to set them at runtime and read them with the child actor they come back as 0
you should be able to use the variables from the parent on the child like as if it was on it
Can you give us some screenshots?
And do need an instance of that parent in the level to edit the values at runtime?
Yeah Ill try its a bit messy at the moment otherwise id have already sent some haha
No, but how are you setting the variables at the moment?
it's ok, I wont judge ๐
I spawn the parent actor. Then set that actors variables to what I need. Then spawn the child actor using the parent. Then read the parents variables with the child
I am just doing a normal get though since I dont have a reference to the actor that I made in the scene which seems like that would be the culprit
That's not really how it works. Just spawn the child, from the return node of the SpawnActorFromClass you get a ref to the child. Using this you can set any variable inside the child without ever needing to spawn the parent
gotcha thank you
how can I change the variables of the parent class before spawning the child then?
an exemple of how I've got it inside our game
I have a parent Rat class from which I have 4 children who's class I've stored in an array
GetPointClosestTiWorldPosition
Or something along those lines
Ok, gona try this now
Then get distance at point
you most likely don't, you spawn the child
and use it when you set the variables
Interesting it doesnt give me access to any of the vars inside of the actor I am spawning since it doesnt know what actor is being spawned
what do you mean it doesn't know? What are you putting in the class field of the SpawnActorFromClass ?
There are 5 different types of birds in this actor array
All are children of the same class
i wonder if you can cast to parent
and get the variables
out of the spawn
I think I tried that already and the cast fails due to the actors not being the same
from the return node, you have a reference to the child you just spawned. You can either set some variables right away (like I'm doing [here](#blueprint message )) or store them in an array to do it later on using the same order as you have in your class array
guys hi ! how can ฤฑ make filter system for enemy in widget
I get what is happening in this screenshot I just dont understand how you were able to set the runner id.
Currently I have 5 birds all children of the BirdParent actor which has a few vars, one of which is Speed
When I pull off of that renturn value given to me from spawn actor I am not able to set that Speed value or any others at all
Whats the ckass of "BirdArray"
This is what is inside the BirdArray
it is an Actor ClassReference
Ohhhhhhh
gotta change that to the BirdParent
that'll do it most likely
pls help guys hi ! how can ฤฑ make filter system for enemy in widget
Can you elaborate on what you're trying to achieve here?
atm I have no idea what you mean
Each enemy has certain features that I have predefined. When I click on the feature checkboxes, I want those who possess the selected features to light up in green, and those who do not to light up in red.
Seems like I can only get info "at spline point", and not the other way around, as in find to which spline point is my actor the closest ๐
Hold my beer
seems not, it returns a vector and not a spline point
My man ! Thank you !
As Todd Howard puts it, it just works! You're the goat !
๐ฅณ๐
Now you can also ensure that no car is trying to reach a location thats behind them !
I had an EUW that worked in 5.2 but gets this in 5.3, is there a notable change that might be behind it?
something kinda like this somehow? At the moment it changes all the segments of the spline rather than just the parts with the tower though ๐ I'm losing my mind
so, how do I do it right?
how do I like make 1 point read every other point that has been selected, not just one?
If you just spawned a piece. You wanna track which piece that was
Does anybody know how to make a scoring system like this using blueprints
notice the borders between the big numbers
and how the score gets bigger on the next boxes
Hey guys! I'm new to blueprint programming and need some help. I was following a 3-year-old tutorial on YouTube where the instructor created a blueprint interface with two variables. To input values into them, he used "Get MoveForward" and "Get MoveRight." However, when I try to do the same thing, I can't find these nodes.
What can I do to achieve the same result? I need this blueprint interface to activate an animation when the character moves.
i mean you could just make a widget and change the text of some things to display it
what nodes are you looking for ?
In the video, he used "Get MoveForward" and "Get MoveRight" and connected them to "Move Forward" and "Move Right." However, I can't find these nodes.
Need a alternative for this
those are functions
hard to tell what they return
us that ue4 ?
and your using 5 ?
In video he was using ue4
i'm using ue5