#blueprint
1 messages Β· Page 154 of 1
I'm looking into the code I'm learning from, and I'm noticing that the code has managed to Cast to another blueprint that is specifically supposed to reset the entire world back to how it is originally. Is there better options for me to call a temporary save in the game besides doing this?
could it be this is needed for that event to work?
except its greyed out so i cant try it
You need to set this up like the video. Beginplay, CreateDynamicMaterialInstance with the material specified. Populate the return into a property.
yea dyion was trynna bug fix
so ill do it like video again
@toxic copper i think what you are attempting, is to use a built in bind to a anim statemachine function. but your concept is more of a different method. if i understood correctly u said that jumping and falling are the same ?
Ah. Right. You have to set that to true in the BP on the Jumped event.
hi guys, I have a question concerning optimization : let's say i have a data table for hundreds of NPCs, all the NPC are based of the same blueprint, how should I take care of updating the materials for each NPC ? Am-I better to create hundreds of material instances and replace the materials in my construction script of my NPC blueprint or have 1 dynamic material that update correspondingly to the current NPC ?
@toxic copperRoughly this I think. Not in a jumpy project to test.
I would say that the tutorial is trying to teach you one thing, doesnt mean that it's the best, but just trust the process and learn that, it's hard to say without context and where you will use that in the future
I'm not sure if this is the right channel for this, but I'm having optimization issues with a blueprint based endless runner project. Been following a couple tutorials to base the project off of, and they all work by spawning a specific number of platform actors, deleting each platform as the player pawn runs past it, and adding a new one at the end of the chain. This all runs around 70fps at the beginning of the game, but as the player pawn runs the fps steadily drops till its unbearable. I'm not sure where to even start looking to fix this problem, as the game is constantly deleting actors and should thereby be recovering recourses. Any thoughts?
Alright, I'll do it for now
ok back at the same place now
What about your beginplay?
@toxic copper i misrepresented what that bind was doing ;/
This seems correct based on your material. This doesn't work?
so i am indeed using this for switching flipbooks as well as some other logic. currenty "isFalling" is true regardless of if im ascending with jump or falling. i think its whenever z != 0
cos it has 0 options
@maiden wadi in your example to @toxic copper would the apex not immeditaly be reached as the jump began?
No. It's set in Beginplay
ok
is this suppose to be like this
Apex is reached when character starts going towards gravity.
This looks fine as well.
nope doesnt work
this worked, thank you!! any idea if this is better/worse than just using a Get Velocity, if Z<0
this is 5.4
Then show me the mesh you have in the cube thing.
Also it took me forever to find the Set Notify Apex node, i didnt notice you had it connected to character moevment
i did not have the marterial set as m_color before
i chnaged that dunno if should of
i feel like at some point you have to set the material you created
and i don't see that
It should be specified at the CreateDynamicMaterialInstance node.
take this m-color material and set this to none because you are setting it in the begin play ?
i think this does it no?
i thought that you had to set material
and the dynamic instance was seperate when it was created
That create will find the current MID and return it. Or if there is not one it will create a new one, set it and return it.
@toxic copper im confused to how it actually changes 'at the apex' and not at 'event on jumped', is your problem solved?
Click Apply here. @dry scarab
omg xD
Useful to use HSV colors for random colors. π
it was working whole time lol xD
Watch Untitled and millions of other Unreal Engine videos on Medal, the largest Game Clip Platform.
AMAZING
dont even needthis in my game but
im learning how to reppstuff so yea
P:D
Slightly easier color randomizer.
so what was the issue co si dint click apply? in color thing
H is color. S is amount of color, V is dark to light.
You didn't recompile the material. So it was showing old values. Probably without the parameter.
When I have some spline meshes along a spline, and I change the location of a spline point, do I really have to trash all the spline meshes and regenerate them... every frame?
Or get the current ones and move them to the new points.
sorry, i got carried away testing with it
so i think what happens is that unreal has a built in check for when a jump reaches its apex. the event "on Reached Jump Apex" seems to only work when this option "Notify Apex" is set to true
so even though the bind event is set immediately after jumping, i think thats just tying that "apex check" to the jump that called it
There is no "at the apex". It's a state transfer. This code is ran in a ticked function. You set the NotifyApex to true, and the first time that velocity is lower than zero Z, notify it and set the boolean to false.
if (bNotifyApex && (RotateWorldToGravity(Velocity).Z < 0.f))
{
// Just passed jump apex since now going down
bNotifyApex = false;
NotifyJumpApex();
}```
Hello there! I've a blueprint for my guards path and Ild like to have an event to reset this (go back to the first point) It seems simple, but I don't understand.. I tried to set the Target to 0 but that doesn't change anything theyre still trying to reach where they were previously, can you help me?
interesting, thanks for that explanation
so its esentially the same as the get velocity < 0 version, tho im not sure what a ticked function is
I'm not entirely sure what you're issue is but this is how I use the on Apex notify event to control the gravity scale of the character. It might help you in understanding how it works.
thank you, ill check this out
beautiful. my next question is was about to ask i answered on that last screenshot lol
was having issue cause "isFalling" was still true the moment i landed and wasnt changing state. is landed should hopefully solve that
@guids π
How would I make an array of blueprints If I needed each blueprint to be different from the other?
array of Objects
You're probally looking for an array of actors.
or , the closest Parent class they have in common
like this?
yup
cant find actors
that sounds like it might work
but , if everything in the array is an Actor, use Actor
it would just be 'Actor'. If the blueprints will be things placed/spawned in the level, use actor instead of object. π
no problem
sorry for ur bank account
What do you mean by add it to your widget?
like this
wut?
I don't think you can. (not in BP anyway)
Probably exposed it in C++, but doesn't appear to be available to blueprint.
these are all expensive lol
How am I supposed to add the actors thought? Especially if I don't have the actors in the level yet, but to use this array to randomly spawn those actors..
ahh ok
anyone can write me code XD
its not 100 needed but long run with 30 interactbles might be good etc etc
If you want to use the array to spawn actors, make it a actor class ref instead of actor object ref.
pay.. :3
i just paid for a assert pack hahaha
@wise ravine can u explain to me again what it is ur trying to do? load maps into an array?
btw they will have a big sale in july its there 10 year anviersely
load actors, but big ones
yes
I believe it might be better to load levels, but I don't know how to so I'm just compiling all of the objects into a blueprint
Untested. Needs more #inlcudes probably.
.h
UCLASS()
class YOURGAME_API UYourBlueprintFunctionLibrary : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintPure, Category = "YourGame")
static bool GetNetLoadOnClient(AActor* TargetActor);
}
.cpp
bool UYourBlueprintFunctionLibrary::GetNetLoadOnClient(AActor* TargetActor)
{
return TargetActor ? TargetActor->bNetLoadOnClient : false;
}
Anyone know how I can reset this path? I tried to set Target to 0 but it doesn't work
Custom Event
Yes but what should I put in this Reset custom event?
what ones of theses do i need
sorry nomrally a bp guy i m guessing im making new ones then naming them. h etc etc?
All Classes > BlueprintFunctionLibrary I think its called.
For this scenario, is casting the best option*? Can I use a BPI instead?
Or is that not necessary?
what is thisjunk xd
it looks like you want to reset when Target is the length of Destinations
Target = 0 will pull the first item from array, but i thing you would want to stop moving because you are at end of array
remove the Exec wire after Set Target 0
@atomic prairie
you got to close the editor and compile from the ide
@versed sun Like this? This doesn't change anything for me, after being teleported the guard still wants to reach his old destination rather than restart the path again
ahh , you want to go to each destination , then loop again ?
Yes. There are three guards doing patrol loops. But I added an event that teleports the guards to their original spawn and I want when that's done they start their loop again with the first point
Bro
lol what am idoing wrong
are there any tricks or shortcuts to convert my blueprint to python script?
Posting in the wrong channel π
i cant put into nice code
nooo
its right channel
just i cant do it nice
Uh try #editor-scripting but beyond that idk
C++
ahhhh ok
ok thanks
= maybe
Also you might do incrementation before you check condition
Not when you are doing branch
Also on true you are not connecting exec pin
YEs i reconnected it
I've 4 target point, the guards do patrol loops
And I would like with this custom event the guards are teleported to their spawn (it works) but I want their target reset to the first of their array
Ok so you increment before branch, then you check if is lenght smaller than the target number, on true you use [index] of array you set, and in case of number > length you go false and reset target to 0
And on false you call event
Also use some strings so see where it finishes for debugging
Basically the problem is in the branch node, just move increase mechanics to happen before branch and not while
Also recommend to change destination to NumberOfPoints name of variable
And target maybe to CurrentPointNumber
Does calling a BPI activate the execution on the Receiver BP's end?
any idea of what is going on wrong here? it broke down because I deleted an unused asset that had nothing to do with this
hello, I'm trying to spawn a projectile, it only fires normally when the collision is set to "overlapall" but my code only works with "blockall", but when I have block all they only appear sometimes when I jump around, because the collision is messed up somehow?
the collision comes from the root and I only spawn them 0,5 second apart, they are small as grain and shouldnt have big collision
at some sized the bullets stayed on place and didnt move at all and start to pile up one after another, ALSO I scaled down the root in viewport for player and bullet if that messes it up? EDIT: I set it to be characterh mesh and it works now with correct sized collision
Hey what does Game State inherit from
Thanks!
im getting an unknown value
try if set to 1
see top right
wdym? pinned messages?
in the BP, check the top right corner and you will see the parent class
where is that beginplay btw
oh
I don't get a "Get Game State Base" however
did you set the game state properly?
yes or else it bev the default game state (made by the engine)..
set it in project settings
I just did it here
does it work
Still getting an unknown value
Wait nevermind, it executed
I'm checking the results now
you have a check point thing on it lol
a breakpoint yes
Got some failed cast, going to check those out now
Everytime my train collides with the trigger box it triggers multiple times, I think that somehow results in multiple failed casts
but it still executes at least once
wdym?
ops
try setting for negative value like -1 or -5
It's finaly works!
and I have an infinite loop now somehow..
Hey! I'm trying to analyse a video with blueprints, can I possibly do that?
like object detection and tracking
show the code
I hope so because I don't even understand what I'm talking
the overlap event gets trigger multiple times
yes
Anyone know how to get the wave function collapse plugin to collapse/generate during runtime? π
Trying one last time to see if I can get an island to get generated when the level begins
I put a do once and I guess that fixed it (this time)
I'll come back to this tomorrow, appreciate the help
hi, can someone help me on this? it stopped working out of nowhere
This isn't necessary. You can get the owner of the component within the component.
how? ( i followed a youtube tutorial)
if you must have it as BP_FirstPersonCharacter reference, then on begin play you'd cast the return value to BP_FirstPersonCharacter and set the reference.
so what should I do to fix it ? im new in ue5
because what I did worked but suddenly broke
Part of the problem is also that you have two things named very similarly. You could be using the wrong one somewhere in your code on your character.
i noticed that after sending the message and deleted it but that was not the problem
it keeps telling me the problem is here
You can get the owner of the component within the component. if you must have it as BP_FirstPersonCharacter reference, then on begin play of the component you'd cast the return value to BP_FirstPersonCharacter and set the reference.
Hey, I need some help. Can anyone tell me why this doesn't work yet when I add a branch and event tick to the branch it does? I have defined my input action as W btw.
Because "pressed" only fires a single time.
ahhhh
ty so much
and how can I do that? because I literally don't understand what I have to do xd
In your case you'd want to cast to BP_FirstPersonCharacter. You'd connect this up to BeginPlay on the component.
Then if you'd want to set the "As BP_FirstPersonCharacter" from the cast into the "Connected Actor" variable.
@signal thunder i think its ok, right? nearly the same as actor components which are uobject classes. or something like that. ;p
Are they actually doing something or is it just to use it to keep track of the state?
how do i get this widget node, blue on left
Are the variables different between them, or are they all the same? Like, using just a single class for all states?
use a reference to self @dry scarab ?
@dry scarab if u right click the BP graph and type 'self' it will create a node to the reference of the BP you are in.
and where should I connect the ac inventory in this case? like this?
i need the reference of widget i think
because if its like that it makes the same error of accessed none trying to read property
On Begin Play Of The Component > Get Owner of Component > Connect to Cast to BP_FirstPersonCharacter > Set "As BP_FirstPersonCharacter" into "Connected Actor"
You would no longer require the construction script part on your BP_FirstPersonCharacter if you do this correctly.
@dry scarab right, since you are in another BP, you need to somehow send or retrieve the widget. not sure what the best case would be for you though. if i understand what your are attempting to do anyways ;p
im creating a widget like this over any replicated things to show, me the values,
ialready have c++ code to get this work hopefully now im just attaching the widget and adding the code to widget
so u mean instead of doing it in the Bp_firstpersoncharacter I should do it in AC_Inventory?
given that by default characters use capsule components, even for 2d paper characters, and that half height cant be below capsule radius.. what's a good way to reduce capsule size below the radius while still maintaining the character's collision width while crouching?
would it be expensive to spawn a collision box to handle overlaps while crouching and delete when standing? i could also have it exist all the time, but im worried about duplicating effects if overlapping with both capsule and this collision box
@dry scarab so if the 'cube' is creating the widget, it should return its reference on creation. right click the return node and permote to variable. use that in place of that 'widget' node?
π
ok so I need some help, for some reason my bullets destroy themsleves when they spawn via my spawn actor which shouldnt be possible as my spawn actor has no collsion mesh. the way this should work is that when the bullet hits an character, it will know what it is and apply damage
I answered this for you already. Set an owner (or instigator) when spawning... Check if "Other Actor" != Owner (or instigator), and destroy/apply damage if true.
mine is i cant get the set cuberep for mine
my apologies, I was extremley tired last night as it was about midnight if I recall
also I'm assuming the owner is the bullet itself?
By default I imagine it's "None".
Input ACTIONs fire once when you press them
input AXES fire per frame when held down
When spawning it.
@Noface its another referencing issue, the variable for 'Cuberep' does not have a target node for the widget reference to point to.
"Spawn Actor From Class" node has an Owner input.
but wait thats not where my damage blueprint will be
Damage doesn't have anything to do with it
You're spawning a bullet. That bullet is colliding with something.
You want to make sure that bullet isn't colliding with the thing that spawned it.
@Noface im guessing you're trying to plug those two nodes together
im trying to do this, my widget is called w_bp
but mine is named cuberp
Owner should probably be self
its being taken by something
is the thing it's colliding with that other thing?
it shouldnt be my bullet spawner, I never gave it the collision mesh nor does my bullet spawner have collision on
@dry scarab pull off the reference pin 'As W Bp' and type 'set cube'
do you think my bullet colllsion mesh and the object in it may be colliding with eahc other
Usually an object won't collide with itself.
with cont sen of it has this
@dawn gazelle found the problem and I fixed it. the ac_inventory i had in the bp_firstpersoncharacter disappeared due to a bug I guess and the game couldn't recognize what the I was referencing, thx for the help tho and sorry for being so dumb π
what could be the possible reason?
@dry scarab there needs to be an event that takes the argument 'actor' and does something, created in the Widget blueprint. it seems to me you named it 'Cuberep' or perhaps havnt created the event at all
hmm
@dry scarab or it has a differnt name
any ideas on the slow spin of my spawner?
no so far i have 0 thign in my widget
dunno how to create a event
in widget
Possibly the bullet colliding with it, causing it to move.
Hey everyone, could someone advise me on something. (Continuing from yesterday) i have set up a player state to hold me scoring and this displays to a widget at the end of a level.
Set up a game instance for saving and loading the unlockables.
First, where would I do the unlocking? In the end of level blueprint if the total score is more than the required score to unlock? Or do it on the player state?
Second after conpleting the level and unlocking, and the player returns to the home level. How to display a widget saying what was unlocked, only displaying if something was unlocked
Help is much appreciated π
is there a way to lock rotation of my sawnder?
@dry scarab in ur widget right click the graph and type 'custom' to add a custom event, and name it 'Set Cube' and go back to the Acube BP, and try again
I'd say check to make sure if that's actually what is happening.
Like, maybe try printing the location & rotation of the spawner on tick (set the duration to 0.016 and make sure it's logging only to the screen) then you can see if it's because the bullet is actually moving it by seeing if the value only changes when a bullet spawns
you mean from this?
@dry scarab thats the designer, top right -> grapgh
On tick of the spawner.
@dry scarab i had to check the editor to see if i was misinforming you of that
so now i just need the custom event doing something
@compact fable tricky to answer. but if kept simple, at the end of the level if you didnt spend your pooints the player state would be lost and so would the points?
ok so I checked my rotation in my bullet obejct and from what I can tell its not rotating
i need the custom event to run c++ code i think
I did a print string text with each spawn
to then show in the widget
You guys are really hurting my head tonight.
try printing the location & rotation of the spawner on tick
Don't care about the bullet, the issue right now is the spawner.
I found the issue, its my player
Oh interesting
yes I assume so. I was thinking maybe creating a end of level score unlockable function in the player state, then when the player finishes the level this is function is called. then set variables if stuff is unlocked and what, then when returning home, this is checked and called if stuff is unlocked
becasue of simulate phsycis and my player being set on fly mode most liekly
@compact fable um i guess playerstate is persists. anyways, check the third post on this forum thread. i think its an ok explination. https://forums.unrealengine.com/t/what-should-i-do-in-gamemode-gamestate-and-playerstate/93584/3
GameInstance (an object spawned when you launch the application and that remains the same until you close it) GameMode (spawned when a level is loaded) GameState (spawned by the gameMode) PlayerState (spawned when a PlayerController is spawned = when a player arrives in the game) You have to pay close attention to what you do and where you d...
what should I turn off here so my bullets cant apply force?
i think im just gonna give up
i dont need this 100 percent
was just gonna be nice lol
thanks for ru help
unless u think tis real easy to fix
i have c++ code already i just got get it print to widget now
@compact fable PlayerState can be set up to persist, but it doesn't do so automatically. You change levels, it gets destroyed and a new one is created.
@Noface the custom event should have been named 'SetCube'
hello. how do i reparent a blueprint with a different c++ parent? the cpp classes dont show in the drop down box
why is ur tagging failing lol
@dry scarab sorry, because i type it out and dont select it
hmmm If it persists then it would need resetting for each level so the scoring doesnt persist to the next level, but only persist back to the home level
except what you did won't work
@dry scarab plug the taraget into 'As W BP' !
ok but now th eeven is not doign anthing
how do i tell the event do get 2 c++ code and insert it
to widget
UFUNCTION
what is thi smagic
not the function
If you actually compiled what I sent, then you should just be able to call that function by its name.
the widget ref should
GetNet...Whatever it was
he did
cat chnaged it a bit
or editied it slighty
and then i some how adde }: and messed it all up
π
not sure about that tho
oh ok
Feed in the actor you want to check the value on. It'll pop out the value on the return value.
what actor lol
If you don't hook up anything or something invalid, it'll still return false.
if bool = 1, write true, else, false
ok is there any way for my player to essentially not simulate collsion phsysics in flying mode?
@dry scarab umm. the ACube. is an actor
ok but this is in my widget
so i have to ref from my boxrep?
cuberep
Orrrr you could pass in the value from the actor itself.
click that custom event, so its highlighted. then in the right panel scroll to the bottom and and under input click +. add the variable of actor type.
int he?
in the
typo π
int'he
@dry scarab
wait let me reword my question, is there any way to lock my player charcates X axis position
@dry scarab
@dry scarab click the 'SetCube' Custom event, so its highlighted, in the right details panel there should be an option to add inputs.
its left detaial panel
lol
i still have ue4 ;/ i donno if it changed
w.e
anyways, back in ur 'ACube' BP, plug in the new node 'Actor' to 'self', as u intended.
@dry scarab #blueprint message
hmm is there a way to monitor how fast certain parts of my BP are running?
@dry scarab are you understadning?
thats not correct?
my target on set cube is not right
It is, but I think they're just wanting to know if you're actually following what is happening.
@dry scarab ;p
lots of texts flying too
kinda just wanting it to work lol
its not core gameplay just a rep thing so i can always use it when i make every thign i need to rep
ease of acess thing
so whats the last 2 teps then
and thanks alot for u r help
@dry scarab Is @dawn gazelle providing you steps?
I helped him a lil' bit.
You need to code it to do something.
yes
What do you want it to do with that value.
display in text on widget
Ok, so you need to get the text widget that you want to display it in and set its text value to the return value of the Get Net Load on Client.
as I said, if bool is true, set the text to be true, else, set it to false
so when said object does said thing, these vales can chnage based of the values
have you created that display in the designer?
nope ill just create floating text lol
so just set the variable of the "floating text" in the event graph pulling of the new custom event
@dry scarab is this an assignment needed to be complete tomorrow?
nah not at all
so u mean somthing like this , i know im doing ti wrong still sorry
@dry scarab close.
as I said, if bool is true, set the text to be true, else, set it to false
you need to watch more tutorials manΓ
i know what bool is
i just dont understand where to implement it
useing that to text and the c++ i have
if you just plug the bool, it will show a 0 or 1
if bool,
true --> Set text (TRUE)
false --> Set text (FALSE)
@dry scarab
You get the thing that can actually display it, like a "Text" field added to a widget. Not a "text" variable.
the bool from the 'Get Net Load on Client', no need to create your own bool variable
yea, normally it's Text ref -> Set text and then you put a text in it
@dry scarab
how i get this
by creating a text in a widget?
make sure the text block is a checked as variable.
igtg
ty for ur help
np
how i do this
we will be narnia soon
@dry scarab in the top right while the textblock is selected, theres a checkbox 'Is variable' in the details panel at the top, check it.
@dry scarab see it?
woot
now i need to turn this blue thign into a string
and chnage it in string yes?
so the branch overwrties the sting
That textblock is more than the text itself, u need to set the text, of the text block.
ok
ok I seriously need help, what can I do so my bullets dont cause a push when they hit my player
@dry scarab #blueprint message
rather than blocking collision, use overlap. Then instead of OnHit (which im assuming you're using), use overlap
on the right lines?
oo wait red things need attaching?
xd
but wont that cause my player not interact with the bullet? I need said bullet to apply damage
@halcyon plover something here in the mesh physics?
As long as you use overlapping collision, it will still interact
but it will be a different event, rather than "hit" it will be "begin overlap"
its easier if you add a colision box around the bullet, then remove collision entirely from the bullet mesh
oh this is what my bullet uses
okay so you are already using it, even easier
so, because I hate myself I'm looking into how save/load systems work and thanks to Datura I have one potential system saved up, but I have 2 copies of my current project file, and on the second one I want to experiment with a different kind of save system, it's one that apparently can use manager classes to keep a hold of item data, but idk how manager classes work or how to use them, does anyone know any good tutorials or resources so I can start looking into it? I've tried googling it myself but results have been kinda sparse
I'm a bit confused on what to do here, I've checked the skeletal mesh, and the bone names are correct, so im not sure if im to add something to the CR BP or not
first for my collider, other for my object in my collider, maybe its because my bullets is a moving object so it will feel push my player no matter what
is there any way for my bullet oebjct to have no phsyical properties?
you're looking in the wrong section. Go to "collision"
what are you trying to do here?
o dear we borke my color for my box lol
its been fixed
why is that
we are getting 2 values , and set the text of widget to show above a box
@dry pecan how?
if you just plug the bool, it will show a 0 or 1 (edited)
[03:35]
if bool,
true --> Set text (TRUE)
false --> Set text (FALSE)
as I said, if bool is true, set the text to be true, else, set it to false
I set PMO to none
i just dont know how to implemtn thtis
I have a question is it possible to add a rows to datatbles at runtime using blueprints ?
so where do i get the bool options to pu tinto text here
y'all are overcomplicating it for no reason, he doesn't even know how it works and you are getting it more complicated
datatables are static
i understand i have on bool true output this pin
Wich means I can't ?
but i dont have the bool goign to the text
don't know why but my health isn't changing when I get hit. left is my damage caused by bullet, other is my BP component for health
@hexed cradle right, u can not add rows dynamically to unreals datatable
Put some print strings around, see what "other actor" is, see if you're getting a response in your "On Damage Taken" event where you're manipulating the health.
I did, I even had it print out the current amount of health
Thats quite sad I wanted to use that instead of using an array of struct
put true and false for the text inputΓ
this is something else btw
is it because my apply damage doesnt know what my health variable is?
done still got this error now
the widget one is also there
go in the correct BP and show code
at top
it wasnt borken before this
weird
so its reading 0 for color material now for some reason
and its refusing to chnage color on overlap with colidder box
thats the full code
it was working now it dosnt
@dry scarab its acessing none, why? find where the 'color material' variable is set, and determine why its being set as 'none'.
Is there a space after the Color? if so, delete it
nope
No it doesnβt have anything to do with the parameter value
Itβs your color material variable
That would do it π
For some reason this code calls a raycast but it keeps starting from the origin of the world instead of the character, why is that ?
Same as before. check that variable and make sure itβs getting set
odd, I even set my BP like this and it still says my HP is 100
Yeah whatβs the widget variable set too
i cant sem to set a value here or drag that widget in
My first guess would be that you didn't initialize your ASC with an appropriate avatar actor.
Like if it's using PlayerState or PlayerController as the avatar actor, then those would be at 0, 0, 0
Yeah I'm giving the ability in the player state, is it possible to keep the code in the PlayerState and still have it working ?
Giving the ability has nothing to do with the init of the ASC itself.
The init part is usually done within C++
So this ?
Like I derived from this BaseCharacter to create a blueprint character child, so is it supposed to work ?
In order to set up the ASC correctly, you would've needed to call InitAbilityActorInfo on the ASC somewhere.
It's basically feeding in the owner and avatar actor that it'll use.
How to do that ?
i cant sem to set a value here or drag that widget in, is this what u mean @worthy jasper
Thatβs odd, yes you would need to set a widget there
Check first to see if you actually did do it somwhere.
But is ASC a c++ class ?
@dry scarab it's taking object ref not class
There is no instance to refer not a world
Technically everything before blueprints is.
UAbilitySystemComponent is defined in C++
You would've likely created something that adds the ASC to it in C++
sorry dont understand
You can see on the left panel I don't have any ASC class but you can it's initialized in the the WerewolfPlayerState.cpp line 21
Hmm yeah wait are you clicking widget component on the left or did you make a variable
@dry scarab I'm just gonna guess what you want to do don't make a variable of widget component. Instead add it thru the too left of the windoe
And here in line 22
Add the component to the actor via the plus button
Ok, so that's the line there.... If this is initialized in PlayerState.... "this" that you're feeding in is a reference to the PlayerState, which you wouldn't want to be the avatar actor.
How to get the avatar then ?
Get your pawn?
You need a reference to the actor that you actually want to be considered the avatar. To make it more complicated you also need to ensure this is updated whenever that changes.
u mean this
I don't know how to do that π€ Like there's no "GetCharacter" or "GetPawn" from the "GetAvatarActorFromActorInfo"
So generally speaking, you may want to use the PlayerController's OnPossess() function to then call into the playerstate to get its ASC to then update its avatar actor.
When you create a variable, you are just declaring a pointer. It can point to any component you set.
With the add button, you are actually making the component
ok
what one
ahh
and what am i adding lol
I'm not sure to understand the last part after the "OnPosses"
Widget component
PlayerController has a reference to PlayerState. From PlayerState you need to get its ability system component and then call InitAbilityActorInfo().
You have the interface implemented to call GetAbilitySystemComponent on the PlayerState, so look up how you call that interface in C++ so you can get a reference to the ASC it has, then using that reference call InitAbilityActorInfo()
so i dont need this to work?
I don't know what this is. Also you still getting the wrong one
Try to delete all the variable first related to widget comp. Compile save. Then add the component again
Top one
thats what i did before
This is my movement logic. Have the issue of pressing left and forward going too fast because its combining so I added logic to slow it down when both are pressed. Now when I start adding in movement for right and forward being pressed, it doesn't slow it down. Can anyone help me? 2nd image is the logic for the right movement.
You need to set βwidget classβ
There's no "InitAbilityActorInfo()" that appears once I get the ASC
Then plug it in to your node there
Your widget class is still set to none so I don't know what you expect
And your node not connected yet
You have to do it in C++
You could probably expose it though π
I wouldn't, but....
One moment
But wait I'm even more confused because I already have "InitAbilityActorInfo" π₯² line 21 on the playerstate
You do but you're initing it telling it that the actor you want to use is the PlayerState
"this" in this context is the PlayerState as you're calling the function in the PlayerState.
so the second "this" should be replaced with the character ?
No.... Because PlayerState Begin Play is not the right place to even call this. You want it updated whenever the player controller possesses a Pawn so you have a reference to the pawn they're possessing.
That's hard for me to understand as I'm not a c++ guy π
What I said isn't even much to do with C++, it's just the flow of how things work.
Begin Play of the PlayerState doesn't necessarily fire when the PlayerController has possessed a pawn, so if you did it in PlayerState Begin Play, there's no guarantee that the PlayerController is possessing a pawn at the time, nor will it keep it updated as BeginPlay only fires once.
Furthermore, if your intention is to have this game multiplayer, it makes even less sense to have it in PlayerState BeginPlay as then all clients will be trying to call this function when a PlayerState begins play on their end (though I don't think it would cause any harm)
Watch Untitled and millions of other Unreal Engine videos on Medal, the largest Game Clip Platform.
so it shows it but text wrong and its not chnage to false
wait
am i being dumb
But I put it on the player state instead of the player controller or the character to keep the abilities, data, etc... after the character being destroyed to respawn him
...... I'm not talking about where you put the ASC I'm talking about where you init the asc That can be in a different place entirely.
I do mine on acknowledge possession for clients
? The C++ I gave you earlier? It was just returning the value set on the actor if a valid actor value was passed in.
yay it says false wheni toggle client off
i fixed my issue for anyone looking to reply dont bother
If you don't check your refs in C++ you get hard crashes.
But I don't have a c++ player controller class, should I create one then ?
Thanks for not sharing
I guess
so its chnagesing this
when ticked
that works great thanks
lol should I do that? I dont want to break the conversation anymore
It's normally a common courtesy to at least say briefly what you do to fix your problem so others that face the same issue can benefit
I can't recall, but is that required? Do clients need to set it themselves too?
I have a few diferent set ups myself, but they all work in different ways XD
Not sure actually, I do call it there afaik. But I might be doing it all wrong lol
replication varible as well in code
I had my branch statement on false continually updating my movement speed everytime I pressed forward, forcing it to be max speed even when I pressed right and forward. I had logic setup to slow it down but it wasn't applying when i did it for the right movement. TLDR, issue was the false statement updating the max movement speed even when i was pressing right
Iirc I called ability actor info both on server and client. Imma check again, I kinda do it thru tutorial hell
Yeah, you'll probably want one anyway at some point.
Replicates is available in blueprints
Ready compendium in #multiplayer
If you don't get it, read again 9 more times with some practices. If still stuck, do a single player game first imo
i have it all set up other than that lol
soo
i need to find replicate node
in bp
?
All the basic resource is laid there
It's a variable on actors.
If you're not on an actor, then the context sensitivity will be hiding it.
Widget just read values from the owner
Hi, Is it possible to add none- static mesh object to a spline? ex : Light, Decal, Skeletal mesh
that makes 0 sence to me :d but anwyas im gonna finish for now ill work on this one tomoz
but yea its amazing
im sure it will help me in my 5 years of deving this game
instead of goign details panel and typeing rep etc etc lol
nice its even showing on client
till i click false π
my brain aint working rn
how can I rotate my actor so it's Up vector faces the same way as the impact normal of a line trace?
and have it only set the pitch and roll but keep the current yaw
actually I can do that second part myself
DOT product ?
doesn't that give a float?
yeah I needa rotation tho
like how much I need to rotate the actor by so that both vectors are pointing the same way
Anyone know why this isn't working. Im trying to rotate the entire character left or right on mouse input.
And bind to owner delegates
Add rotation, dont set the rotation
is there a blueprint equivalent to a dictionary or a map?
Map
To create a map, create a variable, select its desired "Key" type, then where you would change it to an array, there's an option there for Map
Then you'll get the place to choose what variable type you want for the value.
Hmm am I doing something wrong? I dont see it
I still think you need some form of dot product but try #game-math
It just shows these
That might be the variable type can't be supported as a map key.
I'm guessing it's the key type yeah
I learnt that we can have an array of function pointers π. They can be set in a map too, useful for attribute, delegate map
Not bp
Oh.. There are ways...
Yea, but they can be made to call functions.
It's fiddly tho working with these nodes to do it.
Sorry quick question, is playerstate persistent? Hoping the answer is no
Between levels? Not by default.
thank you!
I am thinking of doing the unlockable logic there, seeing as the scoring is there and saving it to the gameinstance, that way when the player returns home and I load the game instance I can get the unlocked data
I've been getting the unknown structure error when going to package lately, but it's been really inconsistent.
Last night I had a package fail with only a handful of the errors, today I didn't change anything in these files except restart my computer and all of a sudden by log is full of these errors
LogProperty: Error: FStructProperty::Serialize Loading: Property 'StructProperty /Game/Nexus/Core/Player/BasePlayer.BasePlayer_C:PullUpHero:CallFunc_Array_Get_Item'. Unknown structure.
These are all really simple functions they grab a data structure from a map or array located on the Instance
From what I've read you're supposed to be able to fix this by refreshing the nodes but this hasn't worked for me, if anything it makes the errors happen more
Any ideas?
turns out even after modifying a constraint class in cpp and making the angular rotation offset exposable to bp, it does not actually modify anything
even this way doesnt do anything
Refreshing might not fully work. Find any Array Getters in that BP. Completely disconnect them, and then reconnect the wires.
This is life with BP structs. π Enjoy the ride til you move to C++ to define data types.
oof that sounds like it's going to be a lot of work :/
maybe it's time I finally stopped dragging my feet and start using c++
thanks. I'll give that a try
is it really not possible to modify the angular offset of a physics constraint at runtime?
What the !?!
π
Its tomfoolery within functions and connecting the delegates to the array and map wildcard nodes.
I wouldn't ever use this.
Looks rather cursed π
Anyone know any guides on how to make vehicle customizations? The idea is basically an apocalyptic world where i can add turrets and armor onto a car. Rn I can rlly only find tutorials on changing colors and such. Any tips appreciated
Try not to think of it like vehicle customisation. Try to think how you would do anything else.
How did the templates attach a gun to the player? They spawned it and attached it to the player.
You can use the same logic for vehicles. Just spawn the things and attach where needed
Hi! I'm trying to make an AI Character follow another actor component. I tried using Pawn Sensing and it works but I don't know how to set the actual location of the other actor component. This component basically is being launched to a random location, and at end of the launch I need the AI Character to pick up the component, since it won't move anymore after being launched perhaps it doesn't need to be On Tick?
Using Get World Location, it send the following actor to his original location, any help?
Get Actor Location and connect it to AI Move To?
or wait, you don't even need location, you just need to connect the target actor to the AI Move To
Another bp struct victim π
@small gyro can you tell me what version of Unreal you are using?
Hi Everyone, I have created decal material to fake the light shadow. How can I repeat this decal along a spline? Is it possible to add other asset types other than static meshes
Pretty much the same way you would do it with static meshes.
5.21
Bp struct are error prone since its creation. One of the reason to not use bp only is bp struct.
Declare the struct in cpp and you wouldn't have to deal with the ticking time bomb
It's dice roll every time you update the struct asset.
So like, there is a bandaid for unknown struct error but I rather you cure the core issue than applying band aid
Mediiiic!
Just don't edit them. Problem solved. π
There are still a couple of ppl insisting bp struct is not broken and the issue lies with the lack of experience of the user.
Lol. No, the issue lies in their need to go buy a fucking lottery ticket because they're oozing luck.
I had that weird issue where the character component in the character class clears out. Very odd, still not sure what actually causes that one.
I know it's a frequent issue of just bp just breaking randomly, I wish Epic would spend less money on super fancy tech and more money on just getting the ancient issues fixed
Survivors bias 
That happens to cmc too afaik
5.2 onwards tho
Yea, that's what I meant lol. Thankfully, I just reparented the character which fixed the issue and I just had to reset up the CMC. I can imagine it being a pain for someone that's made a lot of edits though.
Does anyone actually know what causes the BP structs to be so buggy?
99% their attempt to fixup all BPs which use them
save everything, edit struct and save it, restart editor without saving anything else (as it tries to fix shit)
that gets you around the majority of problems with BP structs
Ahh ok, that sounds like the steps I use to fix bad BP's that have gone to 0,0,0 in the world lol. Fix the BP, save the BP but not the level, restart. BPs now back in the right place.
what was the issue in those BPs? as i had that origin problem, too
and i'm not quite convinced that i found the real culprint of it (just workarounds)
Sometimes when an actors BP class has a compile error it'll revert its level instances values to default which includes the world location. Just fix the BP but don't save the level, when you reload it'll restore the original values.
I think more specifically, it's when you load the level and the BP has the compile error. (Like after a crash and some changes never saved in the BP resulting in errors
interesting, thanks
in my case i thought it was related to having a static scene root (which may cause the same issue π€· )
Yea, I would assume on level load it doesn't apply the variable data to the instances in the level if the BP has an error.
Hi! was hoping someone could help me figure out a blueprint to make my character not reload when i have a full mag?
Where you check if ammo is greater than 0, add an and and also check that the current mag is less than mag max.
worked perfect thank you so much!
The main issue is that there's probably no easy backwards compatibility fix to not break existing structs. And it's such a complicated issue that the mostly working version is better than breaking old projects when most serious engine users just simply use C++.
Then there's Pattym who we're still trying to convert. π
I'm a convert in spirit π
It's pretty amusing how little you really need to do in C++. I'm getting a ways into my latest personal project and like 90% or more of it is BP. Couple C++ overrides, a couple attribute sets for GAS, Some libraries for easier statics, and then my data assets for thing definitions.
Yes correct thanks! I just checked on another BP and it doesn't need location, the issue I'm having is that Pawn Sensing isn't printing when I try to cast
It's one of the reasons I tend to stick to BP only. When I try to do C++ I end up with issues with just the IDE alone that makes me want to pull my hair out. While I can get away with it I will lol.
Rider or one of the VS addons help with that a ton.
hey, the trace is now just straight from capsule,how do i make the trace copy players rotation?
how can i get the variable from my other blueprint? im trying to get "score" and use it to scale a timer thats used for firing a gun.
Can anyone find out why the level doesn't load when the sequence is finished?
check if the timed event actually fires with a print string
Hi, the delay/timed works fine. The level is not loaded when the sequence is finished.
I think that opening level by object reference works poorly if i recall, try opening it by name
Wut
use this instead
They do the same thing.
The strange thing is that the blueprint works well on other levels.
I don't have issue with open level by object ref
i never had it work
Because they do the same thing. π One just resolves the soft object path to a level name.
I never have it not work
void UGameplayStatics::OpenLevelBySoftObjectPtr(const UObject* WorldContextObject, const TSoftObjectPtr<UWorld> Level, bool bAbsolute, FString Options)
{
const FName LevelName = FName(*FPackageName::ObjectPathToPackageName(Level.ToString()));
UGameplayStatics::OpenLevel(WorldContextObject, LevelName, bAbsolute, Options);
}```
Yes but typing it out are error prone, also what If you want to change your level name
Have to back track ro every node that use it
testing it won't hurt
I see no reason to use open level by name ever
I think the length/time is not called in any way. I've to use another method. That may be the problem.
There is event that get triggered for sequence
On finished or w.e
You shouldn't even use delay to begin with
That's not gonna be accurate afaik
what's wrong with delay?
Delay works fine.
Sequence are not really tied to time like that afaik
If u alt tab etc
U gonna have miss match
hm i see
So use event on finished for sequence if u want something to run after the sequence finished
Generally i'd say you'd want to use delegates if they exist
Delay is used to play the media source. That is not the problem.
Nothing to do with your open level, but certainly an issue that I take if that we're my project
I agree, it's what they're for.
Is the event fired?
Or is time passed in = 0.0
Is input re-enabled? Controller is null there so i guess not
If you need any event called when inside the sequence, there is also the event track.
Doing it outside that in my experience result in mismatch (I used delay too in the past)
Print string to make sure
But again if u need to track when the sequence end, use existing delegate. Don't make a timer on your own
Bind to sequence finished or smth?
But
Ur using current time
Its gonna be 0.0
So timer is invalid
You want total or remaining time
@sharp anvil
Why does Set Control Rotation node not work when using "Use Controller Desired Rotation" in character movement?
When are you calling 'Set Control Rotation'?
it is called, that's not the problem. It's called after my attack command. I verified with a print string
Also, the control rotation gets updated, but resets next tick so the character doesn't rotate
Do you set the control rotation anywhere else?
No.
It works when i deactivate Use Controller Desired Rotation in character movement, and activate Use Controller Rotation Jaw in pawn settings, but then i don't have smooth rotation which i want from the character movement
if it doesn't work i'll just have to reinvent the wheel and write my own smooth rotation script
hi, when i Pause game then all widgets also paused, no animations etc. how can i still run animations in widget?
If you open the blueprint where your widget is, you can tick this on
should work
I'm not sure what's resetting the control rotation but as far as I'm aware it should work.
for some reason it stopped working even when i deactivated it so i'll investigate π€
If you have AI on one actor, and you want to follow the 2nd one, you need to somehow tell first one to see the 2nd one. Either you can brute force it for testing, and if you have just 1 characters of class (for example, you are BP_Player, and the other is BP_Enemy), then you can get All Actors Of Class and choose BP_Player class, so the Enemy_BP (your AI), will know the ''target''. In the future you want probably other way for the Enemy (ai) to find the target, but this you can adjust.
i created widget in player controller, and there Tick Even When Paused is set to True
If it's only for testing, you can also make variable type of Actor, make it public and editable in editor, then you go to viewport, and in the editor panel you can actually pick the exact target, you want the AI to forgot. And you plug that variable to the Pawn.
but still doesn't work
from Break Hit, you have ''HitActor'', you can Get Location of what ever actor was hit there
hm idk then
I just changed capsule to camera location and it worked
oh you wanted to make trace point where your actor is looking, sorry
someone can help?
I'm using On See Pawn on AI Character, and when casting to the other pawn It doesn't work, it doesn't even print, perhaps cause is the Actor Component who is moving, the Actor itself remain at same location during the launch
I've been using uobjects for settings based data (data only) but currently looking into overhauling to use data assets instead. Does anyone know what the benefits are of using data assets over uobjects for data only stuff?
it is easy to see/edit the data in a DA
Personally i don't see much of a difference from this aspect but I have just noticed, because that data assets are treated as objects, you can put functions into the primary asset as getters. As you can set a primary asset without having to manually construct it, it definitly makes it convientant.
You can create them in the editor without making a UFactory
You save create and save UDataAssets from blueprints easily using the Editor Subsystem thingie.
Basically it's a UObject with a generic factory, not a whole lot more.
Now It's working using event dispatcher + set actor location, it works only On Tick, I just added a delay before calling the event, so the launched actor is already in the right position, but ofc now the AI Character is being teleported to the final destination, there's a way to make it walk instead?
Being able to do this instead of getting the class defaults is nice which I wouldn't be able to do without first constructing the uobject which is nice.
First image is in the primary asset, the next 2 or new and old method.
What are you exactly trying to achieve? seems a bit like you are using something you completly don't know what is supposed to do, if you tell me what you want to happen I might help you
How is my branch running 320 times? I'm just looping through every bone in the mannequin skeleton.
there's like 150 max bones in that
ayoo what now the warning is goen
This is what I have inside the AI Character, it works but I used Set Actor Location who directly teleport the Actor, there's a way to make the AI Character walk till destination, instead of being teleported?
Hey @livid flare , I think you have AI MoveTo Node π
Why are you not using AI Move To node?
You are literally ''seting'' AI actor to be at place of your character location. So everything works with your code
just change node to be Event Begin Start, still you can use get actors of class to get Target Actor, use AI Move To node, connect Target Actor with your Target from Return Value (Get Actor of Class), and that's it.
thats it
Hey thanks, I tried already but isn't working, I guess I have some interference somewhere
btw you dont even have to use event tick on ai move to, it will follow the target as long as it have it
Thanks, that's is what I was trying to do but isn't working, I guess I need to double check other things
really? show how you implemented it
I know, but it doesn't work on BeginPlay, just On Tick... weird
on begin play ,it might not exist yet
try Begin Play > Delay Until Next Tick > Get Actor
Ok Thanks!
where is move to ai, im sorry?
During testes I just change the Set Actor Location to Ai Move To node
same setup
do how you want
?
i gave you solution, you are showing me something else, we are not one the same page, if you think better then do what you think its working
this will make ai move to your actor
I did what you said, I just posted the earlier code
i dont need earlier code to check how you implemented my solution so i can tell you what is wrong
I already tried, as I said this was my first attempt, I'll keep trying perhaps I have some mess elsewhere, thanks for your help
Hey guys, I want to create an expanding circle/torus that keeps the same thickness as the radius increases. Anyone know the best way to approach this? Splines?
Check dm
I've noted that all the music stuff is handled by the GameInstance, is that a good way of doing thing?
If I connect directly to BeginPlay it works, I was connecting on the end of last node of the BeginPlay of default TP Character
still unclear why it wasn't working
dude is asking for money to help me, is that what can be expected here?
NO
nope, what kind of circle do you want? like a mesh shape? collision?
block him
you're mapping keys to values, the key is 'where you store it' the value is 'what you store', you can't use booleans as keys because there are only two states, you can use ints, names, strings, etc as keys and almost any other type of object as value (but not other arrays or maps)
unless you are asking for doing half your game lol
im just looking to get pointed in the right direction
needs collision yes
sorry, I don't know how to do that
you're a cat you do circles π
Yes that is right. But in a regular blueprint it at least shows it as an option but greyed out. There are no options to make a map even for datatypes that would normally let you make a map in a none control rig blueprint.
hmm i'll try splines I guess π€·ββοΈ
Yeah splines would be good. You can also probably do some things with geometry script
I'll look into it, thanks
It does indeed
Hi all, I'm using the "Event Receive Particle Data" node to get some data from my Particles collisions
Anyone knows how can I get the "Actor" ?
Which is colliding with my particle ?
Btw how did you find the source code like that? Was it with the debug symbols installed?
You get the source code by ticking the sourcecode box
bear in mind that version is read only except in some fringe cases where you need to fix a compile error that Epic pushed
Generally, if you have the source code downloaded visual studio will be able to locate the source code for classes and functions in blueprints, but this was actually broken for the control rig graph and I had to search the source code for 'ControlRigGraph' and follow the trail.
Yeah it's broken for a lot of things
Any K2 node won't work, for instance
Ctrl Shift F is your friend for finding things
`Niagara particles are for cosmetic purposes only, so you wonβt get collision events from them.
If you want to hack it together you can use the Export data interface to export particle data to blueprint on collisions and then redo the trace in blueprint.`
Someone can help me to understand this sentence please ?
Someone from the Epic Games Staff said this, but I did not understand how to redo the trace in blueprint for each particle?
Ok maybe I will try to spawn a "sphere trace" when each particle collides with the ground ?