Tracking Player's Health (V6)

Get started with the upcoming AAO version 6.

Modérateur: EN - Forum Moderators

Tracking Player's Health (V6) 

Message par Domyce432 » Ven Mai 15, 2015 11:02 pm

Have you ever wanted to track of the Player's Health Points so that you can do the Co-Council Help from Dual Destinies?
If you had only 60/120 Health Points, the Co-Council would help you to find the satement to examine.
It's not so difficult, really.
It's just a basic thing, you just need to know two or three things about the Player's life and the Editor.

*Note: I'm Italian, so if there are any errors or typos please report it!

Spoiler : Mastery Required :
Variables (Basics)
Reducing Player's health (Basics)
Expression Engine (Basics, specifically > and <)

Spoiler : First Step :
Remember that 120 = 100% Life Bar.
So, go to the Image button of the first frame of the trial.
Select the action 'Define new variables' and set the variable 'life' with value 120.

Spoiler : Second Step :
Then go to the frame where you have to reduce the Player's life and select the action 'Reduce Player's health points'.
Image

In the text box for 'Number of Health points', type in the amount of HP the player will lose.

Then, check the box 'Merge with next frame'.
In the next Frame, go to the Image button.
Set the Action 'Define new Variables' and define the variable called 'life', with value
Code : Tout sélectionner
life - 10

You have to check the Advanced Mode Box and the Load from Runtime Expression Box for the variable.
It should look like this:Image
Good. Check the box 'Merge with next frame' and you're OK.

Spoiler : Third Step :
Ok, so now we have the Variable set with your Life Points.
Now, for checking the Value should be simple: in a Cross-Examination you just go to the Co-Council conversation and after the dialogue...
Set the action 'Evaluate conditions to redirect the player'.
In the 'Expression to Test' box insert this code:
Code : Tout sélectionner
life < X

Where "X" is defined as the HP required to activate the Help + 1. You need to make sure it is 1 HP higher than the help threshold.
For example, if I want the player to be redirected to the Help Conversation when he has 60 HP or lower, I will enter the expression 'life < 61'. If the help threshold is actually 60 and you do not set the limit as such, they player will not see the Help from the co-counsel when he or she is at 60 HP.
Here's a pratic example: Image
Done! Now redirect, if true, to the first frame of the help conversation. If false, redirect to the 'You have to much health' conversation.


Here's a crappy example trial I made. It's not made for being good, I made it quickly.
Dernière édition par Domyce432 le Jeu Mai 21, 2015 9:45 pm, édité 2 fois.
"The only time a lawyer can cry is when it's all over"
- Diego Armando.
Credit do Ceres/Mr. Incognito for designing the boxart template I used for my Boxart(s)!
Credit to everyone who supported me and my project!

OPEN THIS FOR MORE INFO
Image
Image
Image
Image
Avatar de l’utilisateur
Domyce432
 
Message(s) : 98
Inscription : Sam Fév 28, 2015 3:05 pm
Genre: Masculin
Langues parlées: Italian, Decent English

Re: Taking Track of Player's health (V6) 

Message par E.D.Revolution » Sam Mai 16, 2015 11:14 pm

Not a bad guide. This was viable even in v5 days, though nobody used it. Simple, easy-to-read and easy to follow.

