Mission Maker 0.9.1
Created by aimless

Installation:
1st Script hook V
http://www.dev-c.com/gtav/scripthookv/
install Script hook v 
you will have dinput8.dll and ScriptHookV.dll in your gta v folder

2nd Script Hook V .NET
download
https://github.com/crosire/scripthookvdotnet/releases
install Script Hook V .NET 
you will have ScriptHookVDotNet.asi ,ScriptHookVDotNet.dll in your gta v folder
You need Microsoft .NET Framework 4.6 and Visual C++ Redistributable Packages for Visual Studio 2013 (x64)
Follow install instructions here.
https://www.gta5-mods.com/tools/scripthookv-net

3rd 
install Spawn MP Vehicles in SP 1.2 (needed for using dlc vehicles)
https://www.gta5-mods.com/scripts/mp-vehicles-in-sp#description_tab

4th
install Open All Interiors v5.1 (needed for some missions)
https://www.gta5-mods.com/scripts/open-all-interiors

5th
Make a scripts folder in your gta v folder
if you already have one skip this step

6th
Place Mission Maker.dll, AMLSNativeUI.dll, and Mission Maker folder into your scripts flolder.


Playing missions:
1st Open menu F9.
2nd select Play Missions
3rd navigate to the disired mission and select.
Note: At anytime during a mission if you want to quit you can open the menu and select Cancel mission.


When in edit mode:
Bug Warning: When zooming out you may get stuck and wont be able to get down. If this happens press the U key to get down.
Keys:
down arrow key down open menu.
W/A/S/D Move forward left backward right.
Q/E rotate actors/vehicles.
Ctrl/B Up and down hight for seting props.
U toggle on ground/free mode.
x/c Placemet position further/closer(on ground). zoom in out (free mode).
NUMPAD8/NUMPAD2 Placemet position further/closer(free mode).

Controler:
Dpad down open menu.
B to close menu/go back to previous menu
left right trigers: Placemet position further/closer(on ground). zoom in out (free mode).
R3UP/R2DOWN Placemet position further/closer(free mode).
left right bumpers rotate actors/vehicles.
L3 and R3 and down hight for seting props.


Making a Mission Basic:

1st Open menu F9.

2nd select Edit Mode.

3rd Enter a Title Name, Author, and Description.

4th Select Placement.

5th Select Player/Startoint.
Set Catogory and model for your character. Then select to place the player at the start point.
Select any weapons for your character.
Set variation default, custom, or random. if custom set components.
Note: If you place the character again to move its position it will reset any custom setting.
If you want to move the start position. You can go into Actors/Edit actors position. And set it there.

6th Mission settings. Set weather exc.

7th Add objectives. Select objectives and select checkpoint.
Move a small distance from the startpoint.
Select type to Add a checkpoint. enter objective text.

8th go to main menu and select save.

9th unload mission.

10th exit edit mode.

11th select play mission and select your mission.

12th walk to the checkpoint.

Thats it your first mission!

Note: When making a mission before you get to far you should save unload then load your mision.
This will prevent loss of your work. 
Because you will have to unload the mission before exiting edit mode. If the mission was loaded.
If you just made it you can exit without unloading/saving and all will be lost.
So once you have a name and startpoint save, unload, then load it back up. And you will be good.


Making a Mission Advanced:
First a little on how things work.
Basicly you are adding a series of objectives to be completed in a one after another way.
Each objective has its own list of Actors or Peds, Vehicles, Props, Pickups, and messages.
This is inportant to note when editing. If you delete a objective all of those things will be deleted with the deleted objective.
When inserting an objective before another those things will spawn one objective later with that objective.
And deleting an objective before another those things will spawn one objective sooner with that objective.

OBJECTIVES:

All objectives:
1: When inserting Objectives. The insert before number will auto advance + one each time an objective is inserted.
If you delete any Objective while the insert checkbox is checked. The Checkbox will uncheck itself.

