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
-
AuthorPosts
-
February 12, 2015 at 7:04 am #5412
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!March 16, 2015 at 10:28 am #15916Anonymous
InactiveBank Notes: $ 0Rank:From what it looks like to me it’s calling the functions but I’m not a Expert at LUA 100% so
-
AuthorPosts