#blueprint
402296 messages ยท Page 830 of 403
I know. It can go before your loop though. Only needs to happen once.
But there is another little red arrow there as well.
ok, I changed that.
The other little red arrow should pass your struct in. If you remove your SetText of the ItemCount that you just posted, your binding should run correctly after you pass that struct in.
@maiden wadi I don't know why I'm getting errors when I didn't get them before
it points right to the add.
Looks like something is wrong with your InventoryComponent pointer.
in the pickup master
@trim matrix
Hmm, Now it's not seeing the inventory Component. That makes no sense it was work a few minutes ago
oooh
This workkksss
Sorry it took a bit, my computer's sorta slow :/
:)))
Please tell me if it works for youuu
@maiden wadi I had to put the SetText back where it was. It was causing some of the errors.
That makes zero logical sense. O.o
Yes, I know
Have something activate when it's true and have something else activate when it's false, for example, you could print a string saying Bool On if it's on and vise versa
I posted the errors above. This is what I have left
This one is more of a architecture thing rather then a problem.
So I have my database of items and when I pic up an item it basically copies the row from the database into the inventory, Cool and everything works on that end.
My wonder is how should I handle when drops happen with rarity states (basically dynamic increase based on chance) Once the items is in the player inventory its is not an issue, but when the AI drops something its only an actor on the ground and not going to have this data... Will i need to make a copy of this struc on creation of the the weapon as a variable in the class. Hope this makes sense
can you make a exemple pls with bp
You can ignore the first two nodes on the left
You would need that data on the dropped actor. On a side note, I don't know how you're handling stats, but if those are randomized at drop, I'd recommend changing that to an abstract scaling method. Allows rebalance of stats later even after players have received items.
it wont be random stats, but each item will have a rarity that will be a + or +% increase to base stats
set values tho
so keeping the data on the dropped actor would just be setting a variable pretty much
if you want to learn more about what I'm doing, watch this from 10:44 This is where I got the idea from https://www.youtube.com/watch?v=4ctSlAdMZF8&list=PLSc29g4OjKUOMwWYdslgKpZRtTJU2jFpZ&index=2
Hello everyone. This is a quick Tutorial, how to create an Inventory System.
I used the Version 4.27.0 of the Unreal Engine for this one.
Discord: https://discord.gg/exuHzHjahe
Map: https://www.unrealengine.com/marketplace/en-US/product/modular-houses
Assets: https://www.unrealengine.com/marketplace/en-US/product/smart-archviz-interior-pack
or a copy of the struct and then transfer that over
That works just fine. ๐ But yeah, your dropped actor would definitely need that rarity type.
I'm watching it again to make sure everything is right
I would need to then store in in the data table since my inventory is storing a Class actor reference
and not the actor its self
Most likely your inventory component should just have some sort of Spawn code that at the same time spawns an actor, sets that data, double checks that the spawning went well, and then removes that item from the inventory.
so is it dump to keep some of the weapons variables lets call it in the struct (the ones that can be dynamic)
since im creating an actor based on class when I use the item
im thinking
when the ai dies have that data in the actor
then when A player picks it up pull that data into the struct for that spot in the array of the players inventory
then when he uses it set the values again in the weapon
it would work 100% but im wondering if this is a dump practice type of thing or reasonable
Yes. In my system I have a struct with enough info to define the item. An item in the world is just an actor + that struct.
๐
@tranquil abyss He does the same thing in the video. He adds it after the forloop
So when stored in the inventory, it's just a struct. Dropping an item into the world removes the struct from inventory, spawns an actor (struct gives the actor class) and sets the variable MyItemStruct on the actor
makes total sense
Also does this run on actor creation
I can use it to do that logic initially
Im thinking
wait no. that would run on each time I "pull the weapon out"
so that needs to be somewhere else
Depends on what pulling the weapon out entails.
ill show you
I understand the problem, but it just depends on if you are spawning an actor every time you pull a gun out or not. That's a personal choice a
That's a horrifying event name
But yeah, that's basically the same as dropping it.
lol, it literally means what it is tho
item in slot 1 of the inventory is equipped
by design
well the weapon
specially
I would use SpawnWeaponForSlot1 but you do you bb
I think I did that because this
basically the first 3 weapon in the inventory array are the active weapons and the ones you can switch between
might be dump but it works lmao
@maiden wadi I don't know what I did I fixed the errors and Yes I moved that ToText out of the forloop
@maiden wadi It's fixed
Now I have to work on stacks and so so on. @maiden wadi thanks for your help
i feel like this is dumb: i have two integers, and a map of integers to integers, and i want to set values in the map.. but none of the integer pins connect?
i guess 'SET' is trying to set the value of the whole map, isn't it
Hi, can anyone tell me why this print wont run? everything before Enter and Open works?
yeah. Try putting a get canvas node on the graph and then there are nodes to manipulate it
arrays work in a similar way too
is there a way to create something like a stack via bp?
how do i put a "infinite" constant in blueprint?
There's no such thing as infinity in computers.
lol there is such thing as infinity in float numbers since at least the day IEEE754 was enstablished, and it's supported for floating point operations in any conforming CPU/compiler
well nevermind I'll just make a static function that returns it from C++
Yes, but actually no.
"Infinity" is just an abstract variable for something too large for IEEE754 to handle.
Either way there's not much option when it comes to assembling bit variable in BP and represent it as single floating point.
well comparison and arithmetic operations in blueprint should still work, after all it's c++ behind
how expensive is it to get the system time/date
not
torn between using tick for perfect time or a .01 timer thats slightly off
yeah, but it adds up/is slightly slower over time, at least comparing it to the ticking method
time isnt critical, but im maybe just being too focused on it
If you don't need to show it all the time, you can just fetch it less frequently.
Use looping Timers with large duration.
But practically it's not that expensive on tick, so have fun.
it should be a cheap call but it also shouldn't drift if you sample it regularly afaik
the one with .01 tick always goes 1,2,3,4,6,7 and skips over 5
and the text update display refreshes every .1
a frame is only 16ms
or maybe i should just use event tick and increase the actor tick interval
or is even that frowned upon
That is widely recognized as a best practice
actors have individual tick intervals? ๐ค how does the main loop handle that
Set Actor Tick Interval
wouldn't you lose any chance of parallelizing the execution for all instances of the same actor?
If you expand that, they also tick in groups
assuming any high level engine even tries doing that, idk
I have tick disabled in most places but some situations warrant it
you can also just enable disable tick as needed
interesting
if you have something just visual, like a fan's blades spinning, would you do that in tick increasing its interval until it gets noticeable?
I would use a rotating movement component
does the rotating movement component just secretly use a timeline or something
oh
It ticks unless it wasn't rendered or can't move
uhm is that only for skeletal meshes?
It's a component, it just updates another component
IIRC it calls MoveUpdatedComponent
I don't see where to tell it which component to rotate
ah, so it would be technically better to have a timeline setup along with a render check
parent socket?
it rotates the whole actor unless specified
Just add it as a child to the rotated component
static or skeletal mesh likely
I know this is the BP channel but the C++ is remarkably easy to grok
it's a non scene component, can't add it inside a child component ๐ค
sorry yeah it's a move component which are different
You can either have your collision shape as a root
or you can call SetUpdatedComponent from BP
in the movement category
but still i'm moving the problem one step away, what is the ideal place to do acceleration-deceleration calculations for the rotator speed? Back to tick? ๐
The win for this in my mind, is that the component is from Epic. So whether it ticks or uses a timeline isn't relevant, it's what they will maintain and I don't have to write code. That's a huge win for me
if you want to interp you have to tick
that's perfectly fine
agreed, i use it a lot in some of my scenes
ok ty
Like if I'm using scroll wheel to zoom a camera spring arm
I will tick while the desired length doesn't match the current length
that's ok, move on with your game and sleep tight ๐
You can say I said so
thats fine bc scroll is short
sorry another question, are these equivalent?
I don't believe Delay is callable within functions or other subgraphs
You can cancel the timer
Yes and no. The timer return value allows you to control the timer where you have no real means of changing a delay.
Ok, thanks!
is there a way that an int variable can add a 0 if the number is a single digit
ie, 08 instead of 8
use a toText node.
oh wait yeah that exists
hey yall
sorry im really stumped with something here
i just cant wrap my head atound it
im trying to get a basic attack range and i have get horizontal distance to between 2 characters but i cant figure out how to translate that into the actual function im trying to achiev
might be because it's controller. try pawn or character
hi conrad 
hello
Who are the two things you're trying to get distance between?
should target be my actual target and other actor be myself?
myself and a target- wait x.x
i had something for a second wha
Have you printed what the distance is? Or printed the display names of the two things you're grabbing?
meaning what exactly
debug / print string the things above
yeah, you are on to something
no...
you want the distance between the player and thing the player is attacking right?
yea
so target is thing the player is attacking
it actually doesnt really matter which is which
well thats what i said right here
but you are not feeding in the victim
yeah, they're just names for the inputs
yeah
if that makes sense then go with that
is the get horizontal distance to is greater than attack range float correct?
but you need to get a reference to the thing you are attacking
well, there's no where in this code that is saying "this is what im attacking"
yeah ijust have the distance
what two things do you have the distance between?
this is the thing i have down
right, so you'll have to figure out how to get "the thing you are attacking" and feed that in as target
stop pluggin in controllers for this ๐
yeah, there's nothing here that says this is my target
ah ok ok lemme get that
you are trying to measure the distance between two actors, controllers dont have a location in the world
i actually know what to do in that case 
so get player character would that work in this case?
so long as your player derives from character class
How do I make a timeline that just goes on forever and goes infinitely higher?
Like never stops
you can make a looping timeline, is that not what you're looking for?
I feel like having a timeline loop on increasingly larger numbers is a memory disaster waiting to happen
what's the bigger problem you're trying to solve
^
just curious. Could I have double branches, one determining what is under the mouse and the other doing the horizontal distance to?
i realize now that with the way i have it set up its only looking for actors that are blocking it not specifically pawns or anythin
there might be a case where two branches are needed, but there are also operators like AND or OR. so if you need to check two bools and both need to be true, use AND, or if you want the branch to fire if either bool is true use OR. There's a few other operators as well, gets kinda tricky
wait
ok well its slightly working
you were right having the and is working the same as 2 branches currently
rn its noticing all of the pawns no matter the distance and i believe thats because of the AND?
not quite. the distance check is between pawn and character, but both are player
also, pawn is a parent class of character
so its just catching itself?
yep
since you now have the get result under cursor, you can get the actor from that if there is one
you should see if it is valid though, before performing the distance check
if it is finding the player correctly?
ah ok ok
so i have to see if its finding the target
the hit result returns the hit actor, IF there is one, so IsValid asks if there is something
come to think of it, you'll problably get more actors than you like since actors are almost anything in the game world
so you would need to check if the hit actor matches your enemy class or, if you use tags, work that way
somehowits set up to get everything but the pawn target-
if pawn target means the victim, yes
yeah
im intending to make it multiplayer so-
also what exactly do you mean by this
how can i utilize the is valid node?
oof
wait to see if the target is a valid target
just a quick question but, is there a way for me to discern pawns based on a team system? in that way i dont catch myself when looking for distance?
yeah, but mp is a whole other layer of stuff to keep in mind on top of this
ah thats mb
i usually see enums for teams in mp
thats what i just saw when googlin
i dont do much mp so im not the best source
Tags would be good too
i would try using tags, they should be fine for mp
how can i use tags for mp though is my question
because
at least how i see it is
wait
tags are a list of names that any actor can have
are you able to assign tags in blueprints or
Sure
yeah i know that i just mean like wouldnt i have to give tags to characters which can then be caught later
even by friendlies
yeah, but it sounds like you have team1 and team2
yeah
so logic wise you check if they have the same tag or not of their own tag
so when you spawn your players or whatever, you give them a tag like "team1"
ah ok ol
the logic would check "if my tag is this, and the hit actor has the same tag, they are my friend"
you would not be checking for team1 or team2
you would check for a match or not
because mp
im going to try and build the basis of enemy or player and worry about the mp stuff lattterrrr?
lol later in another project sure
i meant later in the project once i know i have this down i will add that
honestly
actually
ig theres not much reason to
you've chosen hard mode ๐
for now ima just ctrl c + ctrl v my character and give one the team 2 and one the team 1 tag
then see if that works
then ill do
all the hard stuff
that sounds like the correct way
sure...
hard but rewarding conrad
sh-
copy pasting... that sounds right...
yeah.... i dont really think thats how it goes
your game mode needs to handle assigning teams
No ik
Owyn, with your questions you should really take to heart what Conrad said here: #blueprint message
You should focus on some small project to get well acquainted with ue4, even if it's a stupid single player one first
Im just trying to figure out the code for noticing enemy team vs same team before I go into all thar
Yeah ik stumpy
Trust me I do
But I am learning
style
I probably will end up doing that but for now I'm going to do this
is there no "run editor utility widget" in ue5?
right clicked the widget and didnt see the option
saved it, closed engine, opened it back up, no option
widget? ue5? i dont think this is the best channel
how do you get the value of a map from a key? like foo = dict['key'] in other languages?
Find
ohhhhh thank you
it works for me, are you using 5.0EA?
it's based on 4.26 so things might be wonky
but if you create the class from the menus it works no problem
wasn't editor utility widget introduced in 4.27?
ok
but if you create it via the BP > class, no worky
Can you somehow call latent nodes from functions?
Or is it just still a hard limitation you can only do that from the top level event graph?
you can call timers inside of a function and timers can call functions
Binding an event to a function?
Or some other way?
ie. Something other than BindEvent to ... or is that what you mean?
Hi, how can I get the enum class name of an enum variable?
I've tried 'EnumToName' function, but it return - MyEnum:NewEnumerator1.
which I dont know why it added 'NewEnumerator1' at the end.
Is there a way to simple get MyEnum?
Any idea why it doesnt teleport my Ball Actor to the new location ?
set timer by function
but you can still call set timer by event in a function, then hook up a create event node to the timer delegate and call it like that
hey guys, i've got a question. I would like to let the player choose a folder path where his/her music is located to be played IG (like in sims or space colony), is it doable in BP ? Or do I have to pre-create a folder where to copy the musics ?
I have a short question about spawning an actor. Can i spawn Actors in shape or something?
Hey i want to make a system in which when i hit a obsticle one character should born i able to do that but sometimes when i play many characters born how to fix this
HI Guys, i have 20 closets with a camera inside( which is for the Player when he enters the closet) so the fps are 20 when they are in the leevel .. how can i deactivate the cameras? I tried uncheck autoactivate but no effect.
Wouldnt it be easier to override the cameramanager at that time?
But you can set them to auto deactive/activate
Ah. You tried.
yepp its wierd i dont activate them but they still seem to capture for no reason
i tried, hidden in game, visibilitz off, deactivate. uncheck auto activate nothing has a effect
the camera goes black, but my framerae is anyway low.. if i delete the camera it goes froom 25fps to 120 fps
i don't think that the cameras are an issue
they don't render as long as they aren't your view target
yes ben
just found it...
its the mesh i set visivle.. it seems that skeletal mesh which i use to show the player hidding is causing the issue
Is there a node that is basically a Delay, but will also fire off a execution pin every frame until the duration is done?
quick one, how can i destroy exactly this spawned actor? its a flipflop before that.. so was thinking liek this it should work but ope
also before you spawn
you should check if the variable already contains the spawn actor and is valid
yes makes sense
dang it, i made a reference in the actor which will be spawned.. annd get ti from here but it doesnt destroy
how do i make a loop with a delay?
I have this issue where my character just glides over the ground
instead of walking animation
Just cant find where it goes wrong
That ref.. is not a ref
Right click the return and promote it to a variable
Then replace your flipflop with an isvalid
If it is valid, destroy it, if not, spawn it
Have to ask. Why are you bothering with an interface if it has a hard ref to the character? You've went to an extent to avoid casting to the class, only to have the same affect with a slower call.
Am watching a tut, they said this was a better way then casting
And somehow he can link this, and I cant.
Youtube...
yea xD
feeling so dumb when doing this.
yea true
But im stuck rn, like it does all the movements
But just not the animation
Also you have to make sure that the anim bp isn't showing the editor's instance. Editor always shows another instance of the animbp when you play in PIE.
Timeline component. Or else activate/deactivate tick manually with Set Actor Tick Enable node.
Might need a console command for that...
In which case it would be Execute Console Command node
to set a fixed frame rate. I don't recall the command offhand.
Dunno. I mean, it's whatever you last set it to.
If you want the actual live game frame rate as it runs on the device
1 รท Get World Delta Seconds = framerate
hi all - wondering if im going about this the wrong way
i'm trying to repeatedly spawn actors (that move) based on their inital location in the world
i'm unsure how do i access its original location in the world - and not its current one.
for context - i'm creating barrels that roll down a corridor (that get destroyed when they hit the wall or player)
You should just make an empty actor BP and use it to spawn the barrel at it's location
Then the barrels can roll off and the spawner remains to make another barrel.
is there a way to avoid this? it's easier to position the location of the barrels if i used an actual barrel object instead of a TargetPoint
or - can i make it so that the spawner is just visible in editor but not in real?
You can se Hidden in Game to true on your Actor
ah!
thank you!
also just curious - is there a point in using blueprints if you are very familiar with programming?
Yes
Its much faster for iterating logic
Once you have a class working as you want it then you can quickly convert to C++ if you like
i see
thank you - i'll stick to blueprints for now
its quite hard to fight the temptation of writing code ๐
Don't worry, you still are
trying this approach of using spawners
can't seem to call the SpawnActor function because the classes of the actors are different
do i need to cast them to a generic Actor of some sort?
also - is there a blueprint way to create a repeating timer without having to define an event / function?
Nah you wanna just call spawn actor of class, and use the default scene root transform.
And you can use a timeline then call play from start off the finish pin but timer is more elegant and proper
Probably because it's an engine event and is only supposed to happen once. just make a custom event as the delegate
hmm - what exactly is the Event pin on the timer supposed to represent
is it invoking the event?
If you make a custom event it connect to that pin. Assigning it as the delegate event
Most often it's used with event dispatchers to listen for function calls
Hey guys , i wanted to make my game compatible with controller , i got it how i would do that and i applied the blueprint too but i cant find how to make the character walk when the analog is pushed halfway and then when pushed max then to the running / sprinting animation
how can that be done? i saw it in many games and find it pretty cool but i dont understand how to go on doing it
h
hmm im really not sure what i'm doing incorrectly
this isn't invoking at all
is there a way i can see the generated C++ code?
No. Plug event begin play straight into the timer by event.
Plug on spawn event straight into the spawn node.
Delete the call node
I would like to log with BP all effects added to a GAS, is that possible ?
hi
im having a hard time trying to let my zombies go true the object that blocks me
is there a way ?
thanks!
i'm trying to create a trigger that will destroy actors of a certain type that hit it
the problem is - the actors are being spawned
how do i pass a reference of the trigger to the spawned actors?
do i need to pass the reference to the spawner, then the spawner passes the reference to the spawned actors?
is there a better way to do this?
so the trigger filters for the overlapped object - and if it matches, then it performs the destroy?
exactly
can i delegate that to the overlapped object instead?
if it matches your filter on the trigger, you can execute a function on the overlapped object sure
it's way more intuitive and flexible to have the trigger basically doing the heavy lifting, with correct setup of the actor to overlap
rather than having to manage extra references for these tasks, what you do upon an overlap is up to you ๐
tried this to
an easier setup would be to change the object type of your enemies
or specific enemies at least, that way you can just ignore them through collision settings
you can add new types in your engine settings > collision
then assign them to the capsule of your zombie, and on the blocking object set the response to ignore
do you mean something like this?
(swift syntax - apologies)
struct Trigger {
func onCollide(Actor actor) {
if let actor = actor as? Filtered {
actor.perform()
}
}
}
}
protocol Filtered {
func perform()
}
struct OtherActor: Filtered {
func perform() {
emitParticles()
destroy()
}
}
on a blueprint level - how would this be done?
how would the other actors know what function to define?
thanks
oh - the actors can conform to a protocol themselves
i see
sorry haha haven't learnt C++ yet
thanks for walking through this with me! ๐
here?
Yep so there you have ObjectChannel which can be used to define new ones for your enemy/enemies ๐
nice really nice
are events like these always binded by default?
or do i need to explicitly assign a binding
e.g. on BeginPlay
I'd say try it out ๐ I don't do much blueprinting nowadays
can you show me some screenshots how you do it ? i got this popping up and scared to do something wrong xD
do you drop straight into code?
@chrome nymphThey're not 'bound'. They're a BlueprintImplementableEvent. They're called from C++ when Destroy is called on the actor.
There we go wise Authaer to the rescue ๐
context: taking a VR/AR game development undergrad module.
wondering if it's worth spending the time to learn blueprints or try to do everything in C++ directly.
(completely new to game dev, but have been doing iOS and web for several years)
Depends what your goal is
if you're new to game dev I dunno if it wouldn't be easier to not do VR
And if you've gota programming background
especially as a first project
You'll get away with Blueprint only before you get away with C++ only. Too much of the engine is glued together with Blueprint use. You can get around it, but the point there is that you're going around it. Hard coded assets that don't get updated when you move them in your content browser and such.
TLDR, Use both of you want to do things cleanly and easily.
gotcha, will stick to blueprints for now. thank you all ๐
unless you have a background as a programmer
heh not exactly a choice ๐
you'll spend more time figuring out why things are crashing than actually building a game
i'm taking two game dev modules this sem - one to make a VR game and another to make a 3D FPS >_<
former in UE and the latter in unity
maybe I'm showing my age but I will never understand the VR fad
Blueprints is way faster for newer people, until you got a grasp of the basics
the learning curve has been quite insane
Oof. I can't even imagine learning two different engines.
It's not too bad, they're fairly similar
learning two engines at once is not something I'd recommend
At least on a basic level
Dunno. Zero intention of learning Unity. ๐
from my (extremely) inital impressions - it seems like most indie devs gravitate towards unity whereas the pro shops rely on engines like UE more.
what are some of the main driving factors?
Skill floor being the main thing.
Just gunna suggest #industry-chat before this drags out
unity is more suited towards mobile development, unreal towards actual development
so if you're not doing mobile
Also, coding. People are scared shitless of C++. And being a programmer in UE4 requires C++.
I'd forget unity exists
Unity just caters to solo devs more. Also don't forget that it's been free a lot longer. Much more solo dev oriented community.
the "free" version of unity is pretty garbo
in fact the reason unity isn't great in general is because it is so barebones
everything you need is third party
so yeah depending on which way you want to go in development I'd recommend picking one engine and sticking with it
hmm, my teams have currently decided to use unity for both projects.
context:
VR = pingpong simulator.
3D FPS = movement based with time dilation as key idea (inverse of superhot - time moves slower the more you move)
we're all new to game dev in general - so we dont really have good matrices for deciding which engine
do y'all have any directions to share on what we should look further into before embarking dev?
hey what would be the best way to fucking get a pawn reference for the person who owns the player controller?
is it better to do 1 branch or no branch but 2 select nodes? I'm not sure if a select that uses a bool variable is equivalent to 1 branch.
as get player controller 0 only gets the first player/server
aside: why does the function get executed immediately after BeginPlay fires before the delay kicks in?
hii
Need better context. What pawn do you want a reference to?
stil having problemns with the collisions,m can i get some help while im sharing my screen ?
Initial start delay is 0
just the player that is being controlled by the player controller
that's literally it
GetControlledPawn
hi m8 , like to watch my screen to see what im doing wrong ? ๐
But you're in the pawn, why do you need to get it? O.o
increasing this to 0.01 or any value doesnt get the random delays to kick in
no like
in the thirdpersoncharacter
wait
no
uh
in the player controller sorry
How would I get the controlled player's pawn
GetControlledPawn
alright
but what if I want to get the person interacting with a widget
e.g if I wanted to get the person that is using a widget
like this doesnt work in a widget
Confusing naming calling Characters, States. But if you're in a widget, everything is local. So why doesn't GetPlayerCharacter work?
Which is the local player's controlled character.
Okay. Lets back up a minute.
You probably want two lines of execution. Beginplay should set timer. On Spawn should spawn. Don't have OnSpawn start its own timer, and don't have beginplay spawn the actor. Your execution lines (in white) in your screenshot has everything connected to everything, which is probably not desired.
If you call GetPlayerController(0) You will get the local player's controller. This is true on Clients and on a Listenserver.
On a dedicated server, it will just be the first player that joined in, which is irrelevant here as widgets don't exist on dedicated servers.
So if you call GetPlayerController/Character 0 on a button click, it will get the local player's character.
Regardless of machine
ah i misunderstood how the timers worked, thank you.
yeah ok @maiden wadi
It works, thanks a bunch ๐
this worked - the initial delay variance was being ignored if inital start delay was 0
van someone help me blocking me and let my zombie ai go true the blocking volume ?
can*
doing this for couple of houres now and im getting frustrated
Recommend reading this. But TLDR, make player capsule block a same channel the volume is, make AI ignore volume blocking channel
or use nav modifier volume with an absurde high travel/enter cost
Needs to keep player out. If it was for AI, that would work.
oh player, sorry did miss that part
Hey, does anyone know why this print wont run?
swap then0 and then1
you may break out of your loop before opening the gate (but this is just an assumption, as BP may behave different than code...)
Thanks but unfortunately didnt work lol
Chances are it's because your overlapping actor was not detected, or it does not have that interface.
I thought that but i put a print after then 1 before going in to open the gate, and that printed fine
well, he's querying the overlapping actors of the overlapping actor...
is this intended?
Then your input isn't enabled in that actor.
I had a print after that too which also printed lol
Uhh im not sure lol im trying to avoid casting to the player
all of this is in the player character
so the two characters are the same class
you may have opened the gate on the wrong character
add the character name to your debug messages
The characters aren't unique to eachother atm they're all the same class so the name would be the same for all of them
no
Im trying to do a revive system where they have to be in the overlap and press the input for it for it to work so the functionality is all running on the character, ive also tried being the downed player and pressing the input but the gate still doesn't open
they still have different names
If it was getting the wrong character wouldn't one of them work?
no it wouldn't
if you open the revive gate on the wrong one it won't be open if you hit the hotkey on the other character
hmmm.. so if it is calling the wrong character how could i make sure its getting the correct one?
im gonna try it now btw
you may just skip the whole for loop and check if "other actor" of the overlap event implements the interface
that would be too easy
why does ue automatically convert a get (ref) array into get (a copy) array
yea better go with get all actors and iterate over each of them and check if they overlap ๐
show code
i mean there aint anything when i try to make a node as get(a copy) from an array it says alert: modified node to copy node
where does the array come from?
It doesnt
can't help you if you don't show code
local variable? global variable? function return value?
Does anyone know why ai move to refuses to move to a location? It only moves to actors
bp local variable accessed by a function
I tried floats first and then a vector variable but nothing
this is all its showing, its a BP variable
Is that not what i did originally?
because "objects" are always references in some way
there's no point in having a reference on a reference
object references are always pointers
so if i wanted to modify that reference then?
if you modify "the copy" it affects the object if that's what you are curious about
and therefor everything that references to the object see's the change, too
no it doesnt, get as a copy returns a non mutable copy iirc
not in case of objects
well, it may create an copy of the pointer
end of day, it doesn't matter to you
Looking at the bp you posted, i dont think you want to get the overlapping actors of other actor, im pretty sure you want to know what this actor is overlapping, so wouldnt self be right and not other actor?
i think he doesn't even need to for loop over every overlapping actor for that action^
object references always return a pointer
get as ref is only relevant for special cases
I dunno. I would assume that for each overlap event, if it meets the criteria, it will open or close the gate. So i do agree.
yea closing the gate may require to check if he is still overlapping an valid actor
or keeping a list of them
but yea, that will be a fun journey if he struggles on the begin overlap ๐
Thats what i was thinking of doing... to store each overlapped actor in an array to manage checking if they are still overlapped or not. Dont think for loop is needed still either.
yea, i also prefer the list, probably faster than overlap checks for every overlapping thing
I find a lot of ppl forget about sphereOverlapActors which is a great one-off fire check. I remember a long time ago turning on and off my overlap... i was such a noob ๐
Correct lol
Okay so much to unpack i'm confused lmao if there's a better way to do it I'd rather do it that way but the overlap isn't always on cause its set to no collision until the player goes down, then once revived it turns off again.. but this array, how's best to set that up to store all overlapped actors and using it
keeping in mind that it only needs to be active while the player is down?
What else should i be keeping in mind about what your trying to do?
don't think about the array yet
you can't even figure out correct when the overlap is happening
have you tried skipping the for loop as suggested?
there are many better ways but I don't personally have 3 months of intensive tutoring to give you to make you understand what's a good way to do this
I do but I charge ๐
but can you do it in 3 months?
Give me 3 months and I'll let you know
Just like this?
Can you iterate through a struct? I am trying to create a dynamic table header.
yes
no. at least not in BP
Im more than happy to teach myself i just find it hard to find good resources on these types of things which also work for multiplayer, if you have any you recommend, send em my way ๐
Yeah didnt work lol
Mp as well? Oof
Oh yeah.. going in deep lmao
New to bp + mp = i stop helping
Thats the worst part.. im not even like new new to BP lmao just never touched overlaps until now -.-
You are new to it
multiplayer is its own beast in UE4. but look up OOP architecture and engross yourself in that for a year
sounds like fun
To put it another way. After making some sp games. Then mp is less of a steep hill. And when i say make sp games, i dont mean an sp tut.
it should, you got something else messed up, most likely your overlap event doesn't fire on your player
which is kinda pretty obvious if you only enable it if the character goes down
as it's only enabled for that one then, not the others which are running happy around
holy shit you're right if both player are downed the gate opens ๐
hello, how can i remove the moviment from player when certain animations are playing
?
Disable any move input events, like through a branch
Thank you haha!
disable/deactivate the character movement component
or set the movement mode to none, that may work, too
ok ty
how to start unreal without killing brain
Touch some real grass first.
if that means go outside i already did alot and i touched grass
Then start putting unreal grass in Unreal.
so add grass to a new project that seems simple
Also, pretty much get used to this feeling. You'll have it for a while.
until you stop feeling
Unreal online learning
Been at this over three years and I still feel overwhelmed. ๐
It would be more difficult if you have ADHD (which I suspect myself having mentally, due to juggling between project)
how can i made this but only if a animation is playing?
Why not use Play Montage node, as opposed to jerry rigged delay?
depends on how you play the animation
if it's part of your state machine you can have function callbacks which fire on enter/leaving the state iirc
how do i do that?
Hello, I have a fullscreen webview in my UMG, with transparent background to display stuff, but the issue is that even if there's nothing at a place in the webview, it still captures the click and prevent below items to be clicked, any way to prevent this?
how can i made when the attack1_far_idle is played my character lose his movement and 1.5sec after he will get him again. help pls been here for a day
been here for months, good luck
I like tasks for that. Simple UObjects that can live in an array. When called, do things. Play an array montage, set owner's movement component speed to 0. On montage completed, set movement speed back to what it should be.
make custom events in your animation blueprint, and put the name in the transition start/end depending on which edge it should trigger (may also work for the state itself instead of the transition, haven't checked it)
so one event to disable movement, and another to enable it
If multiple Actors are using the same material, is it possible to change the material instance of a single actor rather for all of them?
I have four actors all using same material, but I want to change the opacity of one of those actor's material
Not all of them
Create a dynamic material instance.
Then assign that instance to the character in question.
oh I see so treat the amterial as an object, then assign each actor a new instance of that object?
kind of yes
i would slap one more node between
but i cant recall it's name, what it does is giving you the real parent
like if you call it on a mesh which already has a DMI assigned, it will follow the chain to the real one
Ah, thank you. I'll try that!
Hey Guys, how you would create an Node System like the Unreal BP editor, Just simple like Connecting two Widgets that was created dynamically with an Arrow/Spline?
Thanks you Bro!, never heared about this
(and UEdGraph)
The function is being called
you aren't assigning the material to your mesh
There's a method called like "create and apply" (in c++ at least) might be one for bp as well?
No that was just me being dumb. I thought it would automatically apply.
if changed
Thank you though
What is this warning I'm getting? LogMaterial: Warning: MaterialInstanceDynamic /Engine/Transient.MaterialInstanceDynamic_1405 is not a valid parent for MaterialInstanceDynamic /Engine/Transient.MaterialInstanceDynamic_1406. Only Materials and MaterialInstanceConstants are valid parents for a material instance. Outer is /Engine/Transient
You can't make a MID from another MID
You have to use hte original material. I'm guessing.
does anyone here know something about arrays. I'm using a pickup to pickup an item. when it does. it looks threw the array for a match of Row names. If it DOES'T find 1 it makes a new entry. If it does find 1. It needs to update the Qty value in the array, Nothing I tried seems to work.
This gets the item from inventory
Set a local int var to -1. Look through the list of rows, if it you find the matching row index, store it. Then break the loop. If you have a row index (not -1) update the row, if you don't, add a new one.
Ok, I don't have an local Var value = -1. Sorry I don't under stand. Hold on as a Post my BP
And use bp breakpoints to check how it's going along the way
That part loops threw the data base for a match. If it finds 1. It breaks the loop.
and returns this info
The problem is your name comparison
You're comparing the row's display name against a new struct, so it's going to be blank
ok, how is that an issue. what am I doing wrong
Unless I'm misunderstanding that node - is it a variable that you've broken apart or osmething?
Last part is returns for findstack and does what it needs to do
This thing.
That gets the Rowname from the datatable. If it matchs the item that is pickup. and the max stack size is <= to the Qty in the Qty. It should find a match
Yeah, I get what you're doing, but what is that node, specifically?
Ok, again. That's the Item that was pickup.
See
The value of the Item was sent to the findstack from the pickup.
Alrighty. Then not sure!
I was going to show you a screen shot. Now I'm getting errors I never got before. So it makes no sense why I'm getting them now,.
Oh that could be the problem. You're returning the array index of the for loop into your return node, after the loop has ended.
That won't work.
Probably. It should be out of scope.
You mean this
Yeah.
Hmm, all it should return is the index of the fount item. That's all it should pass.
Why does findstack call get item from inventory?
It should just iterate over the inventory and return the slot/index and true if it finds a compatible slot with free space. Is your inventory an array of items or an array of item slots?
That is, do you have two structures in play or just one?
because it needs something to match it too. ??? your question makes no sense to me
Just read the look at the images.
2
this is my slot structure
The last 2 is the structure from a data table
Can you create a table using datatable dynamically?
Data tables are read-only at runtime.
I am looking and it looks fucked lol.
Is the input to Find Stack an item definition or a slot definition?
So I want to create a vendor where you can buy or sell stuffs? So what are my options?
The data table should be more like your master list of what type of items can exist.
That's just what is for
But the data table for wow would not include what a vendor is selling, but it would include every item that can exist in the game
Or use data assets maybe
Nope
However you do it, the list of stuff for sale at a vendor should just exist on their inventory component or whatever.
Well, you can create their base inventory in a data table, but then you'd have to manage anything else they may have in their inventory probably VIA save games. eg. The first time the player encounters the vendor it reads what they have from the datatable. If a player sells or buys anything, then you have to save the merchant's inventory contents into the save game, and any time the merchant is loaded in, you load their inventory from the save game instead.
....
"So the merchant's inventory contents into the save game"- Since datatable is readonly. I have to save the same format as a struct I suppose.
Yes
More likely an array of that struct.
I mean all a data table is is a bunch of structs
Ok thanks
You're going to want a way to save the contents of an inventory anyway, no need to treat the merchant as special
The merchant is just a thing that has an inventory and is willing to sell its contents
(or buy the player's contents ๐ )
A merchant should basically just be like a treasure chest with a little bit more brains.
I am trying to create more likely a trading post. Where players can buy and sell stuffs and only vendors can sell some stuffs as well?
That's fine. No reason to treat it special.
You'll want some sort of price/bid system
This runs when I pickup an item using the pickup master
from what I read, the set array elem should update that Qty value
@true valve Trading Post would have a regular inventory component but have special rules for the transactions.
Or maybe every transaction in the game has a cost and looting is just transactions with no cost. That's how I'd do it. Then you can use the same system for looting, trading between players, giving specific items for recipes, crafting, everything. Just the definition of a transaction includes what trades hands in both directions
If you're getting these errors, the code you have in your pickup master you're showing likely won't work at all.
It's telling you that the value for "Inventory Component" is not defined. So it doesn't know what inventory component to find the stack on, set the array element on, or add to the array on.
Crafting an iron bar might just be a transaction where you give 10 iron ore, and the crafting station gives one iron bar
I thought of the system already. I needed help with the implementation, especially storing and reading data. The struct that I used to create my datatable I suppose I can use the same struct to save and load.
Your inventory component should already be operating with that same struct. You just need a way to save the state of inventory components and you are golden
If you mean this, then all you've done is add an inventory component to PickupMaster. Any changes you are doing to the InventoryComponent on the PickupMaster will only happen on the PickupMaster - and you are immediately destroying the PickupMaster after performing the operations you've shown.
if the intention is to update the player's inventory (and subsequently display it in your UI) then you likely need to be changing the Player's InventoryComponent, not PickupMaster's inventory component.
I only have 1 inventory component
Your character or Pawn doesn't have an inventory component?
what makes me made is that I didn't get those errors before.
Yes. the inventory component is added to the Char
You understand that components can be instanced, just like any other actor? Like.... This pickupmaster can have an inventorycomponent attached to it, I can have an inventory attached to my character, you can have an inventory attached to your character.
Your pickup logic should exist inside the component or in the character, not really on the pickup actor. You really ought to back up and make sure you understand what you're doing
What you're showing here is you've attached an inventory component to PickupMaster
This is how I had it before. I use an interface for it
I don't get it. I never gone these errors before. and the inventory system stopped working
I don't get it
Ok, that looks more like it.... Can you show where on your player you're sending the "Pickup Interaction" message?
That's it above. or are you asking about the line trace. That's what I use.
Where you do the line trace, sure. I'm guessing where you press E or whatever to initiate the pickup.
Ok so if you have your interaction event on your pickupmaster set up like this, can you try it right now and then screenshot any errors you are receiving?
ok, can you take a screenshot of the left side of ThirdPersonCharacter Like this:
Make sure all variables are showing as well (if they have any categories)
Need the bit that is usually to the left side of that graph, where it shows the components, functions, variables. Should look similar to what I just posted.
This makes no sense at all, now it's working and I didn't do anything
That's what it should do
Logs have a max stack size of 5
Run it like 10 times
God I hate it when something works perfectly in theory, but will fail one in every 10-20 times randomly
Btw, is there a reason you start the linetrace ahead of the players head? Surely that would only create problems when too close to something?
That I couldn't tell you I saw so many videos on it. everyone has there own way of doing things. and this is what I have and has worked before. @dawn gazelle This is what happens. I can pickup the 1st 5 for the 1st stack. then I try and pickup up more.Then I get all the errors again and the inventory widget won't open any more
Perhaps you're accidentally deleting the inventorycomponent of your player somewhere?
That would be the only thing that makes sense if you're getting errors with both picking up and your UI
Not that I know of. This is the only destroy actor I have so far.
it destroys the item I'm picking up
Does it always happen after picking up 5 items?
Like... what happens if you pick up 1 item, wait like a minute, then try picking up another?
It does now. remember I couldn't get it to work at all.
I pickup the 1st items
I just tried to pick up item 4 and I got the errors again and the widget won't open.
???
same thing, I pickup 4 logs and when I pickup the 5th log. is when the widget won't open again and I exit and I get all those errors. I'm stump
I need a better inventory system that slots based and that works.
well it seems to have a mind of it's own, it stopped working like it did a few minutes ago
now I'm thing UE4 is unstable
How many items are available to pick up?
I'm back to 1 now, when I was able to pickup 4.
before the inventory widget won't open and when I exited the game I got the inventory component errors
What happens if you do not destroy the item you pick up?
idk, I can try it
Yeah, let's just see what happens.
that's is many as I can get in the stack, The stack size is 5.
if I try and pickup number 5. The inventory widget won't open and I get all of the inventory component errors
So you can pick up to 4 items now again?
how can i made when the attack1_far_idle is played my character lose his movement and 1.5sec after he will get him again
Yes
Animation notifies on entry and exit of the state
why would that matter what size it is, The max stack size for logs is 5
OK, well, I'm sure you will try different things to get it to work.
well I'm out of ideas like everyone else is. No one has any idea why this doesn't work and it should work.
Yeah, that's why you need to try different things.
i dont know to do that can you explain pls
If you come up with any ideas let me know
I'm not at my computer so I can't really grab the details. But you can fire off events from state machines. I think if you click on the state and view the details panel it will have some events in there. Those events can be used in your event graph and so you can run logic when entering / exiting a state, which is what you want
That's what I used. I normally create a "Finished" event when the animation is finished.
That's what I use*
Any idea why camera shakes dont blend out properly when theyre stopped?
There are hitches at the end
When I go to stop moving
how do i create a behavior tree?
In this presentation, Epic's Paulo Souza uses Unreal Engine's built-in AI features to build smart enemy behaviors for a game with stealth-like mechanics.
By relying on the Gameplay Framework in Unreal, we're able to quickly create convincing AI using Behavior Trees. Behavior Trees are great for creating complex AI that can be presented in a way...
i did that tutorial yesterday 
and it don't work for me
halp
it's been so long that I honestly dont remember what's in the tut
it's just a super basic AI
and it worked yesterday
then i saved
then i opened it today
broken 
all i got is
this bt
actually nvm
not even that
i know where the problem lies
this doesn't fire 
I think I can rephrase what I just read:
It worked yesterday
*I did something that broke it without realizing
I saved
It doesnt work today lol.
I'm being snarky cuz BTs for me have been very finicky, super touchy to things you do even outside of them
Hello, I'm using a decal to draw a circle around an object for selection indication. Is there some way to disable the shadow affecting the decal only?
maybe 
still tho
set the decal to emission
if you run your game you should see the yellow pins firing on the BT, are you saying the hasTarget key never gets set?
did i do something wrong here?
yea it never gets set because OnTargetPerceptionUpdated doesn't fire
like the PrintString doesn't fire
and because of that it just does this
like this? It just makes the decal disappear entirely.
no this
is your class default on the AI set to the right BT? Does your actor that has the AI on it have the right AI in the world settings?
Great that works. Thank you!
does that event begin play fire?
yep
and even if it wouldn't
The BT doesn't even matter right now
All i want is the AI perception to fire
everything else seems to work
right, I was asking because you can set the AI class in the actual world to be different than what you have in actor defaults
oh i see
so that would show if you had done that
on your NPCActor what are the settings on your perceptioncomponent
AIPerceptionStimuliSource
I do not have that component on my player, it's on my npc
wut? But why?
because you want your boss to be seen?
because you're registering senses through that component to the npc
it's been an actual year since I touched it, so I'm probably wrong, but this is how sight works in my setup
the NPC
gets the "AIPerception"
Which gets the sense "Sight"
And whoever the AI is supposed to see
Gets the stimuli
so it's registered to be seen
That's correct Joby.
I can only say that's not how I did it, and since it works in mine I would suggest watching that specific part of the tut above to get the right answer
Make sure your AIPerception is registered on your AI controller:
And on your character make sure the stimulus is configured:
and i gave it to the npc character
Your dominant sense was set to none in your first screen shot, don't know if that would cause what you see
tried it to none or see - didn't change anything 
oh uh, wild shot in the dark
if you did something that broke a nav mesh you should try recreating it
I think the behavior I see is usually that Nav mesh will kill my AI when broken, but that might just be a function of my logic
so even if it looks good, kill it and remake
Just put your AI through some training and it'll figure it out on its own.

"My AI doesn't work" "Okay well time for some neural net work then"
that was a good laugh Dat
Have you tried debugging your sense with the ' key invame?
You can press ' and then press 4 to visualise
yup
Whats happening there
