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. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

custom events for multiple game objects

Discussion in 'Visual Scripting' started by ChewyChipsAhoy, Sep 23, 2022.

  1. ChewyChipsAhoy


    Aug 2, 2020
    I made a game object button in my 2d scene that when pressed it would trigger a custom event inside the blocks to make all the blocks with the same tag reverse their gravity and float to the ceiling. I had it working before but don't know what i deleted because now it only reverses the gravity for the first one it finds. My head hurts trying to figure this out

    The picture is the flow chart for the button.

    Attached Files:

  2. REDACT3D_


    Nov 8, 2020
    woah what version of visual scripting are you using?
    also woah photograph of a screen haha nice

    do both objects have the tag "Block" ?
  3. racsogrong


    Feb 16, 2021
    This might be suitable for what you are doing. It works by finding all objects with the tag and triggers the custom event on each block individually. Screenshot 2022-09-28 075321.png
    REDACT3D_ likes this.