2: There are two ways to edit an objectives properties.
One goto the objective type and select edit propeties. If the placement marker is close to the objective it will turn yellow.
Select it to edit its properties.
The second way is to select edit objectives and select it from the list of objectives.
The second way is good if you want to add a Actor, Vehicle, pickup, or prop to an objective that is far away.


Checkpoints:
Most of the settings are strait forword and dont need explenation.

The deliver Vehicle/Prop can be used with any vehicle or Cargobob Prop that spawns before that checkpoint objective.
Only one deliver type can be used for each objective.
Example take the example basic mission shown above. Load that.
Next goto vehicles and add a car. Make shure spawns on is set to 0.
Now edit thr properties for the checkpoit set Deliver vehicle only checkbox.
Next select add vehicle and move the placement marker near the vehicle and add it.
Save, unload, exit, and try it.
You should have to be in that vehicle for the checkpoint to appear.
Also you can edit the vehicles properties to must survive untill the checkpoints(objective number) is complete or to the end of the mission(-1)
and set faild text for that vehicle. So if that car gets destroyed it will fail the mission and give a reason.
Cargobob props and tow trucks work the same way.
You can also use a enter vehicle objective first to have the player get in the vehicle first.


Kill Actor:
You can select enemy1, enemy2, enemy1/pickup. Or any combination of them.
All actors that are in the selected groups must be dead for the objective to complete.
If enemy1/pickup is used any pickups dropped must also be recovered for the objective to complete.
Optional add blips and or markers.


Enter Vehicle:
You can add more than one vehicle but will complete after entering the first.
Optional
As passenger
If used the player will be prompted to enter the vehicle when close to it.
You can use with can exit unchecked. For ride alongs and drivebys. You will need to set a driver and task see Set player/actor.


Destroy Vehicle:
Add vehicles the same as enter vehicle.


Collect Pickups:
Add Pickups the same as enter vehicle.
Optional add blips


Prop Objective:


Set Player/Acter:
You can ether use Player or actor.
If using Player you can.
Take and give control of the player. Usefull for cutscenes.
Set if player can exit the vehicle there in. Usefull for drivebys as passenger.

If using Actor you can.
Change relationship group. Usefull for setup missions.

If using Player or Actor.
Set invincable.
Give new task. If using task sequence(with timeout selected) or talking animation. You can enter text to be displayed.
And the objective will last for the lenth of the talking animation or until the task seq is complete.
Note: Timeout can not be used with repeat sequence.


Leave Area:

Hack:
Hack objectives should be placed in front of the prop to be hacked.(Use Hacking props)
Once placed select add prop and the prop should be highlighted. Select to add.
Also you can use some laptops and keybords from in game some will not work and you will have to spawn one on top of it.
Select to run bruite force only or ipfind and bruite force.
Set animation. Use keypad for wall mounted keypads, Use laptop on desk for keybords/laptops on tables/desks, 
Use laptop on floor for keybords/laptops on the floor.


Safe Cracking:
You can use any small green safe with a door. They are two seperate props.(Example The one in the gang safehouse near the racetrack)
If spawning make sure it spawns before the objective.
First set the safe body with place on ground checked and freeze unchecked.
Then without moving unselect place on ground. Then select safe door and set hihbt they should line up.
Place the objective in front of the safe and enter objective text.
Once placed select add prop and the prop door should be highlighted. Select to add.



Random Spawn:
You can add as many random spawn objectives as you want.
Each one can spawn ether actor only, vehicle on land, vehicle on water, vehicle in heli or vehicle plane.
When you want to stop random spawns use end and all active random spawns will end.
You can set the actor model and weapon.
If using vehicle select if to add passenger.
If using vehicle select if to add fill remaining seats with occupants.
How many to spawn is how many to keep spawned at one time.(unless repawns are used up)
Respawn times will respawn 1 more if. How many to spawn is less than How mant to spawn. (untill repawns are used up)


