Skip to content

Instantly share code, notes, and snippets.

@ronyx69
Created November 16, 2017 15:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ronyx69/0353e26a6b6c1c0a8d5c28c1a1e7401c to your computer and use it in GitHub Desktop.
Save ronyx69/0353e26a6b6c1c0a8d5c28c1a1e7401c to your computer and use it in GitHub Desktop.
Sets the amount, direction and position of sitting places for benches.
// m_specialPlaces (SittingDown)
// Sets the amount, direction and position of sitting places for benches.
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo;
var specialPlaces = 1; // amount of sitting positions
PropInfo.SpecialPlace[] temp = new PropInfo.SpecialPlace[specialPlaces];
// sitting direction and position
temp[0].m_direction = new Vector3(0, 0, 1);
temp[0].m_position = new Vector3(-0.5f, 0, -0.5f);
temp[0].m_specialFlags.value__ = 65536;
// if you want want another one
//temp[1].m_direction = new Vector3(0, 0, -1);
//temp[1].m_position = new Vector3(0.5f, 0, 0.5f);
//temp[1].m_specialFlags.value__ = 65536;
// and another one...
//temp[2].m_direction = new Vector3(0, 0, -1);
//temp[2].m_position = new Vector3(0.5f, 0, 0.5f);
//temp[2].m_specialFlags.value__ = 65536;
asset.m_specialPlaces = temp;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment