#blueprint

402296 messages ยท Page 766 of 403

brazen merlin
#

they exist, they are tools, but the have their places - it depends

gentle urchin
#

There's only hit result under cursor.. wouldnt think it accumulates

paper galleon
#

And I'll pick a trace because I like micro optimizations

odd ember
#

well maybe it's particularly expensive for where you are

#

I can't tell

#

you have to look into that yourself

brazen merlin
gentle urchin
#

Surely. Checking here first can make sense if it's something common tho. Before wasting any time on it

brazen merlin
#

also no noticeable frame difference

odd ember
#

don't waste people's time by seeing if your case is unique to you

#

which 90% of the time it is

#

especially when it comes to performance

gentle urchin
#

Hurts even more when you're right lol

#

AMD chill was on.

#

as Conrad said, breathing

austere dome
#

is there a way to only call finished on Play and not reverse?

#

or have Finished check if it's from a play or a reverse?

brazen merlin
austere dome
#

ty!

#

yep that worked.

celest oar
#

when i try to cast a string to float its rounding down the number, is it suposed to be that way?

#

for example when it casts it goes from 18.45 to 18.00

#

any way to keep the original number? this is a bit odd ive never encountered this

gentle urchin
#

Multiply string value by amount of accuracy, convert to float and divide on the same amount? Sounds pretty bad tho. 100 for 2 decimal places

#

Or parse the string and do it that way..

#

Still alot of nodes

brazen merlin
#

is there a checkbox for the convert?

celest oar
#

i thought about parsing the string but my issue is why the heck is it doing that

#

its just a regular convert node

brazen merlin
#

i dont really do string to float or string any number, but there's a numeric optoin

gentle urchin
#

Sounds odd that it does it. Is the decimal noted correctly? , vs .?

brazen merlin
#

i think im thinking of the tolerance for floats with vector conversions...

celest oar
#

i ended up replacing the comma for a dot with a replace node and it worked fine

gentle urchin
#

๐Ÿ˜… devils in the detail

celest oar
#

indeed

#

conversions dont like commas that much i guess

brazen merlin
celest oar
#

i have no idea

#

i didnt even know we had a convention for that hahah

brazen merlin
#

i thought european contries tend use comma the way america uses periods, specifically regarding number values, like dollar.cents

short anvil
#

Hi. If anyone remembers Dark Project (Thief) 1 + 2 there the interactable objects always were a bit brighter when they where highlighted. I want to recreate the effect, but I don't know what's the easiest or at least any way to do that. I could get the static mesh, get its materials, do something with it and reverse that, when the player is not aiming at the object anymore, but that seems quite complicated. I also saw that there are material functions and material layer blends etc. but I don't know if that's the right approach. Can someone guide me to a source of inspiration?

brazen merlin
#

back then, id imagine something along the lines of a panner, masked by fresnel

short anvil
brazen merlin
#

the texture it pans would mostly be dark, with a simple white beam across it

short anvil
# brazen merlin trip!

Also a great source of bugs, because most programming languages assume english/american conventions ๐Ÿ˜‰

brazen merlin
celest oar
brazen merlin
celest oar
#

i never played thief so i dunno

#

just trying to help lol

brazen merlin
#

oh shit, no ur right, going up to a picture, it will glow that sort of dealio

short anvil
celest oar
#

i have no idea man, i dont deal with materials often but im 100% sure theres a node that can change material proprieties on the fly

#

cause ive done it before

brazen merlin
#

it would be a frensel so it doesn't look flat, plug that into a lerp, have a param for the lerp, that is what you control in blueprint to turn off and on

celest oar
#

if u want brightness in the material u can just add a var in the mateiral and multiplye it by the emissive or specular or difuse

brazen merlin
#

could also use staticbool param, but lerps are the og way

#

plug that all into emissive ideally

maiden wadi
#

Trace, save reference, do material thing. Trace, hit nothing, set old reference material to normal, ditch reference.

short anvil
#

Okay, I'll go read the docs on materials a bit, I don't even know how to set vars on materials. I also thought I could deal with the material non destructive, because it will be overwritten the next time I do a blender export, but if that's the way I'll figure something out ๐Ÿ‘

brazen merlin
brazen merlin
#

you'd also need to work with making dynamic material instances, which seems to be a running trend these last few days

short anvil
#

k, still I need to dive in a bit into how unreal materials work. So far the blender exporter did all the work.^^

brazen merlin
maiden wadi
#

Tosses?

brazen merlin
short anvil
brazen merlin
maiden wadi
#

Oh. ๐Ÿ˜„

short anvil
brazen merlin
#

not for unreal, not for unity, nothin

odd ember
#

isn't this the blueprint channel?

brazen merlin
short anvil
gusty shuttle
#

Speaking about logic, I have a typical issue most people have and for the life of me I can't solve it haha. I'm in UMG if anyone is interested in lending a hand haha

short anvil
#

I got it working, but can I do this without duplication? I already messed up the first time, because I misspelled the parameter name in the copy ๐Ÿ™ˆ

#

This is how it looks ๐ŸŽ‰

odd ember
static charm
#

you can use the bool to select a value instead, and that value plugs into one node

short anvil
short anvil
static charm
#

search for node Select Float

short anvil
#

yes, perfect, that also got rid of the branch. Thank you!

static charm
#

yup, although for future reference, when using the different Select nodes, everything connected to Select will be computed.

#

this is not an issue for you now, but down the road, Branch can be more performant, even though it's less organized.

#

(for example if you had complex math connected to the Select node)

short anvil
#

Okay, but in this case in the previous version did exactly the same thing happened anyway, so there is no difference here?

static charm
#

no difference here correct

short anvil
#

For example when the else-case involved doing nothing and I'd fake that case by sending a zero value in a complex math function then it would be far more performant to use branch. That's what you mean, right?

static charm
#

yup

odd ember
#

it'd be far more performant to set the float directly, no branch

short anvil
odd ember
static charm
#

not sure what you mean, i was just typing to warn/describe the pitfall of using a Select node when connected to heavy math or functions.

gentle urchin
#

Swap the input to float

#

Remove the branch

static charm
#

he's already done with it lol

gentle urchin
#

Adjust the float during function call :p

odd ember
#

yep

short anvil
#

looks like this now

gentle urchin
#

Or branch -> set local float -> plug into set scalar

#

No doubt this works fine tho^^

short anvil
#

yeah, but then I'd have to introduce a variable ๐Ÿ˜ฉ ๐Ÿ˜‰

gentle urchin
#

Local scope so no biggie ๐Ÿ˜…

#

I agree with the caller not having to worry about the value tho! Now you can do adjustments and keep the calling exactly the same

sonic crow
#

i am trying to spawn an object infront of my character

sonic crow
gentle urchin
#

Get actor loc + (get actor forward * distance(float))

odd ember
#

just to be clear it's not the distance node

#

forward vect * float is a distance

sonic crow
#

thanks a million it is working! ๐Ÿ™‚

pale blade
#

