Closed ohlidalp closed 1 month ago
IMPORTANT: Regenerate your cache! There was a bug and the mission entries are not filled properly.
I added rudimentary UI for missions:
@CuriousMike56 suggested creating multiplayer challenges using this system: https://forum.rigsofrods.org/threads/mission-system-prototype.3846/#post-19130
To help with the coding, I added rorserver scripting documentation to https://developer.rigsofrods.org/
New script function: BeamClass.getAllLinkedTrucks()
I added a new mission type: 'stunt'. It uses 2 eventboxes and measures various parameters while travelling between them.
This is a demo mission 'Simple Test Ramp' - the start eventbox is at the ramp, the finish eventbox is on the landing ground.
simple2ramp.zip
TODO:
hey, It's theJesser from discord :) . We definitely need the ability to add icons onto the overview map for missions as suggested by mike on discord https://discord.com/channels/136544456244461568/189904947649708032/1089317783164166266
Map icons are yours:
const int SURVEYMAP_ICONS_GROUPID = -222;
TerrainClass@ terrn = game.getTerrain();
if (ImGui::Button("Add icons"))
{
vector3 pos = game.getPersonPosition();
terrn.addSurveyMapEntity("info!", "arrow_up.png", /*resource_group:*/"", /*caption:*/"", pos + vector3(0.f, 0.f, -100.f), /*angle:*/0.f, SURVEYMAP_ICONS_GROUPID);
terrn.addSurveyMapEntity("warn!", "error.png", /*resource_group:*/"", /*caption:*/"", pos + vector3(-100.f, 0.f, 0.f), /*angle:*/-3.14/2, SURVEYMAP_ICONS_GROUPID);
terrn.addSurveyMapEntity("error!", "exclamation.png", /*resource_group:*/"", /*caption:*/"", pos + vector3(100.f, 0.f, 0.f), /*angle:*/3.14/2, SURVEYMAP_ICONS_GROUPID);
}
Closing this as stale and mostly obsolete:
Info: https://forum.rigsofrods.org/threads/mission-system-prototype.3846/
Features:
New scripts:
New script API:
array<BeamClass@> game.getAllTrucks()
float game.getElapsedTime()
array<BeamClass@> BeamClass.getAllLinkedTrucks()
int BeamClass.getInstanceId()
eventCallbackEx()
- same aseventCallback()
but with extra parameters.SE_EVENTBOX_ENTER
andSE_EVENTBOX_EXIT
terrain.addSurveyMapEntity()
,terrain.delSurveyMapEntities()
Example: Download the attached file and place it to your 'mods' directory. Note GitHub doesn't allow '.missionzip' extension, so I just used '.zip' - it works the same. simple2circuit.zip To test, load the "Simple Test Terrain" (simple2.terrn2), open in-game console and say 'loadmission simple2circuit.mission'.![screenshot_2023-02-12_03-43-43_1](https://user-images.githubusercontent.com/491088/218291055-613a03e1-c598-4117-a4a1-4ef3f07efdf5.png)