SHARE
TWEET

Untitled

a guest Feb 27th, 2020 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Spawn helper function
  2. void SpawnObject( string type, vector position, vector orientation )
  3. {
  4.     auto obj = GetGame().CreateObject( type, position );
  5.     obj.SetPosition( position );
  6.     obj.SetOrientation( orientation );
  7.     obj.SetOrientation( obj.GetOrientation() ); //Collision fix
  8.     obj.Update();
  9.     obj.SetAffectPathgraph( true, false );
  10.     if( obj.CanAffectPathgraph() ) GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( GetGame().UpdatePathgraphRegionByObject, 100, false, obj );
  11. }
  12.  
  13. //Your custom spawned objects
  14. SpawnObject( "bldr_wall_wood4_pole", "11499.603516 342.455200 11351.873047", "100.000008 0.000000 0.000000" );
  15. SpawnObject( "Land_FuelStation_Feed", "11434.489258 330.371643 11365.093750", "37.000000 0.000000 0.000000" );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top