UE Editor keeps on crashing regularly when I try to save, why?
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address

odd ember
#

sounds like a corrupt asset maybe, unless it's something editor related

pale blade
#

I don't know if it's related but I've been working with structs a lot more
And I change the structs around and edit the BPs that use the struct, then save, then it crashes

brazen merlin
pale blade
#

I'll try the fix up redirectors, hopefully it won't keep crashing again

brazen merlin
#

resave all is important, moreso than redirects in this case

sonic crow
#

This is a tricky one, i have been messing with it for days, I am trying to change my navigation to a keyboard and or a gamepad whilst still keeping the constraints of my grid, ideally i would like to limit movement to 4 direction (north, south, east, west). The current setup works perfectly for a cursor and mouse, but i would like to limit it to a d-pad or (A,S,D,W)

odd ember
#

select node based on the orientation of the player character

#

or I'm not sure you can do just one node for that

#

which is a bit of a pain in the ass

#

can you show where the camera is in relation to the player character?

odd ember
#

sexy

#

is the camera ever rotating?

upbeat moss
sonic crow
odd ember
#

okay but specifically rotation

sonic crow
odd ember
#

get the camera's forward vector and the character's forward vector, do a dot product on them

#

actually let me draw up what I think will work

#

@sonic crow use this when you add direction

#

the top one for forward/backward

#

bottom for left/right

gentle urchin
#

This worked for 8 directions

odd ember
#

ah fk the bottom one should be 1/-1 on Y

sonic crow
#

ty will read and try it now

dusk cave
#

I need help getting my AI to change roles from being "It" to not It and vice versa within the same blueprint. How would I do that?

ivory adder
#

how do I change an animation in blueprint

#

I read that you can use anim instense class but i sont have a class

odd ember
dusk cave
#

This is how I decide who is It first

brazen merlin
ivory adder
#

???

odd ember
brazen merlin
odd ember
#

on begin play, you can have the AI each register themselves to the gamemode as "players"

ivory adder
#

What do you mean?

odd ember
#

once a player threshold has been reached, you can pick a random "player" to be "it"

brazen merlin
odd ember
#

I'm addressing both

ivory adder
#

Ok and? What do I do to get the animation to play?

#

huh

#

what

odd ember
#

in your event hit logic, you can call on the game mode to say that an AI has been registered as "it" on hit. the game mode then ensures nobody else is "it"

ivory adder
#

i dont know what to put in the class input

odd ember
dusk cave
#

@odd ember could u show me how I'd could go about it

odd ember
#

I just told you

ivory adder
#

what class input

brazen merlin
ivory adder
#

im lost

gentle urchin
#

Wouldnt only (it) be able to hit anyways? So no reason to check ?

#

If hit -> transfer it

ivory adder
#

i just want to switch my player model and have the animation switch too

brazen merlin
brazen merlin
gentle urchin
ivory adder
brazen merlin
odd ember
ivory adder
#

not what i need

gentle urchin
odd ember
#

almost as if you get what you give

glass stump
#

is it possible to have independent enemy units that are able to make a formation? if so, can anyone set me on the path of how to do this? thanks.

odd ember
#

sounds like something an AI director would handle potentially

glass stump
#

Ah, thank you! :)

sonic crow
#

@odd ember I tried your approach but I dropped the ball, should I be doing this in top down controller or top down character and i also noticed by my relative input location the character movement creates a new target and does not take infor from the character itself

odd ember
#

but also, if you're doing this from keyboard and mouse

#

you should be using InputAxis

#

not MoveTo

#

you're not actually getting a location from those values, you're getting a direction

dusk cave
#

@odd ember I have the level select a random actor and I put it inside a actor variable. How do I get a reference to that variable from another blueprint?

odd ember
dusk cave
#

yea I have that in the game mode sorry I meant gamemode not level

odd ember
#

you can always use GetGameMode and cast to your specific gamemode

#

so on beginplay for your AI actors you want to GetGameMode > CastTo<YourGameMode> > RegisterAIAsPlayer(self)

sonic crow
# odd ember I did say the one at the bottom should be Y, not X

i made the correction, however I am not sure what I am missing I am currently guessing because you cant use input axis at the end where I had moveTo, and it seems i need to have a branch for both input axis right and input axis forward to work, weird how difficult this is compared to a normal controller setup. I am pretty sure I am doing things very wrong and probably starting to make guesses with nodes in the wrong direction

dusk cave
#

Is RegisterAIAsPlayer(Self) a node?

odd ember
#

no gating, no conversion nothing else

odd ember
odd ember
#

also you're using the forward vector with the MoveRight input

#

you need to use forward with forward and right with right

dusk cave
#

By registering the AI as Player, do u mean putting them into an Array called Players?

odd ember
#

something like that

#

but wrap it in a function

#

so that if you need to do more than just adding them to an array, you can just change the function

#

for instance, you might want to bind an event per registered AI to call when they get tagged

dusk cave
#

This is my Gamemode Bp

odd ember
#

but also, the array should be an array variable internally

sonic crow
#

I appreciate the help, did what you said, still not working wondering if i missed something

odd ember
#

RegisterAIAsPlayer is not for the gamemode, it's for use in the AI blueprint

odd ember
#

none of this needs to happen on tick

odd ember
dusk cave
#

like this?

sonic crow
odd ember
odd ember
dusk cave
#

yea it is

odd ember
#

you need a parameter for the RegisterAIAsPlayer

odd ember
#

then inside the function, you're not having random things happen, you're adding an AI to an array

#

you're not doing anything else with the array inside that function

dusk cave
odd ember
#

you added a return value

#

you need a parameter

#

apparently they are called inputs in BP

#

for whatever reason

#

anyway you need one of those

dusk cave
#

so was this correct or no?

#

I just need to add an input parameter?

odd ember
#

also try and keep each function to do exactly what it is called. If you're registering an AI, you're not doing random things, you're not doing anything else but registering an AI

odd ember
bronze elk
#

Hi guys am learning how to use blue prints. Question lets say I have an OptionsMenu button and I click it, how do I give it a delay before it goes to the options screen?

dusk cave
#

oh ok

dusk cave
#

theres a node called delay

#

@odd ember can u explain the steps again? I'm getting confused. So on my gamemode, I make a function to put actors in a array. I will call that function into my AI Bp. In my AI BP, I will have another function that will take a actor from the other function and I will make it my It player?

odd ember
#

does that make sense?

dusk cave
#

yea i think i got it

bronze elk
#

is there a way to export like a prototype of a UI menu? so people can try it out

odd ember
#

additionally, in another function, at the beginning of the game, once enough players have been registered, a random player can be chosen to be "it" out of the array of players that the game mode has

sonic crow
#

how do you change hit result under cursor by channel to my character movement, what do I connect to break hit result

odd ember
sonic crow
# odd ember that sentence doesn't make sense. what are you trying to do

