Report this content
We want the Dreams coMmunity to be a safe, diverse and tolerant place for everyone, no matter their age, gender, race, sexual orientation or otherwise. If you believe this content to contradict these principles, you can file a report for our coMmunity teams to investigate.
Note that misuse of the reporting tool will not be tolerated.Item being reported:
AndymationB has some good ideas, though I see a couple of bugs that may be problematic. Here is a slightly different way of doing it based on the same principles:
Add an impact sensor to the object, and use its "touching" output (this will work similarly to the "bump" output but will continue to send a signal while touching something).
Add a selector to track the current state of the logic. A selector has may channels, outputs a signal from only one of those outputs at a time, and allows you to set which channel is the current "active" one. It will not change which channel is active until some logic changes it. It defaults to channel A, so we'll use that to trigger the growing logic.
Add a timeline, with the same setup as AndymationB explained. Leave it powered all the time.
Add a timer, set it to "speed" mode; this will allow you to send a signal into the "play" input which will set the speed time passes for that timer. So if you send it an "on" (1) signal, it will play at the normal speed. If you send it an "off" (0) signal, it will pause entirely. You can even send it a negative signal to make it go backwards, but we won't need that here.
Wire channel A into the timer's "play" input. Open the timeline, and wire the timer's "output" into the *bottom* of the playhead. This will set the playhead's position through the timeline based on the value being sent to it. 0 means the start of the timeline, and 1 means the end of the timeline. So here, the output of the timer will give a value between 0 and 1 based on the progress made towards the target time; you can adjust the target time to change how long it will take to get to the end of the timeline. In this case, this means it will grow the object while the timer increases and will stop growing when the timer is paused.
Now take a wire from the impact sensor's "touching" (or "bump" if you prefer) and plug it into the selector's channel B input. When it receives a signal, it will make channel B the active channel, and no signal will be sent from channel A anymore. So here, when the object is touching something, it will change to channel B, and stop growing. But the timer and timeline will still be powered so it will remain paused at whatever size it currently is. And, as you've got no logic setting it back to channel A, it'll never go back to growing and will stay that size forever.
So an overview of what's happening is: In state A, the object will continue growing over time to some maximum scale. When the object first touches something else, state A will stop which stops the object from growing any further.
Hope this helps.
@AndymationB: I'm not sure what you mean about the switch. A switch will just send on an "on" signal while receiving an on signal, and an "off" signal while receiving an off signal; it wouldn't really do much in this case I don't think.
Also, the issue with the timeline is that it has to stay powered for the keyframes to continue affecting the object. But then it will continue playing.
(See above for amendments to your solution.)