#blueprint

402296 messages · Page 414 of 403

snow geyser
#

some go red where there is existing building

#

the rest is "Hey, you can use this!" land

#

idea being to help the player better manage their land while city building

#

since not all buildings will be 2x2 grids

#

some will be 1x1, 6x3, etc

#

Thats why I wanted the grid that extended beyond the building to-be-placed while checking for valid placements in each cell/panel/grid square

hollow cape
fathom portal
#

@snow geyser will the maps be flat?

#

Or 3d, like elevation differences and such

snow geyser
#

some Elevation changes, but largely flat. Almost all flat

crystal mural
#

Thanks for everyone's patience with me! Did I convert this code correctly? My whole editor freezes. I made this:

#

From this:

#

void Tick(float deltaTime)
{
fTimeAvailableToFire += deltaTime;

float fTimeForSingleShot = 1/fShotsPerSecond;

if (bShooting)
{
    while (fTimeAvailableToFire >= fTimeForSingleShot)
    {
        fAccumulatedFiringTime -= fTimeForSingleShot;
        ShootABullet();
    }
}

// Clamp time available for firing to no more than one shot.
if (fTimeAvailableToFire > fTimeForSingleShot)
{
    fTimeAvailableToFire = fTimeForSingleShot;
}

}

#

No idea how to put code in a block.

#

@hardy merlin This is the code you gave me right? What am I missing?

fathom portal
#

@crystal mural:

1: Try not to set variables in a tick event, use comparisons instead, or even better use open/close gates:

#

And then basically never use a while loop inside of a tick event, unless you're a sadist and like living on the edge

#

What's inside your while loop?

crystal mural
#

Or use timers:
@fathom portal HAHA! Actually there was a BIG debate last night on this. I originally had a timer doing this. But I found that the loop body was alltogether slower than my delay.

#

It's spawning a projectile in a direction.

fathom portal
#

If you're not modifiying "Time Available to Fire" or "Time for Single Shot" inside your while loop that would be why the code freezes

crystal mural
#

And playing a sound./

#

Ah yes that makes sense!

#

So the loop won't end.

fathom portal
#

Not trying to be a dick, but what you posted is a perfect example of what not to do lmao

crystal mural
#

The code or the blueprint?

fathom portal
#

So the current frame (tick) never finishes, so it won't run the next frame

#

The blueprint

crystal mural
#

Did I misunderstand the code?

#

And sure, you're not being a dick. I've got to learn hey 🙂

fathom portal
#

The cpp has the same issue, the while loop will never exit, because the boolean controlling it (the "fTimeAvailableToFire >= fTimeForSingleShot") never changes inside it

#

You should be using a gate or a timer for this

#

100%

crystal mural
#

I'm reading the instructions @hardy merlin gave me and I see this step is probably important:

#
  1. In a loop, if TimeSinceLastShot is greater than SecondsBetweenEachShot, spawn a projectile and set TimeSinceLastShot = TimeSinceLastShot - SecondsBetweenEachShot.
#

I'm NOT doing that.

#

Let me fiddle quick.

fathom portal
#

kk

crystal mural
#

Actually, just something to put into the back of your head. I'm trying to spawn about 400 bullets per second. That was the original goal. So I'm just trying out the three methods I was given last night. This is method number three.

#

Chat soon.

#

Once it's correct I don't think 400 would be correct.

fathom portal
#

Sure, which is fine. Even while loops are fine, as long as you set them up carefully lmao

hollow cape
#

Lol while loops....SUCK in BP

crystal mural
#

Ah yes Mr @odd ember It actually is very phallic.

#

HAHA!

fathom portal
#

Oh god

#

freaking lmao

odd ember
#

it was in reference to the solid structures @hollow cape used as examples

hollow cape
#

lol NOBODY ELSE commented on that

odd ember
#

but really, haven't we all drawn a phallic object that somehow made it into a released game

fathom portal
#

The image just showed up for me

hollow cape
#

I decided against using spheres and a capsule....so I kinda get it

fathom portal
#

The very first iteration of my random level generation would quite often make phallic shapes

crystal mural
#

LOL!

fathom portal
#

My friends called it my "dick generator"

hollow cape
#

I got one for you guys

#

Don't ask why

#

I want player (0) to receive player(1) - player(3) inputs

#

without the existence of a player(1) - player(3)

#

inputs are coming from a gamepad

#

well....4 game pads

odd ember
#

is this a riddle

hollow cape
#

no

#

legit question lol

fathom portal
#

Local multiplayer only?

odd ember
#

had to re read it a couple of times

hollow cape
#

local multi, yep

odd ember
#

you need to check individual input events for the keys

#

and figure out which key belongs to which player

#

I SUPPOSE

#

having not touched multiplayer in UE4 for a good 4 years

hollow cape
#

will the input handler differentiate the "A" button between the 4 gamepads however?

#

from what I've tested so far, no

fathom portal
#

@hollow cape Your controllers should each have their own controls

#

When player 3 presses "A", it should activate the "A" event on the player controller(2)

odd ember
#

@hollow cape it should if it goes through server, and also doesn't the FKey structure pass which player pressed the key?

hollow cape
#

yes, my question though is there IS no PC(2)

#

now, obviously, my working workaround is to add a player and spawn a simple input handler pawn, which works

fathom portal
#

That means every physical controller is bound to the opject player controller(0), which is bad

odd ember
#

or idk, connect several player controllers to the same pawn and let the madness unfold?

#

not sure if that's a legal move

hollow cape
#

@fathom portal on top of that, steamvr (which is handling the gamepads), won't pass the events from other gamepads

fathom portal
#

not sure if that's a legal move
@odd ember Lmao. "This is epic games, come outside with your controllers up, you're under arrest"

hollow cape
#

unless there is another PC

#

LOLOL

#

I ONLY HAVE 2 HANDS YOU HEATHENS

#

eh, my solution works, what I HATE is I can't differentiate the gamepads. it's based on the order they were connected

fathom portal
#

Wait, so you just need a way to say "Press a button on a controller to pick player one"?

#

I don't think im understanding

hollow cape
#

I suppose yeah

#

which is possible, I was just trying to be trick and creating my own headache

odd ember
#

I do that too in my spare time

#

I'm not allowed to at work

hollow cape
#

lol

#

Unfortunately I don't have anybody at work that tells me not to do stuff since I kinda own it. So it happens more than it should

crystal mural
#

Got it working nicely!

fathom portal
#

@crystal mural don't forget the updated code and maybe a gif of it working

hollow cape
#

if those engines don't spin, just quit now

fathom portal
#

If it doesn't slightly thrust for every shot what are you even doing with your life

crystal mural
#

@odd ember @hardy merlin @left bay Between the three methods I've got mine using a STUPID while loop with integrated timer. Bad idea that was. THEN there was a DoOnce with a timer but that was VERY heavy. This new method on tick feels VERY smooth. And they're all firing 400 bullets per second.

hollow cape
#

LOL

crystal mural
#

@crystal mural don't forget the updated code and maybe a gif of it working
@fathom portal I can make a quick video of all three...

hollow cape
#

put 10 of them in there and then we'll talk

crystal mural
#

It's all a mess so I'm going to clean the one up and make it know how many bullets to actually shoot.

fathom portal
#

No worries, dirty working code is still better than dirty not working code

crystal mural
#

@fathom portal VFX and Animation is my actual job so don't worry about the juice 😉 That'll ALL be in there.

hollow cape
#

add drunk AI controller and #shipit

crystal mural
#

LOL!

fathom portal
#

It's relevant to the conversation at hand, which is about blueprints

odd ember
#

this entire discussion isn't

crystal mural
#

It's relevant to my gun.

odd ember
#

or well

snow geyser
#

Thanos snapped

thorny marsh
#

Get back ontopic, stop trolling and move forward.

fathom portal
#

There wasn't any trolling

crystal mural
#

So as I said, should I compress it or do you want a dropbox video to see what I did?

fathom portal
#

Either or

#

Hopefully it doesn't get removed

hollow cape
#

either way