apologies, I am still using the topdown default template in ue4, thanks to you i managed to create movement with (ASDW), before I did this I added a procedural grid that forced my character to always step in the center of the square boxes by using the (Get Hit Result Under Cursor by Channel) I want this effect but with (ASDW)

odd ember
#

ok first

#

these are two different ways of controlling inputs

#

so you have to think in two different ways about them

#

you can't conflate one way of doing things with the other

#

each needs its own solution

#

how are you setting up the procedural grid?

sonic crow
#

I used geometry method that is extremely light weight

odd ember
#

okay

#

how are you finding the middle of the node from the mouse click?

sonic crow
#

in short, i spawn the procedural grid, when using the mouse you click on the tile you want and it moves to that tile, to get it perfectly in the middle you need to make your collision box extremely thin

odd ember
#

it might require some rework to make it happen, unless the grid itself has a way to get this

#

like GetSurroundingTiles

#

or something

sonic crow
#

i think i can get surrounding tiles if so how would i go about it

odd ember
#

you might have to do something like LocationToTile(ActorLocation)

#

and get tiles around it

#

once you have the tiles you can use SetSelectedTile based on movement input

#

so if you have an array of surrounding tiles, it'll look something like this

array values:
[
0, 1, 2,
3, 4, 5,
6, 7, 8
]
#

it's not a given it'll be exactly that, but it will be something like that

#

so knowing that, you can e.g. use SetSelectedTile to be 1 for forward, 5 for right etc.

sonic crow
#

thanks i will give it go,

dusk cave
#

@odd ember does ur method work if I am using one AI Behavior tree?

#

how do I tell that random AI to use the It role?

odd ember
#

it'll work regardless of anything, it's not tied to anything

#

which is how code should work

dusk cave
#

ok well lemme show u what i hve now

#

So this is inside my AI BP. This registers the AI into the Array.

#

This is how they are added into the array.

odd ember
#

yep

#

correct

dusk cave
#

The level calls random

#

gamemode i mean

#

heres the function

odd ember
#

yep looks fine

dusk cave
#

ok cool

odd ember
#

one thing to keep in mind

#

you might want to be polling for players to trickle in

#

you don't when or how many AI will register how quickly

dusk cave
#

well im just dragging the AI into the level

odd ember
#

right but the registering happens at game time

#

not at editor time

dusk cave
#

ok so what do u mean by polling

odd ember
#

so what I would consider doing is

#

create a delegate called OnPlayerRegistered on the gamemode

winged sentinel
#

@odd ember I beleive you helped me with some ideas the other day i had one more question, I have some sort of system where my character will get the nearest marker and "attach" (linetrace) to it. I am able to get the distance to each one which is great. My question is tho, how to i calculate percentage of the level complete, its a bit difficult to figure out

bronze elk
#

how come when i play my game it has a different screen size from design editor?

winged sentinel
#

sorry didnt mean to interupt

dusk cave
#

its ok

odd ember
# dusk cave ok so what do u mean by polling

polling as a general concept means that an entity is sitting and waiting until something else has happened. so for instance, when doing multiplayer games, when you join a server, if it has just started, you'll be placed in a "waiting room" until more players arrive. the server is "polling" until a number of players are ready. in your case, you can do it a little bit different, which is better

odd ember
#

then on beginplay, Bind the delegate to an event or function of your choice. you can then set a threshold for when you want to set the game to start running

#

it is at this point you will want to use your random function

#

otherwise if you random too quickly you might just pick the first AI to be "it", always

dusk cave
#

okay ill try to figure that out

odd ember
#

just to be clear, the threshold would be a value of how many players you would want registered before the game begins

#

it's up to you to decide what value that should be

#

you can compare the threshold with Players.Length

dusk cave
#

do I need to code to do this?

#

I've never used delegates

odd ember
#

it's just another variable type in blueprint

odd ember
dusk cave
#

like this?

odd ember
odd ember
#

an event dispatcher variable

dusk cave
#

oh ok

odd ember
# dusk cave

you really want to call it something more relevant to what you're doing

#

e.g. PlayerRegistered

dusk cave
#

ok i did

slate hound
#

I have an axis input on Gamepad Left Y-Axis that a player controller is using named MenuUpDown
I have another axis input on Gamepad Left Y-Axis that a pawn is using named ForwardBackward
One controls the menu when the menu is visible and the other controls the pawn when the menu isn't visible
The problem being the ForwardBackward input is not receiving any axis value unless I remove the MenuUpDown from the player controller
How do I make this work?

dusk cave
#

would it make more sense to put it at the end then

slate hound
#

the Consume Input and Override parent binding are both disabled on the player controller inputs

odd ember
odd ember
winged sentinel
slate hound
#

This is for VR, the UI is a 3D Widget

odd ember
slate hound
#

the widget works though it's the forward/backward that isn't working

dusk cave
#

ok done. but i still dont understand how id tell the random actor to be it. It was easier for me to do use a bool inside of my Bp AI and reference my blackboard key.

slate hound
#

There's just something I don't understand about Inputs

dusk cave
#

I only have one AI Bp btw

odd ember
dusk cave
#

ok just showing u my becomeit

odd ember
#

that's on the AI yes?

dusk cave
#

yea

odd ember
#

now, since you have all the AIs referenced in the game mode, from the random pin, you can call BecomeIt

dusk cave
#

yep i did

odd ember
#

that's it

dusk cave
#

does it need a parameter

odd ember
#

if you create a boolean parameter, you can use it to set who is "it", but also who is not it. you should ensure that nobody else is "it". so what I would do is: get the random AI that you have picked for "it", save it into a variable, then use a ForEachLoop to loop over the array of players and use BecomeIt(false) on each one. on the loop's completion, set BecomeIt(true) on the AI you saved out in the beginning

dusk cave
#

Is my gamemode set up right? It didn't work

dusk cave
#

not yet will go for it

#

the loop is attached to my gamemodes begin play?

odd ember
#

your random function hasn't delivered

#

until it does this

dusk cave
#

okay and what did u mean by using BecomeIt true and false? I make a bool parameter for Become it then call BecomeIt inside the Random function?

odd ember
#

correct

slate hound
dusk cave
#

not sure if im doing this right

odd ember
#

you shouldn't have a return mid loop

#

at least not in this case

dusk cave
#

so only have it attached to become it true or take it out?

odd ember
winged sentinel
odd ember
brazen merlin
winged sentinel
odd ember
dusk cave
#

how do I use it? The variable is holding the random actor

#

i have to cast to the ai bp

odd ember
#

how have you used variables so far?

dusk cave
#

i know how to use it but i don't know understand what u want me to do with it.

odd ember
#

I told you

dusk cave
#

like this?

odd ember
#

yeah but now your loop isn't functional

dusk cave
#

okay i attached the target to the As BP My AI

odd ember
#

did you do the polling event we spoke about?

dusk cave
#

if u mean create the event dispatcher, i did

odd ember
#

did you bind the dispatcher to an event or function?

dusk cave
#

no what do i bind the dispatcher to

odd ember
#

... an event or function

dusk cave
#

