Widget causing crash?

So I recently tried to implement a note-pick-up element in my mod similar to that in a lot of horror games, I used a youtube tutorial for direction and when I implemented it into my mod it wouldn’t work at all, I tested in ue4 4.7 and it worked with no issues, this is the blueprint I used

I also attempted to set up the blueprint to see if it would work in game without the trigger box but it crashes every time the key is pressed.

Is there a better method to implement this or is this blueprint set up incorrectly?

I’ll probably scrap the idea if I can’t get it to work but it seems as though there’s an answer I just can’t figure it out.

Make sure your widget is parented to PrimalUI or you will crash, every time.

Also, get player controller is not right. You need to get Owner controller or whatever its called. You will then need to also pass that object to your create widget where you have nothing tied on “Owning Player”

You will also need to setup custom events and what not so that the server runs the functions and then replicates to the client or you will crash.

I changed the parent to PrimalUI, the blueprint itself appears not to be working so I’ll find another way around it, when I pulled it apart and just had it so no matter where you are in the level ‘q’ should bring up the note it works for a second but then causes an instant crash.

What are custom events exactly in reference to the dev kit? its really hard finding information on this sort of stuff. Thank you for the help though! :slight_smile:

First thing is first, you’re attempting to use logic from an engine that is two major version changes from the one we’re using. This just will not happen.

Access Violations generally are caused by attempting to do server code without running it on the server, or accessing server data without correctly doing it.

Also, save your created widget to a variable, just as a backup measure, and you also need to use remove from viewport either after - in conjunction with - remove from parent or instead of it.

Where is this graph?

-WM

Well that explains many things :frowning:

The graph I made this blueprint in? that would be the level blueprint.

That is also most likely not going to work either. The Level blueprint, as I understand it, is mainly used when building games, we’re just modding. I would theorise that when making a map(possible game mode depending on the map used), is when you could/should also use it.

What you’re trying to do, I don’t exactly know if it’s achievable… at least in the sense you were presumably hoping to. You would need to make your own map or edit TheIsland to get those “notes” to appear in the game I would think, based on what I’ve experienced/seen with the game and ADK.

-WM

Ahhhhhh okay, thank you for the information :slight_smile: I was in the process of trying to implement this into my own map which is currently in the process of being made!

Fortunately the note system isn’t something I absolutely require but it would have been a neat little thing to try and input, if you’ve got any ideas of how this or something similar would be possible or another way around it I’m super open to ideas.

You will also need to get a good understanding of Server/Client replication and if the widget is added with a on blueprint equipped event, you will need to set is from saved game to false -> then create widget

Any idea where i’d get a good understanding of that from? Also would it be as important if the mod is intended for single player use only?

no, as in single player use you are the only character to add to viewport and you will be ‘valid’ when the server starts cause you are starting the server. if that makes sense.

buuut… you should always make your mod server compatible if possible, if you have any intentions of releasing it publicly.

I will be posting a few shots of my graphs once I have released my mod. I don’t really have any good references as I got lucky piecing it together, honestly. I, even, still do not have a good understanding of it all. I just know that if you try to add to view port server side, you are crashing the server. lol

That makes a lot more sense now atleast,

my mods generally intended for single player and is actually a university project, i wont get into the details as its lengthy but its essentially exploring the idea of linear game play within a survival sandbox setting.

I’ll take a look when you do upload them might be a fairly good reference point, getting lucky with things as technical as this is never necessarily a bad thing. :stuck_out_tongue:

If you’re making your own map, then the chance of getting this to work is significantly greater.

Namely, what you’ll end up doing in some capacity, is adding the “notes” to the map, that then have overlap triggers and upon successful interaction (pressing E or what it becomes bound to) it destroys the actor, and adds a new item to the player inventory.

Things would become more complicated, quickly, however if you ever wanted to introduce respawns of the “notes” if there are multiple players on the map at any given time.

You’d also probably need to look into a Custom Game Mode and a Custom Game State(possibly - I’m still not 100% on everything exactly that this handles). The Game Mode defines the rules essentially, so this would - in theory -handle what happens when someone collected all the notes, or provides the mechanics for all of this stuff. There are only two or three people I’ve seen/know about that have worked on or are working on game modes.

-WM

The ‘is from save game’ is very important, it can cause a crash if it is an item to be equipped, that then displays the hud when equipped.

http://puu.sh/lClw3/8ed7bfe6bd.jpg

Ahhh, thank you for this!!
Is this an actor blueprint?

off hand item you slot.

Coming back to this as I’ve still had no success, if anyone has a clear answer on how to get a simple onscreen hud when a player enters a trigger box let me know but I’ve put far too much time into this and I clearly don’t understand the engine enough to make it work :frowning:

Hmmm, if you are making your own map, then this shouldn’t be an issue at all. If you are trying to get it to to this NOT on your own map, however, I think it is impossible for ARK at this time. The reason being, from how I understand what Jslay and Woe were saying (also from my thread RE: widgets), is that it would have to already exist as a trigger box in the map itself. Since the default ark levels do NOT have said trigger boxes for said event, and since the server is pretty much pure code/logic, you wont be able to add a trigger box to the level itself. You CAN add triggers to items etc, but not into the level without creating a TC if I am not mistaken (complete with your own level maps).

IF you are creating your own map, and it still is not working, from what I have been researching to date, it shouldn’t be that hard at all. Essentially, in your level, you will have the trigger boxes set up. From here, you can easily create an event that activates when the player, and only the player, crosses into the trigger zone. This link here actually has a good example of how to do this in a multiplayer environment. If I am not mistaken, the last part of that tutorial is akin to exactly what you are trying to do…that is have a trigger zone that is triggered only for the current client entering it so that only that client can see the information. This process uses replication! https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/Networking/ReplicateFunction/Blueprints/

FYI I am new to UE4 and modding, so don’t think I’m an expert! This is just my understanding of the widgets and replication from researching them the last couple days working on a similar part for my mod.

This is actually incorrect, but i don’t blame you for being wrong, as the answer is not immediately obvious.

I will try to write up a detailed method on this, as it is a thing unto its own. Samson F. was the one who helped me, so Ill try my best to pass the knowledge along when I can get time to give you a proper guide on this.

Maybe if we had a little more info from what he is trying to have as the trigger? Is it a structure you are placing in the world?