I used bool parameter in my animator controller setting it to true by script but where should I set it back to false and when?

using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI;  public class FireEffect : MonoBehaviour {     public Transform player;     public Transform target;      private float timeElapsed = 0;     private float lerpDuration = 3;     private float startValue = 1;     private float endValue = 0;     private float valueToLerp = 0;      private Animator playerAnimator;     private bool prevFacing = false;     private bool stopped = false;     private bool move = true;     private bool rot = false;     private Vector3 currPos;      private void Start()     {         playerAnimator = player.GetComponent<Animator>();     }      private void Update()     {         var currFacing = IsFacing(target);         if (currFacing != prevFacing)         {             timeElapsed = 0;         }         prevFacing = currFacing;          var distance = Vector3.Distance(player.position, target.position);          if (IsFacing(target))         {             if (distance < 10 && move)             {                 if (timeElapsed < lerpDuration)                 {                     valueToLerp = Mathf.Lerp(startValue, endValue, timeElapsed / lerpDuration);                     playerAnimator.SetFloat("Forward", valueToLerp);                     timeElapsed += Time.deltaTime;                 }                 playerAnimator.SetFloat("Forward", valueToLerp);                 stopped = true;                 valueToLerp = 0;             }              if (move == false)             {                 playerAnimator.SetFloat("Forward", 0);             }              if (playerAnimator.GetFloat("Forward") == 0 && stopped)             {                 move = false;                 rot = true;                 currPos = player.position;                 stopped = false;                 Debug.Log("Player current position when valueToLerp value is 0 : " + currPos);             }         }                  if(rot)         {             playerAnimator.SetBool("Walk Back", true);              rot = false;         }          if (playerAnimator.GetCurrentAnimatorStateInfo(0).IsName("Walk Back"))         {             playerAnimator.SetBool("Walk Back", false);         }     }      private bool IsFacing(Transform target)     {         Vector3 forward = player.TransformDirection(Vector3.forward);         Vector3 toTarget = target.position - player.position;         return Vector3.Dot(forward, toTarget) > 0;     }      public IEnumerator ScaleOverSeconds(Vector3 scaleTo, Vector3 rotateTo, Vector3 moveTo, float seconds)     {         float elapsedTime = 0;         Vector3 startingScale = player.localScale;         Vector3 startingRotation = player.localEulerAngles;         Vector3 startingPosition = player.localPosition;          while (elapsedTime < seconds)         {             player.localScale = Vector3.Lerp(startingScale, scaleTo, (elapsedTime / seconds));             player.localEulerAngles = Vector3.Lerp(startingRotation, rotateTo, (elapsedTime / seconds));             player.localPosition = Vector3.Lerp(startingPosition, moveTo, (elapsedTime / seconds));              elapsedTime += Time.deltaTime;              yield return null;         }         player.localScale = scaleTo;         player.localEulerAngles = rotateTo;         player.localPosition = moveTo;     } } 

At this part, I’m setting the bool to true once and it’s playing the "Walk Back".

if(rot)             {                 playerAnimator.SetBool("Walk Back", true);                      rot = false;             }                  if (playerAnimator.GetCurrentAnimatorStateInfo(0).IsName("Walk Back"))             {                 playerAnimator.SetBool("Walk Back", false);             } 

After that, I’m setting the trigger to false when it’s finishing playing it because if I will not set it to false it will keep playing the "Walk Back" nonstop.

I want that it will play it once but also when rot is true again then play it again once. but because I’m setting it false it’s not playing it again even if rot is true again.

animator controller

I created a transition from the Grounded blend tree to the Walk Back with the bool condition in the screenshot.

The Walk Back is working fine smooth as I wanted the problem is now how to make it play once only each time rot is true?

The way or the place in the script I’m setting the bool back to false make it that it will not play the Move Back ever again even if rot is true.