I'm lost. I don't understand how to use it.

odd ember
#

when you drag it out

#

do you get the bind option?

dusk cave
#

yes

odd ember
#

so you have your bind node

dusk cave
#

i binded it to event beginplay

#

but i dont know what target to set it to

odd ember
#

show me what you did

dusk cave
#

oh forget the last two nodes

#

i deleted those

odd ember
# dusk cave

so you obviously don't want to bind it to beginplay, which is why it's complaining

#

you want to bind it to a new event

#

you can use the CreateEvent node

#

to hook into

sonic crow
#

MY solution does not feel right or work properly with a controller, i am trying to limit my character to moveing only in four directions, i dont want diagonal movement how do i do it?

dusk cave
odd ember
dusk cave
#

i just chose it. i didnt know what to put in there

odd ember
#

you're binding an event to whenever a new player is registered

#

so that event gets called every time a new player registers

#

this makes it your polling method

#

now you can consider how many players you want registered before you want to start the game

dusk cave
#

do i keep call player registerd in the function

#

im getting an error that says infinite loop

odd ember
#

...yes

#

that's because you've still bound it to your begin play function

#

create a new function

#

and pick it from the list of options in the CreateEvent node

#

that way you won't have an infinite loop

sonic crow
#

apologies here is a closer snap shot, this technically works but not well enough on a controller/gamepad

unreal quail
#

what's the best way to have a for each loop with a delay?

#

I can think of a few ways but I don't know which is best (or works)

odd ember
odd ember
unreal quail
#

how do I iterate through an array with a delay in between each iteration

odd ember
#

a timer, perhaps

dusk cave
odd ember
# dusk cave

so in that function, you can setup a branch that checks the player array's length against an Integer value of your choice called Threshold

#

on the true end of that branch, use the SetRandomPlayerAsTheIt function

#

instead of on begin play

sonic crow
odd ember
#

get gates out of your head

odd ember
dusk cave
#

@odd ember i need to take a break and switch to a different project. can u help me again tomorrow?

odd ember
#

can't guarantee anything. but you're almost there.

#

if you do what I said you'll have a fully functioning setup

dusk cave
#

ok hang on

sonic crow
odd ember
unreal quail
#

what was that neat way of doing formatted text in blueprint again? I'm trying to do a printf without it being too much of a hassle

odd ember
#

invert the condition for MoveRight

unreal quail
#

I can't find it anymore

unreal quail
#

nvm I found it

#

it's FormatText

#

buildstring would also work

sonic crow
odd ember
#

the logic I gave you is exactly that

#

you're basically not executing one while the other is active

#

if you instead want to get rid of the branch, you can use a Select Float node instead

#

and set it to the same

dusk cave
#

like this?

sonic crow
#

thank you, not sure why you doing this but really appreciate you being here

odd ember
# dusk cave

yes. make sure that's the function you've bound to the PlayerRegistered delegate

dusk cave
odd ember
#

you just need the binding

dusk cave
#

ok

odd ember
#

the random is already being done under the correct conditions in Poll()

dusk cave
#

right

odd ember
#

I assume you've set Threshold to be more than 0?

dusk cave
#

yea

#

i set it to 2 since I have 2 AI actors in the level atm

odd ember
#

that's it then

dusk cave
#

ok so one actor did become it but i got an error with this

odd ember
#

what's the error

dusk cave
#

accessed none trying to read k2node_dynamiccast_AsBP_My_AI

#

the node thats selected in the picture

odd ember
#

you need to use the loop for the BecomeIt(false)

dawn gazelle
odd ember
#

so you need another cast node

dusk cave
#

@odd ember but u told me that i didnt need to cast constantly

odd ember
dusk cave
#

players is an array tho

odd ember
#

yes, but even an array is an array of types

dusk cave
odd ember
#

you can have arrays of floats, vectors, actors, objects etc.

dusk cave
#

yea players is an array of objects

#

actors

odd ember
#

so you could change that to be an array of your AI class type

#

then you wouldn't need to cast

#

but for now

#

just remove the execution path in the loop body

#

that goes into the second cast node

#

from BecomeIt(false)

#

the body of the loop is separate from when it completes

dusk cave
odd ember
#

now you're not executing the loop body

#

the end of the loop body, cut that execution

#

you're already execution the rest on completion

dusk cave
#

oh ok

#

u mean the execution node at the become it false?

#

rn both of my players are set to being "It"

#

hang ong

#

like this right?

#

ok so i have one player as It and one as not It

odd ember
#

no

dusk cave
#

oh

odd ember
#

cut the wire from the loop body

#

the loop body keeps looping

dusk cave
#

so dont attach it to anything?

odd ember
#

correct

dusk cave
#

ok just making sure

#

yes?

#

both of my players are It

sonic crow
#

how does one move objects that are placed in the world without physics, to a specific increment distance from character facing (like a push effect)

odd ember
# dusk cave

this should be correct. only whichever player you picked should be it. what is your threshold value set to? because if it's set to 1, this is what would happen

dusk cave
#

2

#

are u sure i dont need the becomeit false to be attached to anything?

odd ember
#

yes

#

the loop body is different from its completion

dusk cave
#

oh ok

odd ember
dusk cave
#

@odd ember what could cause both players to be it

odd ember
#

are they both it consistently?

dusk cave
#

yes

#

we didnt set it up so they'd wont be it

#

i mean the tagging

odd ember
#

ah

dusk cave
#

only when the game starts

odd ember
#

I forgot about the tags

#

in your BecomeIt() function, make sure you update the tags correctly

dusk cave
#

no i didnt mean that tag i mean like tagging a player in the game

#

@odd ember I need to work on another assignment with someone in unity. if u can help me tomorrow, that'd be great or i'll try to figure it out.

odd ember
#

no promises and don't tag me. but just post in here and there'll be other people who can help you out as well if I'm not here

dusk cave
#

ok

#

thanks for the help i really appreciate it

#

so to end off

#

lets say I get it working right

#

what would be the next steps for me to get the tag working

odd ember
# dusk cave lets say I get it working right

I think the tag is the issue you're seeing. under the hood, there is probably just one "it". in your AI's BecomeIt() function, you need to ensure that your boolean parameter propagates the tags correctly

dusk cave
#

which tag are u referring to

#

the Actor tag or tagging in the game

odd ember
#

you'll need a few extra functions but they're basic

round shale
#

is there a way to make pawnsensing able to sense through geometry?

dusk cave
#

But we didnt use tags in BecomeIt. We used a bool. You mean the blackboard key?

lime pelican
#

If I want to make an actor always spawn on the surface, do I line trace and set location or is there an easier way?

brazen merlin
lime pelican
#

I want to spawn a box damage volume actor on the character's feet and get actor location is not near the feet

#

I see a getactorfeetlocation but I'm not sure if its exposed to blueprint

brazen merlin
lime pelican
#

thanks!

storm vigil
#

