Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Count collision enter?

Discussion in 'Visual Scripting' started by Tinniman, Jul 28, 2023.

  1. Tinniman

    Tinniman

    Joined:
    Dec 14, 2020
    Posts:
    49
    Hi
    I need to count how many hits my enemy takes before sending output. I have all the collision stuff setup so that I get one collision and then particle/remove but need to set counter for all enemies that need more than one hit? How can I set this up?
     
  2. Tinniman

    Tinniman

    Joined:
    Dec 14, 2020
    Posts:
    49
    I am bumping this because I cannot get further in my game before I find this out
     
  3. S2NX7

    S2NX7

    Joined:
    Aug 17, 2021
    Posts:
    26
    cant you just make a variable with how many times its been hit and add 1 to it and then use a if to check its the amount you want if it is trigger something
     
  4. Tinniman

    Tinniman

    Joined:
    Dec 14, 2020
    Posts:
    49
    How do I set a variable for this? Not sure what you mean:)