Is it possible to add an “examination mode?” In other words, is it possible to have the player walk up to an object (say a picture), press the “E” key and then have the game pause and text appear? The player would then press “E” again to un-pause the game and the text would disappear. Not sure if this is possible. I know you can Blueprint script to draw Text, and pause the game, but together?
Using the above, it is possible to create a system where after examining all the necessary objects, a door will open for the player? I guess in a sense it’s like a collection mechanic, but instead of objects the player will be examining items.
If anyone can show me how these can be done, I’d be very appreciative.
I’d look at the blueprint intro tutorials for the basics on making a proximity trigger and grabbing input. Start here. You could also do it with UMG, although you can’t use the E to exit currently. To pause the game, you can call the pause function (which has ugly blue “paused” text) or slow the world time to .01 using Set Global Time Dilation, and setting it back to 1 with a flipflop connected to the E key press.
Lots of ways to do this. You could just make an int in the blueprint, and on examine of each object, increment that int by 1. Set a compare vs. a value that matches the total number of examinable items which you check after each increment. Once the int is = the total number, open the door using the matinee or timeline or whatever you’re using to open it. You’d basically just be doing a set int where the value equals the saved int + 1, and an int compare. You’d also want to gate each instance with a DoOnce so that it doesn’t increment if you repeatedly examine the same object.
If it were me, I’d probably make it a little more data driven, and make a blueprint class for “examinable objects” that can be reused. On begin play, I’d find all actors of the class to a list, and on examine I’d remove the object from the list. When the list length = 0, I’d open the door. That way, if you change the number of objects by adding or removing, the logic that drives the door won’t change, and each item that’s examined can be reexamined without messing with the counter.
Thanks for the information.
However, I seem to be running into two problems:
Is there a way to fully pause the game with the Time Dilation node. Putting the value to “0.0” only makes it extremely slow, but not fully paused… and with that said, is it possible to attach it to a trigger as well?
So only when on the trigger can the player “pause” the game (and read the text and what not).
I have yet to try to do the examinable objects to open the door (that seems rather easy though).
Unfortunately, I don’t think there’s a way to pause fully unless you call the pause function, which does pop up the “paused” blue text, but will still pass through key events.
To attach it to a trigger, you could just use a gate. The trigger can open & close it on touch/untouch, and the keypress to pause could pass through the gate.
I use a blueprint with a trigger and set the controls to the trigger:
I enable input in self(the Trigger) and disable in the player soo cannot move and you can put any input event in the trigger blueprint. When the trigger end you need inverse all to enable the input in the player again.