ShadowMario / FNF-PsychEngine

Engine originally used on Mind Games mod
Apache License 2.0
1.15k stars 2.22k forks source link

source code line to lua if possible #8362

Closed ghost closed 2 years ago

ghost commented 2 years ago

Describe your problem here.

does anyone know how to make this line of code from within source code work in a lua script? (from Vs Void)

            new FlxTimer().start(3, function(tmr:FlxTimer)
                {
                    if(spacerocks.y == -65) FlxTween.tween(spacerocks, {y: -30}, 2.9, 
                        {ease: FlxEase.quadInOut});
                    else  FlxTween.tween(spacerocks, {y: -65}, 2.9, 
                        {ease: FlxEase.quadInOut});
                }, 0);

Are you modding a build from source or with Lua?

Lua

What is your build target?

Windows x64

Did you edit anything in this build? If so, mention or summarize your changes.

nu

frantastic24 commented 2 years ago
     runTimer('rocks', 3, 0)

function onTimerCompleted(tag)
     if tag == 'rocks' then
          if getProperty('spacerocks.y') == -65 then
               doTweenY('rocksY', 'spacerocks', -30, 2.9, 'quadInOut')
          else
               doTweenY('rocksY', 'spacerocks', -65, 2.9, 'quadInOut')
          end
     end
end
ghost commented 2 years ago

holy moly thanks homie