I've released 2 open source missions before. I've been told my scripts aren't always easy to read, but you can try if you want.
The Cure
1 and
2.
First I suggest you learn LUA and get a basic understanding of it, make sure you can at least make some simple mods like spawning and recruiting bodyguards for example. SWEGTA has some tutorials to get you started a little bit. He has a topic
here but his tutorials don't cover much, but I personally think it's an okay first step as you can get your first mod working, then learn what all the code you wrote meant and how it works. C00ld0c has a simple text tutorial of some LUA
here, or if you're patient enough to read through all of mine I think I made a pretty solid one that covers a lot more than the others
here, but it may be a bit confusing too.
Bully uses LUA 5.0.2 (well, a modified version of it, so we have to use
this compiler made by Fred Tetra to compile code). You can find a full manual of LUA 5.0
here, but note that it may not all be supported by Bully's version.
You won't need to master LUA to make some custom missions, but make sure you at least can make some basic mods and understand entirely how the scripts you make work before moving on.
After you get the basic understanding of LUA, you may be able to better understand the missions I linked above and learn from them too.
Basically what a mission is... is it's just a script with objectives. It's just like any other script really. We just need something to pause the script from getting to the next part of the mission until a certain objective is completed, which is a very simple concept really.
function main()
TextPrintString("Kill Gary",1,1)
local enemy = PedCreateXYZ(130,270,-110,6)
PedAttackPlayer(enemy,3)
repeat
Wait(0)
until PedIsDead(enemy)
TextPrintString("Go to the waypoint",1,1)
BlipAddXYZ(280,-110,6,0)
repeat
Wait(0)
until PedIsInAreaXYZ(gPlayer,280,-110,6,3)
end
There's a super simple example. Spawn a ped, show on screen what the player should do, then repeatedly wait (this prevents the script from getting to the next part of the script) until Gary is dead. The repeat loop won't end until Gary is dead, and only then will the script get to the next part of the code, which is the 2nd objective, which is to go to some place.
Really that's all you have to do. Just make a bunch of objectives and well that's a mission!
For your mission though you'll probably need a lot of coordinates. Enemy spawns, waypoints, camera coordinates for cut-scenes, etc.
I haven't been able to write to files to save coordinates, but you can use steam or something similar to take screenshots of a mod that shows coordinates on-screen, then put those screenshots next to notepad++ and write them in. Use
my coordinate grabber to get player, ped, or camera coordinates. Read the readme.txt for important info.
You can also
add me on steam if you have any questions.