fathom portal
#

That's the last time I ping mods asking for advice

crystal mural
#

I am going through my code. Just listening if I sound OK 😛

thorny marsh
#

You asked if it was ok, now your upset that its not?

#

...

fathom portal
#

I mean, I light-heartedly asked just to be safe, then you proceeded to call me a troll

thorny marsh
#

I wasnt aiming that at you, everyone in the conversation was not ontopic.

#

Please stop arguing and move on.

fathom portal
#

No one here was trolling, including myself.

hollow cape
#

We were helping out on an issue

crystal mural
#

Potato, Tomato.

#

It's still uploading.

#

Done.

#

Thanks for all the help! I'll definitely have to clean up the code of this last tick method but my computer feels much happier with that method.

fathom portal
#

Sorry we trolled you, @crystal mural

crystal mural
#

😉

thorny marsh
#

Mate, do you want an infraction for not moving on?

fathom portal
#

😉

thorny marsh
#

Seriously.

hollow cape
#

also glowbeard, getworlddeltaseconds == delta seconds from the tick

fathom portal
#

Mate, are you going to give yourself an infraction for calling everyone here trolls for helping people?

hollow cape
#

so you can use that without needing to store it as a var

crystal mural
#

Ah I didn't know that.

hollow cape
#

another cleanup for ya

crystal mural
#

Sweet, my code will be half the size by tomorrow.

fathom portal
#

Seems calling everyone trolls for helping people would constitute being disrespectful, no?

thorny marsh
#

Nope, being an arse talking back like that to a Moderator does though.

fathom portal
#

I'm defending myself from your personal attacks

hollow cape
#

Aait can we just table this lol

#

@thorny marsh MFG helps out quite a bit, we got a bit off topic however it was still all in relation to #blueprint related content. We got back on track.

fathom portal
#

^ And no trolling whatsoever occurred

static charm
#

Anyone know if there are performance benefits to function vs macro/event

hollow cape
#

hmm no idea actually

hardy merlin
#

Not really. Events are usually better for maintenance than Macro, however

snow geyser
#

omg guys

#

I took a break came back and fixed it

#

I AM THE HAX0R

hollow cape
#

lol nice

snow geyser
#

lol

#

So its not the ideal solution, but just for reference it was something to do with the custom eventt I made for changing material. Im convinced it has something to do with the fact that the house mesh is from the active class while the grid mesh is being spawned from a separate one. I have to reprogram a little functionality for some checks but have found the solution at least

#

ty MFG / KHarvey

hollow cape
#

yep, get it

snow geyser
#

Its still plain looking because of placeholder materials and whatnot, but you get the idea. Thanks again guys

hollow cape
#

nice man! looks better than mine for sure lol

odd ember
#

you are welcome, I helped out SO MUCH

hollow cape
#

LOL

snow geyser
#

Cranz you did answer some and I am grateful too 😛 They just went the extra mile this morning

#

anyway

#

thats all

fathom portal
#

Woop woop, glad it's working. I'm interested in how you did it

#

And sure @snow geyser, glad I could help

hollow cape
#

@snow geyser remind me, you're spawning 100 individual bps right? and moving them each individually on tick?

snow geyser
#

I create a 10x10 grid from a single mesh inside "GridPanel_BP" using 2D Grid Execution Macro at beginplay. Each panel is saved in an array of GridPanel_BP References and also their center point saved in an array of vectors

#

on-tick I set actor location using a snapping cursor mourse location I have set up (so updates movement every 100 units) x the centerpoint vector

#

Lemme get screenshots again for ya

hollow cape
#

nah you don't need to, that's what I was thinking

#

I wonder if there are any performance benefits to just parenting each of those boxes to a root, and moving the actor itself around instead of explicitly setting the location of each individual box

snow geyser
#

Im positive theres a better solution. Im sorta just hammering my face into things until they work without obscene loss of performance still haha

hollow cape
#

yep, nothing wrong with that

surreal peak
#
  1. Solve the problem.
  2. Check if it hits performance.
    2.1. If yes, improve.
    2.2. If not, leave it.
hollow cape
#

yeah

#

I was more thinking out loud lol

snow geyser
#

I have basically that idea on a to-do. Making the grid and somehow saving it as a single object or whatever and moving it rather than moving 100 meshes every tick that moves 100+ units from its last location

hollow cape
#

well if you converted the grid to a single static mesh you lose the dynamic single-cell based outlining you want

snow geyser
#

right

#

I dont know about instanced static mesh but I was going to look into that some as well

hollow cape
#

what I'm wondering is if you just move the actor that contains the 100 static mesh components around, instead of each individual box around, would there be performance gains from that

#

my gut says yes

odd ember
#

@surreal peak have you had any experience with an intelligent camera?

hollow cape
#

I think you'd have to use HISM to be able to change materials right?

#

I don't think ISM allows different materials...could be wrong though

#

Cranz, elaborate, what is an intelligent camera

odd ember
#

imagine like a person, but it's also a camera

#

a cameraperson if you will

surreal peak
#

Not really

hollow cape
#

so a person holding a camera?

odd ember
#

a camera being

surreal peak
#

Also don't think I ever encountered that

snow geyser
#

A camera where the face is?

static charm
#

so camera AI

odd ember
#

it lives for the good shot

#

and for helping the player

#

that is an intelligent camera

static charm
#

ue4 has a tensor flow plugin

#

that can match images

#

and things in the images

thick orbit
#

Hey all, not sure if this is the right place to ask or not (sorry if not!). I'm trying to create levels that have different win values (tracked as an int). Looking around, level variables seem to be very difficult to use. What would be a better way to handle a value being different per level?

severe turret
#

@thick orbit put them in a singleton class like the GameInstance. They will remain during level changes.

surreal peak
#

I think they mean settings per level

#

BPs aren't so nice with LevelBlueprint settings

thick orbit
#

I'm fairly new to this and the only way i can see would be to store the number in the level name haha.

fair estuary
#

What you might also consider @thick orbit is a data table with the name of the level and the variables that are needed for each level. this will help centralize and store the values for each level. When the level loads, load the data from the data table from the level bp, calling the row with the name of the level, and when the win condition is met, push it to game instance to store as completed.

thick orbit
#

A data table! of course!! thanks @fair estuary !

fair estuary
#

np 🙂

trim matrix
#

How can i check if a static mesh var is empty?

keen goblet
#

@trim matrix You mean like if a BP has a var for a Static Mesh and it's never set to anything?
IsValid will do it.

snow geyser
#

@trim matrix branch with condition == null

#

pretty sure

keen goblet
#