Hi. I am starting to make use of timers to some logic of my game that was previously using TICK. May I ask if the delta seconds on the tick and get world delta seconds are the same? I need the get world delta seconds to smooth out some floats. Thank you

worthy frost
#

.01 timer?

#

might aswell do it on tick..

storm vigil
worthy frost
#

.1 is fine

#

but the .01 is pretty much tick

#

if things need to be done on tick, do it on tick ๐Ÿ˜›

storm vigil
# worthy frost but the .01 is pretty much tick

I see. Thank you. I was using 0.01 on the weapon block trace as the transition was not smooth with 0.1 so I used the 0.01. Please correct me if I am wrong, I moved from tick since it is dependent on the fps? Though I have not yet noticed it, if the fps is low it will also reflect the smoothness?

worthy frost
#

i do weapon block trace on tick, (granted C++ tick), but still on tick

#

well you cant smooth things on a timer

#

if you need smooth you need tick

#

or do some kinda interp between timer calls.

storm vigil
worthy frost
#

i optimize by turning off tick on the weapons when not needed

#

ie when weapon is unqueipped or its back at resting spread/recoil.

#

turn them on when weapon fires

storm vigil
#

Both of these functions/events are in a separate BP for firearm. So these only fire when I equip a weapon or should I manually set or override it in the blueprint?
Currently the tick actor on the details panel of this BP is set to start with tick enabled, 0 time tick interval and allow tick before begin play is disabled.

brazen merlin
#

1D blendspace you mean sprint via holding a key down?

#

this kind of input has Pressed and Released outputs, so when the pressed happens they sprint, and once the release happens it stops

#

you would be changing the MaxWalkSpeed

#

try searching for sprinting, good stuff on it

#

haha, yeah, gl

#

alright... thanks

timber knoll
#

Do keep the overshooting in mind

#

If your player lags he could overshoot your timer quite a bit, so you might want to do something in that case

brazen merlin
#

but the timer is based on delta seconds, it's tied to tick

timber knoll
#

Yes exactly

#

Usually overshooting isnโ€™t an issue, just keep in mind it can happen thatโ€™s all ๐Ÿ™‚

brazen merlin
#

so like... whats a situation, what happens?

timber knoll
#

For example if you were to make a stopwatch or something using event tick

brazen merlin
#

mm i see

timber knoll
#

If you dropped to letโ€™s say 10FPS

#

Thats 100ms/tick

worthy frost
#

i compensate for that in my weapon firing

#

by getting the slack between timer calls

#

and adjusting the next timer based on that

faint pasture
fiery glen
#

you can just delay 0 to delay one frame if that's what you actually want

devout crow
#

Guys,I made a simple combo system with montage,but the combos really stiffness between each attack.How can I fix that?

blissful widget
#

@devout crow But if you want more specific help, maybe show us what you mean by it looking stiff?

manic knot
#

Is it possible to get a Float value 0-1 from where a player in standing in a Volumetric Cloud?

blissful widget
manic knot
#

@blissful widget like the clouds density where the player is within the cloud

devout crow
blissful widget
trim pollen
#

can someone dumb this down for me or link to a concise ELI5

manic knot
blissful widget
trim pollen
#

is everything in "world outliner" one of these classes?

#

why does a blueprint have to be in a parent class at all?

devout crow
tight schooner
#

@trim pollen C++ base classes with BP child classes how UE works. From what I've read, the reverse isn't possible. BP is a layer that goes over C++, but C++ cannot see BP variables, functions and events, so inheritance only flows from C++ to BP

trim pollen
#

I see

blissful widget
thorn ermine
#
UIntProperty* IntProperty = FindFieldChecked<UIntProperty>(BlueprintClass, TEXT("VarName"));
int32 VarValue = IntProperty->GetPropertyValue_InContainer(BlueprintInstance);

You can use reflection to find BP variables in c++ that was not exposed. Only works for instance variables, not sure about scope etc. But it is possible.

dapper bramble
#

I seem to have trouble getting the location of an "actor component".
Any ideas how that could work? (Blueprint)

tight schooner
#

Can you put the component on the node graph?

dapper bramble
#

Yes

tight schooner
#

Drag out the data wire and Get World Location

dapper bramble
#

Does not exist

#

That's what baffles me a bit

tight schooner
#

Oh, it must not be a scene component

dapper bramble
#

It's not

tight schooner
#

Actor components have no physical presence. Scene components do (they have a "transform")

dapper bramble
#

Aha!

#

So I need to convert them then, thanks.

tight schooner
#

Yeah

dapper bramble
#

But can a scene component then have a trigger for example?

tight schooner
#

I never played with triggers. Is that a component?

#

Components can't have components unfortunately

dapper bramble
#

Hmm that's not good for what I had in mind

#

I just wanted an actor with multiple components, for which I can get their locations (and they should be triggers or contain triggers)

#

I really love Unreal, but sometimes I miss a simple way of making a prefab like in Unity

tight schooner
#

Yeah it can make structuring things complicated. You can attach actors to actors though as an alternative.

dapper bramble
#

Yeah I guess, but in my case it's 27 components and I wanted to declutter my world outliner a bit

#

Oooh I made a mistake. Those are actually scene components

#

Only in the blueprint where I work with that actor (and its components) I have set the components to a actorcomponent variable, and then it stopped behaving as intended. All good!

digital palm
#

Hey, I'm trying to create a replicated keypad for a door. But I have an issue for sending the number pressed by the client. As you can see in the first picture, the server is pressing 5, so on 5 is display on the keypad. But, the client have pressed 6, the print who say wich number is pressed is correct, but the information is not send to the keypad BP. In the third picture, I'm in my base character class, I'm printing wich number is pressed, and I'm sending this number to a function inside my keypad BP. In the last screenshot, inside the keypad BP,I have a custom event replicated on server, who call a custom event replicated multicast, who are setting the text. Any idea?

maiden wadi
#

@digital palm Two major issues here. First is that you should be replicating the values entered, not multicasting them. Likely in an array of integers.

#

The second, is that you're trying to send a server RPC through the Keypad. This won't work because the server owns the keypad. Clients cannot network through objects they do not own. Objects they own start as their controller, possession sets the ownership of their possessed pawns as well. You can add more yourself by setting the Owner variable of an object on the server. However that isn't what you need to do here.

#

Instead, you should have an interface in the keypad. Your key press can get the keypad reference locally, and then send that and the desired number through an RPC in the controller. On the other side of the controller, you can call the interface function on the keypad on the server. That would update the array of integers, and replicate the new state back to the clients.

raw orchid
#

Hi guys! Is there a command to see the average fps (total/game/cpu) of the last seconds?

digital palm
maiden wadi
#

Yep

digital palm
#

Ok so I have to move these functions from my base character to the player controller

#

And I can create a array of integers inside the player controller

maiden wadi
#

No. The integers were for the keypad. They're the keypad's state.

digital palm
#

Oh I see why you talked about a array. Iโ€™m just sending a single number because inside my keypad I use the build string function

maiden wadi
#

