Basically, I want to make an object so that when this particular platform movement object touches it, it sinks, and when the platform movement object is NOT touching it, it rises back to its original position. How would I do something like that?
Printable View
Basically, I want to make an object so that when this particular platform movement object touches it, it sinks, and when the platform movement object is NOT touching it, it rises back to its original position. How would I do something like that?
The simplest way is:
- Make the bobber an active object
- Start of frame - set bobber value B to Y("Bobber")
- On overlap with hero add 1 to bobber value A
- On collision with hero, stop hero
- If bobber value A >= 10, set Y of bobber to Bobber value B + (Bobber value A / 10)
- Negate on overlap with hero, subtract 1 from bobber value A
That should do it... but this is just an off-the-top-of-the-head answer.
The simplest way is:
- Create an alterable value named Sine
- Make an Always event
- +Set its Y position to: Y( "Active" )+Sin(Sine( "Active" ))
- +Add 1 to Sine
That should do it... but this is just an off-the-top-of-the-head answer.
Y( "Active" )+(Sin(Sine( "Active" )*However many pixls you want it to bob up and down for))Quote:
Originally Posted by DarkeSoft