IsValid checks if input is null but also checks a few other things too (I think that it's not pending kill)

trim matrix
#

@keen goblet Do you know how i can check if something is attached to a socket?

#

@keen goblet I got it with does socket exist

hollow cape
#

getattachsocketname

#

not does socket exist

keen goblet
#

@trim matrix Never used sockets myself

hollow cape
#

it will return "None" if not attached to anything, that's how you can check

lyric marsh
#

quick question when I use look at rotation on only one axis it does a boomerag effect where it rotates from 0 to 60 then back to 0 and then goes into -60

#

know why its doing something like this

tribal axle
#

I have an idea for a fnaf fan game, a mechanic is one of the enemies stands at the end of a hallway, and his eyes are white. When his eyes turn red, you have to flash your light to stop him. But if you flash your light when his eyes are white, he’ll kill you as well. How would someone go about making this?

pine trellis
#

does anybody know where to find the setting toi bring up the stat commands the ~ key isnt working and I want to try something else but I cant find it in the settings

hollow cape
#

project settings, search console

pine trellis
#

oh thanks

#

engines so big not even the unreal guys know it all

#

I seen them get stuck before

keen goblet
#

@tribal axle Lots of ways to approach something like that. Maybe store a bool in the enemy called bEyesRed and when you call a ShineFlashlight function on it, branch on bEyesRed to call an "enemy subdued" script if True and call a "player dies" script if False

hollow cape
#

@tribal axle Start with one feature, get that working, add another feature, get that working...on and on

#

Just start with something like getting the mesh imported, then work out how you are going to get the eyes to turn red, and if it's even visible at the end of the hallway etc

tribal axle
#

Ok, should I use a trace line for the flashlight hit though?

lyric marsh
#

so anyone know why rotation in unreal is does the bomerang thing on one axis

analog hill
#

Is there a node for detecting when physics have "settled" or should I just check velocity?

ember veldt
#

I am dynamically spawning vector fields, and my particle system sometimes doesn't want to cooperate with it when it's spawned in the same location. Any one dealt with this stuff?

supple dome
#

search for IsSleeping or IsAwake, i know those exist in C++ but i dont remember if they do in blueprint

analog hill
#

Thanks!

shell estuary
#

We continue working on our Find a Match screen by scripting how to populate and find available games to join. By the end of this video we have our basic multiplayer functionality in place and test out a server hosting a game while a client connects to that game. We also show r...

▶ Play video
#

have a quick question before moving forward, currently on the part where you integrate steam

visual granite
#

Hey, I have an border png for 3d widget that has to wrap around an progress bar

#

How do I make my border non pixelated since riught now Im using it as image?

#

I know that I can draw it as an shader using unreal materials but I dont know exactly how to set it up

sudden lynx
#

@visual granite hey you asked that already in #umg and I have a possible answer there

#

@shell estuary I dont know to do it in steam but my wifi crossplay works great

frail wyvern
#

@tribal axle a line trace is fine to have your checks occur

trim matrix
#

For fps games, are traces or collision objs more effective?

static charm
#

they both are effective

#

define what the effect is

#

trace is more performant

#

collision has different options

trim matrix
#

Im assuming bullet drop would be easier to implement w collision

static charm
#

the built in projectile class has physics simulation

#

and can basically give you bullet drop

#

the FPS template has ready to use projectile setup

trim matrix
#

Damn never knew ab that, kinda a noob at gun mechanics

#

Thanks

static charm
#

but there's lots of different math and methods to bullet mechanics

#

the more you research it

dusk dust
#
  1. does anybody know a way to use heightmap to deform a mesh in blueprints?
#

I dont mean material displacement stuff

#
  1. How can I use gradient textures to specify where things can be?
static charm
#

the free voxel plugin probably can use textures to deform

dusk dust
#

if you wanted to do weather for example

#

yeah but i heard the free version doesnt have the ease of doing that

#

its the pro version

static charm
#

yeah never looked at it

#

tbh

dusk dust
#

oh

#

well what about accessing gradient textures?

#

to define things

#

like temperature

#

or something

static charm
#

not sure what features exist in the current engine

#

but rama's plugin had blueprint read texture node

#

assuming it would convert texture to pixel data for use as blueprint values

#

the beginnings of the community ocean plugin has some c++ that i think read material/texture height at various points

#

and output it to blueprint

dusk dust
#

okay thanks

mossy coral
#

Hi guys. Can any one tell me about collision object types: made 2 object types blocking together in my own project and they do not collide. But when I do the same thing in start project it works well.

#

I'm interesting in MK_Projectile and MK_Hitbox_obj. Don't look other options)

stuck hedge
#

I have an object that spawns in the world, with a 3D widget info box that pops up. I rotate this info box so that it's always facing the player. But if this object spawns near a wall or box or something, the 3D widget can rotate so that it will clip the wall or box and make it hard to read. Is there a way make sure that as it rotates, it doesn't clip into a wall or box? The set rotation node says that "sweep" isn't supported on rotation so that can't be used to check the space.

#

should I attach the widget to a similarly sized invisible cube and stick like a spring arm or something on it so it'll push off against the wall?

marble halo
#

when a server is destroyed how can i send instructions to all clients to call end game, and load another map?

cunning sentinel
#

am i getting this right? :)

surreal peak
#

UE4 handles that on its own.

#

The get send back to the map they connected from, so usuall the MainMenu

marble halo
#

Thanks eXi. Will check GameInstance.

plucky bane
#

Hi guys, noob question. Is there a way to add node/instructions to a child actor's inherited function?

twilit heath
#

override event, right click the node -> call parent function, connect that then add additional functionality

pastel rivet
#

Question
How can one make something load partially from levels, without breaking references to eachother? I have objects that needs to be loaded AFTER the game instance to be able to retrieve a variable from gameinstance to my actor. I cant use load stream level with all the actors in the same level, as this creates graphic bugs

#

Apparently the game flow charts which shows the game instance being the first loaded before other actors seems incorrect, since the variable passed from first level isnt set for the actors construction script

surreal peak
#

GameInstance is def the first thing that loads

#

It's also not linked to any levels.

pastel rivet
#

@surreal peak not in package apparently, because its able to retrieve the variable from game instance in a construction script fine in editor or pie, but in package its not set before it can retrieve the variable from game instance

dusky moat
#

Hey guys iv been struggling with AI, i need it to simmulate physics to be kinda PUSABLE, but Move to node isnt woking then, what should i do, any suggestions?

odd ember
dusky moat
#

hah not yet but i should :3

summer zephyr
#

is any way to disable all draw debug sphere from console comand like "DISABLEALLSCREENMESSAGES" ?

stuck hedge
#

@pastel rivet Could you explain a little more about exactly what information you're trying to pass? is it save game data?

gentle flare
#

is there a blueprint node that you can give two numbers and it'll give you the smallest one back?

pastel rivet
#

@stuck hedge A simple float variable, which is both set inside save game and game instance. This variable is to change the width of a cable in the construction script.
The first level is where you choose the size of the cable and set the variable both in game instance and savegame, then the next level loads in the cables and retrieves the float on construct from the game instance.

This works fine for a editor version, but once its packaged, the cables arent visible because the variable retrieved from game instance, is 0.

gentle flare
#

oops 🙂

#

nvm

stuck hedge
#

@pastel rivet Your game will have a menu won't it?

pastel rivet
#

@stuck hedge It already has a menu in its own level, where you set the size of the cables, once you start the game, it retrieves the cable size set from the game instance

#

Then once you hit play, it loads a new level where the cables construction script tries to retrieve the float variable from game instance, which works in editor, but not in package

stuck hedge
#

So the player has to set the cable size before proceeding, or the cable size is being loaded from the save game?

pastel rivet
#

Once you have set the cable size, its saved to the savegame, everytime you restart the whole game, the game instance retrieves the cable size from the save game incase the user doesnt set the cable size

stuck hedge
#

In that case, what you have going on is a race condition between the loading of your save game and the construction of the actor.

#

The game instance is being created first, but it isn't running the load game before the actor hits its construction script.

#

Here is what you do.

pastel rivet
#

What you mean load game?

stuck hedge
#

When you start the game, you're loading the save game data aren't you? to get the cable size

pastel rivet
#

Im loading the variable from the game instance

#

i can easily change it to the save game data if you want

stuck hedge
#

which is coming from a save game isn't it?

pastel rivet
#

well

#

The save game is used in the main menu, for saving pourposes, i used the save game in the start to try to retrieve the variable, but the reference to save game isnt set before the construction script runs

#

when i moved to game instance it works, in editor

stuck hedge
#

if the variable is saved as you want in the defaults of the game instance, it shouldn't be any issue at all. Game instance definitely comes up first. But if you're trying to load the save game and get the variable but the construction script is running first that is your problem.

pastel rivet
#

Im using the game instance

#