Follow Actor:
Probably the most complicated objective.
First set the actor to be followed.
This actor should have a task sequence to fallow ether on foot or in a vehicle.
The task seq can be set using the actors task seq or a set player/actor objective.
Set trigger position is the destination or last point of the actors task seq.
AI is not perfect so be sure to set trigger distance big enough so it will trigger.
Set objective text. Example Follow franklin.
There are basically three options to use you can use any one, two or all three.

First Use minimum/spook-o-meter. Use this for following targets.
Minimum spook distsance is the distance you have to keep away. If closser for too long it will fail the mission.
Minimum warning text. Example: Back off your to close.
Minimum failed if within minimum distance to long. Example: "The target was alerted".

Second Use maximum warning/wait distance.
Use this if you want to keep within a distance.(Like tailing missions)
Or Keeping up with an actor maybe showing you somthing or taking you somewere.(wait for player checked)
Set warning/wait distance. If using wait for player. If the player is farther than this the actor will pause.
Set warning text: Example 1 "the target is getting away". Example 2 "Go back to franklin".
Set wait for player.
Set wait for player drive speed. If actor is in a vehicle set to same as there drive speed.

Third Use Maximum failed. Use if you want to fail if the actor gets too fare away.
Maximum failed distance. Distance to fail at.
Maximumfailed text. Message to display at mission failed screen. Example The target got away.


Telleport:


Cutscenes:
There are 10 types of cutscenes.
End, Fade out, Fade in, Point at position, Point at player, Point at actor, Point at vehicle, Follow player, Follow actor, and Follow vehicle. 
The follow type attach to the entity an will move with them.
Each cutscene(segment) will last for cutscene time plus transition time.
Cutscenes have to be ended using a type End.
You can string togather multiple cutscenes togather, Like Point at position then point at player then point at vehicle. Followed by End.
Once you start a cutscene you can use set player/actor objectives while the cutscene is happening. To create dialogs.

Example of a cutscene:

Objective checkpoint. have actor to goto at checkpoint. will call them "actor lester" 

Objective cutscene fade out.

Objective  set player/actor 
Set use player
controlable false.

Objective cutscene point at position. 
Set Position, angle, distance, and hight.
set time and trans time to 0

Objective cutscene
fade in

Objective set player/actor.
use player
new task task seq
task one walk to "actor lester"s position
time out = true.

Objective set player/actor.
use actor, set to use "actor lester"
new task task seq
task one talking 6 seconds. note: Talking tasks are controlable. And wont count for the total time of the sequence.
task two gesture. pick one. 1  seconds.
task three pause set to 5 seconds so the text will display. if you dont add this text will only display for 1 second(the langth of the gesture).
time out = true.
objective text = "hi i got a job for you."

Objective set player/actor.
use player
new task task seq
task one talking 6 seconds.
task two gesture. pick one. 1 seconds.
task three pause set to 5 seconds so the text will display 
time out true.
objective text = "Ok sounds good. Im on it."

Objective  set player/actor 
Set use player
controlable true.

Objective cutscene
End

Change log:
.9.1
Fixed not replacing . with ,
Fixed if you try to edit actors when there are none it would crash.
Added option to mission settings to not fade in at start for cutscenes from the start.
Added objective text to cutscenes properties.
Added option to restart mission if failed.

.9 
first release

Credits:
Alexander Blade/SCRIPT HOOK SDK Link http://dev-c.com/gtav/scripthookv/
Crosire/Contibuters ScriptHookVDotNet Link https://github.com/crosire/scripthookvdotnet/releases
Guadmaz/NativeUI Library Link https://www.gta5-mods.com/users/Guadmaz
LeeC2202 Countdown timers
NewTheft Open All Interiors
drp4lyf Spawn MP Vehicles in SP 1.2
GTAV community for research, tutorials and code examples.
If your name is missing let me know.