Your comments

It seems to work with this script, which weighs on particles.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ParticleForse : MonoBehaviour
{
public GameObject bodyObj;

void OnParticleCollision(GameObject bodyObj)
{
CharacterController body = bodyObj.GetComponent();
if (body)
{
Vector3 direction = bodyObj.transform.position - transform.position;
direction = direction.normalized;
body.Move(direction * 5);
}
}
}

The question is - how to affect the particles on the character without rigidbody.

How would you do that? These are particles. Large clouds of bats (appearing at different intervals) should bring down the character.BatPart.gif

Thanks Eagleeyez. There are no other options?

I need the player to react. The box falls on the player and the player must fall.

Once I had a question "Random jump sounds"(in this forum). I did the same for the steps.

Eagleeyez help me.

You need to use a list an action called execute action from a random value in the list

  1. Create a List in your Hierarchy by either right click, gamecretor, variables list or just click on the floating bar in the scene view on list variables.
  2. Now make an empty game object in your hierarchy and call it my jump sounds.
  3. Create an action also from the floating bar or right click in the object and call it play sound 1
  4. Add an action called play sound and select the first sound of your sounds.
  5. Duplicate this game object within your jumps sounds and give it your second sound to play.
  6. Do that for as many sounds you need.
  7. Now go into your list variables and add a game object. Drag the first action you made in your jump sounds into this field and then create the next list game object for the second one and so on for as many as you need
  8. Now create a trigger in your hierarchy and call it jump Trigger
  9. Change this trigger name to key down space.
  10. Add an action and find the action execute action
  11. Change this to variables and not actions
  12. Select list and drag your list into the field.
  13. Select then in the drop down random value.
  14. That is it now each time you press space you will jump to one of your random sounds.

Accordingly, the save button must have a different profile number? Or can I leave the same one and it will be overwritten again?

To make it work, I use scripts from the Gamekit3D addon. ((I'm not a programmer - I can't write this myself)). The first one - "Trigger Command" just lies in the Scripts folder. The second - "Platform" - hang on the moving platform. We add the "Player" layer for this script for the character. And the third "Trans_Parent" - also hang on the platform.

using UnityEngine;

namespace GameCommands

{

public class TriggerCommand : SendGameCommand

{

protected override void Reset()

{

if (LayerMask.LayerToName(gameObject.layer) == "Default")

gameObject.layer = LayerMask.NameToLayer("Environment");

var c = GetComponent<Collider>();

if (c != null)

c.isTrigger = true;

}

}

}

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

namespace GameCommands

{

public class Platform : MonoBehaviour

{

public LayerMask layers;

protected CharacterController m_CharacterController;

const float k_SqrMaxCharacterMovement = 1f;

void OnTriggerStay(Collider other)

{

if (0 != (layers.value & 1 << other.gameObject.layer))

{

CharacterController character = other.GetComponent<CharacterController>();

if (character != null)

m_CharacterController = character;

}

}

void OnTriggerExit(Collider other)

{

if (0 != (layers.value & 1 << other.gameObject.layer))

{

if (m_CharacterController != null && other.gameObject == m_CharacterController.gameObject)

m_CharacterController = null;

}

}

public void MoveCharacterController(Vector3 deltaPosition)

{

if (m_CharacterController != null && deltaPosition.sqrMagnitude < k_SqrMaxCharacterMovement)

{

m_CharacterController.Move(deltaPosition);

}

}

}

}

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

public class Trans_Parent : MonoBehaviour

{

void OnTriggerEnter(Collider other)

{

if (other.tag == "Player")

{

other.transform.parent = transform;

}

}

void OnTriggerExit(Collider other)

{

if (other.tag == "Player")

{

other.transform.parent = null;

}

}

}

Can someone who understands scripting write an Action for GC based on this?

Yes, changing the parent doesn't work for the platform. Marti, fix it, please.

Apologize. I solved the problem. Thank you for your answers.