This is the variable i use, that is set from the main menu, before the level load which has the cables (play map=

stuck hedge
#

two choices 1 - load your data before you move to the level. If the data is loaded it will be ready when you change levels.
2 - Move the cable logic from construct to begin play and put in a loading screen. Tell the cable to loop until the data is there and when it finds it, set it up and remove the loading screen

pastel rivet
#

@stuck hedge Cant do that, the variables of physics cables are not changeable during runtime

#

only on construct

stuck hedge
#

Your game instance is set properly in your project settings right?

pastel rivet
#

The data inside the game instance is set in the main menu, then it opens a new level where the cables are and then retrieves the variable

#

yes

stuck hedge
#

if the variable is set in the main menu, then it should be there when the level opens.

pastel rivet
#

So everything works nicely in editor, not in package, so apparently i cant use this method

stuck hedge
#

the game instance is persistent, it doesn't change when you change levels.

pastel rivet
#

Well, apparently in package ? 😩

stuck hedge
#

You must be missing something else.

#

Can you show me the code you use to set the variable in the menu and load the new level?

pastel rivet
#

Yes

stuck hedge
#

how are you moving to the next level?

pastel rivet
trim falcon
#

Anyone know great open source projects to study from?

stuck hedge
#

why are you saving the game through the game mode?

#

Save game should ultimately run through the instance.

#

The game mode might process part of it, but it looks like you've got your save game reference in the game mode itself.

#

One thing to do is, after you set the cable width in the game instance, print the cable width from the game instance.

#

package that up and run it

#

make sure it's being set properly in a packaged version

#

just set, then print, verify that. if it's coming back properly then you know it's set. Also try printing the result of the cast to the game instance in the construction part of the cable. That bool that comes off, make sure it's casting properly.

#

you should get a true. Or you can try changing that to an impure cast.

gentle flare
#

Aight

#

How do I tell an animation on a skeletal mesh to go to a specific frame? (or point in time)

trim falcon
#

@gentle flare off-topic. Ask that on #animation . I'm sure you'll find your answer soon!

gentle flare
#

I meant how do I do it in a blueprint

pastel rivet
#

@stuck hedge You mean from the game instance before the new level after set, and once the level is loaded

gentle flare
stuck hedge
#

@pastel rivet in the menu when you set the variable, after you set it, print it right away. Make sure it's actually set

#

If it isn't set that means you have an issue with your package

gentle flare
#

I've figured out how to calculate the delta I want to add to the animation position, I just don't know how to set the animation to a specific time (in BP)

pastel rivet
#

@stuck hedge How should the logic be on the checking of the variable once the level loads?

stuck hedge
#

Is it printing after you set it?

pastel rivet
#

@stuck hedge I have now set a print to the menu where you set the cable width, game init on gameinstance printing as well on startup of game, and gameplay event begin play on the start it prints the variable of cable width from the game instance, inside the new level.
So i am packaging it now and will give you the results

stuck hedge
#

That's the first test. If that doesn't print the correct variable immediately after you set it, it means you have a bigger issue with your package.

pastel rivet
#

@stuck hedge
From the event begin play in GAMEMODE, it prints out the correct value for the cable width, ones the play map loads up

#

@stuck hedge Maybe i need to print this from the game instance at the new level load?

#

just to check if the variable is set once the game instance initiates

stuck hedge
#

The game instance doesn't really know that the level loads.

#

So if the value is printing in the game mode, it means there is something wrong with your actor.

pastel rivet
stuck hedge
#

No, that's just in reference to the path. If your level is loading, you don't need to change that.

pastel rivet
#

Hmm, okay let me make a dummy actor with a text display that is created on construction script

#

i will debug it that way

stuck hedge
#

in the construct of the cable try to print there as well.

#

and try changing that cast to an impure cast.

#

I seem to recall I had an issue with a pure cast once, changing it to an impure cast fixed it.

pastel rivet
#

good observation

#

@stuck hedge
The empty actor with a text is on construction script showing a 0 in the text field

#

Hmmm

#

The print string in construction script doesnt print anything, as if the casting has failed

stuck hedge
#

are you using a pure cast or an impure cast?

pastel rivet
#

pure

#

impure**

stuck hedge
#

is it printing anything at all?

#

or just nothing

pastel rivet
#

no, im placing a print string failed on both the dummy actors and the cables now, to just check

stuck hedge
#

If nothing is printing then your cast is failing.

#

It's always a good idea to put an append on your prints

pastel rivet
#

Nothing is printing from the construction scripts

stuck hedge
#

so there you go. the cast is failing.

pastel rivet
#

but the prints works for gamemode and other actors with correct value

#

from event graph

#

not from construction script

#

So this means that the actors are loaded before the game instance?

stuck hedge
#

It's always a good idea to make your debug prints like this. This way, you can be 100% certain that the execution is passing your print.

#

No. Your game instance is loaded as soon as your game is turned on

#

and it never gets unloaded.

pastel rivet
#

Oh yes, i use that, but for this i used colors to define the different ones

stuck hedge
#

It means that the cast is not working in construction.

pastel rivet
#

damn

stuck hedge
#

Colors won't help you if the variable is empty

pastel rivet
#

Aaaaah true

#

but anyways, this means i cant use the game instance within construction script

stuck hedge
#

the reason we append is to make sure there is text there. If you're printing an actor's name and you don't see anything you can't be sure if the actor is empty or if the execution made a mistake and didn't go there.

pastel rivet
#

so i need to go into external file information maybe

stuck hedge
#

Can you spawn the cable?

pastel rivet
#

No, this is to big of a task to setup

#

😦

#

What i can do is this or try

  • Save the variable to a text document inside the projects folder, and load this on construction
#

maybe will work

stuck hedge
#

I don't know if load will work from there or not.

pastel rivet
stuck hedge
#

that doesn't print?

#

put a print at the front of the construction script and make sure construct is running at all

pastel rivet
#

im repackaging now, may have been the delay of the print

#

@stuck hedge It doesnt printstring at all, but the construction scripts runs for sure, because of the last lines of the one i pasted to you, you can see that it chooses the 5 in width cable if the value == 0

#

thats trigggeres, if i choose a higher number on that last variable == 0 it changes the cable

stuck hedge
#

Yes I just did a search here and others have commented that print doesn't seem to work in construct

#

but if it is choosing 5 that means the cast is working.

#

if the cast failed, then the execution would stop

#

and it would never choose 5

pastel rivet
#

jupp

#

Doesnt seem that its possible for construction script to retrieve values if the actor is placed in the next level

#

already*

#

Maybe the external document will work, ill get on it shouldnt take long and give feedback 🙂

#

@stuck hedge The casting fails for sure to game instance!
Ive disconnected the lines and the ending line didnt accualty set the cable width (Works in editor strangely)
The picture shows the construction scripts of the cable, and this works, but not the code snippet i copied to you in that site

#

GameInstance: high-level manager object for an instance of the running game. Spawned at game creation and not destroyed until game instance is shut down. Running as a standalone game, there will be one of these. Running in PIE (play-in-editor) will generate one of these per PIE instance.

#

hmm

stuck hedge
#

I'm just looking to confirm if cast can run in constructor or not.

pastel rivet
#

'Doesnt seem that way

#

damn

#

ill try the save external info

stuck hedge
#

I'm trying to think if I've ever had to cast in constructor, but I don't think so.

#

if you can't spawn this cable during begin play, then I think you're a little bit stuck.

pastel rivet
#

its a custom physics cable from vicos dynamic, should be able to rebuild the cable, but the casting fails to the VDDdynamics of the object, so thats why im trying to get a workaround right now, incase this doesnt work, it will have to wait for support of the plugin creator 😦

stuck hedge
#

You better do that then. I don't think you're going to be able to work around this kind of situation.

pastel rivet
#

@stuck hedge That seems to have done the trick! Im testing the packaging again for confirmation (had to get the file from the package directory and not the projects directory)

cyan lion
#

but to write something into txt file or read you need to use C++ so maybe it will be better to write C++ function of getting GameInstance of current class (so you wont need to cast it)

pastel rivet
#

@cyan lion Cant write c++, but i want to learn haha, the writing method of file worked strangely enough not inside the package written text file, but from the content folder of the ue4 project to the package

#

I will have to patiently wait for the plugin creator to respond why the casting is failing to the dynamic rope plugin

cyan lion
#

@pastel rivet last thing you can try (but i dont see reason why it should works this way ;p but if you gonna wait than you can give it a shot anyway) if you have BlueprintFunctionLibrary you can create there PureFunction GetGameInstance->CastToGameInstanceOfYourClass->Return GameInstanceOfYourClass, maybe that will work

toxic salmon
#

If I set a character to movement mode flying, there doesn't seem to be any drag. Is there any way to disable this "slippery" effect?

zealous trellis
#

I'm using the free forever cars variety pack from the marketplace. How do I get it working w/ the single player preset?

pastel rivet
#

@cyan lion you have an image sample of this?
I have tried pure function and impure casting

#

@zealous trellis Check out your projects input mapping

#

Seems like you have lost some information or project configuration there inbetween projects

cyan lion
#

create a function ;p and hopefully that will do the trick, but tbh im not sure

pastel rivet
#

hmm, that seems like a lucky work around if that works, im not sure if this handels the game instance casting any differently, but ill give anything a shot at this moment

#

thanks @cyan lion :)
@stuck hedge Thanks for taking the time to debug with me 🙂 Ill get back to you if anything works 🙂

