TPT, register step?

  • nmd
    19th May 2012 Member 0 Permalink

    i was trying to make it so that on every frame, TPT would repeat this line:

     

    tpt.set_property("type","none","sing")

     

    so, I placed it within tpt.register_step(function func)

     

    to get

    tpt.register_step(tpt.set_property("type","none","sing"))

    but it only works on one frame, and whenever I draw sing, it doesnt disappear after >.<

     

    please help!

  • billion57
    19th May 2012 Member 0 Permalink

    You sure it isn't:

    tpt.register_step(tpt.set_property("type","sing","none"))  ?

     

    Just a guess.

     

  • nmd
    19th May 2012 Member 0 Permalink

    @billion57 (View Post)

     no, that changes "none" into "sing" :P

  • jacksonmj
    19th May 2012 Developer 0 Permalink

    tpt.set_property(...) isn't a function. tpt.set_property is a function, but you can't pass it directly to tpt.register_step while specifying what arguments it should get. Instead, create a new function that calls tpt.set_property with the right arguments, and pass that to tpt.register_step.

     

    In Lua, you can create a new function using:

    function()
     --code goes here
    end

     

    So in this case, you would use:

    tpt.register_step(function() tpt.set_property("type","none","sing") end)

  • nmd
    19th May 2012 Member 0 Permalink

    @jacksonmj (View Post)

     I completly forgot about function()

    thanks!