Can I indicate (via robots.txt, meta robots or another approach) that one or more queryString parameters should be ignored by crawlers?

I’ve written my own SiteSearch Script in PHP.

The SiteSearch parses two GET parameters from the queryString:

  • search // the search-phrase
  • filters (optional) // indicating which parts of the site to include or ignore

I don’t mind GoogleBot and other crawlers reading the search parameter.

But I would like to advise crawlers to ignore the filters parameter, because a very high number of configurations of that parameter would simply return the same results – and an identical, duplicate page as far as the crawlers are concerned.


As much as I would like to add to my robots.txt file something like:

User-agent: * IgnoreParameter: filters 

this isn’t an option.

And a meta robots directive like:

<meta name="robots" content="ignoreparams[filters]"> 

isn’t an option either.

Is there any creative way I can enable crawling of the page and have crawlers ignore the filters parameter in the queryString?

Or am I stuck with a directive as unrefined as:

<meta name="robots" content="noindex"> 

if I don’t want to risk pages with identical search parameters (but different filters parameters) being crawled?

If player is not holding the ladder then it should not jump twice

I am using Unity2d and I am stuck with a problem. In my game I gave the player a double jump ability. I want to the player to jump twice only if they hold the ladder.

The problem is that if the player jumps through the ladder without holding the ladder, it jumps twice (as if the user presses jump key twice) I want the player to only double if player holding the ladder and then presses jump. If the player just jumps through the ladder it should not jump twice.

Below is the player script:

[SerializeField]  [SerializeField] float _xSpeed = 1f; [SerializeField] float _ySpeed = 1f; [SerializeField] float _jumpForce = 1f; [SerializeField] float _distance; [SerializeField] LayerMask _ladderLayer; private float _horizontalMovement; private float _verticalMovement; private Rigidbody2D _rb; private bool _isClimbing; private bool _isMovingHorizontal = true;    [SerializeField] Transform _groundPos; [SerializeField] float _checkRadius; [SerializeField] LayerMask _groundLayer; private bool _isGrounded;    // ExtraJump private int _extraJumps; [SerializeField] int _extraJumpValue = 1;   void Start() {     _rb = GetComponent<Rigidbody2D>();     _extraJumps = _extraJumpValue;  }   void Update() {     _horizontalMovement = Input.GetAxis("Horizontal");     _verticalMovement = Input.GetAxis("Vertical");        }   void FixedUpdate() {     if(_isMovingHorizontal)     {         _rb.velocity = new Vector2( _horizontalMovement * _xSpeed,_rb.velocity.y);     }            _isGrounded = Physics2D.OverlapCircle(_groundPos.position,_checkRadius,_groundLayer);       if(_isGrounded == true)     {         _extraJumps = _extraJumpValue;              }     if(Input.GetKeyDown(KeyCode.Space) && _extraJumps > 0)     {         _rb.velocity = new Vector2(_rb.velocity.x,_jumpForce);         _extraJumps --;              }     else if(Input.GetKeyDown(KeyCode.Space) && _extraJumps == 0 && _isGrounded == true)     {                  _rb.velocity = new Vector2(_rb.velocity.x,_jumpForce);     }       RaycastHit2D hitLadder = Physics2D.Raycast(transform.position,Vector2.up,_distance,_ladderLayer);      if(hitLadder.collider == true)      {         if(Input.GetKey(KeyCode.W))         {             _isClimbing = true;             _rb.gravityScale = 0;         }         else         if(Input.GetKey(KeyCode.Space))          {             _isClimbing = false;                              }            }                     if(_isClimbing == true && hitLadder.collider == true)     {                     _rb.velocity = new Vector2(_rb.velocity.x,_verticalMovement *          _ySpeed);              }     else     {         _rb.gravityScale = 1;     }       } 

How should I as a GM handle a player *character* who has a bad memory?

There is a player in my campaign who’s characters defining trait is that they have a bad memory.

