lua console question

  • flamethrower
    21st Jun 2011 Member 0 Permalink
    lets say I'm in the lua console and i enter: tpt.set_property("life", "9999", "dust")
    then i enter: tpt.register_step(what do i put here to make this ^ go on?)
    Edited by flamethrower, 2011-06-20 00:31:11
  • BlueAmulet
    21st Jun 2011 Member 0 Permalink

    Deleted

    Edited once by BlueAmulet. Last: 11th Apr 2024
  • flamethrower
    21st Jun 2011 Member 0 Permalink
    that didn't work.
    Edited by flamethrower, 2011-06-20 02:08:30
  • BlueAmulet
    21st Jun 2011 Member 0 Permalink

    Deleted

    Edited once by BlueAmulet. Last: 11th Apr 2024
  • MasterMind555
    21st Jun 2011 Member 0 Permalink
    @gamax92 (View Post)
    Weirdly, I tried with tpt.register_step(setlife()) and it worked one time, tried with tpt.register_step(setlife) worked on every frame

    There ya go :D
  • BlueAmulet
    21st Jun 2011 Member 0 Permalink

    Deleted

    Edited once by BlueAmulet. Last: 11th Apr 2024
  • flamethrower
    21st Jun 2011 Member 0 Permalink
    when your'e writing function setlife() can you change the word setlife to something else?
  • ief015
    21st Jun 2011 Former Staff 0 Permalink
    Yes, it can be any name you like, so long as tpt.register_step(function) references that function (matching names).

    function anyname() tpt.set_property("life", "9999", "dust") end
    tpt.register_step(anyname)

    Also, something to keep in mind that everyone seems to forget/have trouble with, when a function is looking for a function in it's argument (IE: tpt.register_step(function) ), do not include the parenthesis like in the example above. You only use the parenthesis when you want to call the function, not reference it.
    Edited by ief015, 2011-06-20 14:30:48
  • flamethrower
    21st Jun 2011 Member 0 Permalink
    thanks for the help
  • desred3
    21st Jun 2011 Member 0 Permalink
    I don't understand the Lua console and I can't set type with the old one!! I don't know what to do, I need help!!