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"

Is there any way to disable an action mapping when my stamina bar is lower than a certain amount?

Hey there,

I am trying to figure out a way to disable the ability to sprint and jump when I have no stamina left. I have a stamina system set up which decreases when you sprint or jump, however you can still continue to sprint and jump with 0 stamina. This is why I ask the question, can I disable the ability to sprint and jump if i have 0 stamina.?

Product Version: Not Selected
more ▼

asked Sep 16 '14 at 10:23 PM in Blueprint Scripting

avatar image

34 7 9 12

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

2 answers: sort voted first

Why yes of course.

You have a few options but disabling the mapping is not one you should try to achieve.

I'm not quite sure how you set up the run function but I'm sure you have something that makes you stop running when you release the button.

Add a branch on the "on actionButton pressed" and check if you are on or below 0 stamina. If so do nothing.

Add a "EventTick" and do the same. If it should be below 0 stamina add an execution line to the part where you already stop the running.

Does this get you somewhere or should I add a picture of a potential function?

more ▼

answered Sep 16 '14 at 11:45 PM

avatar image

5.9k 291 86 293

avatar image DidsGG Sep 16 '14 at 11:55 PM

Thanks for the reply!

I sort of understand what you mean but I am confused as too how I can check when I am below 0 stamina. I understand it but not sure on calling the right actions.

So this is how I have setup the whole stamina system, some of it comes from the tutorial on the forums by HorusHeretic (Sorry for all the links) :/

http://gyazo.com/4a3e6c304f4df68d8fa9e8d1b207fceb http://gyazo.com/a52b0d42eaae34d6aa8bc636bcc735e8 http://gyazo.com/3622af8022f51d993eef0ce1bbb9c666 http://gyazo.com/d7f6a5a267d9a6b7f361a8db9d149158 http://gyazo.com/7275c196206848efbfe997110cca10d3 http://gyazo.com/3960f04f9ae41084b6d15706c060347f http://gyazo.com/596a522549ac8d8c12218bfcca90c481

avatar image Erasio Sep 17 '14 at 12:10 AM

Ok now I' actually confused. Shouldn't it be like really easy?

If stamina is below or equal to 0 set "Is Sprinting" false. It's that easy.

The nodes for that are real simple: "Get Current Stamina" into a "


avatar image DidsGG Sep 17 '14 at 12:17 AM

Thanks for spending the time to help me, it was easy to do however I should really go to bed as my mind is getting all confused, thanks again!

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

In addition to what Erasio said, you should always clamp your stamina between zero and its max value, then check if its zero for a cleaner process. Type "Branch" after right clicking; it should give you an idea.

more ▼

answered Sep 17 '14 at 12:13 AM

avatar image

2k 62 24 111

(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