#blueprint
402296 messages ยท Page 459 of 403
I would think this is a pretty simple one to solve honestly
My guess is you have an actor with a static/skeletal mesh component, and you are trying to see if that static/skeletal mesh is simulating physics
to do that, you need to drag off the "actor" pin, and cast to "mycustomclass", then drag off that cast and get myComponent, THEN call is simulating physics
That's not the problem.
I have that handled already. I'm trying to scale the actors as they get closer to the center of the Black Hole Actor.
@deft ingot it is bed time for me but I see some issue already... On what BP do you have these nodes?
The check for simulating physics is just to make sure it only sucks up those that are, then applies the Radial Force to them (-2000) and Destroys them when they get to the Inner Sphere Component.
@hallow helm it's on the Black Hole Actor.
Where are you setting Other Actor Refs
And what variable type is Other Actors Ref? It looks to me like you are taking a single actor, putting it in an array at index 0, then seeing if the Outer Sphere Component overlaps it
I made the Variable inside the Black Hole Actor. It's just an Actor Object Reference. I know it's working because if I change anything it stops sucking things into itself.
Hold on. I can make a video showing it working.
Well either way, using distance to node will give you a larger value than 1. Alpha is between 0 and 1, so if it is above 1 you get B until the DISTANCE is less than 1.
I'm doing it for all Other Actors Simulating Physics.
I recommend use the Print node to print these variable to better understand what values you are getting
I would see what float value you get from the distance to node once the object starts being pulled in, then FInterp the alpha based off that divide by whatever number you need for it to be between 1 and 0. I'm getting tired so I cant put all my mental ability to use right now lol. But I will be on tomorrow and can help more if needed
Well for both Distance To and the Return Value for the Lerp I'm getting 0 with Print String hooked up to Tick.
Jeep in mind you are setting Other Actors Ref into an array at index 0. So only one object is in the array
So do I need to make an Array of the Index as well?
Try it without that array crap... Is Other Actors Ref already an array?
Nope. Facepalm Don't worry about it. I appreciate the help. Get some sleep.
Lol just relax. I would suggest getting rid of the array crap for now and test with one object first... Idk how you are getting the Other Actors Ref, but if you are saying it already works with getting the objects to have towards the black hole you must have the right object.. So just plug in the ref to the nodes instead of the array crap
I got rid of the Array. The most of this is set up in C++, as demonstrated by an online course I am taking.
If you are getting 0 on the distance to node, that probably means you aren't getting the right actor ref
Ok.
But I head to bed now. I will catch up with you in the morning, probably 10 hours from now
Yeah, when I'm asleep. Thanks anyway. Sleep well.
Build powerful visual scripts without code.
This may help. Try printing the object ref you get to make sure it is the correct ref
Got it. Had to add every box as an array element after making the Other Actor Array Variable Instance Editable. sigh
There ya go man! Good job
Now I'm tweaking values. It...works...kinda derpy looking. I think may have to set it to Apply Linear Force instead of Radial Force. That might....I repeat might, work better....?
In ue4 I added a react animation of player nd I was gave a condition at branch when ai enemy attacks player nd player'S health>0 . เฅค and I set a death animation using condition at branch when player's health<=0 but when I am playing the react animation is workind but the death animation doesn't works
How to solve this problem please
Heyy, I'm new to Unreal Engine, I was wondering how do you stop AI rotation?
AI dies, stop moving but still keeps rotating
rotating based on player's location
nvm, it was stop movement immediately
why doesn't this work, any help is appreciated.
Next Spawn point is set to 0,0,0
yet it doesnt spawn at 0,0,0
when the game starts
floor tile:
so it doesn't spawn at all?
yup
change the collision handling override to always spawn, ignore collision
wait is that logic in the game mode?
yup
I don't think game mode can spawn an actor
weird
I'm just following a tutorial made by unreal
for an endless runner
but it's pretty old so maybe they changed it?
ohhh wait one sec
it works now
what the tutorial doesn't tell you is to set your default gamemode to your new gamemode
maybe before you didn't need to set it or something, anyway thanks @hollow cape
No you absolutely need to set your custom game mode for it to work
huh, weird that they didn't tell us to do that
they probably cut past it and just forgot, found the solution in the comments section.
Yeah, that's a somewhat high level step, and they may not have remembered to mention it. If you are ever curious if a BP is even firing, just put a printstring on Begin Play, and that will at least tell you if that BP is firing that event at all
print strings are your friend, very simple debug
cool thanks, I will make sure to do that when I run into problems!
Heyy, I'm new to Unreal Engine, I was wondering how do you stop AI rotation?
@plain flame use 'destroy actor'
Is there a Blueprint where i can check multiple booleans and minimum one needs to be true?
Such as: if(bool1 or bool2)
isnt that what OR does?
Also I have a but thinking about implementation problem.
How would one go to make TPS character slide down steep slopes, in unity I did it by first raycasting in 4 directions and down to check the slope, player migh be on if higher than certain amount I switched to the sliding mode(thats not a problem I can do something similiar in BP) but the next part I though of as spawning a physics sphere without renderer that rolled and player was just set location to its point, also I am sure this would work in MP, any ideas?
omg okay, thank you, completly missed that ๐
Is there an Equal to Unity Fixed Tick Method? So i have Event Tick but want there an Animation but its always different for each client so unity has a "Fixed Tick" Event where only 60x called per second. Or something equals to that, that i can call every 50 milli seconds an Action?
@trim matrix you can set the tick intervals yourself on an actors class default...
Ah great! Thanks ๐
anyone here have steam working on 4.25?
how do I instantiate a UObject class inside a blueprint? I'm already specificing UCLASS(BlueprintType, Blueprintable), also exposing properties and functions to blueprint with UPROPERTY. Basically I want a struct with functions so I thought UObject would do the trick
Hey there. I need a little bit of help. How to map a range in blueprint from 0 to 1 so that from 0 to 0.5 goes up and from 0.5 to 1 goes down ?
@errant sage Can you define what you mean by "up" and "down"? You could use 1 - (2 * Abs(Input - 0.5)) which will give you a number in the range 0..1 for input between 0 and 0.5 and then a number in the range 1..0 for input between 0.5 and 1. Is that what you were looking for, or did you want negative numbers output for input from 0.5 to 1?
Let's say I'm in LevelA and want to get to LevelB momentarily and get back to LevelA once I'm done in LevelB but leaving LevelA as it was before teleporting to LevelB and thus without resetting it, how would I do that?
@cinder dirge Thanks for helping. I have a day night cycle bp with time in range from 0 to 1. At 0.5 ( when the sun is at it's highest) I want to set the indirect lighting intensity to full 1. At both 0 and 1 ( during night time I want to change the indirect light intensity to a min value like 0.1).
Having a problem with the game working in editor but not in standalone. I'm seeing this warning in the log that seems related:
LogClass: Warning: Property Dialogue Sequence of Dialogue Sequence has a struct type mismatch
Any ideas what causes this and how to fix? A quick google resulted in recompiling the blueprints that use the struct, but that didn't help...
@errant sage It sounds like you want a sine curve (sin function)
With a clamp at some minimum value
Is there a way to set a unicast delegate from blueprints?
Google only finds info on multicast ones
@cinder dirgete This worked like a charm. Thank you again!
@errant sage Nice! ๐
Hi all i have issue with multiplayer setup, I have got it working kind of of to a point however when i run in standalone instead of main menu showing each time it opens the options menu shows everythime ?? Anyone maybe know what i'm doing wrong I can shar snaps of blueprints etc for you to gather more idea
also when i run the standalone with steam in background and set internet as play method and luanch into lobby it closes shortly after to menu
What's the best way to save a relationship between two actors for a save game? For example: I have a cover system for AI. Various pieces of the environment have "cover spots" attached to them, and when an AI unit claims that, other units can't because there isn't space. When the game is saved, I can save where that piece of the environment is, and the unit itself, but I can't save the instance of of the Unit that is saved as a reference in the environment piece. So when I load the game, I can't directly tell Coverspot A that Unit B was the one who had claimed that because that instance was unique the last time the game ran.
Is there any kind of standard way of handling this? Should I generate a unique number for the cover spot and make that part of the save data and tell the unit that it's cover spot is the one with that unique number? I could attempt to check overlaps on begin play (the cover spot is a capsule collision), but then I have to make sure the cover spots are all spawned and set up before the units are placed as part of the load game, but that could cause race condition issues as the game mode offloads load/saving to various manager actors in the game and simply collects a master struct.
I could use overlaps with a failsafe. The coverspot could check it's overlap on spawn and if it finds nothing, the unit could also check it's overlap on spawn as a backup. That way regardless of which one spawned first, one of them would detect they're sharing a space and register the unit as the one using that bit of cover.
is it possible to make an entire game using only blueprint?
especially and fps
or is c++ necessery
you can do basically everything in blueprint that you can do in c++ with few exceptions and mostly it's just longer in blueprint.
@trim matrix there are games released that are completely done in bp
@stuck hedge consider using structures for that.."map---unit and cover location"...and yes if it's data that needs to persist you want to give the cover areas unique identification so you can save that in the struct
I have a map for it, but those reference instanced versions of the actors.
that's what I was wondering.
if I should consider using an ID or something else.
Are the appropriate variables for the units being saved? You could come up with a way to identify them... I don't think you can just slap a reference in the save game... More like rebuild the character to the point it was when you saved... I might be wrong there might be some way to save the entire ref as a var...but i dont know of one
The ref is a unique instance, there isn't any way to save that. I'll probably either do an ID or just check the double overlaps on begin play to see which cover area they're closest to
Yeah i have their full stats, position, rotation, class etc all part of their save struct
Then seems like all you need is unique identification for the cover locations
So you can "assign" them to the unit on load
that's probably the easiest solution. I'll just have the unit look for a cover area with that ID and loop until it finds it in case the unit loads first
Exactly ๐ ... they shouldnt be seeking cover immediately tho...you might want to make sure everyone who already has an assigned location had a chance to claim thier area before any nonassign unit is even allowed to look for a spot @stuck hedge
Seeking cover is part of their behaviour tree. If they're not in cover they're always looking for an open cover spot to move to. I'm still working out the AI for what to do when the player generates more units than cover spots.
Sounds like your making an rts
actually no.
With worker placements
third person squad management.
The concept would be the same...if you needed sources to cross reference for code solutions
this part of the game is a kind of defense part.
player will research and build defensive structures, many of which include a certain number of cover spots, and then also recruit and deploy units to defend an area. When they're deployed, they look for any available cover spots and if one is open they run to it and take cover to shoot from. But if none are available, they'll just move to wherever the player has pointed them to and mostly stand there for now and return fire from there.
Patrol routes consider splined patrol routes
Using the cover areas as spline point locations
no patrolling. This is more of a meat grinder scenario.
I'm debating making the cover areas destructible and if the enemy AI destroys them, the friendly AI units may want to look for other defensive areas to move to
Imo, i love rts games...but when my units just stand there not moving to any given location and only idling it kills the immersion...but thats another topic :)
Their behaviour tree is fairly simple: Am I cover? Is there cover available? Do I have a target? If I have a target, shoot at them. Do I need to reload? if I'm too hurt, duck and try first aid or wait for a medic unit.
Even most survivor worker placement games like frost punk always has a fall back for units so they dont just idle
Not really survivor worker, its' more xcom world defense + rogue like dungeon crawling.
Since the logic is baked into you ai youll need to halt all of it until "game is loaded" since your trying to add saving mid battles....most of these turn based games only allow saving before and after matchs
Youll never even feel it
Yeah, it's real time. I'll bind a function in the game mode for when the load is complete to start the AI.
But it will prevent you a million and one edge case headaches
Other than that it sounds like you got it figured out :)
Yeah I've been working on it for a few months, as I refactor some things, I sometimes get curious if there is a "standard" way for handling certain kinds of scenarios which is what I mostly pop in here to ask about .
You are on a great course so far it sounds...its probably nice to hear from others that your idea on how to handle something isnt crazy
I'm about 90% of the way to my early access release, probably the biggest hurdle is making a trailer which isn't my forte.
The biggest issue i think youll face is the one you mentioned earlier..
What should they do if you make more units than cover.... you could give the locations ungrades that allow them more units...and only allow as many units as you got cover space for...that would fall right in line with games like starcraft
They have a mix of units here, medics, engineers, soldiers, scientists. The scientists are totally separate because they operate in the ship doing research. The other 3 operate outside as part of the defense crew.
Or send them out as kamikazi units
idea being that when the ship is landed, these units and the defenses you set up keep it safe until you're ready to move again.
That sounds awesome
The losing part of the game is if your defense fails.
while landed you can do research, craft items, launch the rogue like missions that help you gather resources and take over areas and stuff like that.
Have you played frostpunk by chance?
Yeah, not really my cup of tea, but I've given it a go.
Its similar except you dont fight aliens or other creatures...you fight the elements
I modeled this more after xcom, but I wanted to make it real time third person.
Its not so much the game itself why im referencing it...but how they handled some of their unit management
They have the builders, hunters, and scientists... then there version of losing is if the population of nonunit workers dies
You can convert nonunit workers into actual workers
Yeah in this case you'll recruit people in specialties, and they'll be trained. They'll get XP and you'll be able to give them better weapons, gear, train them.
hey everyone. I thought I solved this but I'm still getting this spam in message log:
thing is, it stays there until I change literally anything (even move a node) and save the animBP
and then it doesn't print those errors anymore
and I have no idea what could be causing it
my animBP is rather simple. I get reference to playerBP like so:
and later on update anim event I keep calling this:
I just started experimenting with HLOD ( Hierarchical LOD) so can anyone guide me on this, I have a huge city and I want to generate the HLOD in small groups so that my engine doesnt crash
how can I check if "stat fps" is already executed to avoid disabling it?
Hey, i just reopened my blueprint and all tabs are missing, how can i restore to default? It's looking like this
does OnMouseButtonDown on widgets has a delay before calling that function again?
I'm trying to make something I coded in c++ appear as a widget. In this case I have a timer that is counting down. Does anyone have an idea?
I'm trying to make something I coded in c++ appear as a widget. In this case I have a timer that is counting down. Does anyone have an idea?
@dusky hatch what do you mean? isn't it working?
So I have the text linked to a text box on a widget. But it just stays at 0 and doesn't do what its supposed to. As the timer goes down its supposed to update but im not sure why it isnt working. heres the function
both seconds and minutes are UPROPERTY(Blueprintreadonly)
@dusky hatch isn't it because you're making that text into the seconds and the seconds are higher than 60 (making it so it's 0)
That would be the case but even if the seconds start at a lower value, the widget still displays 0
Are the minutes shown and updating correctly
timeleft is a float and if i set it to like 20 the widget still displays 0
no neither seconds nor minutes are updating. both stay at 0 on the widget
Where else are you calling set time, on a timer somewhere?
could it be because the setTime() isn't being called?
Can you show us the code where you start a timer that calls this function on a loop?
This is the timer and and the end a debug message pops up and that works fine
why is UPROPERTY inside the function?
oh that was just me trying to figure out how UPROPERTY works
i just forgot to remove it
why is that an actor also?
Is that not right? I wanted to add it to certain levels but not all
Also the timer binding looks a little off...where are you calling set time
That's what needs a timer
Unless timeleft is the function that calls set time
Show us timeleft lol...this is getting to bread crumby for me i think im tapping out
The timer should be calling settime function....all that timer is doing is calling ontimerend
Rather it's bindings are on timerend...im not seeing anywhere where you actually call settime to update the mins and secs
So is the issue that I havent set it to settime?
You can have that timer binding as long as timeleft is set at the beginning and not the actual one that is changing... cause then there's no telling when that timer is supposed to happen
You should do the check for if time ran out elsewhere tho cause you really dont need it to have a timer...call it after you set the time on settime...then make sure to add an if statement to determine if you ran out of time on the timer end
Ah ok that makes sense
Could someone help me? I havfe an exposed array but it wont let me change it in the editor and its doing my head int
You also should be setting the time it triggers to 1 if your using seconds
Not a variable
In the timer delegate
And looping should be true
Cause it should happen every second
@ornate rain Your array is set to Instance Editable = True?
yup @maiden wadi
Not sure then. You should see it in the Details panel in the editor under Default if you click on an instance of the actor the array is in.
becasue the aim is to have each floor its own array element which is an enum and it selects the window style
right now i have this its set to round by default just so i can see if they are getting placed correctly
Oh, I didn't consider that. You're using the construction script, so anytime you change anything, it's probably just overwritting it.
@ornate rain Also, be careful adding things to arrays in the construction script. If you don't clear the array at the beginning of the construction script, you can end up with empty array elements often.
@maiden wadi so from what u said i checked the beginning of my script and i remembered my friend told me to put the clear at the beginning and a generate button, but with the clear essentially every time i change something it reconstructs it and then clears it and sets it to default
I'd probably consider redoing your construction script based on the array instead of setting the array in the script. For each element in the array, generate a wall of that type.
Then you'd just go into the editor and add an element to that array for each floor you need and change them at will.
i have to remake the script entirely?
I dunno. Just depends on what you want to do with it. Just saying that I think the reason that your changes aren't staying is because they're being overwritten by the script.
How do I get a reference to an object of my level into the level's BP? Can't seem to find a way to
drag and drop?
Is there some sort of delay to spline updates?
@abstract socket with the actor selected in level, right click the blueprint graph and choose 'create reference of <actor name>'
does anyone know if there is a node similar to GetRangePct but for rotators?
hi, is there a room that's best to ask questions regarding performance? my game is running slow on older machines but i can't find the right place to ask about it ๐
hi, is there a room that's best to ask questions regarding performance? my game is running slow on older machines but i can't find the right place to ask about it ๐
@halcyon latch #ue4-general is for general stuff about unreal engine, i think you should ask that there
@pearl kindle That did it, thank you!
@thin rapids Thank you ๐
Hey I have a couple questions about the possess node because mine is not working at all
@clear palm You should just need to call it with a player controller as the target and a pawn/character as the InPawn
@maiden wadi I have done that, it only works in the level blueprint though, which is not ideal
Where else are you trying to use it?
Single player?
yeah
How are you getting the pawn reference in the player controller?
can I show you a picture?
Go for it
Looks good, but where are you setting those two references?
@thin rapids Thank you ๐
@halcyon latch you're welcome
@clear palm What you're doing there isn't setting a reference. You're creating a spot where a specific type of reference can go. For example, if you put an isvalid node to the left of your possess nodes and plug your references in, they'll show up not valid cause nothing is in them.
oh ok
To get an actual reference for those empty slots, you need to do things like LineTrace, Shapetrace, SphereOverlap, Collision, Overlaps, Saving references to things when they're created and placing them in a global place to be taken, or the very worst resort which should only ever be used for testing purposes usually is GetAllActorsOfClass.
How would I "save a reference to things when they are created"?
That sounds like a good choice for me
Hey, is it possible to add a null component to an actor? Basically just a child node that only has a location that I can query?
Like, would a collision component with all collision turned off accomplish that? Or is there a dedicated component for it?
@latent junco I'm still a noob, but I think GetWorldLocation is all you need. You can use it on most things inside of an actor BP.
Hey folks I completely forgot the name of a node! Perhaps ya'll can help me out
I'm looking for the node that can give me different results based on "Every" X integer
Like every 8'th, output a different result
@clear palm if the reference is going to be the pawn that is possessed..
There is actually an event node for "on possessed"
Anyway, I was popping into this channel for the first time to see if anyone can point out what I'm doing wrong here. I'm trying to set a "Stagger" state by comparing floats of two overlapping actors of the same class. The problem is, this always returns false. When both actor classes overlap, I can see they have different values. So, one actor should return true, and the other false, right?
You can set it at that point
@sonic gale are you purposely using class default here?
Yes?? I'm not sure if that's the proper way to do it.
That will be the defualt set on the bp not any adjusted number you put on the instanced one
But, when I print the values of the overlapping items, I'm getting different readings.
Just drag off the as weapon and "get" ....youre printing the value set on this bp
Not the one youre overlapping...print that value your comparing
And see
@clear palm Was in a game. Generally you just save the reference where ever you're spawning that pawn. Or just call the possess where you're spawning it. But since you can use the level blueprint, I assume that your pawn is already in the level at game start. So you don't have a spawn node for it.
Also cast to weaponbp...not class
I have a player avatar blueprint and a c++ player state class. The player state has a component, which has a delegeate, to which I want to bind stuff in the avatar blueprint. Is this possible?
But as weaponbp you can drag off that pip and type get swing strength
No need to recast if your using the correct "cast to'
@frozen spear Thank you so much! That worked!
Your welcome
I have a player avatar blueprint and a c++ player state class. The player state has a component, which has a delegeate, to which I want to bind stuff in the avatar blueprint. Is this possible?
pls halp I cannot into blueprints
Hey guys, I'm trying to call the function Activate from my TriggerBox QuestNorthMens but it write this error : "The type of Object is undetermined. Connect something to Cast To QuestNorthMens to imply a specific type."
I know it's a simple trick I may have forget but don't really know what^^
@latent junco add a billboard or arrow component
Thats what theyre for
Youre missing your object baptiste
Are you casting this actor to that?
See the object node on the left side of the cast...you need to tell it what exactly were casting here
Like a ref to the actor youre trying to activate on
Do you have a questnorthemn or whatever that you're casting activate on?
It goes plugged in there
Oh I see, but then when i connect to self 'Quest North Mens' does not inherit from 'BP QUEST' ( Cast To QuestNorthMens would always fail).
Ok so drag off the ref
And type cast to questblah
How can i position my particlesytem on opposide of my velocity?
And select the version that keeps the ref connected to the object pip
Theres multiple versions of cast
But wait your casting it to activate?
It already knows about activate without casting
Are you just trying to make sure its valid before activating?
Yeah i'm casting it to call his function "Activate" ;:)
So remove the cast
And just use activate
If it owns that function you dont need a cast ๐
But
Activate before destroy
@trim matrix
You dont want it destroyed before it did its activation
Connect self to that
Is this a fresh activate node?
Drag off self and type activate
To get the correct one
Unless you have that target set in the function as the wrong type...
This is bpquest...are we in the right blueprint?
I'm in BP_QUEST, which is a Cube Blueprint, and once the player get into that cube, I want it to call the Function Activate in a TriggerBox named QUestNorthmens
Complicated I know^^
Ok so youre setting up a blueprint interface?
That's why i was making a cast to :))
Or do you have a reference to bluequestmen
But this would never cast itself as a different bp
Ah Oh :(
But this would never cast itself as a different bp
@frozen spear
You either need a blueprint interface or a reference to questnorthmen
Or do you have a reference to bluequestmen
@frozen spear Don't have a reference to, how to make one ?
Depends on how you have the quest thing set up...
Is it in a level bp...is it an object...
It just a simple Trigger Box with events and placed in the level
Ok so an actor
Yeah that's it ! ๐
When does the other bp come into effect
When the player enter into
If they are both actors you need a blueprint interface to talk between them
What is a Blueprint Interface in Unreal Engine 4 Blueprints?
Source Files: https://github.com/MWadstein/wtf-hdi-files
Ok ! Gonna watch
Its a 5 min tut...takes like 30 secs to set up once you learn it
Am I correct in assuming that you cannot generally work with delegates from blueprints? TMulticastDelegate is not a U-thing...
They have binding in blueprint
Not sure if they have a multicast but they do have bind delegates
When I try to make a function that returns a reference to a delegate blueprintable, UHT flips me off
:\
Did you meta it correctly
@maiden wadi Ok, how could I make a variable reference global?
If I am spawning it in through the level blueprint for example
are you replying to my question @frozen spear ?
Yes sir
ok
hey I have a false gravity plugin that I am trying to use in my game on 4.24 but the plugin is for 4.20, I try to load project but it says it cant and to rebuld from source
how do I rebuild the plugin from source? I know I use visual studio
but its not working
I open up virtual studio click rebuild and get this error
@frozen spear I found a way shorter, using get Actor of Class was perfectly working ๐ thanks you for your help !
Oh yeah, you're right, but for me it work well, quests are unique ๐
How can i go back to an older save of my project??
I fucked everything up
please help
unless you got ssource control or backups, this is not possible
can i not revert to when i last closed the project or did a saveall?
hm not that i know of
Really
someone did it the other day
How can i do it with autosaves
i dont know personally, they found a guide somewhere on google
restoring from an autosave
and it worked for them
i was trying to help them find a way to recover a umap that became corrupt when they found that
I just deleted my content and dragged the auto savew
I think i fucked it up forever.
Nvm
Im trying to get an older save of my map
The new one is broken
When i use the auto save map
and put it in
it wont open in unreal engine
the older save3
I'm trying to save a boolean variable but it's not showing in the menu. I already saved a rotator variable that worked without problems
What happens if you drag it from the left Components list to graph?
can't tell if you saved bp yet
is it possible to make the player camera's children follow it when it shakes?
anyway to get length from wildcard array?
is it possible to change postprocessvolume variables with player input?
in the first person template
there is a post process volume under lighting, but i don't know how to access it in blueprint
wuz hoping for some Blueprint help in 4.24 I had a simple level blueprint that on event play went to a looping sequencer that had a camera in it - it played once then went ot another looping sequencer that played forever with no camera or cuttrack - this let me in VR ride with the camera for 1 loop then after that everything would keep animating but i could fly around free - now in 4.25 its not letting me fly around after first loop- if i disconnect the level blueprint i can fly around fine -?????
literally impossible to give you a specific answer without seeing all the places you use that loop from or the error message....
But if I had to guess, you need to actually connect an input array to the macro
A secondary reason might be a const array? I doubt that one.
that's the default FoorLoop from Standard Macros @sand shore
It is wanting me to use a specific type
But it itself doesn't use one?
Idea would be Specfic Type To CustomMacro Wild Card to ForLoop from Standard Macro
Okay, you shouldn't be hitting that problem at all
Show me the actual for node in your actual graph.
Well, error messaging would be a slight improvement, yeah.
Oh so you're nesting macros?
yeah
That's your problem, I think.
well
its a problem
but even if I fix that
by lets say taking the guts for the For loop
and putting into one Macro
The other macro up still has the same error with the Wildcard
Well I can DC the for loop
and still have the issue
One moment
I'll get you error message
If I dont have my BP nodes attached to any tick, theyre just sitting in space because i may want to reuse that code one day, will that affect performance in any way?
Here's @thorn fiber's error for those too lazy to take a screenshot of the gif
It's fucking obtuse
if it isn't
is what it is
why?
Because it's an expectation around here, and in fact most online communities where you get some kind of tech support for development issues, to give suitable context.
"The type of target array generated from expanding ShuffleWith Seed is undetermined. Connect something to Length Generated from expanding Shuffle with seed to imply a specific type.
The entire time, each of these windows has had an output window at the bottom of the screen with a full list of all the errors.
Well. Great.
it isn't nested macro
oh
wait
it is
lol
why go off on this whole tangent
thanks
It compiled at least this time
but my macro still throws the error
which is what threw me off
let me hit play and see if it actually runs
it does
Guess I'll gut the for loop too
Also found this just now https://issues.unrealengine.com/issue/UE-21739
Looks like an old issue
why go off on this whole tangent
@thorn fiber Because it shouldn't be 20 questions and then some gif with a tooltip
Anyway, yeah, the nested macro thing is super annoying.
It's something that I was considering fixing around a year ago
I renamed my project and I need to re-set my blueprint parent classes
but it can't see any of my project classes
why is that and how do I fix this?
thx for help
it can't even see just a plain actor
forget pawn or custom pawns or anything like that, any ideas to what is broken?
since Oct 2, 2015
I'm not. It's not very surprising to me at all
wow
I've been around the code responsible for that.
tricky?
Very much
Not so much, no, but my solution to it started crashing the editor when they wanted me to not use members on pins
ยฏ_(ใ)_/ยฏ
Might look into it
Or maybe I'll just make a C++ function that does what I want
lol
Hence why it never gets fixed
Yup
Poor BP only folks
Making a generic array function to shuffle with seed should be cakewalk (and a good PR)
Oh to add to the Engine?
make it in your game, then port that to the engine and submit a PR, sure.
If you want.
I gave my character person an interface bp, but the "interfaces" tab under the "my blueprints" thing isn't showing up
give it a compile, possibly?
I see a failed there though.
I renamed my project and I need to re-set my blueprint parent classes
but it can't see any of my project classes
why is that and how do I fix this?
thx for helpit can't even see just a plain actor
forget pawn or custom pawns or anything like that, any ideas to what is broken?
@lucid granite If you renamed your project and loaded up the editor before doing redirectors, the class is going to be essentially irrecoverable
that was part of a different tutorial
also I did compile it and even removed the other one for safe measure. neither of them worked
Hello, had a question for bp users. In an effort to hold good habits i'm always trying to optimize along the way inside my character bp. My question is about a bp I made recently, and whether what I did to enable it on and off is actually helping with optimization or not really doing anything:
So I had a bp function that is attached to my tick chain which line traces from the player camera to some meters in front of them to check for items, and returns a true state bool if an item is being aimed at. In an effort to make it more efficient and less costly, I have a seperate functions using the on component overlap event trigger for a component I attached to the player character (a vicinity collision sphere that extends about 400 units from the payer in size). If the component overlap is called, im getting the overlapped actors parent class and returning a bool on a branch if its == to the class "Item" I set up for child items I spawn in the world. On begin overlap the bool for CanStartItemSearch is set on, and on end ovelap is set off. There is a branch to the entrance to the line trace function checking the state of this bool before continuing the tick through.
Im pretty sure this is some sort of optimization but wanted to know for sure if this actually will help or if it has no effect since the bp is still checking for on component overlap/end overlap.
Hi, yesterday I've started my making of Cubers: Arena, the game I'm working on for last 4 years. It's 90% made in blueprints, So You can find many interesting solutions on this channel. 1st video is about projectiles on spline (fake :P)
This is the first video of Cubers: Making of series. In this one, I'm explaining how I've created fake projectiles on spline. Check this out and Ask question in comments If You want to know more about this, or tell me what video You want to see in the future.
Cubers: Arena on ...
Hi guys,
absolute beginner here having a quick question about blueprints & timers. Anyone willing to help me out really quick?
I'm working on an OnCharacterMovementUpdated event blueprint (i suppose this is the right one for my request, please correct me if I'm wrong).
I want to gradually increase the value of an variable based on how long my character has been in "moving" state. And on the other hand decrease that value twice as fast as soon as the character stops moving.
Thank you in advance!
@trim matrix Honestly, traces are very cheap, a lot cheaper than collision stuff. I don't think you're doing yourself any favors by adding the extra complication for what is going to be an incredibly negligible increase in performance. If you really want to improve your performance on stuff like that, I recommend just dropping the line trace amount. I find that 20 times a second, or an interval of 0.05 works perfectly fine for most circumstances to see what the player is looking at. I used to do mine on an event timer in the characterBP but these days I just use a separate actor scene component that has it's tick interval set to 0.05 so that I can do the trace on tick in the component itself at only 20 times a second. Only other real way to drop processing time on that is to reduce your stuff you're doing every frame. For example, not calling an interface message on the same object over and over.
hi guys, beginner here.
anyone here know how to or have a tutorial to integrate ALSV4 with SGK ?
Thanks
Quick update regarding my question - I can also provide my current blueprint, if that helps
@trim matrix @maiden wadi nailed it...what you did is absolutely fine...but the difference that dropping tick intervals from every frame to 10 ticks a sec is extreme...and remembering to disable tick functions on all actors thay dont use tick also helps
Hey guys anyone ever run into this error after a crash before Assertion failed: !MixerBuffer [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/AudioMixer/Private/AudioMixerSource.cpp] [Line: 437]
Why would one component not attach to another?
Log won't tell me why. I see the node for attachment getting called, but the components clearly don't move together.
Guess a difference in mobility could cause that?
@steep dome Hard to say without knowing exactly what it is you want to increase over time. In my head when I read that, I get that you want to change a float from like 1 to 3 over five seconds, and then when not moving slowly change it back to 1. If that's the case, I'd recommend just going with a clamped float on tick with some math. Is it just a single float you're trying to gradually increase? If so, what time frames were you looking for?
@maiden wadi Thanks for getting back to me!
So maybe it helps if I try to explain a bit further - again - I'm really a rookie & started a few days ago.
I'm currently experimenting with a Sidescroller and I want my character to build up a variable called "Charge" while moving (and only while moving, it should decrease as soon as movement stops).
So I'm currently using OnCharacterMovementUpdated to check, if my character is moving (that seems to be the wrong event actually, because my debug string gets printed like 10 times a second without even moving)
So let's say my character starts moving, i grab velocity from that to see if it's larger than 0 and add +2 to the Charge variable per second moving and subtract 2 for every second that my character is not moving
Is there a way to export my blueprint as screenshot or anything like that? Maybe that would help
WindowKey+Shift+S is how I take easy screenshots. Looking for that event because I'm not familiar with it.
@trim matrix To add to what others have said, updating BP components and checking for overlaps has its own cost. I wouldn't worry too much about optimizing your player pawn unless you're managing replication in #multiplayer... It's not going to kill performance if you have a handful of ticking actors in the world. If you're spawning hundreds of a certain actor class though, I'd direct your efforts there. But otherwise BP is more performant than it's often made out to be. (If you want to see exact per-BP performance, try the Unreal Insights profiling tool.)
@steep dome I mean. It comes down to how precise you want it to be. If you always want exactly two up or down for every second moving or not moving(Meaning also that there would be no change if the player moved and stopped moving every half second.) Then all you need to do is start a looping timer at the beginning of movement and the beginning of the stop that'll loop every second and increase or decrease your charge.
@maiden wadi Well, maybe the count needs to be more precise than 1 second, but for starters it would be great if i get it to work like that, I've attached my blueprint (hopefully the quality is sufficient), basically the whole Charge being multiplied by vectorLength needs to be changed to "Charge" being multiplied by the seconds my character is moving
I'm confused, does the construction script for an actor not get called when you play in PIE?
@vast lion It should get called once in PIE.
@vast lion Don't use conscription for gameplay related tasks, its mainly for stuff that needs to be calculated Before gameplay.
construction^
@steep dome I realized why I'm not familiar with that event, I didn't realize that it was supposed to be for the level blueprint. Can I ask if there's a reason you're using the level blueprint over the character class?
@vast lion construction scripts for pre placed objects are ran in the editor as you place/update the object, in a built game they are run in the cooking process, and for dynamically placed they are ran when created, but be wary not to intertwine construction and begin play together, can cause some issues if they rely on each other, or one to finish first etc
@maiden wadi I really didn't know better. I just thought the level blueprint is the place where the nodes etc. go
Anyone know why my VInterp To is not working? I want to rotate an object smoothly and not SNAPPYily. I have tried it 2 different ways and it always snaps.... any help would be appreciated โค๏ธ
@steep dome Level blueprints are generally for one time only things that relate directly to that level. It's really hard to come up with an example that can't be also done inside of a class. Mostly this should be used for simple level design features. Lets say you have a whole game that's about running around and hacky slashing, and one single level that's just some cave where you can open it and unlock it. You might handle this in the level blueprint instead of creating some classes for this because you're only using it once and it's not being repeated in any other level. But for general gameplay designs, I strongly recommend learning to use the class blueprints themselves for stuff like this. In this specific case, create a blueprint class that has the sidescroller character as a parent. It'll be the same thing and you can add code and modify it as you want.
@dim kiln What is the value of DeltaSeconds?
@maiden wadi I am setting it
@maiden wadi Okay, so use class blueprints for all the general stuff, and only use level blueprint if something differs from my general settings and behaviours, right?
Could you help me with a basic blueprint that increments a variable by 1 for each second the Sidescroller character is actually moving?
Is there a way to get a string from a key structure?
Key structure as in keybinds
I'd like to get a string version of the actual key to display in an actionbar which keybind is set to which action
hey, can we control all the sounds with blueprint? As we could control it with the sound mixing of windows?
is it possible to make the player camera's children follow it when it shakes?
@untold fossil you can see all the vars in it by breaking key btw
Drag off and break
Or right click and split
@steep dome if you absolutely need some logic that doesnt make sense to put in something like character that needs to persist between levels you can look into using GameInstance instead..level bps are destroyed when the level unloads
@frozen spear Okay, gotcha - thank you!
@dim kiln I like to use timelines to set smooth rotation, lets you use a curve too which is nice to give a custom feel
Hey guys, there is a neat BP node "construct object from class" which allows me to spawn a OBJECT(not actor) class without physicly creating it in a scene
for example: i need to access variables of a spell blueprint such as texture2d or skeletal mesh. Get class defaults doesn't allow me to get these types of variable, only basic ones
so i use "construct object from class" and get only info i require.
But the problem is that OBJECT class doesn't have all these neat features of Actor.
And i really wish to have all the variable data and functions data in the same BP class.
When i try to plug ACTOR class in this node, the "instigator" input appears and nothing that i try to plug it in works
is there any way to make it work?
or maby a similar node to get actor variables without spawning it in scene?
@dim kiln I like to use timelines to set smooth rotation, lets you use a curve too which is nice to give a custom feel
@ocean radish you cant have a timeline in a function ๐ฆ
@dim kiln nope just make it a collasped event graph if you want to tidy it
Is it possible to change actor properties before physically spawning it? Things such as collision, gravity and physics toggles
I thought perhaps I could "construct" an actor and then consequently "spawn" it, but it looks like construct and spawn nodes are the same thing, except spawn has a transform
I keep finding myself wanting to alter these properties after an object has already been created, but it seems like the engine dislikes this - I'll try and change those properties and oftentimes they don't change as I expect them to
You could make custom vars exposed on spawn and set them on the spawn node you call, then immediately change actor properties on BeginPlay based on them.
ahhhhhh this sounds good
I shall give this a try - I forgot about the expose on spawn option!
Though spawn actor doesn't seem to give me the vars despite exposing them on spawn
Ah... it's probably because the spawn I am doing pulls the class out of a variable from a data asset
If I don't explicitly specify the exact asset I will spawn, I lose the ability to change properties on spawn by the looks of it
The assets that will be spawned are all children of the same parent class, not sure if that helps
1 writes a variable
2 she is still there
3 cannot access her,
does not perform a function
what to do ?
Hello, when 2 actors overlap with each other, I want to spawn a fx on the impact point, I thought it would be fairly easy, but I'm struggling with it since 3h urf. I first tried to get the "sweet result impact point" from the "on component begin overlap" function, but it always return 0,0,0 for some reason. Then I tried to create a "Sphere trace by channel" that is basically following my actor but the "out hit impact point" always return the center of the sphere (instead of the.. impact point) Any idea of to fix it ?
@quartz field please show code
what is Zaq variable, is this character or something else object
it is the character that is moving yes
A is the character, B is the obstacle, 1 is where the fx spawns, and 2 is where I would expect the Fx to spawn
you can see sphere trace debug
so I assume that when the spere trace detects the collision with the obstacle, it spawns th Fx at the center of the sphere insted of on the collision point between the obstacle and the sphere trace
I'm trying to add a spotlight via Add Spot Light Component on BP. Is there any way I can take properties from another available spotlight component?
@quartz field What happens when you decrease the radius?
when passing a struct reference to a BP function and setting members on the reference i get a warning that the struct ref is readonly, but the members are still changed
so is that expected behavior and the warning is wrong, or is it a bug?
(i'm reading the changed values outside of the function)
@strange turtle same :/
Hi everyone,
I have a question, maybe a strange one but here it goes:
I am trying to make the decal NOT project on more axis than one. I want it to only project on the surface where it is pointing and not on all surfaces encomppased with the whole volume. Does anyone know how to achieve this? Thanks a lot.
Here is the thing that I want to avoid
@quartz field Wild idea but why didn't you go with collision detection and chose tracing instead?
@visual canopy Can you mark where you want the pivot?
@strange turtle i want the pivot there (like on the picture) but i dont want it to project on side surfaces of the box, only on the floor
@strange turtle Both my obstacles and my character have collisions set to "overlap all" and in the "on component overlap" node and from I understood the only way to get the impact point from an overlap event is to break the sweep results, but I do so, the impact point return 0,0,0 for some reason
Hmm, well it seems like its colliding with itself?
Try increasing the radius then
@quartz field you need event hit node in both actors. also you cast to other actor to make sure it only spawn fx when they overlap
Anyone know how to grab percents of true Booleans within a struct?
For example: if 50% of boleans are true, Do This or 75% Do That
@hollow flame I also tried that but the hit event wasn't firing even after I ticked the "trigger hit events" for my obstacles and my character, could it because my collisions are set on "overlap all" ?
@upbeat sinew Foreach loop the struct, on a temporary variable add 1 for true values, after the loop is complete, multiply the value with 100 and divide the value with "struct length"
Should do the job ๐
@quartz field It would really help if we can see the debug lines
@upbeat sinew that really looks like something you should use a Map instead of a struct for
then you can iterate over said map as suggested above
@strange turtle have you ever tried to tackle the decal projection thing? I am trying for 2 days now with no luck ๐ฆ
Does "simulate physic" need to be enabled to trigger hit events ?
From UE4 Documentation: For collisions during physics simulation to generate hit events, 'Simulation Generates Hit Events' must be enabled. Note: When receiving a hit from another object's movement (bSelfMoved is false), the directions of 'Hit.Normal' and 'Hit.ImpactNormal' will be adjusted to indicate force from the other object against this object. Note: NormalImpulse will be filled in for physics-simulating bodies, but will be zero for swept-component blocking collisions.
ah thanks
The debug lines of the sphere trace channel are visible on my first screen, which others would help ?
set collision preset to block and check "simulate generate hit event" in component @quartz field
@visual canopy I did
@strange turtle nice! would you share please? ๐
If you dont want specific meshes to receive decals
You can use "Receives Decals" variable to disable it
but thats not the thing that I want. I want the decal to project only along some axes
I want it to project on mesh A but on sides facing up, but on the sides facing other direction i dont want to project
all as a part of one mesh
@upbeat sinew
So you want the same mesh but only on lets say X axis?
yes
?
@strange turtle Worked Really well, Thanks
@upbeat sinew that really looks like something you should use a Map instead of a struct for
@spark steppe That's True, Just gotta move everything into maps tho ๐ฆ
@upbeat sinew Your division looks a bit incorrect
You should divide by the number of total items
My ai character is not moving from point a to point b. Im using the AIMoveTo Node, NavMesh looks correct any idea where the problem is?
I also have a delay at the beginning befor calling AIMoveTo just in case
@rancid ridge Can we see your bp?
@strange turtle Yeah mb!
@strange turtle I created a new project and there it does work. I will try to create a new ai in my current project and if this does not work I can send a screenshot
Afternoon, when making a really accurate timer, is there a generally agreed-upon best practice?
I've been checking out the below tutorial but it suggests using Timelines which seems like an odd choice
https://www.youtube.com/watch?v=KS6In6yJerM&list=PLZlv_N0_O1gYdhCvvMKGpCF6LCgBz9XeS&index=8
In this video we work on the functionality to display and keep track of the race and lap times and test them through debug code. We also create and use a macro to convert the float value used in our race to a timer-style format in text format.
(00:05) - Intro
(00:34) - Timer &...
World Delta Seconds and Event Tick seem tempting also, but maybe that's not smart for optimisation either
@strange turtle I found the problem. If I change the Agent Radius in the RacastNavMesh Default Actor from 35 to 32 is stopps working. Changing it back to 35 and it does work again but why? This value should only make it stop working if I increase it or do I misunderstood something?
@visual canopy I was experimenting with materials but couldn't find a solution. Decals are really hard to work with in advanced manner. I would suggest using mesh decals but that would get really frustrating if you have hundreds of different decals. I would be interested to hear if you find any solution
@rancid ridge Your "move to" point might be too far when you decrease the radius
@strange turtle But decreasing the radius does not mean less navmesh surface. It increases the surface and is more accurate so this would make no sense ๐ฆ
@unique falcon you could also save Get Time Seconds into a variable (call it "start time" or whatever) and then you can get the elapsed time by subtracting the saved variable from the current Get Time Seconds on-demand.
Basically Get Time Seconds is your game clock, and the only piece of information you really need is when the race or lap or whatever began. The timeline method in the video (which tbh I only glanced at) should work as well. The performance differences between the two approaches should be negligible so try whatever you want.
Timelines have a lot of extra functionality/potential but I'm not sure how one could use that for simply timekeeping.
Sometimes people like to use timelines as a self-contained pseudo-tick
Yeah that's what I thought as well, I assume there's no issue with doing this and I couldn't really see the benefit of using a timeline with a linear float value in it just to track time
Well @maiden wadi and others, thanks so much for the tips/ insight. Maybe just dropping the check to 20 a second or around that as well as taking a look at how my item text is appearing will be the best approach
@rancid ridge when you say that it stops working, do you mean its no longer being updated? or your ai is no longer working on it?
The nav mesh is being updated and it looks fine but the ai is not moving. Same in a new project (4.25) so maybe you can reproduce it if you want
your ai collider is prob too big then
set there radius smaller
If i remember the navesh actor size needs to be larger than your ai that use it
@rancid ridge
ok but how can I get a more accurate nav mesh then?
cell sizes
is at 1
let me load up ue and i'll tell you cant remember exactly all the settings
mm i think i might be wrong, with the radius, it should be the other way round
how come you need it to be that accurate down to 1 cell width
@rancid ridge
setting it in project settings seems to work
@rancid ridge nope still not working with that, it rebuilt nav mesh when I set it so thought it changed it didn;t change the one in the level :/
For me it ignore the agent radius in the project settings (I have deleted the RacastNavmesh Actor)
saw your answer to late ๐
Looks like a bug to me
@rancid ridge seems to be weird one, I think its how the engine decides on what navmesh to use, it sort of tries to put it on a navmesh thats cloesest to its size, but in doing that might be stopping it using a smaller one, not sure if its a bug or intended https://www.reddit.com/r/unrealengine/comments/9geemf/i_am_trying_to_set_up_a_ai_to_use_a_custom_nav/
0 votes and 6 comments so far on Reddit
does anyone know what could be causing this. Looking online doesn't help me very much. This only happens when a bullet hits another player and I think it is slowing my project down.
means the whatever you hit is not net addressable
well, bullets aren't net addressable
which means you spawn them locally
which in turn means you can't send a reference to them via RPC
That error is in a few popular games. Seems like an odd thing for seasoned people to miss.
thats FPackageNetGUID i think
one you're thinking about
that happens when you say, spawn a component on BeginPlay on a replicated Actor
@ocean radish I had an other game with an AI and it does not work with 4.24 and obove (dont know which version worked last) so I dont think that this is how it should work.
While launching the game, none of my actors appear in the newly loaded stream level, neither those spawned in the editor nor those spawned in BP.
It works fine in PIE, what could be causing this?
They're simple Actors that only contain Sprite and GameplaySystem components, their Simulate Physics is unticked and I'm also printing their position, it doesn't change at all, so I doubt they're falling off the world.
Hey! I Dont know if this belongs here but, how can i make it so when you are chrouching you could still fall?
And yes I'm a beginner
I'm using just this basic setup.
how can i prevent my floor creating hit events?
It is turned off but I don't know how it generates them
I am very happy, now with 4.25 I can hot-reload after calling createDefaultSubobject and not have any transform issues.
nice fix ๐
@tough ore i think there is a "can walk off Ledges when crouched" in the character movement
if that's what you are asking
Any way to make node strands light up when you click on a node?
by default without actively pressing a button
there is a "Hide Unrelated" toggle button on top of editor
https://www.screencast.com/t/ZgQHxvG2DCH
@lucid granite Thanks! I got it working now ๐
Awesome ๐
I got a MAD stupid math question for y'all
What would be the easiest way to set up an inverse ratio between two floats
If float A = 1 , I want float B = 0
And if float A = 0 , I want float B = 1
I'm seriously blanking rn
Not like that, haha
Not literally those values
I essentially want an effectiveness multiplier
If the effectiveness is 1 (100%) I want the output to be 0
If the effectiveness is 0 (0%) I want the output to be 1
If the effectiveness is 0.5 (50%) I want the output to be 0.5
ok, a lerp ?
Yea, thats what I've just figured out, lol
hey anyone able to make me a simple walking loop for a model i will dm you
- #looking-for-talent
- #animation would be a better crowd if you're going to break the rules
Read the description or pinned post
ok
Trying to break my desk on impact.
It was going all well until I realized they don't overlap.
Is there any way I can get which child component was hit?
any one know if its posible to have a pawn as a componet in another pawn?
for example a turret for a vehicle?
I am getting an "Infinite while loop detected" when using a while loop that checks a reference. Is there a way to over-ride this security protocol?
Why do these gaps appear in my landscape navmesh?
@lucid granite No, infinite loops are not allowed. Your loops will attempt to complete in a single frame but can potentially take an infinite amount of time to do so and this would break your game, so the engine won't let you attempt it. Either:
a) make sure the loop has a guaranteed way to exit, or
b) delay your checks to not pressure the engine to exit successfully in one frame
Ok, so I am trying to follow a tutorial (with an older version of ue4) and I need to ensure that the game mode blueprint has been initialized before calling "beginPlay" on an actor. What is the best way to do that?
I tried using event tick and I noticed that the timing is the problem.
I'm thinking I may just go back to using C++.
The only issue is that if I don't first do it in blueprint like the tutorial, then if I do something wrong it will be harder to backtrace.
However, it is looking like my blueprint is going to be so much different, it probably wouldn't matter which way I do it.
@rough wing The "Hit Component" output on the hit event
@lucid granite In the gamemode, when initialized, set a boolean to True (false by default). In other BPs that rely on the gamemode being active, simply check if the boolean is true, and if it's false, delay 0.1s and check again. Unless your logic absolutely requires same-frame recognition, the above workaround is fine.
interesting, I didn't think about trying to loop-back, i'll give that a shot
I don't seem to have it
the 2nd picture is not from my project
setdelay I think is it now
do you know the tree structure for that?
not sure what you mean by 'tree structure' but
here's what it would look like
this still has the possibility of running False forever, you just need to make sure the gamemode boolean can be True
@plush ridge how do you get your node paths to apear that way?
I have a quick question! I'm using Random Sequence Player to randomize the death animation but I can't figure out how to stop the animation loop after the player dies. Any ideas?
if it's never ture, the problem is elsewhere
@devout condor It's a plugin called Electronic Nodes (highly recommend!)
oh
oh
are you pulling from something that is not a standard execution pin?
either pull from an exec pin and try, or right click in a blank spot and do it
delay is not inherently linked to any specific variable type
@solid gyro use montages
@plush ridge I'm coming right off of Branch > false same as you
I checked several times, I don't see it
Flow control is where it is
Very strange if you don't have it, it's one of the most basic native nodes in Unreal .. ;/
Thanks for the advice. I will have to look up how to use it! ๐ป @zealous moth
you cannot always delay, where are you trying to delay?
Ok, so I am trying to follow a tutorial (with an older version of ue4) and I need to ensure that the game mode blueprint has been initialized before calling "beginPlay" on an actor. What is the best way to do that?
I tried using event tick and I noticed that the timing is the problem.
@lucid granite you can make your gamemode or controller call to spawn your actor; either way why do you need this check for?
the game mode spawns my characters.
The camera (world asset) needs references to those characters (created by the game mode)
then why not make your characters tell the camera
Sounds like a good way of doing it, I was hoping I wouldn't have to veer too far off of what the tutorial is doing though. valid method though
i noticed many people are used to "Getting" data but forget you can always "tell" or "set" it inversely
๐
another method could be to create a "bool initialized" and on tick, check for the characters that have been created, once they have been created, then go through with everything and set bool to false to not get called again
but your way is better because less would be in the tick
nah, don't tick it; make a timer and run it at beginplay and if you succeed, disable it
even if it is just a bool check
tick would mean every frame, so between 30 fps (0.03s) to 60 fps (0.016s); that is way faster than needed in real time; if you make a timer, you can check every 0.1 to 0.2s which is not perceptible by humans
well I won't be putting it in tick anyway now, but thanks for the input
the tick method was more for a hot-patch to get something up and running, but I am going to re-write it
in my experience, the only thing tick is good for are animations or followings; otherwise everything can be set on timers below human perception threshold
do agree
is there anyone who wouldn't mind hoping in a screen share chat in order to help me out with two topics
trying to get this to work forward, left, right, and backward. i would like to hold w,a,s or d and press shift to move in the respective direction. any help is appreciated.
@spare patio shift is already a modifier you use when assigning inputs...you would create it like normal movement but in the action mapping put a checkmark in the 'shift' modifier..see if this would suit your need
Basically it would require both shift and a key to be held to move in that direction
Or are you trying to do impulse style movement like a rocket ship?
@frozen spear i want to teleport my character 500 units in the direction i am running
Like a mage blinking in an RPG?
@spare patio if i where tackling that problem i would make a vector varible
and whenever you press a key (w) then it will set it to the appropriate vector (0, 1, 0/ the forward vector)
then when you release that key it resets the vector
then you use that vector for your movement
the only thing about that is it introduces the problem that if you hold one key then hold another and release the first key it the vector will be default
@neon remnant thats what i am using get actor forward vector for
did you guys even look at my bps
yes
im saying you change the vector you are using depending on what key you press
are you even looking at my awnser? ;)
I glanced at it but mostly just read the poor explanation without a actual example of an instance that might exist in the 1000s of games most of the people here have most likely played....youre recreating world of warcraft mage blink skill with the direction rune..
On that note goodnight all
goodnight
anyways ima bump my question
why is the "contains" node always returning false?
search in is "HitBox_lethality03"
and substring is "leathality03"
im trying to make it so that different hit boxes will do more damage when hit. if there is a simpler solution to this then having a list of different hit box types and finding what type the hit hitbox is please tell me.
@neon remnant i am trying to figure out how to do what you said
i looked at your question and i duno how to help
i explained how you should
every time the user presses a key set a vector varible to the respective vector (w/forward or a/left)
then when they release the key reset the varible
hmm
Danger your loop body not connected to anything on purpose?
oh yeah there was a print statment there to show off what was happening but i removed it
If you have like collision on multiple parts of your body, im not sure there would be an easier way to do it unless you took it to c++ instead
You would need to add custom tags to the different collisions
can i right just 1 blueprint in c++ i might have to do that
write*
why is my english so bad today
Well custom tags on the collision is what you would want...then you can use the tags to compare or find the components without going through all this
Also make sure your collisons are interacting with physic bodies if the components are being hit with physics actors
im simulating the colisions atm
And yeah there's a tag system in ue4 but not every component can have them unless you make custom versions of the class youre trying to use them on
alrighty
Check your collision setting make sure they generate hit events..
Make sure they interact with physics bodies
Set the main capsule of the character to ignore the physics bodies or it will consume your events before the body arms legs head whatever even has a chance to
ok
Or atleast overlap instead of block
Character wont stop rotating towards direction of movement, even though this is disabled
Any help?
@worthy pendant can we get more context?
Oh, this channel is active
sorry for the interruption
Check your camera setting
no its ok
The pawn and the camera both have settings that do that
Uh, sure
I'm trying to make the character face the mouse cursor
Which currently works perfectly fine, when they aren't moving
Once the character starts moving though, they turn to face the direction of movement, even though it's disabled
im aware
Camera
Spring Arm
Movement comp
Character
You using 1d animbp for walking?
Trying to brainstorm what else would cause that
It may have something to do with my update rotation there
I disabled it, and it's not rotating to movement anymore
i feel like something wacky is going on with the convert mouse location to world space thing
Like
In my implementation of it, or in general?
aaaaand I got it working
Instead of using the location of the cursor, and a look at rotation, I used the direction output and a rotation from XVector
Awesome ๐
@neon remnant @frozen spear this is what i got. it seams to work as intended. thanks for the help
if anyone knows any ways to clean it up i would appreciate it.
you can do that a lot cleaner ill try and make an example rq
in all it's duct tape and super glued glory
lol thats the same with my current game
@spare patio this is alot cleaner and easyer to read imo
also i fixed a potential bug where if you where not looking forward your dash will be in the wrong direction
ah
I have a bool array, and I want to check if everyone item in that array is true, how?
Does anyone know how to automatically offset coordinates say I wanted to teleport the player +300x +300y away how could I take the coordinates of a character and add that amount to it instantly
get ref to your character, get actor location, drag out from pin and get vector + vector, enter 300 in x and y, drag out that pin and plug it into a teleport function
if you want to do the x and y in local space to the character - use forward vector and right vector, multiple those individually by 300, add the result back to the actor location, and plug that into teleport function
Question: probably bee asked thousands of times, but is it possible to get the transform of the editor viewport camera. google gives me results for "get level viewport camera" which would be suuuuper useful but that doesn't exist for me.
@neon remnant i got your method working. I dont know how to make it work with my forward facing controls though.
oh im pretty sure I saw that when i was poking around in my problem let me see if i can find it
@spare patio replace add actor local offset with add actor world offset if your actor cant rotate
Ok, needed to enable the blueprint editor utilities plugin
@neon remnant i really tried your way but its causing issues mine dosent so ima just use mine. if i jump and change the way im facing it will dash the direction i was facing when i jumped instead of my current facing direction. also 0ing the variable out on release dosent work well when spaming different directions. sometimes you press a new direction before letting go of the old one and then when you do it gets zeroed out.
but it was interesting to work threw
ah
is it not possible to mark a BP Enum deprecated?
you could use an anim notify from the end of the attack animation, that sets a bool in wherever you are registering the attack input, and either buffer the new attac input or just don't allow a new attack until the current one is finished
Question: does anyone know a way with the blueprint utility nodes to rename an asset in the outliner. There is a way to rename the asset on disk but I'm after renaming the ID in the level, can;t seem to find anything useful
Answer: "Set Actor Label"
Hey I'm having trouble for whatever reason my character cannot look around vertically
first person? make sure your camera has "use pawn rotation" enabled, if thats not it then check your player controller and see what pitch min and max are set to, if tha'ts not it make sure you haven't unhooked any input events that set pitch in your charatcer blueprint. if none of that works need more specific info
awesome thanks it was pawn rotation
has no construction script? it seems to be failing to access some reference and not finishing the spawn for that reason
hmm
does it inherit from any class?
can you send a screenshot of the construction script?
or is it just totally empty
hmm
yeah im not sure whats wrong then
sorry
do you have any references to MainHandWeaponReference?
@unique flicker on the variables list, click the eye and show inherited vars, then look for that reference in question and see if it is defaulted to something it can't access or right click and find refs
@unique flicker
@unique flicker look at the spawn node for the item, is there an exposed pin with that name?
Its very hard to know whats going on without seeing where its getting stuff from especially from code your not sure on, my eyes would be looking for PackagingResults: Warning: Accessed None trying to read property MainHandWeaponReference
that
mainhandweapon is just a variable, it depends on how that is set, it wouldnt just not get set because its on a character unless its trying to set it to something it cant reference or just not getting set at all
Looks like you're trying to spawn an actor in the construction script of another, which I'm pretty sure is unsafe
take a screen of where the spawn node is
Even Epic has stated that you're not supposed to spawn any items in the construction script. They never took out the ability to call functions from the Construction script, which can spawn actors, but there's a reason that the spawn actor from class node isn't available directly in the construction script.
well apart from procedural meshs and such
Procedural mesh is a component, not an actor. Components are perfectly fine in the script most times.
you said spawn any items not actors ๐ my bad just making sure people were aware that certain are fine
Where is MainHandWeaponReference?
My editor crashes when trying to return an enum from a valid class, anyone knows how to fix this bug?
@unique flicker Hey
yeah then randomly saw your name here lol
No i use my own but I know it well
your getting the issue with NPCs that spawn item actors yeah?
can you show me the code that spawns the actor?
and you get this error when trying to cook your project or all the time
do the NPCs spawn actors or just sets a mesh?
look in the NPC at the components it has
or if it has a controller look at the components on that also
yeah but is there a NPC controller ?
just move the code to event begin play
the load item node at the end
I've just in to a strange problem, I added a loop that continuously kept updating all of my player info to see if it would fix a problem i previously had. However after deleting the blueprint for the loop it is still running. Have anyone here had a problem with deleted blueprints "ghosting"?
then delete the other one as you don't need two
in the rifle whats in its construction script?
that message just means it can't find the compiled parent function
I wouldn't worry about it
np
Is there anyway to make variables public based on context? For example I have an blueprint actor which has a Bool variable called "bEnableExtraOptions", which is always public and visible from the editor. When the user/designer enables this Boolean, I would like extra variables to be come visible, such as more Booleans, Strings, Ints, and Actor References.
Has anyone implemented such a feature before, and could provide implement tips?
@sick solar plugins or unrealengine would probably be a better place to ask that...plugins for sure cause thats all they do there is deal with the engine side of things ๐
Alright, I'll shift over to #ue4-general then, as I'm not developing a plugin currently
Hello. I'm looking for some general advice. How many times might a programmer need to get a variable from another class in Blueprint before it becomes more performant to promote it to a local variable instead?
it would be better to store the "other class" as a variable instead, i can imagine your casting that class every time to pull its variable
Thanks for your response.
the expensive part is casting that class to "MywhateverBP" to drag off and get the variable
if you stored the REF instead, you can pull off it all day and it wouldnt hurt a thing
I find myself very often doing that kind of casting in the construction script or on BeginPlay in order to get the game state/mode/instance. Then I pull off of that reference many more times in the script for its various variables. But I wonder if for instance, I'm constantly getting say, GameInstanceRef.S_PlayerInfo.Speed, is it more performant to just upgrade speed to a variable?
i dont think you would gain much from that...as MyObject--->speed ...is pretty much the same as Speed--->from MyObject from ref
it would maybe make your code easier to manage?
or nicer to read?
But there's no lag communicating between two classes via reference?
HI there, I'm looking for a tutorial about gamemode that cover the basic of creation a team deatchmatch mode. Weirdly, I can't find a good one on Youtube, preferably in Blueprint as well. I'm currently using Advanced Session for the multiplayer. Anyone got this in a bookmark ?
as long as you already have the ref stored not really...its just pointers to memory, what i showed you above is exactly how the computer is going to read it
Sorry, noon, I don't know a series on that one. But you could look at the Unreal Tournament project and see what they've done there.
myob->speed...speed->fromMyobj are the same thing
Thanks, man, I appreciate your time.
its tough to put in it simple terms without going into a lot of detail about pointers and how they work
No, no, I understand.
other than tell you as long as you have the Ref stored
its the same both ways
the "castTo" <---those are the ones that steal your milliseconds of compute ๐
yeah good idea @rancid quartz ๐ thanks
right...so long as your not doing "stuct of objs" pull off cast to otherThingBP--->speed...on everything in there
Yeah, I understand. Cast only once, then promote.
if you are you might consider a different method
even then...as long as its not happening on a tick...or on functions that are constantly firing off...its ok if you need to do it from time to time
in something like for example...your switching into a map and loading your assets at a load screen
you cast everything and store variables
during the load
but if your doing "get all actors" then casting all actors for something like aiPerc...youll be doing TONs of casting unless they are nearly blind lol (2 ft vision cone)
Yeah, I tend to only do it once on construction. But you know, because I tend to cast and store the same three things in so many classes, I always wonder if there were some better way to store them. In almost every class, I find I need access to the current Game state, mode, and instance.
I keep well and away from GetAllActors. That thing's got a warning right in its tooltip.
careful what you slap in construction...thats a compile time ref your storing...
not the instance that spawned
Sorry, it's usually in BeginPlay.
^
if you ever notice variables on your stored refs are wrong..make sure to check where you store the ref
Yeah, I'm currently going through that revelation right now actually. Apparently using SetMembers off of a map get node doesn't work well because I guess Get returns a copy. ๐
Thanks for the tips.
๐ np at all
Since I have your attention, do you know much about networking games?
Servers in particular?
not the best no unfortunately i only known enough to get myself out of a bind or what ive learned the hardway myself
@frozen spear @rancid quartz Just a small clarification, actual casting costs pretty much nothing. The part of usual casts that cost are the isvalid checks. Pure casts are much better in this regard if you know your reference is valid.
Oh, okay. I still appreciate you.
Really? Are pure casts more performant?
Cause I could make almost all of my casts pure. It's almost never a question.
also that casting creates objs in memory to compare the casted class that are not destroyed until garbage collection
it doesnt have a "charBP" laying around...it makes one...
That makes sense, cool.
and it doesnt compare "this class is called charbp" it compares the whole thing...
So the more complex the actor, the more expensive to cast?
lets also add that when we say expensive were talking about .00001 compute time lol
if youre having issues where youre getting FPS dips or stutters...its something in your games logic causing it
looking into the profiler can help track down the real culprit of your performance hits which usually for me is always draw calls
Yeah, I have my eye on the profiler for when that day comes.
you gain more back in performance turning off "tick" on any actor that doesnt actually use it, and using merge mesh on a whatever staticmeshs you can then you would changing every single cast you ever did to pure cast
Yep, I've got those habits worked into my practices.
and changing "tick interval" to less than every frame on any actor that doesnt absolutely need every frame updated gains you a nice chunk back
Here's my networking question in case you do have something to add to it: https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/1757560-advice-on-listen-and-dedicated-servers
Hello,
I'm building a cooperative four-player game. The plan is to eventually sell it on Steam.
I never intend to display a server list. I plan on only allowing joining locally and through friend invites via Steam. I've seen some warnings around that movement replication for...
Here is a better explanation of the difference. All three are doing the exact same thing, with the exact same reference. The bottom one is already casted to the correct class. The top two are casting in the loop. Top one is a pure cast, middle one is an impure cast with the isvalid check.
Wow, thanks for recording that.
that is an awesome example ๐
see it all in .000001 of compute...
so unless you are doing it on 1000 actors where it adds up visibly at the same time
the real problem you will have with the cast is the ram usage tho
not the compute
run around with 2gigs of garbage thats nothing but casted object until you close the game down(or unload level)
Actually the one test that really surprised me was the Get functions on references. Validated Get is so much faster than getting and using an isvalid node. I expected a bit of a difference, but not 18-23 percent.
yeah but validated gets assume you know its there...if any part of it is invalid you just stright up crash
What's validated get?
Nah, it's just a different way to confirm if the reference is valid.
i must be thinking of a different function
Right click on a blue reference and near the bottom you can convert to validated get.
i know i tried something everyone swore up and down was the best for performance that ended up getting me so many headaches i went back to the way it was
the .02 of compute wasnt worth the headache
What was it?
i cant remember, i thought it was validated gets
hey authaer you should profile that example and see what it dumps in your ram
or
share the code
i guess i could just recreate it myself
let me save this pic
Which one?
the cast example
i can already see in which order theyre better but im wondering how much all 3 individually add to garbagecollection
18% tho
wow
hmmmm
is posible to make a pawn a componet of another pawn?
for example a turret on a vehicle?
you click add component, and type the name of the otherbp and it should show up as a component you can add
@maiden wadi I cant seem to open the macro in engine or get vs to open the validated get function...im curious to see what its doing under the hood
@frozen spear there seems to be a set list of components that can be added
https://gyazo.com/f98adc8f9de41ded04c43120e1937ca3
@frozen spear what base class do you mean component?
how do I make a pawn base class also a component base class
but keep in mind doing this you cant modify variables on children classes in a LOT of cases
if there is a case where you absolutely need to do this which i cant think of too many cases where you cant find easier or more flexible solutions, your better off doing it in a custom c++ class where you would gain way better control over the child class variables