cyan lion
#

yeha that's my concern, it still cast so i dont know if it handle any other way

split crescent
#

how do i use an aicontroller for my player? I'm trying to use the AIController MoveTo rather than the default SimpleMoveTo. i've set the aicontroller class and tried calling spawn default controller but my aicontroller is still returning none.

#

Not at a PC atm but I believe I tried spawning an ai controller setting it to a local variable and then using that to call moveto.

trim matrix
#

some sort of hot reloaded struct now causes a crash on startup, if I remove it from Content and add it back and try to open the bp it crashes, any ideas for a workaround?

#

damn even right click crashes it

#

ffs

fringe veldt
#

what's the call stack for the crash

modest gulch
#

So I have these two settings in Point light (MaxDrawDistance and MaxDistanceFadeRange)

trim matrix
#

@fringe veldt the callstack?

modest gulch
#

is there any way to set them programmatically (via blueprint)? I cannot find anything that would match

fringe veldt
#

when the engine crashes do you get the dialog box that says there was an error?

trim matrix
#

the struct is c++ created

#

but blueprintable

#

though it was hotreloaded

#

I was like hey let's compile, close and reopen to get the actual struct in there

#

damn there are quite a few blueprints who cause a crash on right click

fringe veldt
#

ok cani see the struct

#

i was just scanning the source to see exactly where it faulted

trim matrix
fringe veldt
#

ok that all looks fine you are saying when you compile it and right click on a blueprint in the content browser it crashes the engine?

trim matrix
#

it crashes at startup with a certain bp in the content folder

#

and it crashes when i only right click icons of certain bps

fringe veldt
#

ok what is in the bp's that are causing issues. is it just the use of that struct

trim matrix
#

yeah

#

it was hotreloaded

#

then i closed and reopened the editor

fringe veldt
#

is the blueprint a child of a c++ class?

trim matrix
#

nope

#

yeah

#

well one is

fringe veldt
#

are you storing the struct as a pointer in that class

trim matrix
#

im referencing it i think

#

also i am not quite sure which struct it is

#

i can only tell that more than 50% of my bps are now messed up and like 2 days of work

grave nebula
#

hello, how do make a 'stop hit' effect after we hit something hard (Time Dilation->Delay->Time Dilation)? i try to make a stop motion effect after i hit an enemies several times, but sometimes it's not working (the delay isn't working)

fringe veldt
#

@trim matrix i'm sorry i'm lost i don't think i have a solution for oyu

trim matrix
#

@fringe veldt no problem!

hollow cape
#

You may want to check #cpp honestly, as this isn't fully BP related

feral kiln
#

Hey there, so i'm working on a game and now I have an issue, I want to make my character fly in a certain direction (for example X axis), but I want the character fall always and control it by a key (for example space bar button). so when i push space bar the character goes up and when i release the button my character falls down. I've done it already but the problem is that when the character start flying it's forward speed decreases, any idea how can I improve it ?

sour comet
#

hey so im getting an issue with my camera. ill load a gif here. but to explain whenever i have a destructible mesh it shakes my camera around and i would like it to not affect the camera or player. i was told it was a spring arm issue but ive set the mesh to when it destructs to not have collision but it still does
https://gyazo.com/3197ef5c6ca3178957365ec14895793f

#

oh i found if i damage it twice collision get turned off then

feral kiln
#

you can set collision for your camera ignore under the collision section of your CapsuleComponent

sour comet
#

yes but then it clips through it before it's destroyed

fathom portal
#

Hey friends, I'm having an issue where a non-existant variable is preventing my blueprint from compiling:

sour comet
#

so now it works but i have damage it twice. and id rather not have tick function calling to see if it has taken damage

fathom portal
#

