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. 

How can add three lives for my third person character?

I want to add three lives for my character and make it so that he can revive whenever he dies. Specific instructions please

Product Version: UE 4.14
Tags:
more ▼

asked Jan 30 '17 at 03:29 PM in Using UE4

avatar image

JohnsonDam
1 1 2 1

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

1 answer: sort voted first

To store numbers of death I would store a CharacterDeath Integer inside of the PlayerController which increases upon death for every time the Character dies. When the character dies in your game the Player Controller can check if the CharacterDeath Integer is greater or equal to 3, if so - > End game (I guess), if not -> go on with a new life.

For the revive I would start a "waiting for revive" event inside the Character, maybe with a Gate Action, when the character dies. I would have the Gate open for a predefined time controlled with a "Revive Time"-variable which starts to decrease when the character dies. If this variable reach 0 the character dies

That's somewhere to start I think :)

more ▼

answered Jan 30 '17 at 03:38 PM

avatar image

Alltvin
416 9 7 27

avatar image JohnsonDam Jan 31 '17 at 01:00 AM

I'm a noob so can you please send like screenshots or maybe a video on how to do it? Thanks!

avatar image Alltvin Jan 31 '17 at 08:48 AM

How long have you been using the engine and blueprints?

Because it's no right nor wrong way to do this, my answer is just one way to execute this functionality. The solutions of yours should match with the rest of your project, gameplay, blueprint setup etc and you need the understanding of how it works to be able to extend the work in the future.

avatar image JohnsonDam Jan 31 '17 at 03:29 PM

I've only started doing this for a week soooooo......

(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