Either way. But the gist is that you're probably going to have more things to interact with. So if you make basic functions like this with generic rpcs that just take actor level pointers, it makes it much easier to send stuff from client to server to do interaction stuff. General code flow in a nutshell should be...

Handle Client Input
(Line traces? Overlaps? Whatever you use to detect what the player is interacting with)
Get Controller
Call Server RPC With Interacted Object And Other Data Neceesary
Now you're on the server version of that player's controller.
Used passed actor pointer to call interface function on interactable.
Now you're on the server version of the interactible
(Maybe do checks here like distance to avoid cheating if needed)
Server sets new state on interacted object.
Server updates own visual stuff.
Replication system comes along and sends replicated value to clients.
Client runs that property's OnRep, sets up it's own new visual state.

The reason for this is because it's abstract. Now you can reuse this same networking logic on not just the keypad, but doors, alarms, picking stuff up, elevator switches, etc.

odd ember
quasi frost
#

Is there a way to do a replicated do once?

maiden wadi
quasi frost
#

Yeah I mean I know I could do it via custom events, but I was wondering if there was something that already existed for this. like the already existing do once node.

maiden wadi
#

Kind of. At least you could with the new push model but not in blueprint. Usually that is done via replcating as InitialOnly, and setting it from server after that as a multicast.

harsh orbit
#

