The Driver Syndicate/Scripting/Mission Scripting/Minigames/Gates: Difference between revisions
Jump to navigation
Jump to search
SwissCruiser (talk | contribs) (Created page with " These are simple to create: #Start Freeride mode on the level you want to create the minigame. #Drive to your desired starting point. Open the console with the key below escape key. #Then type "trailbrazer_gates_record" and press enter and drive your route. when the counter reaches 100 the script is saved in "GameData/trailblazer_generated.txt". #Now you can rename the file as you desire and move it into "scripts\trailblazer\gates" of your mod/Addon. (remember the filen...") |
SwissCruiser (talk | contribs) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Creating Gates Minigame == | |||
These are simple to create: | These are simple to create: | ||
#Start Freeride mode on the level you want to create the minigame. | #Start Freeride mode on the level you want to create the minigame. | ||
Line 5: | Line 5: | ||
#Then type "trailbrazer_gates_record" and press enter and drive your route. when the counter reaches 100 the script is saved in "GameData/trailblazer_generated.txt". | #Then type "trailbrazer_gates_record" and press enter and drive your route. when the counter reaches 100 the script is saved in "GameData/trailblazer_generated.txt". | ||
#Now you can rename the file as you desire and move it into "scripts\trailblazer\gates" of your mod/Addon. (remember the filename for next step) | #Now you can rename the file as you desire and move it into "scripts\trailblazer\gates" of your mod/Addon. (remember the filename for next step) | ||
#In "scripts\missions\minigame\gates" you need a .lua file with following content: | #In "scripts\missions\minigame\gates" you need a .lua file with following content:<syntaxhighlight lang="lua"> | ||
--////////////////////////////////////////////////////////////////////////////////// | |||
--// Copyright � Inspiration Byte | |||
--// 2009-2017 | |||
--////////////////////////////////////////////////////////////////////////////////// | |||
-------------------------------------------------------------------------------- | |||
-- Mission script for trail blazer/gates | |||
-------------------------------------------------------------------------------- | |||
-- By Shurumov Ilya | |||
-- 11 Sep 2018 | |||
-------------------------------------------------------------------------------- | |||
world:SetLevelName("default") --set levelname here | |||
world:SetEnvironmentName("dawn_clear") --set weather here | |||
MISSION.MusicScript = "nyc_day" -- set music here | |||
MISSION.Hud = TrailblazerGame.GatesHud | |||
---------------------------------------------------------------------------------------------- | |||
-- Mission initialization | |||
---------------------------------------------------------------------------------------------- | |||
function MISSION.Init() | |||
local playerCar = gameses:CreateCar("mustang_f", CAR_TYPE_NORMAL) --set car here | |||
playerCar:Spawn() | |||
playerCar:SetColorScheme( 2 ) | |||
gameses:SetPlayerCar( playerCar ) | |||
-- init game mode | |||
TrailblazerGame.Init( "gates/gt01", true ) -- replace gt01 with your filename (point 5) | |||
end | |||
</syntaxhighlight>After this you only need to add the minigame in your ModInit file (this needs to be described in more detail here) | |||
== How to add it to the Game/Mod == | |||
ToDo: | |||
== See Also == | |||
[[The Driver Syndicate/Addon System]] | |||
[[The Driver Syndicate/Scripting/Mission Scripting]] |
Latest revision as of 13:53, 25 January 2025
Creating Gates Minigame
These are simple to create:
- Start Freeride mode on the level you want to create the minigame.
- Drive to your desired starting point. Open the console with the key below escape key.
- Then type "trailbrazer_gates_record" and press enter and drive your route. when the counter reaches 100 the script is saved in "GameData/trailblazer_generated.txt".
- Now you can rename the file as you desire and move it into "scripts\trailblazer\gates" of your mod/Addon. (remember the filename for next step)
- In "scripts\missions\minigame\gates" you need a .lua file with following content:After this you only need to add the minigame in your ModInit file (this needs to be described in more detail here)
--////////////////////////////////////////////////////////////////////////////////// --// Copyright � Inspiration Byte --// 2009-2017 --////////////////////////////////////////////////////////////////////////////////// -------------------------------------------------------------------------------- -- Mission script for trail blazer/gates -------------------------------------------------------------------------------- -- By Shurumov Ilya -- 11 Sep 2018 -------------------------------------------------------------------------------- world:SetLevelName("default") --set levelname here world:SetEnvironmentName("dawn_clear") --set weather here MISSION.MusicScript = "nyc_day" -- set music here MISSION.Hud = TrailblazerGame.GatesHud ---------------------------------------------------------------------------------------------- -- Mission initialization ---------------------------------------------------------------------------------------------- function MISSION.Init() local playerCar = gameses:CreateCar("mustang_f", CAR_TYPE_NORMAL) --set car here playerCar:Spawn() playerCar:SetColorScheme( 2 ) gameses:SetPlayerCar( playerCar ) -- init game mode TrailblazerGame.Init( "gates/gt01", true ) -- replace gt01 with your filename (point 5) end
How to add it to the Game/Mod
ToDo: