Forum Mod Bakery Docs

[MFK] Selecting random object from list?

Posted in Support
Please login to contribute to the conversation.
Good Afternoon all,

New to the forums, however I've taken a look around and can't quite seem to find a similar issue so thought it best to post here, apologies if I'm in the wrong category.

Currently working on my first little mod / project, some experience in LUA however I'm curious about the MFK route as it's entirely new to me so thought we'd give that a try, however I'm drawing a blank on how to:
  • Create a list of objects, in this case a series of strings
  • Select a random object from this list

Of course through LUA, this is fairly straightforward and it certainly seems that LUA opens up a lot more options, though I thought I'd ask anyway in case there's a way to achieve this via MFK?
Nope, without LUA there's no way. You could make multiple versions of the same mission in MFK and have a LUA script decide which version to execute, but in my opinion, you're better just having your mission as a LUA instead of MFK
Ah that's a real shame,

Well not to worry, LUA it is then in that case, now hopefully I can find a good example project to figure out how I'm structuring this thing, been struggling to find a decent LUA guide for these mods / hacks,

Thanks anyway!
You could check out these two pages for some information on how to set up LUA:
You could also join our Discord server if you'd like to ask questions and get an almost immediate response!