Only a couple of things to note:
  • The part about going to the penalty conversation in the first step should be moved to step 2.
  • The reason for this is that actions can be combined if you merge frames. So you can use the 1st frame to knock off HP, use the 2nd frame to fix the variables and then combine the two frames together via merge on the 1st frame.
  • In the games, the whole penalty animation is as follows:

    "Blah blah blah... You are hereby penalized." (penalty animation)

    So, in reality, the whole penalty animation from the last lines of the conversation is really three frames merged into one. The first frame has the dialogue saying "I must assess a penalty against the defense". The second frame has the actual animation (reduce player's HP + Penalty sfx). The third frame has you adjusting the variables. Merge the second frame with the third, and then merge the first frame with the second frame. There should be no timer. If you do it this way, it will be a lot smoother than what is currently written.

Grammar-wise:
  • "Have you ever wanted to take track of the Player's Health Points to do the Co-Council Help thing from Dual Destinies?

    Should be...

    "Have you ever wanted to track of the Player's Health Points so that you can do the Co-Council Help from Dual Destinies?"
  • "Insert in the 'Number of Health Points' the Health Points the Player will lose. Type in a number from 1 to 119."

    Change the last number to 120. There are cases that have the infamous "unlimited penalty" aka "100% penalty" aka "OHKO penalty". Also change the first sentence to "In the text box for 'Number of Health points', type in the amount of HP the player will lose."
  • "Where X is you will insert the number of HP the player will need in order to activate the Help + 1.
    Like this, if I want the player to be redirected to the Help Conversation when he has 60 or inferior HP, I will type life < 61."

    Should be changed to this for clarity:
    "Where "X" is defined as the HP required to activate the Help + 1. You need to make sure it is 1 HP higher than the help threshold.
    For example, if I want the player to be redirected to the Help Conversation when he has 60 HP or lower, I will enter the expression 'life < 61'. If the help threshold is actually 60 and you do not set the limit as such, they player will not see the Help from the co-counsel when he or she is at 60 HP." (remove the single quotes, I only added the quotes for grammar purposes.)
Image
Avatar de l’utilisateur
E.D.Revolution
 
Message(s) : 5721
Inscription : Lun Juil 26, 2010 9:00 pm
Localisation : Across dimensions, transcending universes
Genre: Masculin
Langues parlées: English and decent Spanish

Re: Taking Track of Player's health (V6) 

Message par Domyce432 » Dim Mai 17, 2015 12:39 pm

Spoiler : Answers in blue :
E.D.Revolution a écrit :Not a bad guide. This was viable even in v5 days, though nobody used it. Simple, easy-to-read and easy to follow.

Glad that you say this.

Only a couple of things to note:
  • The part about going to the penalty conversation in the first step should be moved to step 2.

    Ah, yes. I noticed that too, but I was too lazy to do it. I'll adjust it as soon as possible.
  • The reason for this is that actions can be combined if you merge frames. So you can use the 1st frame to knock off HP, use the 2nd frame to fix the variables and then combine the two frames together via merge on the 1st frame.

    Oh, thanks, I knew I could merge the frames, too. But it's pratically the same thing. I'll adjust that later.
  • In the games, the whole penalty animation is as follows:

    "Blah blah blah... You are hereby penalized." (penalty animation)

    So, in reality, the whole penalty animation from the last lines of the conversation is really three frames merged into one. The first frame has the dialogue saying "I must assess a penalty against the defense". The second frame has the actual animation (reduce player's HP + Penalty sfx). The third frame has you adjusting the variables. Merge the second frame with the third, and then merge the first frame with the second frame. There should be no timer. If you do it this way, it will be a lot smoother than what is currently written.

Again, I already knew that. But if you're referring to that thing that can't be called an example trial, well, it's for make things shorter.
I'll adjust that too.

Grammar-wise:
  • "Have you ever wanted to take track of the Player's Health Points to do the Co-Council Help thing from Dual Destinies?

    Should be...

    "Have you ever wanted to track of the Player's Health Points so that you can do the Co-Council Help from Dual Destinies?"
  • "Insert in the 'Number of Health Points' the Health Points the Player will lose. Type in a number from 1 to 119."

    Thanks again for the grammatical tip. :D

    Change the last number to 120. There are cases that have the infamous "unlimited penalty" aka "100% penalty" aka "OHKO penalty".

    Ah, yeah. I didn't thought it at that point.


    Also change the first sentence to "In the text box for 'Number of Health points', type in the amount of HP the player will lose."
  • "Where X is you will insert the number of HP the player will need in order to activate the Help + 1.
    Like this, if I want the player to be redirected to the Help Conversation when he has 60 or inferior HP, I will type life < 61."
    Should be changed to this for clarity:
    "Where "X" is defined as the HP required to activate the Help + 1. You need to make sure it is 1 HP higher than the help threshold.
    For example, if I want the player to be redirected to the Help Conversation when he has 60 HP or lower, I will enter the expression 'life < 61'. If the help threshold is actually 60 and you do not set the limit as such, they player will not see the Help from the co-counsel when he or she is at 60 HP." (remove the single quotes, I only added the quotes for grammar purposes.)

Again, thank you so much. :D I'll adjust that, too.

This is my first Tutorial, so thank you so much for the help. And thanks for the Grammar Tip.
"The only time a lawyer can cry is when it's all over"
- Diego Armando.
Credit do Ceres/Mr. Incognito for designing the boxart template I used for my Boxart(s)!
Credit to everyone who supported me and my project!

OPEN THIS FOR MORE INFO
Image
Image
Image
Image
Avatar de l’utilisateur
Domyce432
 
Message(s) : 98
Inscription : Sam Fév 28, 2015 3:05 pm
Genre: Masculin
Langues parlées: Italian, Decent English

Re: Tracking Player's Health (V6) 

Message par Enthalpy » Mer Sep 28, 2016 12:07 am

Due to today's update, there is now an expression which returns player health directly:

f:player_health()
[D]isordered speech is not so much injury to the lips that give it forth, as to the disproportion and incoherence of things in themselves, so negligently expressed. ~ Ben Jonson

Current AAO Development Priority: Issue #94: Grayscale Mode
Avatar de l’utilisateur
Enthalpy
Community Manager
 
Message(s) : 4380
Inscription : Mer Jan 04, 2012 4:40 am
Genre: Masculin
Langues parlées: English, limited Spanish

Re: Tracking Player's Health (V6) 

Message par Conspiracy_risk » Mer Oct 12, 2016 12:58 am

I did both steps one and two and went to test it out, but the action that actually reduces the player's health doesn't appear to work. Could someone offer some possible problems and solutions?
Avatar de l’utilisateur
Conspiracy_risk
 
Message(s) : 1
Inscription : Mar Oct 11, 2016 5:14 pm
Genre: Masculin
Langues parlées: English

Re: Tracking Player's Health (V6) 

Message par Enthalpy » Mer Oct 12, 2016 4:32 am

First, there's no longer any need for this tutorial. Like I said two posts ago, we now have a function to return player health.

You need to be more specific about your problem. I opened your trial in the player, and I was penalized for presenting the wrong evidence on the first cross-examination. So "the action that actually reduces the player's health" is working. I need more details to say anything. For which part of the trial are you saying the penalty is broken?
[D]isordered speech is not so much injury to the lips that give it forth, as to the disproportion and incoherence of things in themselves, so negligently expressed. ~ Ben Jonson

Current AAO Development Priority: Issue #94: Grayscale Mode
Avatar de l’utilisateur
Enthalpy
Community Manager
 
Message(s) : 4380
Inscription : Mer Jan 04, 2012 4:40 am
Genre: Masculin
Langues parlées: English, limited Spanish


Retour vers V6 Tutorials

Qui est en ligne ?

Utilisateur(s) parcourant ce forum : Aucun utilisateur inscrit et 1 invité