I like creating mechanical representations of character traits if it makes sense to do so.

I’ve given the player a Homebrew feat called "bad memory" that basically says "roll disadvantage on any memory based intelligence checks".

My reasoning being that a character with bad memory should not have the same statistical probability of rolling well on a memory based check as a character with a good memory.

This player is adamantly fighting me on this though.

This is his reasoning:

The game already has the scaffolding and complexity in the locations where it is required. There are reasons why things like forgetfulness are included in the traits and features yet don’t have mechanics attached to them. If it was appropriate they would have been added by the devs. Mechanics which make it harder to use a character, and especially mechanics which remove abilities from players, are things which are only used in very rare cases and only ever for very short periods.

Note: This player is a very good role-player. It feels wrong to me to not represent the bad memory mechanically though.

How should I as a GM handle this situation?

How should my Warlock player use their familiar during battles?

One of my players has a Warlock character and is using Pact of the Chain for their Pact Boon. They most often cast a pseudodragon as their familiar, but neither of us are sure about how they should be using the pseudodragon during fights. Does the familiar get its own turn in the turn order? Or can the familiar only act when the Warlock gives up their action slot? I read the PHB content, but I’m still unclear how/if the pseudodragon should be used in fights.

Should casting Confusion centered on yourself from Wild Magic Surge be trivial to end because it’s a concentration spell?

The entry for a roll of 13 or 14 on the Wild Magic Surge table is:

You cast confusion centered on yourself. (PHB, emphasis mine)

Confusion is a 4th level concentration spell. The rules for concentration state that:

If a spell must be maintained with concentration, that fact appears in its Duration entry, and the spell specifies how long you can concentrate on it. You can end concentration at any time (no action required). (PHB)

The intent of the entry on the Wild Magic table seems to be for everyone nearby, including the caster, to be hit by confusion, essentially a less-bad version of casting Fireball centered on yourself. However, since the table doesn’t specify anything special about concentrating on the spell, the caster needs to maintain concentration on it, and consequentially the spell should end if they stop concentrating on it.

RAW, is there any reason someone who rolls this result on the Wild Magic Surge table couldn’t immediately drop concentration and end the spell?

How should a player and GM handle an ability that necessitates a player seeing a GM’s roll?

A Dual-Cursed Oracle gets the following Revelation at 1st level:

Misfortune (Ex): At 1st level, as an immediate action, you can force a creature within 30 feet to reroll any one d20 roll that it has just made before the results of the roll are revealed. The creature must take the result of the reroll, even if it’s worse than the original roll. Once a creature has suffered from your misfortune, it cannot be the target of this revelation again for 1 day.

This can be used against any creature, including those the GM controls; indeed, that appears to be the intent of the ability, hence the name Misfortune. The problem is that in order for it to work on said creatures, the player needs to see the GM’s die roll, which to my knowledge is generally frowned upon, and see it whenever any enemy makes any save since Misfortune can potentially be activated at any time. Is there a better way to handle this?

Similar abilities include a Fate Cleric’s Tugging Strands, and a Nornkith’s Fate Weaver.

How should rests be handled inside the Tomb of of the Nine Gods?

I’m running Tomb of Annihilation and my players have finally arrived at the Tomb of the Nine Gods. As they have been deciding when it is safe to take short rests, I’ve been rolling for random encounters, only to realize that there don’t seem to be random encounters inside the tomb.

This appears to give a lot of leeway to the DM regarding how often to allow short and long rests. A generous DM could allow a short rest after nearly every major encounter, while a sadistic DM could interrupt the party’s long rests, not let them recover spells and other long rest refreshing abilities, and maybe add levels of exhaustion to boot (for lack of sleep).

The only guidance I can find in the adventure is the following:

Arguably, it is always up to the DM how to manage rests, but many published modules use randomization as a way to balance between cakewalk and death trap. How should the be handled inside the Tomb of the Nine Gods?