How do I make grab sensor work once only
I'm trying to use a grab sensor on a simple cube to make it glow once only. I can get it to glow by grabbing the cube with the imp, but I only want it to be grabbable once only. Once it's been grabbed and glowed I don't want it to work again. Have tried counters but no luck. Any ideas?
-
Do you want it to turn off, the glow that is? Like a second-long glow? Remember to wire the output of your counter (which, by default, should make it glow permanently) to the grab sensors on/off switch so it won't work anymore.
If you want smooth transitions: I'd personally go for a signal manipulator and change the transition time. As long as the counter is full, the sensor won't work and you'll get a custom glow animation. -
Thanks for answer , I'll look into signal manipulators. I'm using a timer to make the cube glow for a short
period. Since I posted Ive been mucking about with counters and seem to have it working now. If I set target count to 100 and current count to 99 then reset at target, then I don't have to worry about duplicate grabs, as long as the user doesn't grab 99 times. I've also just realised I can use a second counter to reset the first counter in a certain way. Thanks for your help -
I'm pretty sure you're overthinking this. Just use the default counter, no changes to max count or anything. You immediately want to switch the grab sensor off and connect a timer to reset the counter (or whatever signal ultimately drives your glow), other than that, you're fine.
-
Ok, maybe not quite: I uploaded "Grab Sensor Example" for you to check out. You have to invert the output of the counter, otherwise you'd automatically disable the grab sensor by default and won't ever trigger it. I also changed the saturation to zero so you can discern between what has been grabbed and what hasn't. For the glow, a remapper with pulse on works best because I didn't want the glow to be too bright (again, tons of ways to do this).
Cheers! -
Thanks alot I'll check this tomorrow
Vous devez vous connecter pour laisser un commentaire.