Page 1 of 1

How to do a death message when the player dies

Posted: Sun Jan 08, 2017 7:07 am
by aicd99
I tried doing a death message in the play set-up entity.
But it's not working why ?

Is their a way to make it work ?

Re: How to do a death message when the player dies

Posted: Sun Jan 08, 2017 8:06 am
by Allanon
From the SpecialTriggers.htm file located in the RF docs:
When the player dies in a level you have several options of what can happen next. When the player's death animation is started a trigger called PlayerDeath is set to on. This can be used to trigger special effects or special camera sequences when the player dies. As well, you can control what happens after the death animation has finished.

In the PlayerSetup.ini file in the [Misc] section there is an entry called restartafterdeath. If this is true then pressing the ESC key after the death animation is finished will cause the level to restart. If it is false then a trigger called DeathESC is set to on and can be used to activate other entities that will cause the level to end or change to another level. If you press the Space bar after the death animation a trigger called DeathSpace is set to on. This also can be used to trigger other entities. This trigger is independent of the state of restartafterdeath.

Just remember, if restartafterdeath is false then a ChangeLevel entity must be activated at some point or the level will never end and you will be stuck at the point of death. If you choose to ignore the DeathESC trigger then the PlayerDeath trigger must activate a ChangeLevel entity or you remain stuck at death.
So basically you can use PlayerDeath or DeathESC to trigger your message.

Re: How to do a death message when the player dies

Posted: Sun Jan 08, 2017 8:44 am
by aicd99
Basically my death message will be

[Ouch]
Game Over press Esc to try again
from message.txt

When you press Esc game you restart
Capture.PNG
PlayerSetup Entity
Capture.PNG (11.09 KiB) Viewed 6401 times
Please can you make it possible ?

Re: How to do a death message when the player dies

Posted: Sun Jan 08, 2017 3:23 pm
by seppgirty

Re: How to do a death message when the player dies

Posted: Sun Jan 08, 2017 7:21 pm
by QuestOfDreams
aicd99 wrote:Basically my death message will be

[Ouch]
Game Over press Esc to try again
from message.txt

When you press Esc game you restart

Capture.PNG

Please can you make it possible ?
  1. The DeathMessage entry in the PlayerSetup entity is the actual text that will be displayed (i.e. it is not a reference to a section in the message.txt file)
  2. The DeathFontSize entry in the PlayerSetup entity must refer to a valid font as defined in the menu.ini file. Note that in the default RF installation FontSize 0 (i.e. FONT1 in menu.ini) is not defined and no message will appear with the setup above. In the log file you will find the following warning in that case:
    No defined Font # 0 (FONT1 in Menu.ini)

Re: How to do a death message when the player dies

Posted: Mon Jan 09, 2017 4:50 am
by aicd99
I got the thing to work finally thank you Quest of Dreams

I found a bug in the Deathfontsize entry I had to type 12 to get font 13
which is the default message text "Adventure26" FONT.

To get FONT8 I had to type 7 in the deathfontsize entry in the player setup entity

Is their a way to get the message to display before you press ESC ? and not after ?

Re: How to do a death message when the player dies

Posted: Mon Jan 09, 2017 10:08 am
by QuestOfDreams
aicd99 wrote:I found a bug in the Deathfontsize entry I had to type 12 to get font 13
which is the default message text "Adventure26" FONT.

To get FONT8 I had to type 7 in the deathfontsize entry in the player setup entity
This may be an unfortunate design decision but it's not a bug and it's clearly documented in the manual:
http://www.realityfactory.info/cms/inde ... tmap-fonts
aicd99 wrote:Is their a way to get the message to display before you press ESC ? and not after ?
You can set up a message entity that gets triggered by the 'PlayerDeath' trigger as mentioned in Allanon's post.