Profile Photo

eXistenZ34’s Mods

  • Public Group
  • 3 days, 10 hours ago
  • 477

    Posts

  • 3

    Members

Questions about the LUA Script in Mafia II

Home Forums Modders Corner Mafia Scene Modders eXistenZ34’s Mods Questions about the LUA Script in Mafia II

last updated by Anonymous 7 years ago
1 voice
1 reply
  • Author
    Posts
  • #5412
    wjsz12
    Participant
    Bank Notes: $ 360
    Rank:

    Could you answer my questions about the LUA Script in Mafia II?

    1.What are the differences between the standard LUA grammar and Mafia II LUA grammar?

     


    This is the standard LUA grammar of function:


     

    function func_name (arguments-list)


    statements-list


    return


    values


    end

     


    This is a Mafia II LUA command:


     


    –By eXistenZ34


    ply=game.game:GetActivePlayer()


    DelayBuffer:Insert(
    function(l_1_0)


    CommandBuffer:Insert(l_6_0,{


    function(l_1_0)return ply:SetControlStyle(enums.ControlStyle.LOCKED)end,


    function(l_2_0)return ply:AnimPlay(“sc_man_smoke_in”, false)end,


    function(l_3_0)return ply:AnimPlay(“sc_man_smoke_stat_a”, false)end,


    function(l_4_0)return ply:AnimPlay(“sc_man_smoke_stat_b”, false)end,


    function(l_5_0)return ply:AnimPlay(“sc_man_smoke_stat_c”, false)end,


    function(l_6_0)return ply:AnimPlay(“sc_man_smoke_stat_d”, false)end,


    function(l_7_0)return ply:AnimPlay(“sc_man_smoke_out”, false)end,


    function(l_8_0)return ply:SetControlStyle(enums.ControlStyle.FREE)end})


    end,{l_1_0},500,1,false)


     


    2.Where is the name of a function in Mafia II LUA command?

    3.What do the l_1_0 , l_2_0 , l_6_0 , and etc. mean? Are they arguments? Or are they the names of functions?


     


    This is another LUA script of Mafia II:


     

    DelayBuffer:Insert(function(l_1_0) xxxxxx end,{l_1_0},10000,10,false)

     

     

     


    4.What do the two l_1_0 mean?

    5.And what is the usage of CommandBuffer:Remove() ?


     


    Thank you!

    #15916
    Anonymous
    Inactive
    Bank Notes: $ 0
    Rank:

    From what it looks like to me it’s calling the functions but I’m not a Expert at LUA 100% so

You must be logged in to reply to this topic.

Description

This is where you can get help with any of eXistenZ34’s Mods.

Group Administrators

Profile Photo
existenz34
@existenz34

Group Moderators

Profile Photo
Joshua
@erich