Scenario Editor

From KitHack Model Club Wiki
Jump to navigation Jump to search

This category is dedicated to topics covering the usage of the in-game Scenario Editor.


This is a very powerful tool, that allows you to create your own missions and challenges, though admittedly it does take some explaining to start with.

But don't worry. For that, you're in the right place!

Tips and Key binds

  • When placing props, you can hit the tab key to orient the prop movement to strict X Y Z axis, instead of relative to the current rotation of the prop. This is useful for moving props that are already rotated.
  • To copy and paste props, you have to copy and paste ON TOP of the same prop. Then you can move the blue circle to the new location to place the prop.
  • To place multiple props at a time, hold down shift while left clicking. Note this only works when selecting the prop from the menu, not copy pasting.
  • When trying to line up ramps, hit F11 to remove all the wireframes so you can see clearly. You can hit F11 (or tab if prop is selected) to go back to normal.
  • If you have multiple props occupying the same space, you can hover the mouse over the props, hold alt and use the scroll wheel to select the prop, so that you can move it. Selected prop wireframe will highlight yellow, then left click.

Known Issues

  • Prop Groups do not work. You can try to create one, but you can't use them.
  • Sometimes when placing a prop, a second prop will spawn in the sky above it.
  • Movable Dynamic Props (cones, lawn chairs, balls) will double spawn while starting a mission or hitting the reload button at random. Workaround is save and load the mission or close and reopen the scenario editor.
  • There is a known issue with the checkpoint recovery module, where when you resave the scenario, it wants to override the data you set for recovery checkpoints. The best way to get around it is by opening the .scn file in a text editor right after you setup and saved the scenario with the recovery checkpoints and save a copy there. Then if it reverts, you just have to copy in the correct data.
  • The built in log viewer (F8 button) does not show "Script from file" module compiler issues, but the log path %USERPROFILE%\AppData\LocalLow\Floating Origin Interactive\KitHack Model Club\Player.log should show it.

How do I ...?

Disable Traffic

Add a script module with the following contents:

Traffic.TrafficDaemon.Instance.StopAgentThreads();
Trigger("OnStopTraffic");

The second line is optional. You then need to link this script to start when Player is Ready or Stage Start.

Display lap time as a floater

The script below needs to be added as a file with a `.scs` extension and put it in your scenario folder. Add a "Logic"->"Script from file module", add it, compile it and hit test. You will also need to add a float parameter called currentLapTime to have it compile successfully. Hook it up to your lap trigger and it will display when a lap is complete.

String lapTimeStr; lapTimeStr = "Lap Time! " + currentLapTime.ToString();
Floater("hello".RTColor(XKCDColors.NotSoGoodOrange).RTItalic()); Floater(lapTimeStr.RTColor(XKCDColors.NotSoGoodOrange).RTItalic());