Basically, after updating to 4.24 my blueprint is yelling at me that what I was using before isn't valid anymore. Which is fine, but after removing all instances of that variable (replacing it with the new, valid "Tile to AHHHHHH" variable) I'm still getting compile issues
The original variable no longer exists (as proven by the left side "Tile to" search I'm running)
But the interesting thing is if I control+f for "Tile to", it does say the original variable exists in two places, but when double clicking those to try to get to them it doesn't go anywhere:

https://cdn.discordapp.com/attachments/221798862938046464/679732992603979806/unknown.png

#

I've tried:

1: Deleted every reference variable to the original TMap variable
2: Right clicked the blueprint and selected "Reload" under "Asset Actions"
3: Closed and reopened the project about a dozen times
4: Duplicated the blueprint (Same errors)

#

As well, when I try to make a new variable named like the variable in the error, it says the variable exists, even though I have no option of deleting it:

feral kiln
#

yes but then it clips through it before it's destroyed
@sour comet i think what you are dealing here is your setting camera to ignore the collision for the big meshes and as you destroy them you get small meshes with the default collision blocked for camera, so what you can do i think is to change collision for the camera to ignore all meshes inside your ThirdPersonCharacter blueprint, if that does't work i'm not sure of any other ways to fix it.

sour comet
#

no im setting the mesh of the cube to no collision whenever it gets damage to no collision and it takes two hits of damage for it go to no collision or a delay to let the collision to be turned off

#

yeah ill just say fuck it for now and just do a delay on it

hollow cape
#

@fathom portal when you went to 424, did you delete intermediate/saved folders?

sour comet
#

what's the size of the default cube?

hollow cape
#

1M

sour comet
#

gotcha yea 100 unreal units

#

so spawning cube actors makes the game realll laggy o.o

#

100

#

ima try 1000

fathom portal
#

@hollow cape I believe so, but when i get home i can try again. What's a full list of the things I should delete before rebuildin

hollow cape
#

saved/intermediate. Is it a BP only or c++?

sour comet
#

it really doesnt like that many actors o.o

hollow cape
#

you're trying to spawn 1000 actors and surprised it hitches? lol

sour comet
#

yeah trying to make a procedural map

#

it didnt like that many cubes

#

it spawns them all but rendering them is a different story

hollow cape
#

look in to instanced meshes and/or voxel plugin

sour comet
#

i tried instanced meshes but they didnt spawn

hollow cape
#

read up docs, you don't spawn a bunch of them, you add instances

fathom portal
#

@hollow cape its both cpp and blueprint

#

This was a blueprint variable tho

sour comet
#

i mean it should work like this when i looked at the docs or no?

hollow cape
#

do you have a instanced static mesh component?

sour comet
#

yea

#

nah i lied

#

im dumb

#

much better performance XD

#

now i gotta figure out a way to destroy them.

tulip iris
#

I cant seem to get line traces to work in editor. That's supposed to happen?

sour comet
#

are you rendering the debug?

tulip iris
#

I am

#

I'm using the event graph with an event to run it in editor vs using the construction script.

#

Maybe that's why?

fathom portal
#

@tulip iris shouldn't make a difference. Are you sure tthe code is running, have you ran the debugger light show thing or added a print string or two? Want to share the code?

tulip iris
#

Yeah that was it

#

It wont run in the event graph

hollow cape
#

yes it will, but it has to be at runtime

tulip iris
#

only the construction script

#

Right

#

I'm in editor

sour comet
#

how do i make a class in a blueprint.

fathom portal
#

Naa, those can run anywhere, doesnt need to be in the construction script

hollow cape
#

that's fine, just simulate

tulip iris
#

I just tested it

hollow cape
#

or PIE

#

@sour comet make a new blueprint, that is a new class

fathom portal
#

I have multiple line traces with debug, none of which are in any construction scripts

hollow cape
#

yep

#

I use traces allll the time

tulip iris
#

Strange

#

I'm going back and forth right now and it only works in the con script

#

same trace logic

hollow cape
#

are you simulating or PIE

tulip iris
#

Just in editor

hollow cape
#

for anything on the event graph, you have to be simulating, or playing

tulip iris
#

not simualting

#

That's not entirely true

#

Custom event run in editor for instance will run in editor

#

doesn't mean it will always do what you want

sour comet
#

ok well whats the best way to store each instanced mesh in a blue print and destroy that specific one. im thinking storing location in one array and index of each one in another array and getting hit location then removing the closest instance mesh to that location

tulip iris
#

It does work though

sour comet
#

or can i not do that

hollow cape
#

that's not really how that works

sour comet
#

ok well. i would like to be able to destroy each individual instance is the thing. Though that doesnt seem to be doable

terse goblet
#

Hello 😳
How can I break vector3 to x,y,z in math node?

hollow cape
#

right click, split

#

or drag off, break

terse goblet
#

i meant inside

#

but its for make vector, I also need to get x,y,z from the input

hollow cape
#

vector(x,y,z)

terse goblet
hollow cape
#

is that what you were looking for?

terse goblet
#

nearly 🙂

#

i need to get vector to input tho

hollow cape
#

you can change the input type

terse goblet
#

yes

#

but how i can make new vector from input ?

hollow cape
#

why not just use a function

terse goblet
sour comet
#

i figured out a way

terse goblet
#

? 😮

#

just wanted to know, is possible or not via math expression

sour comet
#

its not quite right

hollow cape
#

I don't think you can do what you're trying to do with a math expression @sour comet

sour comet
#

oh no

#

what im doing is different

#

i forgot to put an index

#

cause im stupid

tulip iris
#

@terse goblet I think I know what you mean. Right click in graph and search make vector, and simply select the one that works for you.

hollow cape
#

no @tulip iris , that's not his question

terse goblet
#

😄

hollow cape
#

he was trying to break a vector in a math expression, which I don't think you can do

terse goblet
#

y

#

Thanks all, I done without math expression

hollow cape
#

you're stuck with a function methinks for what you're trying to do

terse goblet
#

Would be great if it will become possible in the future

tulip iris
#

N/M

odd ember
#

I don't know that math expressions are cheaper than any other nodes really

#

you're still going through the VM

hollow cape
#

yeah not sure I understand the desire to make that work, when a function will work the same

upbeat smelt
#

whats the difference between adding something for example a particle system as a component vs as a variable to an actor blueprint?

hollow cape
#

a particle system component is basically a container, with just a var, you still need to either spawn an emitter, or add a component and activate it

odd ember
#

a variable is a reference in the case of actors

terse goblet
#

it lust looks cleaner..

odd ember
#

that reference still needs to come from somewhere

hollow cape
odd ember
#

it's the sleek matte black color of the math expression

#

delicious

#

like an apple product

hollow cape
#

function ftw

sour comet
#

yeah so my issue is now currently a math issue i think..

#

trying to get the closest instance to my point damage

hollow cape
#

dunno if you can even do this with ISM, but can you drag off hit component, get location, and use a find node with the array to find that index, then remove

upbeat smelt
#

@hollow cape @odd ember ok thanx

sour comet
#

ok umm now its working >.>

#

ok so now im just getting weird flickering on my meshes

hollow cape
#

like Z fighting?

sour comet
#

is it just a lighting issue?

hollow cape
#

culling?

sour comet
#

maybe culling yea

hollow cape
#

might be a function of ISM, I don't use it much

#

try that

sour comet
#

still doing it and it was 0 0

hollow cape
#

doesn't seem like a distance cull, but a screen space cull

sour comet
#

where is that camera?

#

i just turned it off works great now

#

alright attempting 1mil

thorny pewter
#

Hey, vivek this side... im working with ue4 for archviz where i want to build a model when my first person character can change the wallpapers/colour of the Walls, change the models such as Sofa, Bed and basically furnitures using blueprint...i tried and with help i was able to do it but I'm stuck where i can't change the pivot point of static mesh( i can change them but only in editor and the moment i try to make it as a blueprint, i find the pivot point to be at the same place and not where i changed it in the editor). This has created a problem for me coz when i change the models in Game mode using cursor programing, the models pop up at different location and not at the same place, due to the reason that their pivote points are not at the same place and they tend to move slightly to different location depending on how different the pivot point of my model( furniture ) is.

sour comet
#

yeaaaa big fat nope

thorny pewter
#

I first create my 3D model in SketchUp and then i import it to UE4 using Datasmith

sour comet
#

50x50x50 works but not 100x100x100 XD

#

so chunks of 10x10x10 seems optimal so i gotta make an actor to render the actors :3

hollow cape
#

@thorny pewter 2 simple options, 1 option is to take that model into a modeling program, change the root, and reimport

#

option 2, add the mesh to a bp, move the mesh in relation to the bp root so the pivot is where you want it, drag that BP into the world, right click, convert to static mesh

#

for option 1, you can export from UE4 as FBX, then import into blender, change the root, export and reimport to UE4

sour comet
#

yeaa so its taking a min to load 1000 chucks of 1000 cubes XD

#

think i fucked up

thorny pewter
#

Option 2 is not useful for my work...coz i cannot make my meshes into BP...as im using meshes in a library( which will only use static mesh and not amy BP), from there the meshes are changing in game mode with the help of classBP.....

#

@hollow cape .. if i take my model into blender, then i will have to change the root to 0,0,0(location) right?

hollow cape
#

If you read what I wrote, you add the mesh to a bp, change the pivot point by moving the mesh relative to the root of the bp, then convert the bp to a static mesh which will bake the new pivot/root of the mesh

thorny pewter
#

I'll try it in the morning...thanks mate @hollow cape

hollow cape
#

yep

fathom portal
#

@hollow cape I'm back home. I deleted the intermediate/saved/etc folders and rebuilt my solution

rigid meadow
#

hey, can someone help me with my problem? so, im doing this for a firing function and it isnt firing?

fathom portal
#

Same errors

rigid meadow
#

sorry if its messy

fathom portal
#

@rigid meadow How are you calling the event?

rigid meadow
#

like, using it or?

fathom portal
#

It needs to be called for it to happen

hollow cape
#

@fathom portal you may want to check with #cpp, they'll prob know better

fathom portal
#

Are you calling it on a key press?

rigid meadow
#

yes

fathom portal
#

Share that part, @rigid meadow

rigid meadow
fathom portal
#

@hollow cape but I mean it's a blueprint variable that's messed up, the cpp isn't an issue as far as I know

rigid meadow
hollow cape
#

but it's a CPP project, so there may be a project upgrade recompile fuckery that's causing an issue

fathom portal
#

Ok, I'll ask over there

rigid meadow
#

it was firing before but it wasnt firing in the right place

hollow cape
#

@rigid meadow put a print string in between the event and the fire function to verify that it's actually being fired

#

oh, so it is firing

rigid meadow
#

i tried to fix it and uhh

#

cant see the bullet now

#

so, what should i do?

hollow cape
#

well first verify that the bullet actor is being spawned

#

put a print string on begin play of the bullet actor

#

then start looking at your location/rotation inputs and make sure they make sense, or just drag an instance of the bullet bp in the world and make sure it fires off that way

rigid meadow
#

like this?

#

yep, its firing and i saw some bullets when i was spinning around

#

lemme try smth

#

aha

#

its spawning at a

#

really weird place

#

behind me to the right

#

what should i change?

spark robin
#

Hey, Im following a YT tutorial where you are supposed to make a make a cast to character node trigger a calculate direction node that is supposed to trigger a set variable node.

And in the video he drags out from the execute socket out socket of the cast to character node to search for a triggerable calculate direction node, but for me nothing shows up when I search for it, however I can create a non-triggerable calculate direction node, and Im curious if I could just stick with that instead and make the cast to character node trigger the set node directly

https://youtu.be/ftLBejDtlqc?t=309

In today's video we check out how we can finish up our animation blueprint, setting up the conditioning and logic to determine the player's speed and direction and then feed it into our animation blendspace.

By the end of this video we'll have a completely custom character se...

▶ Play video
#

As you can see, I didnt manage to get a triggerable/blue calculate direction node, does it matter in this case?

sour comet
#

soo all my chunks are stacking at 0,0,0

rigid meadow
#

i think you should use vector length

#

he said vectorlengthsquared on accident

sour comet
#

fixed it

rigid meadow
sour comet
#

now i have a new issue v.v

#

nvrm fixed it XD

spark robin
#

To answer my own question, no, it doesn't seem to matter, looks good in the preview at least

swift warren
#

hey im having some trouble

#

so basically im working on carrying velocity through portals

#

the portals are dynamic

#

and function as mirrors

#

ill just show what i have

#

the rotation is something complex

#

and then i launch the character with the output of the first blueprint

#

wait its working now

#

oh wait i didnt plug everything in right the first time

trim matrix
#

@swift warren you could just take the forward vector of the out-portal

#

multiply it by whatever

swift warren
#

ok well if anyone ctrl f's having the same problem im gonna add some keywords for their search so they can see my blueprints: portal, rotation, velocity

#

@trim matrix im not good with vector math, what would whatever be

#

the player forward vector?

trim matrix
#

a value defining the strength

swift warren
#

oh

trim matrix
#

a float

#

like for the launching strength

swift warren
#

well the problem with that is that the player can enter the portal at an angle

trim matrix
#

maybe add a bit z up

swift warren
#

angles are kinda the entire point

trim matrix
#

ok i see

swift warren
#

lemme explain

#

the portal can be rotated and the player can't turn

#

the player needs to walk through the portal to change directions

trim matrix
#

didnt get that

#

so the portal can be rotated by 180° or whatever to a wall?

swift warren
#

yeah

#

well like

#

its a mirror

#

if u wanna turn around you will walk directly into it

#

with it facing you directly

shrewd summit
#

Hey so I'm having some problems with creating a texture- this is my script and the error that comes up:

swift warren
shrewd summit
#

Okay ty

swift warren
#

wait @shrewd summit i can fix it real quick

shrewd summit
#

How do you fix it?

swift warren
#

ur trying to blend RGB and RGBA

shrewd summit
#

Oh

#

So, how would I go about getting rid of the A tho. Sorry I'm kinda new to this

swift warren
#

why are you using the A

trim matrix
#

rgb is without the a

swift warren
#

A is transparency

#

opacity is the term

shrewd summit
#

Mostly to get the texture samples I just dragged them from the starter content into the blueprint

delicate drum
#

Guys, basic question, how to convert Texture2D into image in blueprints? I want to make basic equipment system so that thumbnail in inventory would change based on what was equipped

shrewd summit
#

And they automatically came as the "RGBA"

#

Sorry I'm stupid about this but how do you change from RGBA to RGB

trim matrix
#

@delicate drum texture 2d is an image asset

#

if you wanna change an image widget element you can do "set brush from texture"

shrewd summit
#

I basically realised I didnt need 3 of the same texture and did it like this

trim matrix
#

what are you trying to do there?

shrewd summit
#

To create a texture so I can paint the floor

#

Of my map

odd ember
#

just forget the A

#

the A isn't necessary

shrewd summit
#

Ok

delicate drum
#

That what i was trying to do, but i cant figure out how to use brush out of get_brush func and if i use it there image is either white or transparent all the time

trim matrix
odd ember
#

@shrewd summit but use #graphics in the future

shrewd summit
#

Okay I will from now on

delicate drum
#

Okay, sorry you are supposed to place it from and image, i thought it was renamed to "make brush from texture" and tried to use this

#

Tyvm

sour comet
#

how to do a delay with a for loop without f*cking up the for loop

mild pine
#

Hey guys. I want to add my AI to an array when they succeed at moving to a location, and I want to check if the array has hit my max clamp (2), and if it's full then the remaining AI should move on to another task. Not an AI question, but more interested in how I should go about doing the array coding, it's my weakest suit haha

hollow cape
#

@sour comet there are a few ways, but a Do N with the delay should work

#

another way is with a macro, slightly more complicated

mild pine
trim matrix
#

@mild pine the output of the add is the index of the added element and not the array size

#

you have to add 1 to it

#

also there is AddUnique

#

dont know if you can use it instead of the Contains branch

#

and you can also get the array length

#

probably won't have to store it like this

mild pine
#

Hmm, but the branch checks if the array contains 1 member of the array, correct? Meaning it would return true even if one of my AI got to the location; how do I make sure it checks if two made it to the location?

#

the output of the add is the index of the added element and not the array size
@trim matrix Not too sure if I understand that :/

trim matrix
#

@mild pine if i might ask, what exactly should happen and what blueprint is this on?

mild pine
#

I'm doing it in the Behavior Tree as a Blueprint Task.

I have some variations of AI, predators (wolf) and prey (deer). If the predators kill their prey I want to clamp the amount of predators that can move to the corpse and feed, as if a whole pack of wolves would stack ontop of the corpse it would get messy with collisions and space. So, if they get near the corpse and check if the array is full (2 wolves feeding on the corpse) then the remaining wolves should do other tasks, i.e roam around. What I specifically need help with is the array setup though, to make sure that the AI checks if there's less than 2, if true move to the corpse, if false do something else. I also want to clear this array after the feeding is done with a clear node.

#

@trim matrix

odd ember
#

you should have the "pack" entity make that behavior

trim matrix
odd ember
#

and use each wolf as a pawn extension

trim matrix
#

the unique only as a precaution if the same wolf might be checking twice

odd ember
#

yeah it's not a surefire way to get it to work

trim matrix
#

Maybe you could do it as CranzEstebogen said on the pack entity, this example of mine would be on the prey

odd ember
#

yeah that's not ideal either

#

the "pack" is really the AI manager in this case

#

or controller

#

it can have PackSize amount of pawn extensions

#

that it then controls

trim matrix
#

that is true, if the wolfs should act as a pack then that behaviour should definitely be more tied in with that pack ai

#

let's say if the whole pack initiates the eating check then it could probably pick 2 of them defined by whatever parameters

#

but if some initiate the eating and others not it might get a bit more complicated

odd ember
#

and it would always pick deterministically

#

which is the most important factor really

trim matrix
#

let's say theoretically if a pack ai could split the members into sub ais then it wouldnt be a bad idea to have an array of eating wolfs on the prey object to check on by each ai or sub ai, it would be rather "modular" and could also work with the pack

mild pine
#

I'm thinking I'll have a hunger count for future reference that will be determining the hungriest wolf that gets to eat, so multiple checks. That could be done in the AI Controller or AI Actor BP I guess; but you don't think I should do the array in the actual task itself?

odd ember
#

nope

#

it's not a deterministic setup

#

at any given time you cannot guarantee that any x amount of wolves will actually initiate eating, despite otherwise perhaps wanting or needing to

mild pine
#

Hmmm... not as straightforward as I was hoping it would be

odd ember
#

well yeah

#

AI is one of the hardest parts of programming

mild pine
#

I don't have a pack controller yet. They're all currently running invidiualistic behaviors, although they're roaming with a pack leader that generates their pathing points.

#

Yeah, I literally meet a wall at every corner. xD I'm trying to wrap up my AI section before I move on, as I find it way too easy to forget where I was and having to re-read my whole code and re-learn behavior tree coding etc 😛

odd ember
#

tbh you could have the AI manager be a pack leader as well

#

but I don't know if the pack spawns as a complete entity or if you want them to "become" a pack when there is a congregation of wolves for instance

#

likewise is there a need to account for when a pack loses a member?

mild pine
#

What I've done so far is have the wolves follow their leader if they're close enough, and if they fall off wander around until they meet another leader. In the future I'll work on adding a functionality to make a wolf's X lifetime make it an alpha so other stray wolves can follow it.

#

They're not necessarily a pack though

odd ember
#

so what happens if 2 or more young wolves find themselves together?

hollow cape
#

you never got the birds and the bees talk eh?

mild pine
#

It'll be a player situation where you gotta "control" the predators in the forests unless you'll find yourself having a hard time travelling around

mild pine
#

Nope xD @hollow cape What's that?

odd ember
#

@mild pine I mean do they form a pack or not

trim matrix
#

I gave my gold an impulse force as it start to go Up in the air

odd ember
#

also I think that was directed at me

trim matrix
#

But as i Spawn it nothing happens 😄

odd ember
#

😅

trim matrix
#

Any clue why?

hollow cape
#

simulating physics?

odd ember
#

haaaaaaaave you tried googling it?

trim matrix
#

@hollow cape Yup did it

#

Am confused

#

screenshot please

mild pine
#

@odd ember Food for thought 🙂 One thing would be females and males. To be honest, all I can think about right now is not having a bunch of wolves stack ontop of their prey. Kinda tackline one issue at a time, but I do appreciate you questioning my path down the road 🙂

trim matrix
#

@trim matrix if i put the gold bp in the scene it works fine as i start the game

#

it gose in the air for a while

#

but if i spwan it in the enemy position as he dies

#

the impluse wont work

hollow cape
#

colliding with the enemy maybe?

trim matrix
#

^

odd ember
#

@mild pine I think you need to take a step back and reevaluate your structure, because then issues like these become much less of a roadblock on your path

#

that's all really

trim matrix
#

This first pic from the gold BP

#

and this one

#

from enemy as he get destroyed

#

@hollow cape colliding?

#

am ganna check atm

hollow cape
#

try changin the collision handling to don't spawn if colliding, and I'm betting it won't spawn....because it's colliding

trim matrix
#

Yup

#

it wont spawn 😄

#

@trim matrix the impulse might be simply too weak

hollow cape
#

so you need to change the collision profile, or spawn it outside/above the collision

#

no, if it's working when placed, then it's not an impulse strength issue, it's a collision issue

mild pine
#

@odd ember Thanks your assistance 🙂 I'll play around a bit and get back to you ^^

trim matrix
#

am ganna try and do it now

#

@hollow cape can you tell me how i can change the collison profile?

#

Tried to do it outside above the colloison still not adding force 😄

#

@trim matrix try 500k on the z axis

#

ok am on it

#

It worked @trim matrix 😄

#

wth hehe

#

yeah those impulses have to be ridiculously high

#

when you tick Velocity Change you can have them lower

#

by like 2 or 3 zeros

#

Mystic

#

look

#

Am trying to do it like this

#

is it super hard?

#

i think am half way there

#

only the spawning of the loot, not that hard imo

#

How is he doing that circle angle

#

been trying to do it since 2 hours 😄

#

gotta make sure that the loot has a collision channel which the enemy doesnt block and vice versa or else you might get no spawning or offsetting or maybe depenetration

#

you mean that it spawns around the guys?

#

Yup

#

Look how it dose the cirlce thing

#

circle*

#

not sure if those are actors or a particle system

#

It goes up and around

#

Mystice

#

cant i at least give it an angle?

#

yeah

#

lemme come up with a function lol

#

oh 😄

analog hill
#

There are only certain times I want to be running a line trace, but I only know how to run it off of tick. Is there a better/more performant method than this to turn the trace on and off?

#

And then some other event switches that bool

trim matrix
odd ember
#

@analog hill using a timer

analog hill
#

Oh yeah, that would totally work.

trim matrix
#

like I try to make a random vector and sort of make it always Z positive and then add a random amount to it to possibly make it go a bit steeper, then normalize it to get a direction vector and then multiply by strength

#

but you could also do a non normalized vector and ensure more that it is going upwards

#

but i mean this is probably the unsmartest way to do it at all

#

yeah you could also do something like this to ensure it is going upwards

#

but then some of the impulses are stronger than others

#

Wew

#

Trying to understand it sec 😄

#

this is new to me hehe

sour comet
#

@hollow cape Do N ?

hollow cape
#

Yeah, do N, look it up

trim matrix
#

@trim matrix
what it does is:
It gets a random unit vector which is a vector of length 1 pointing in any direction.
Then it only uses the X and Y of it and adds a positive Z to it which is in a certain range.
Then you multiply it by the strength of the impulse.

odd ember
#

doN, the mafia node

trim matrix
#

doN used on Mob

#

Mystice its almost doing the job

#

this is really smart tbh

#

sec am testing

#

the thing is it won't evenly distribute it

#

@trim matrix

#

Humm i dk 😄

sour comet
#

@hollow cape yeah DoN isnt working for i need because its nested for loops

trim matrix
#

Maybe i need to give it a random rotation?

#

so each one go to side in an angle lets say 65

#

something like that

#

@trim matrix if it's too steep change the Z range

#

lower it

#

if you want more uniform angles make the range smaller

#

or use a constant value

hollow cape
#

@sour comet you can basically copy the for loop code and add a delay, I've used it and it does work

#

For the love of coding gods don't modify the default for loop macro

sour comet
#

MODIFY THE FOR LOOP MACRO

#

GOT IT

trim matrix
#

wth 😄

sour comet
#

ill try that tho ty

trim matrix
#

One last question 😄

#

For smooth scaling from small too big

#

TimeLine is the case?

#

or there is something easier

#

I'd probably use a timeline too @trim matrix

#

Am giving it a try atm

#

and a tip: you can use a float track in the timeline and make a vector with it for uniform scaling

#

easier to adjust than a vector track

fathom portal
#

MODIFY THE FOR LOOP MACRO
@sour comet I blood pressure jumped when I read that, before I read the rest of the conversation

#

Reading conversations before reacting is important, people

sour comet
#

Yeah that still didnt work v.v delay causes skipping @hollow cape

hollow cape
#

Delayed for loop definitely works if set up properly. Screenshot

sour comet
#

with delay node

#

it's causing skipping

uneven shadow
#

ello, just downloaded ue4 today and trying to make post processing effects. trying to copy someone elses bp and they have boxes called 'param' with custom names? how do I do that?

odd ember
#

@sour comet literally people telling you not to modify it and not to add delay nodes to loop

#

and you still do it

#

you deserve it not working tbh

sour comet
#

.> im no modifying it. its a custom function

odd ember
#

@uneven shadow #graphics is a better place to ask

sour comet
#

macro

trim matrix
#

@trim matrix

#

it is going to be something like this right :D?

uneven shadow
#

oh

sour comet
#

and @odd ember same effect with normal for loop and delay

uneven shadow
#

but its blueprint related

#

I guess I'll go there anyways

odd ember
#

@sour comet also people told you not to put delay inside loops

#

you got no sympathy here smh

snow geyser
#

a delay in loops? oof

odd ember
#

@uneven shadow material editor is not the same as blueprints

sour comet
#

you got a better solution to loading 1mil instances?

trim matrix
#

@trim matrix yep, but as i said for uniform scaling you could just use a float track

odd ember
#

even if I would I'm not going to bother

sour comet
#

ok then stop being a dick

odd ember
#

same

trim matrix
#

@trim matrix also for smooth interpolation you can right click the keyframes and set the mode to auto or user

#

@trim matrix really thanks its working like magic tbh

#

but is there a way i can make it slower maybe?

earnest tangle
#

@sour comet loading 1 mil of stuff is kinda tough I suspect. You could try splitting the workload over time but it's not going to be a super straightforward implementation

trim matrix
#

yeah increase the timeline duration and move the end keyframe

#

or set the playrate before playing it

#

playrate is an outside node yup?

#

i been having problems with this playrate 😄

sour comet
#

yeah i just keep getting risk of infinite for loop prompt and crash

earnest tangle
#

One potential way you could split the work: Keep a 'queue' of things you need

snow geyser
#

Out of curiosity, could you build those 1million in construction script so it happens before the game loads?