#blueprint
402296 messages · Page 414 of 403
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
not perfect obviously....but shows it
some Elevation changes, but largely flat. Almost all flat
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?
@crystal mural:
1: Try not to set variables in a tick event, use comparisons instead, or even better use open/close gates:
Or use timers:
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?
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.
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
Not trying to be a dick, but what you posted is a perfect example of what not to do lmao
The code or the blueprint?
So the current frame (tick) never finishes, so it won't run the next frame
The blueprint
Did I misunderstand the code?
And sure, you're not being a dick. I've got to learn hey 🙂
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%
I'm reading the instructions @hardy merlin gave me and I see this step is probably important:
- 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.
kk
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.
Sure, which is fine. Even while loops are fine, as long as you set them up carefully lmao
Lol while loops....SUCK in BP
it was in reference to the solid structures @hollow cape used as examples
lol NOBODY ELSE commented on that
but really, haven't we all drawn a phallic object that somehow made it into a released game
The image just showed up for me
I decided against using spheres and a capsule....so I kinda get it
The very first iteration of my random level generation would quite often make phallic shapes
My friends called it my "dick generator"
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
is this a riddle
Local multiplayer only?
had to re read it a couple of times
local multi, yep
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
will the input handler differentiate the "A" button between the 4 gamepads however?
from what I've tested so far, no
@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)
@hollow cape it should if it goes through server, and also doesn't the FKey structure pass which player pressed the key?
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
That means every physical controller is bound to the opject player controller(0), which is bad
or idk, connect several player controllers to the same pawn and let the madness unfold?
not sure if that's a legal move
@fathom portal on top of that, steamvr (which is handling the gamepads), won't pass the events from other gamepads
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"
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
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
I suppose yeah
which is possible, I was just trying to be trick and creating my own headache
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
Got it working nicely!
@crystal mural don't forget the updated code and maybe a gif of it working
if those engines don't spin, just quit now
If it doesn't slightly thrust for every shot what are you even doing with your life
@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.
LOL
@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...
put 10 of them in there and then we'll talk
It's all a mess so I'm going to clean the one up and make it know how many bullets to actually shoot.
No worries, dirty working code is still better than dirty not working code
@fathom portal VFX and Animation is my actual job so don't worry about the juice 😉 That'll ALL be in there.
add drunk AI controller and #shipit
LOL!
It's relevant to the conversation at hand, which is about blueprints
this entire discussion isn't
It's relevant to my gun.
or well
Thanos snapped
Get back ontopic, stop trolling and move forward.
There wasn't any trolling
So as I said, should I compress it or do you want a dropbox video to see what I did?
either way
That's the last time I ping mods asking for advice
I am going through my code. Just listening if I sound OK 😛
I mean, I light-heartedly asked just to be safe, then you proceeded to call me a troll
I wasnt aiming that at you, everyone in the conversation was not ontopic.
Please stop arguing and move on.
No one here was trolling, including myself.
We were helping out on an issue
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.
Sorry we trolled you, @crystal mural
😉
Mate, do you want an infraction for not moving on?
😉
Seriously.
also glowbeard, getworlddeltaseconds == delta seconds from the tick
Mate, are you going to give yourself an infraction for calling everyone here trolls for helping people?
so you can use that without needing to store it as a var
Ah I didn't know that.
another cleanup for ya
Sweet, my code will be half the size by tomorrow.
Seems calling everyone trolls for helping people would constitute being disrespectful, no?
Nope, being an arse talking back like that to a Moderator does though.
I'm defending myself from your personal attacks
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.
^ And no trolling whatsoever occurred
Anyone know if there are performance benefits to function vs macro/event
hmm no idea actually
Not really. Events are usually better for maintenance than Macro, however
lol nice
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
yep, get it
Its still plain looking because of placeholder materials and whatnot, but you get the idea. Thanks again guys
nice man! looks better than mine for sure lol
you are welcome, I helped out SO MUCH
LOL
Cranz you did answer some and I am grateful too 😛 They just went the extra mile this morning
anyway
thats all
Woop woop, glad it's working. I'm interested in how you did it
And sure @snow geyser, glad I could help
@snow geyser remind me, you're spawning 100 individual bps right? and moving them each individually on tick?
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
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
Im positive theres a better solution. Im sorta just hammering my face into things until they work without obscene loss of performance still haha
yep, nothing wrong with that
- Solve the problem.
- Check if it hits performance.
2.1. If yes, improve.
2.2. If not, leave it.
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
well if you converted the grid to a single static mesh you lose the dynamic single-cell based outlining you want
right
I dont know about instanced static mesh but I was going to look into that some as well
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
@surreal peak have you had any experience with an intelligent camera?
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
Not really
so a person holding a camera?
a camera being
Also don't think I ever encountered that
A camera where the face is?
so camera AI
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?
@thick orbit put them in a singleton class like the GameInstance. They will remain during level changes.
I think they mean settings per level
BPs aren't so nice with LevelBlueprint settings
I'm fairly new to this and the only way i can see would be to store the number in the level name haha.
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.
A data table! of course!! thanks @fair estuary !
np 🙂
How can i check if a static mesh var is empty?
@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.
IsValid checks if input is null but also checks a few other things too (I think that it's not pending kill)
@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
@trim matrix Never used sockets myself
it will return "None" if not attached to anything, that's how you can check
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
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?
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
project settings, search console
oh thanks
engines so big not even the unreal guys know it all
I seen them get stuck before
@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
@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
Ok, should I use a trace line for the flashlight hit though?
so anyone know why rotation in unreal is does the bomerang thing on one axis
Is there a node for detecting when physics have "settled" or should I just check velocity?
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?
search for IsSleeping or IsAwake, i know those exist in C++ but i dont remember if they do in blueprint
Has anyone followed the multiplayer blueprint tutorial? https://www.youtube.com/watch?v=ngBI40tjirE&list=PLZlv_N0_O1gYqSlbGQVKsRg6fpxWndZqZ&index=11
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...
have a quick question before moving forward, currently on the part where you integrate steam
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
@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
@tribal axle a line trace is fine to have your checks occur
For fps games, are traces or collision objs more effective?
they both are effective
define what the effect is
trace is more performant
collision has different options
Im assuming bullet drop would be easier to implement w collision
the built in projectile class has physics simulation
and can basically give you bullet drop
the FPS template has ready to use projectile setup
but there's lots of different math and methods to bullet mechanics
the more you research it
- does anybody know a way to use heightmap to deform a mesh in blueprints?
I dont mean material displacement stuff
- How can I use gradient textures to specify where things can be?
the free voxel plugin probably can use textures to deform
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
oh
well what about accessing gradient textures?
to define things
like temperature
or something
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
okay thanks
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)
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?
when a server is destroyed how can i send instructions to all clients to call end game, and load another map?
UE4 handles that on its own.
The get send back to the map they connected from, so usuall the MainMenu
Thanks eXi. Will check GameInstance.
Hi guys, noob question. Is there a way to add node/instructions to a child actor's inherited function?
override event, right click the node -> call parent function, connect that then add additional functionality
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 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
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?
have you tried #gameplay-ai?
hah not yet but i should :3
is any way to disable all draw debug sphere from console comand like "DISABLEALLSCREENMESSAGES" ?
@pastel rivet Could you explain a little more about exactly what information you're trying to pass? is it save game data?
is there a blueprint node that you can give two numbers and it'll give you the smallest one back?
@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.
@pastel rivet Your game will have a menu won't it?
@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
So the player has to set the cable size before proceeding, or the cable size is being loaded from the save game?
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
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.
What you mean load game?
When you start the game, you're loading the save game data aren't you? to get the cable size
Im loading the variable from the game instance
i can easily change it to the save game data if you want
which is coming from a save game isn't it?
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
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.
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=
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
@stuck hedge Cant do that, the variables of physics cables are not changeable during runtime
only on construct
Your game instance is set properly in your project settings right?
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
if the variable is set in the main menu, then it should be there when the level opens.
So everything works nicely in editor, not in package, so apparently i cant use this method
the game instance is persistent, it doesn't change when you change levels.
Well, apparently in package ? 😩
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?
how are you moving to the next level?
Code for moving to next level
Anyone know great open source projects to study from?
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.
Aight
How do I tell an animation on a skeletal mesh to go to a specific frame? (or point in time)
@gentle flare off-topic. Ask that on #animation . I'm sure you'll find your answer soon!
I meant how do I do it in a blueprint
@stuck hedge You mean from the game instance before the new level after set, and once the level is loaded
@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
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)
@stuck hedge How should the logic be on the checking of the variable once the level loads?
Is it printing after you set it?
@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
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.
@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
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.
@stuck hedge
does this matter in this case?
No, that's just in reference to the path. If your level is loading, you don't need to change that.
Hmm, okay let me make a dummy actor with a text display that is created on construction script
i will debug it that way
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.
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
are you using a pure cast or an impure cast?
no, im placing a print string failed on both the dummy actors and the cables now, to just check
If nothing is printing then your cast is failing.
It's always a good idea to put an append on your prints
Nothing is printing from the construction scripts
so there you go. the cast is failing.
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?
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.
Oh yes, i use that, but for this i used colors to define the different ones
It means that the cast is not working in construction.
damn
Colors won't help you if the variable is empty
Aaaaah true
but anyways, this means i cant use the game instance within construction script
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.
so i need to go into external file information maybe
Can you spawn the cable?
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
I don't know if load will work from there or not.
@stuck hedge
this doesnt print either
that doesn't print?
put a print at the front of the construction script and make sure construct is running at all
Do you know this site? https://blueprintue.com/ copy and paste your construct into it for me
BlueprintUE.com is a tool for sharing, rendering and rating blueprints for Unreal Engine 4. UE4 is a game engine which use visual scripting called blueprint.
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
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
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
I'm just looking to confirm if cast can run in constructor or not.
I have a Avtor BP. In the Construction Scipt i call Event in App-GameInstance. But after this the Variable is Empty?
Click image for larger version Name: 1.PNG
Build powerful visual scripts without code.
'Doesnt seem that way
damn
ill try the save external info
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.
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 😦
You better do that then. I don't think you're going to be able to work around this kind of situation.
@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)
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)
@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
@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
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?
I'm using the free forever cars variety pack from the marketplace. How do I get it working w/ the single player preset?
@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
@zealous trellis
@pastel rivet first of all you need to create library
and then
create a function ;p and hopefully that will do the trick, but tbh im not sure
if you have time, maybe its worth a shot ;d
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 🙂
yeha that's my concern, it still cast so i dont know if it handle any other way
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.
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
what's the call stack for the crash
So I have these two settings in Point light (MaxDrawDistance and MaxDistanceFadeRange)
@fringe veldt the callstack?
is there any way to set them programmatically (via blueprint)? I cannot find anything that would match
when the engine crashes do you get the dialog box that says there was an error?
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
ok cani see the struct
i was just scanning the source to see exactly where it faulted
@fringe veldt https://justpaste.it/44e1o
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?
it crashes at startup with a certain bp in the content folder
and it crashes when i only right click icons of certain bps
ok what is in the bp's that are causing issues. is it just the use of that struct
is the blueprint a child of a c++ class?
are you storing the struct as a pointer in that class
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
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)
@trim matrix i'm sorry i'm lost i don't think i have a solution for oyu
@fringe veldt no problem!
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 ?
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
you can set collision for your camera ignore under the collision section of your CapsuleComponent
yes but then it clips through it before it's destroyed
Hey friends, I'm having an issue where a non-existant variable is preventing my blueprint from compiling:
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
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
When attempting to see if I can use said variable (right click on open blueprint area and typing), it doesn't show up either:
https://cdn.discordapp.com/attachments/221798862938046464/679733389208846444/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:
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.
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
@fathom portal when you went to 424, did you delete intermediate/saved folders?
what's the size of the default cube?
1M
gotcha yea 100 unreal units
so spawning cube actors makes the game realll laggy o.o
100
ima try 1000
@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
saved/intermediate. Is it a BP only or c++?
it really doesnt like that many actors o.o
you're trying to spawn 1000 actors and surprised it hitches? lol
yeah trying to make a procedural map
it didnt like that many cubes
it spawns them all but rendering them is a different story
look in to instanced meshes and/or voxel plugin
i tried instanced meshes but they didnt spawn
read up docs, you don't spawn a bunch of them, you add instances
do you have a instanced static mesh component?
yea
nah i lied
im dumb
much better performance XD
now i gotta figure out a way to destroy them.
I cant seem to get line traces to work in editor. That's supposed to happen?
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?
@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?
yes it will, but it has to be at runtime
how do i make a class in a blueprint.
Naa, those can run anywhere, doesnt need to be in the construction script
that's fine, just simulate
I just tested it
I have multiple line traces with debug, none of which are in any construction scripts
Strange
I'm going back and forth right now and it only works in the con script
same trace logic
are you simulating or PIE
Just in editor
for anything on the event graph, you have to be simulating, or playing
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
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
It does work though
or can i not do that
that's not really how that works
ok well. i would like to be able to destroy each individual instance is the thing. Though that doesnt seem to be doable
Hello 😳
How can I break vector3 to x,y,z in math node?
i meant inside
ok
but its for make vector, I also need to get x,y,z from the input
vector(x,y,z)
is that what you were looking for?
you can change the input type
why not just use a function
i figured out a way
I don't think you can do what you're trying to do with a math expression @sour comet
@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.
no @tulip iris , that's not his question
😄
he was trying to break a vector in a math expression, which I don't think you can do
you're stuck with a function methinks for what you're trying to do
Would be great if it will become possible in the future
N/M
I don't know that math expressions are cheaper than any other nodes really
you're still going through the VM
yeah not sure I understand the desire to make that work, when a function will work the same
whats the difference between adding something for example a particle system as a component vs as a variable to an actor blueprint?
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
a variable is a reference in the case of actors
it lust looks cleaner..
that reference still needs to come from somewhere
how does it look any cleaner than a function?
it's the sleek matte black color of the math expression
delicious
like an apple product
yeah so my issue is now currently a math issue i think..
trying to get the closest instance to my point damage
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
@hollow cape @odd ember ok thanx
like Z fighting?
culling?
maybe culling yea
doesn't seem like a distance cull, but a screen space cull
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.
yeaaaa big fat nope
I first create my 3D model in SketchUp and then i import it to UE4 using Datasmith
50x50x50 works but not 100x100x100 XD
so chunks of 10x10x10 seems optimal so i gotta make an actor to render the actors :3
@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
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?
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
I'll try it in the morning...thanks mate @hollow cape
yep
@hollow cape I'm back home. I deleted the intermediate/saved/etc folders and rebuilt my solution
hey, can someone help me with my problem? so, im doing this for a firing function and it isnt firing?
Same errors
sorry if its messy
@rigid meadow How are you calling the event?
like, using it or?
It needs to be called for it to happen
Are you calling it on a key press?
yes
Share that part, @rigid meadow
@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
but it's a CPP project, so there may be a project upgrade recompile fuckery that's causing an issue
Ok, I'll ask over there
it was firing before but it wasnt firing in the right place
@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
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
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?
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
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...
This is what the YouTubers node setup looks like:
This is mine:
As you can see, I didnt manage to get a triggerable/blue calculate direction node, does it matter in this case?
soo all my chunks are stacking at 0,0,0
this is what im using @spark robin
To answer my own question, no, it doesn't seem to matter, looks good in the preview at least
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
so the vector is the player's velocity
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
@swift warren you could just take the forward vector of the out-portal
multiply it by whatever
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?
a value defining the strength
oh
well the problem with that is that the player can enter the portal at an angle
maybe add a bit z up
angles are kinda the entire point
ok i see
lemme explain
the portal can be rotated and the player can't turn
the player needs to walk through the portal to change directions
yeah
well like
its a mirror
if u wanna turn around you will walk directly into it
with it facing you directly
Hey so I'm having some problems with creating a texture- this is my script and the error that comes up:
Okay ty
wait @shrewd summit i can fix it real quick
How do you fix it?
ur trying to blend RGB and RGBA
why are you using the A
rgb is without the a
Mostly to get the texture samples I just dragged them from the starter content into the blueprint
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
And they automatically came as the "RGBA"
Sorry I'm stupid about this but how do you change from RGBA to RGB
@delicate drum texture 2d is an image asset
if you wanna change an image widget element you can do "set brush from texture"
Would this work fine?
I basically realised I didnt need 3 of the same texture and did it like this
what are you trying to do there?
Ok
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
Okay I will from now on
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
how to do a delay with a for loop without f*cking up the for loop
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
@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
https://gyazo.com/72652f3282f632c53f6828327e3ae16e this should pretty much be it, amirite?
@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
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 :/
@mild pine if i might ask, what exactly should happen and what blueprint is this on?
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
you should have the "pack" entity make that behavior
and use each wolf as a pawn extension
the unique only as a precaution if the same wolf might be checking twice
yeah it's not a surefire way to get it to work
Maybe you could do it as CranzEstebogen said on the pack entity, this example of mine would be on the prey
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
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
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
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?
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
Hmmm... not as straightforward as I was hoping it would be
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 😛
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?
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
so what happens if 2 or more young wolves find themselves together?
you never got the birds and the bees talk eh?
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
Nope xD @hollow cape What's that?
@mild pine I mean do they form a pack or not
I gave my gold an impulse force as it start to go Up in the air
also I think that was directed at me
But as i Spawn it nothing happens 😄
😅
Any clue why?
simulating physics?
haaaaaaaave you tried googling it?
@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 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
colliding with the enemy maybe?
^
@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
This first pic from the gold BP
and this one
from enemy as he get destroyed
@hollow cape colliding?
am ganna check atm
try changin the collision handling to don't spawn if colliding, and I'm betting it won't spawn....because it's colliding
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
@odd ember Thanks your assistance 🙂 I'll play around a bit and get back to you ^^
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
Mixture of currency and potential loot drops upon enemy death, right now, the currency drops are set as small/medium/large/huge. and those would tick depending on the enemy that was slain. Also, to ensure better performance, currency actors despawn after around 10 seconds
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 😄
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
@analog hill using a timer
Oh yeah, that would totally work.
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
@hollow cape Do N ?
Yeah, do N, look it up
@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.
doN, the mafia node
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 😄
@hollow cape yeah DoN isnt working for i need because its nested for loops
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
@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
wth 😄
ill try that tho ty
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
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
Yeah that still didnt work v.v delay causes skipping @hollow cape
Delayed for loop definitely works if set up properly. Screenshot
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?
@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
.> im no modifying it. its a custom function
macro
oh
and @odd ember same effect with normal for loop and delay
@sour comet also people told you not to put delay inside loops
you got no sympathy here smh
a delay in loops? oof
@uneven shadow material editor is not the same as blueprints
you got a better solution to loading 1mil instances?
@trim matrix yep, but as i said for uniform scaling you could just use a float track
even if I would I'm not going to bother
ok then stop being a dick
same
@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?
@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
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 😄
yeah i just keep getting risk of infinite for loop prompt and crash
One potential way you could split the work: Keep a 'queue' of things you need
Out of curiosity, could you build those 1million in construction script so it happens before the game loads?