I wanted to do a quick episode on when, how, and why to use the Game State, and an example of how I plan to use it.
Пікірлер: 11
@sinavaghefi1603Ай бұрын
This is great approach. What I would do normally is to create an empty actor bp that acts as a manager for a gameplay system. one advantage of this compared to UGameState is that since it's an actor you can add box collision component to it and place it on area that you want this to affect which gives you more control ( or even you can add multiple box collisions to actor and place them differently to even have more types of behavior based on location) but most importantly you can get all specific types of actor that are overlapping with box that is much much cheaper than "get all actors from class" and you can even set a timer and update them based on duration you want. Also since actors are instansable in nature you can tweak lot of things on diffrent levels when you place the manager actor.
@kenalpha3Ай бұрын
4:06 @NumenBrothers so how do you "get the closest" foliage actors (to player) if GameState doesnt have a collision box (not possible?), as @sinavaghefi1603 is suggesting?
@NumenBrothersАй бұрын
@@kenalpha3 I have a function on each HISM foliage actor where, based on passing in a location, I can get nearest 'X'
@kenalpha3Ай бұрын
@@NumenBrothers Ty for the confirmation. Is the code for the HISM / get nearest - available somewhere? Im guessing it is a BP with collision. Event > OnBeginOverlap > you transfer to a Function? and where does the Get nearest code go?
@kenalpha3Ай бұрын
0:59 Can you do a video on Player State vs Game State? (A video on the best place to put player info that you wanted remembered when transferring maps, e.g. status effects, Experience, current weapons in hand?) It's the first time I heard of Player State, so I'm wondering where AAA games put their stats? (Use Player State to load temp memory (load stats while Game is running), but link to and offload it to a SaveGame asset for Game/PC reloads?)
@NumenBrothersАй бұрын
I have minimal experience with saves and loads thus so far. I'm sure I will tackle it, but it won't be for awhile, apologies.
@kenalpha3Ай бұрын
@@NumenBrothers Np. Ive made a SaveGame asset that stores what armor I wear. (But it's tedious to setup copies of variables to pass from Player BP to SaveGame.) And I bought some SaveGame assets (but havent used to see which method they use). And I saw another method that Stats use a Component added to Player BP. (But Im hesitant to use Components since they dont allow Timelines/transitions.) I was just curious if anyone knows or can show about Player State (when you can), since it seems to be what Epic wanted us to use for player stats?
@user-wb6ue6qc3wАй бұрын
Hi, I'm having a really difficult time trying to fix something from one of your earlier tutorials. Tried emailing you a while back but received no response. Is there any other way to get help? I've been stuck on this issue for weeks now.
@NumenBrothersАй бұрын
I recommend posting on the forums. This looks promising- forums.unrealengine.com/t/umg-drag-drop-not-working-4-20-packaged-standalone/431658/14
@LupusMechanicusАй бұрын
bro you think I know better than you. lol lmao just. Um Akshually shouldnt you be using an interface for this?
@NumenBrothersАй бұрын
You can't store variables/data on an interface. Event Dispatching might work (it's a 'Twitter-like' communication method) but the problem is Event Dispatching still needs hard references.