Hi guys, does anyone know what is good practice here? I am using a livelinked joint in maya to control ue4 camera FOV (for animating). On event tick I tried updating the FOV(img2) but its a little laggy/jolty, so as an experiment I tried doing (img3) instead the timeline graph is just a straight line 1:1 value-time ratio, I'm not even using the value though I'm just performing an action on its update and its smoother despite timelines updating from even tick too (as far as I'm aware?) - Is there a better method I should be using?

spark steppe
#

you could use finterp if it's not smooth enough

quasi frost
#

Is there a special way to replicate movement or do I just do it the same way as everything else? For example I am using a "Launch Character" node but it isn't replicating by default. Do I just throw a server/multicast custom event on it or is there a better way to do it?

harsh orbit
#

@spark steppe will finterp work on live animated skel mesh ? I will take a look tho thanks

flint warren
#

noob question - is there a way to make the input array for the for-loop be selected based on where the flow came from?

sharp rapids
#

or 'Pick A' node

flint warren
#

"Pick A" doesn't seem to exist for me; I don't think Select is what I need

sharp rapids
#

Select on a bool?

#

Use the same bool you're using for the branch

dawn gazelle
flint warren
#

oh, yes, that might work in this particular instance. But I'm interested in a more general solution

#

@dawn gazelle I was just about to ask if this would work:

#

I'm not feeling super confident about when the "Get" node gets called

#

is there a way to do it without a local variable? (not that there's a problem with using it)

dawn gazelle
lofty smelt
#

hello there

#

im having a little trouble with my game

#

i made a new level and imported an fbx file of a house

#

and now my firstpersoncharacter doesnt get recognised

#

when i simulate it shows a static camera actor and i cant move or whatever

#

its just stuck in one place

#

anyone who can help?

worthy carbon
#

I want to create an inventory like fortnite where you can press 1 to use the first weapon and when you press 2 you can use your second weapon, how can i create this?

spark steppe
lofty smelt
#

i have a firstperson gamemode

#

but instead of me spawning as my first person character

spark steppe
#

if you can't move when spawning in the house it's probably because unreal created a collision box which capsules the whole house

lofty smelt
#

i spawn as a static cameraactor

spark steppe
#

unless the house is made of several mesh's and not one big mesh

lofty smelt
#

its several

#

but i spawn as a cameraactor

#

it also doesnt turn yellow like the rest

#

idk what that means tbh

spark steppe
#

maybe it couldn't spawn a character. you still have the player spawn thing in the outliner?

lofty smelt
#

i do have a player spawn

#

but my player doesnt spawn

spark steppe
#

is it within the house?

lofty smelt
#

yup

spark steppe
#

move it outside and check if it still wont spawn

lofty smelt
#

it does spawn

#

oh yea now it also shows up as yellow

spark steppe
#

well most likely your house still has some part which covers the spawn area

#

so you have to open each mesh and check the collisions

lofty smelt
#

i moved it around the whole house

#

JESUS

#

that's a lot

#

i didnt make it tbh

spark steppe
#

well, it's most likely something that covers the area, so maybe 2 opposing walls or ceiling/floor

lofty smelt
#

anyone got a good source to find free 3d models?

spark steppe
#

unreal marketplace has some free stuff

lofty smelt
#

im looking for a low poly interior

#

like a haunted thingy or smth

#

basement

#

anything

#

also how do i check the collisions of the things

#

and perhaps edit them

spark steppe
#

in unreals mesh editor, you have to check show collision for it to show up

lofty smelt
#

how do i use the mesh editor ๐Ÿ˜…

spark steppe
#

watch a tutorial, i cant recommend one

#

but there are plenty on youtube

stoic narwhal
#

Any ideas why my thumbnails arent updating? They have meshes inside of them. I've made sure 'real time thumbnails' is checked in my content browser view mode

lofty smelt
#

i'm finding like a ton of videos

#

my unreal engine doesnt have the mesh editor?

#

idk i cant find it in my plugin list

green eagle
#

Just like pro tip to anyone new to BP.. learn the way UE integrates DataTables with Structs to .CSV and use EXCEL magic to change the game!
So mad I didn't pay enough mind to this stuff sooner.. roommate was always like "why don't you use DTs and Spreadsheets" and I was always like "idk htf to do that with bp and im being a baby about looking into it or going back to coding"

LIKE BRO!?

stoic narwhal
lofty smelt
#

i have like a whole house

green eagle
lofty smelt
#

of separate meshes

stoic narwhal
lofty smelt
#

do i have to check all of them 1 by 1?

stoic narwhal
green eagle
green eagle
# lofty smelt i have like a whole house

The mesh editor will let you create collisions that are either "max" or "min" with a generator tool that does convex but isn't great with complex geometry. You can set collisions in most 3p software and reimport which is probably best practice(I used Houdini which makes it really easy but no idea about blender) the other option, assuming you made the asset, is to import the asset as individual objects and create simplified/convex collisions individually than set them back together and turn them into a single asset in UE

flint warren
# dawn gazelle

so... I think I already know the answer, but worth a shot - is there an enum-based ComboBox?

#

(sorry if this is the wrong channel)

#

searching online has not been successful

dawn gazelle
earnest tangle
#

You can also loop all enum values to collect them in an array

#

And generate the combo value from that

flint warren
#

thanks, thought as much

odd ember
#

another time where FNames could truly shine... but they don't ๐Ÿ˜ญ

lofty smelt
#

okay guys

#

now i need to get my textures done properly

#

i have like a map with textures

#

a folder

odd ember
#

wrong channel

lofty smelt
#

but idk which texture belongs to what

odd ember
lofty smelt
#

oh

#

mybad

dusk cave
#

hey Efool

#

so you said to check the BecomeIt() function I made

#

I didnt have Is It attached to anything before and I think its works now

#

although the same actor seems to be It. I'm gonna put in more to test.

sonic crow
#

is there a way to substitute "Update cursor Position" with a gamepad and its thumbsticks?

odd ember
#

nope

#

if you really wanted to, you could see about controlling the cursor with the thumbsticks by using UpdateCursorPosition but I doubt it'd be that easy

dusk cave
#

ok i added a third AI and put the threshold to 3 and the red guy is still always It. We made it choose randomly right? I don't mind if its random or not.

#

nvr mind. it does pick another actor but not as often.

odd ember
dusk cave
#

oh ok

#

good thing that was a easy fix. now to do the tagging

#

so to set that up, I need to reference the actor that got hit and send to the gamemode?

odd ember
#

you already have that

#

but you have to check if the other AI is "it" first

dusk cave
#

like this?

odd ember
#

so for that you might need another function, this time pure, called IsActorIt

#

on the game mode

#

on the game mode as well you might need another function for SetActorIt

#

I use actor here but you could use Player as well

#

for the naming

dusk cave
#

couldnt we reuse BecomeIt?

#

IsActorIt function

#

wait thats not right

odd ember
#

that's true, we could use BecomeIt

#

so we need to move some logic

#

or actually

#

no

#

we can't

#

because BecomeIt is on the AI itself

#

not on the gamemode

#

so we need another function

#

we still need to move some logic

dusk cave
#

so I pass the "hitter" actor in here?

odd ember
#

this is in the game mode yes?

dusk cave
#

yes

odd ember
#

you can just return the value of the bool

#

you dont need the branch

dusk cave
#

so an empty return node?

odd ember
#

no?

#

hook the return value up to the value of the bool from the equals node

haughty nymph
#

how to add a muzzle flash

odd ember
#

do you have a muzzle flash asset?

dusk cave
odd ember
#

are you not reading what I am saying?

dusk cave
#

i can't connect the equal node to the return node

odd ember
#

how are you trying to connect it?

haughty nymph
odd ember
#

like there is a red pin and a red pin. connecting them should not be an issue

odd ember
dusk cave
#

Oh ok i see what u mean

haughty nymph
odd ember
dusk cave
haughty nymph
odd ember
#

ok cool

#

so in your gun actor, I'd recommend having a scene component (or socket, if you want to do it on the level of the gun's skeletal mesh) called MuzzlePoint. when you fire, spawn the muzzelflash as a particle system

odd ember
dusk cave
#

ok i check marked it

odd ember
#

so now in the game mode, you will need a new function called SetPlayerIt or SetActorIt

#

in the random function from yesterday, cut and paste the loop part

#

into that new function

#

in fact, you can select all those nodes, right click on them and select Collapse to function

dusk cave
#

i have an error in our Poll function

odd ember
#

post screenshots

#

looks right

dusk cave
odd ember
#

so that's not in the poll function

#

that's inside your random function

#

so show your random function

#

generally wait with compiling until we're done with the reshuffling

dusk cave
odd ember
#

it doesn't connect to the return node now

#

which is probably the issue

#

anyway

#

go into your new function

#

let's set that up first

dusk cave
#

ok i fixed it

odd ember
#

you don't need a return value for that function, but you need a parameter for which actor is supposed to be "it"

dusk cave
odd ember
#

correct

#

now

#

inside your SetRandomActorAsIt

#

use the SetActorIt function

dusk cave
odd ember
#

yep

#

now with these new functions

#

go back into your AI

#

on EventHit

#

check if the other actor IsActorIt

#

with a branch

#

and if true, then set self as SetActorIt on the gamemode

#

that's it

#

that's entire logic for the game

#

now it's debatable if you need some scoring system or whatever, but the gameplay is this

dusk cave
odd ember
# dusk cave

you dont need the hit result, you can use the pin called Other

#

otherwise correct

dusk cave
#

awesome it works

#

gonna have to make changes to my AI behavior

#

and add in the the stuff I need but I can do that myself I think

odd ember
#

cool

#

consider the visibility of whoever is "it" as well

#

maybe you want a special material etc.

dusk cave
#

thanks EFool. really appreciate the help.

odd ember
#

now that you have these functions, you can change stuff like that in the BecomeIt function

bronze elk
#

Efool how long have you been using blueprints?

odd ember
#

blueprints are just code

#

but I worked with UDK before UE4 and they had a rudimentary version of blueprints called kismet

#

when UE4 came out I just transferred

bronze elk
#

does Unity have blueprints?

odd ember
#

who knows

#

I haven't touched unity in almost a decade

dusk cave
#

no unity doesnt have blueprints

#

u have to code in C#

odd ember
#

anyway a lot of this is not explicitly to do with blueprints, it's just good code practice

heavy lion
#

I cannot for the life of me get a widget blueprint to display on the screen.
I have a game mode, I have a HUD class, in the hud class, I create a widget, add it to the viewport.

Hud class is set inside the gamemode class but nothing displays on screen

odd ember
#

if you go to university and study to become a CS major or a system architect or a software developer you'll learn the same

#

doesn't matter if it's blueprint, C#, cpp or any other OOP language

odd ember
empty pelican
#

Hi, may i know how to resize the Editable text box if i make it as a child of a border?

heavy lion
#

@odd ember But I have done it this way in another project, its identical

#

AHH, umg channel is still here. My bad

dim robin
#

i would like all the blueprints using a struct to get updated parameters straight from the "master" struct, is there a way? if i update a struct inside a random actor blueprint using it, it will keep these new parameters and not the ones set on the struct itself (outside the actor bp)

spark steppe
#

a struct is just a data type, it doesn't share values across blueprints

dim robin
#

so should i just use a data table?

spark steppe
#

you may want to store your struct in a global place like game mode, where all can access them

#

data tables are readonly

cerulean radish
#

maybe stupid question, but why there is no for loop (or any kind of for) in widget blueprints?

#

ue5

odd ember
cerulean radish
#

idk if its related to ue5

#

specifically

fickle granite
#

ue4 does

brazen merlin
#

Ive done for loops inside a widget bp in ue4

odd ember
#

I got loops in UE4 too

fickle granite
#

i checked just now

fickle granite
cerulean radish
#

okay, ty

static charm
#

might be a temp work around at the bottom most post in the link

#

"copy a For loop node from a plain Actor BP, then paste in the widget BP"

wraith bay
#

is it possible to have 2 people working on the same project online, with blueprints?

wraith bay
#

Yes

icy dragon
#

Though not exactly "2+ people working simultaneously in real time"
But for "2+ people to share the same project", then yes, you can use source control for BPs. The changes won't be apparent though, because BP .uasset is binary file, not plain text.

wraith bay
#

What do you mean wont be apparent

icy dragon
#

The change log in your repo for BPs won't be directly readable in the source control interface.

wraith bay
#

Cool, thanks

sonic crow
#

Hi thought I would ask the question in a different way perhaps someone can help, how do I replace "Get Hit Result Under Cursor by Channel" with my Xbox controller where the thumbsticks could act as the motion for the mouse. I know they use different systems but in theory it should still be possible

sonic crow
trim matrix
#

hi can i ask here about animations ? in animations its dead silent

trim matrix
heavy ibex
#

I have a floatcurve that I'd like to adjust to be more like the red line, is there any way to accomplish that?

#

or is additional points the way

#

actually looks like just 1 more point in the middle did the trick. thanks guys ๐Ÿคช

odd ember
heavy ibex
odd ember
#

maybe that's unique to the curve editor, for e.g splines that's possible

heavy ibex
#

Yeah I remember doing it .. somewhere. But it doesn't seem to work here

odd ember
#

fair enough, but at least you have a solution

sonic crow
odd ember
sonic crow
odd ember
#

I don't think it makes a difference necessarily

#

the gist is that you need to have your mouse cursor be affected by gamepad input direction

sonic crow
odd ember
#

so... that should be enough to get you started?

sonic crow
faint pasture
#

Don't need a 3rd

heavy ibex
faint pasture
#

Can tangents be lengthened in Unreal curves or just rotated? If they can only be rotated you'll need a 3rd point but if they can be lengthened you don't.

odd ember
#

we literally just had this conversation if you look up

odd ember
faint pasture
#

@heavy ibex BTW that looks like a sigmoid function so depending on what you're doing or how precise it has to be, you could just do it mathematically.

heavy ibex
sonic crow
# odd ember don't think there is. I use a rudimentary system like this for my own project bu...

the perfect solution would be to lock mouse position infront of character (could this be done with a spring arm not sure?), directly x units away from character always (no need to worry about the z axis), then allowing the x and y axis of the left thumbstick to change the direction of the character with the right trigger that moves the character forward in which ever direction it is facing when pressed. And finally limiting the cursor directional input to 90 degree increments so that it can only move in four directions. This allowing the existing tiles to be selected forcing character to always move to center of tile, making the gameplay smooth. Am i over complicating this, is there a better solution?

faint pasture
#

@sonic crow We have a similar system. We don't use Cursor itself at all.

odd ember
#

and then we can look at the technical implementation separately

sonic crow
# odd ember I have a very hard time figuring out how that would look or feel. I think you're...

i try to explain it here briefly but essentially I am looking for the classic bomberman movement (fun to play on a nintendo switch) the grid system forces the character to move to the center of the tiles, iwant the movement limited to four directions. Getting the character to move to the center of each tile without a mouse currently seems impossible so i am looking for a work around

sonic crow
odd ember
#

what didn't work?

faint pasture
#

to your grid interval

sonic crow
# odd ember what didn't work?

my movement works fine but it does not limit it to the tile which means you would move your character and you cna stand between tiles

faint pasture
#

you still need to enforce 8 direction movement but that'll get your mouse -> desired location correct

faint pasture
odd ember
#

the mouse just picks a tile based on world location. the gamepad would pick a tile based on surrounding tiles

#

regardless, a tile gets picked

sonic crow
sonic crow
odd ember
faint pasture
#

using d pad only, can you right now move to a tile edge or center only?

sonic crow
odd ember
faint pasture
#

Get your movement behaving correctly so you can just pass a MoveDirection (8 options) and move 1 tile over

#

Once you have that, it's just a problem of mapping stick input to a MoveDirection

#

and mouse will be handled by Picking a DestinationTile from mouse position, and pathfinding there by MoveDirections

#

Unless you want your dude running at any diagonal he chooses which I'm assuming is not what you want

odd ember
#

most of the input system was set up yesterday

odd ember
maiden wadi
#

This sounds.. painful. I don't know why this whole thing isn't just based on simple grid math. Who needs to care about where the tiles are?

odd ember
#

how is grid math any different from this?

maiden wadi
#

It's much simpler to implement. And then the tiles can be anything you want them to be. They can be entirely ripped out and the gameplay still works.

odd ember
#

I mean what is the technical implementation

#

not what the benefits are

faint pasture
#

There's a million ways to pull this off but the best would be to have a grid representation of disallowed positions (map of integer vector 2d to enums) which you lookup to see if a move is allowed.

#

just register all the blocked locations in that map at game start and off you go

sonic crow
#

thanks i will give it another go, technically my grid is essentially just made up of vertices built with geometry to make it ultra light weight meaning i could have a billion tiles and the game would run smoothly (although might take a few extra seconds to load)

maiden wadi
#

A vector on the character. This is where the player is moving. A second one is where the player wants to move. Character's movement logic always trues to go towards the first vector. Input changes the second vector, when character reaches the first vector it checks if the second vector is set and if so sets the first to the second and nulls the second out. CharacterMoves again. If you need something even more complicated, it's as simple as putting in an array of vectors and a pretty simple path following system. Input from mouse snaps to grid at a Zless point for input and sets the desired location to that. DPad takes the current target and sets the desired target to whatever current target is + gridsize*direction.

odd ember
#

this seems weirdly... predictive?

#

also gonna say that while I get that you can separate grid and movement it's not something I'd personally recommend unless the game has to do both

#

but maybe that's just me

maiden wadi
#

Predictive of what? If you only want four directions, the character needs to move to the next square before another move can be made. This second vector allows players to set input without having to wait for the character to stop.

odd ember
#

ah like that

#

but that is still predictive behavior

#

because there is an assumption that players will want to continue to move in that direction

#

I'm not sure if that affects the system as a whole, however

maiden wadi
#

It's easy to put in a clause that if the new direction is backwards, you can set the current destination immediately.

#

I'm also under the impression that the character needs to move direct to the center of the grid? I wasn't thinking this was like old Zelda style, but literally like chess movement?

odd ember
#

I think they are trying to make bomberman

#

so I think the whole movement system is predicated on the fact that the center of the tile is what matters

gentle urchin
#

Bomberman or super bomberman?

odd ember
#

I don't know

#

I honestly didn't even know there was a difference between them

#

I haven't played bomberman for at least 20 years

gentle urchin
#

None of the ones i find have locked grid movement

#

Me neither, so wanted to look it up so there's a clear reference for the intended movement

faint pasture
#

Yeah for a Bomberman like I would not lock movement to cells but just placement of objects, and have dude about the same size as a cell

gentle urchin
#

Even arcade version has free movement.. im confused ๐Ÿ˜…

#

It would be weird imo if mouse and gamepad dont play out the same tho

#

Like mouse can click tile far away, and gamepad can not?

#

That would need some commit to the move when using gamepad (similar to mouse button click)

odd ember
#

I wonder what happens when the mouse hits a wall tile

faint pasture
#

Mouse movement would be weird imo

odd ember
#

I guess the tile centerpiece style movement makes sense for bomb placement and the like perhaps

#

but I don't know, maybe the idea is to have tile based movement style bomberman

#

and call it transformative

#

๐Ÿ˜Ž

gentle urchin
#

Turn based bomberman