AtomicTorch Studio Forums

CryoFall => Modding info => Topic started by: Yomi on December 10, 2020, 07:44:41 PM

Title: how to use the ΓÇ£if" ?
Post by: Yomi on December 10, 2020, 07:44:41 PM
            base.PrepareHints(hints); // or other way?
            hints.Add(ItemHints.ImplantApplication);
if ( ???? ItemImplantNanofiberSkin)
{
hints.Add(ItemHints.YomiImplantHealthApplication);
}


i add to Skin Implant a new ability , i need show tips.
but i wanna holy show this item.

how can i use "if" (other?)to confirm?

an other question :
how can to control animation speed?

like we change player or vehicle to high speed , an then just look like crazy.

now we have a way :
if server move = 7
then client move = 3.5

but this dosent to work forever , every once update need to change tiwce files.
Title: Re: how to use the ΓÇ£if" ?
Post by: ai_enabled on December 11, 2020, 06:34:21 AM
Regarding the PrepareHintsΓÇöit will not work as you wish as it's called once for each item type and it should not depend on the player's equipment or state. We have applied the necessary changes to support your idea in A29 Update, stay tuned!

Regarding the movement speed and animationΓÇöif you have noticed, the animation is synchronized with the actual animation so there is no "sliding feet" issue.
If you really wish to have a super-high-speed movement but wish to slow the animation, open the skeleton file (for players it's "ProtoCharacterSkeletonHuman") and adjust "DefaultMoveSpeed" property.
For example, if your set your character speed to 5 ("StatMoveSpeed => 5") but the "DefaultMoveSpeed" is still 2.5, then the animation will be played twice as fast to match the character movement speed. If you adjust "DefaultMoveSpeed" to 5, they will match.

Regards!
Title: Re: how to use the ΓÇ£if" ?
Post by: Yomi on December 11, 2020, 06:16:13 PM
Quote from: ai_enabled on December 11, 2020, 06:34:21 AM
Regarding the PrepareHintsΓÇöit will not work as you wish as it's called once for each item type and it should not depend on the player's equipment or state. We have applied the necessary changes to support your idea in A29 Update, stay tuned!

Regarding the movement speed and animationΓÇöif you have noticed, the animation is synchronized with the actual animation so there is no "sliding feet" issue.
If you really wish to have a super-high-speed movement but wish to slow the animation, open the skeleton file (for players it's "ProtoCharacterSkeletonHuman") and adjust "DefaultMoveSpeed" property.
For example, if your set your character speed to 5 ("StatMoveSpeed => 5") but the "DefaultMoveSpeed" is still 2.5, then the animation will be played twice as fast to match the character movement speed. If you adjust "DefaultMoveSpeed" to 5, they will match.

Regards!

thx , i did that..
use bool

Quotebool = false
if (bool)
{
  add.hints
}
itemimplantsskin.cs :
override bool = ture
Title: Re: how to use the ΓÇ£if" ?
Post by: ai_enabled on December 11, 2020, 06:24:28 PM
Hints are prepared only once currentlyΓÇöwhen the scripts are initialized.
So putting any conditions ("if") there that checks something related to the current player (equipment, status effects, etc) will not work as desired.
In A29 we will change thisΓÇöthe list of hints will be recreated every time a tooltip is displayed.

Regards!
Title: Re: how to use the ΓÇ£if" ?
Post by: Yomi on December 12, 2020, 05:32:12 AM
 
Quote from: ai_enabled on December 11, 2020, 06:24:28 PM
Hints are prepared only once currentlyΓÇöwhen the scripts are initialized.
So putting any conditions ("if") there that checks something related to the current player (equipment, status effects, etc) will not work as desired.
In A29 we will change thisΓÇöthe list of hints will be recreated every time a tooltip is displayed.

Regards!

:) :) :)