x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

ShowFPS Problems! (How to make ShowFPS NOT FLIPFLOP???)

I'm trying to set up a bool which loads and saves. This bool will set "Show FPS" to true or false.

The problem I run into is: Trying to use the same console command "showFPS" makes it flip flop.

When I load, whether or not the bool is true or false, "showFPS" will just flip flop.

Basically I want to be able to set "showFPS 1" or "showFPS 0"

Is this possible? Or is there another way I can allow the FPS to be seen or unseen in UMG?

Product Version: UE 4.16
Tags:
more ▼

asked Aug 13 '17 at 09:16 PM in Blueprint Scripting

avatar image

JJGG117
28 4 7 11

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

Instead of calling the console command on Begin Play, use a function that adds some logic before calling the command.Then, when the function is called, flip a boolean var to 1 so that you know it's on. Next time the function is called, flip it to 0.

It's not exactly the answer you are looking for, but if you keep track of every call, it should solve your problem. You can simply read out the boolean to see if the FPS is visible or not.

Additionally, you can do your own calculation of event tick and delta time to create your own FPS counter in a BluePrint Widget... although it would be just a touch slower than the engine one.

more ▼

answered Aug 13 '17 at 09:56 PM

avatar image

TornadoTwins
21 2 5 6

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

As for the second point, here's a custom FPS counter you could use: https://forums.unrealengine.com/showthread.php?137596-Simple-custom-FPS-counter-with-a-frame-buffer

more ▼

answered Aug 13 '17 at 09:57 PM

avatar image

TornadoTwins
21 2 5 6

avatar image JJGG117 Aug 13 '17 at 10:01 PM

I've been trying for some days now and I don't want to suffice with anything other than showFPS :)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Ok, in this example I'm using the 3rpderson template.

Open the ThirdPersonCharacter blueprint.

Create a new function (hit the plus sign next to functions) Call it "toggleFPS" Add this logic: alt text

Now, go to the Event Graph of this blueprint. Add "key F" as an event (to make sure the FPS toggles when we press F) and wire the "pressed" action to your ToggleFPS function, like so: alt text

capture1.png (244.1 kB)
capture2.png (166.7 kB)
more ▼

answered Aug 13 '17 at 10:12 PM

avatar image

TornadoTwins
21 2 5 6

avatar image TornadoTwins Aug 13 '17 at 10:13 PM

I forgot to say, when adding the logic, that you need to add a boolean variable. I've called it "FPSIsVisible" in this example.

Now all you need to do to figure out if the FPS counter is visible, is check if the boolean is true.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question