'This stop-action animator system will allow you to play any animation when a particle collides/dies.
Yes, this works on PlayerLocal. Be responsible.
Video Demonstration/How To Use:
Copy of ReadMe:
How to Use
Move the "PulseAnimator" object so that the flashing particle collides with the "On" cube.
This will trigger the animation, enabling the cube with a sound.
To reset the system for the next use and disable the cube, Toggle the "Reset" animator on the "Reset" GameObject.
This animator should turn itself off after the reset is complete.
For use, both the flashing particle system and the collider that kills it must be jointed to the avatar where you need them. (or IKed:
)
The actual system from "Reset" down can technically be anywhere.
Basically, 2017 particles now have a feature that allows you to perform an action when the last particle in the system dies. In this case, it disables the object the particle is on.
If we use an animator to keep the object with the particle on it enabled then it will disable from stop-action and immediately enable again.
Now, animators.
I went over this in my state-machine cycler video:
Essentially, turning the object an animator is a part of to disabled and enabled again while the animator is still on will set its state to "Entry" which resets the animator from the beginning.
In this case, I'm using a stop-action triggered or "non-linear" animator to cause the animation to only play if the object is disabled and enabled again.
Here is exactly what happens in this system:
The "OnLogic" object immediately enters its suspend state, disabling its animator.
The reset, which is on by default, forces the animator on the "OnLogic" object to move passed suspend into its third state then turns itself off.
This disables the cube.
The "OnLogic" particle being emitted by the "EnableSample" emitter and dying immediately causes the "OnLogic" object to rapidly be disabled and enabled again.
This resets its animator to entry.
The "OnLogic" animator enters its first state.
This enables the cube.
The "OnLogic" animator enters its 2nd state.
This disables its animator, locking the state.
Since the reset animator is off, the "OnLogic" animator will not move passed it's suspend, effectively toggling the object.
The reset animator animates the "OnLogic" animator which forces it passed the suspend into the 3rd state.
This disables the cube, resetting the system.
Frankly, it's a lot to take in.
I don't expect most of you to understand it to be honest and that's ok.
This is here for the people that think they can and have the drive to learn something new.
Once you figure out how it's all happening there are a ton of possibilities now available to you.
I've spent a very long time developing this method, this is just ******** logic to get you started.
There's some pretty complex working systems I've already made with this as a base.
Feel free to contact me with questions or suggestions on Discord: Rero#9097'
I thought that only applied to world particles, not local. No particles are emitted, just a game object on and a sound. Will try again with that and see.
Dno If its just me But noticed that if you toggle this with a hand gesture. On or off dose no matter. The longer the hand gesture is held down, it'll destroy frame rates. Have poked you on discord to try find more out about this.
It should go without saying but nothing is ever going to fix the "late joiner desync" that occurs when someone new joins the room after you've toggled something. All that can be done is that you can either get everyone to the same state by repeatedly enabling or reset for everybody. That should "sync" people.
@Red134 You've definitely missed the purpose. I used the mechanism in this prefab to make 2 different types of projectiles that have sound on collision, an inventory, and a bow. You're just doing it wrong
@RetroGEO Do you recommend IK or Joints for this system? As I have been working a bit on with joints and it seems to desync for others. Before I delve into IK, which one is most recommended here?
@Red134 You appear to be missing the purpose of this system in the first place. If all you can think of seeing this is "me make bullet" it's not for you, sorry.
Comments
I thought that only applied to world particles, not local. No particles are emitted, just a game object on and a sound. Will try again with that and see.
0Did you make sure to use joints/ik for the positions?
0it works in unity but not in game
0Dno If its just me But noticed that if you toggle this with a hand gesture. On or off dose no matter. The longer the hand gesture is held down, it'll destroy frame rates. Have poked you on discord to try find more out about this.
0Going to use this to make a meme soundboard lmao
0It should go without saying but nothing is ever going to fix the "late joiner desync" that occurs when someone new joins the room after you've toggled something. All that can be done is that you can either get everyone to the same state by repeatedly enabling or reset for everybody. That should "sync" people.
0@HoloWorld00 Considering I made a whole video about the benefits of using IK in the place of joints I'm gonna go ahead and recommend that method. :P
0@Red134 You've definitely missed the purpose. I used the mechanism in this prefab to make 2 different types of projectiles that have sound on collision, an inventory, and a bow. You're just doing it wrong
0@RetroGEO Do you recommend IK or Joints for this system? As I have been working a bit on with joints and it seems to desync for others. Before I delve into IK, which one is most recommended here?
0I don't see how I can miss a purpose that does not exist
0@Red134 You appear to be missing the purpose of this system in the first place. If all you can think of seeing this is "me make bullet" it's not for you, sorry.
0absolutely useless it flickers so fast theres no possible way you could make a bullet or anything meaningful from it
0God tier prefabs
0