Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Spawn helper function
- void SpawnObject( string type, vector position, vector orientation )
- {
- auto obj = GetGame().CreateObject( type, position );
- obj.SetPosition( position );
- obj.SetOrientation( orientation );
- obj.SetOrientation( obj.GetOrientation() ); //Collision fix
- obj.Update();
- obj.SetAffectPathgraph( true, false );
- if( obj.CanAffectPathgraph() ) GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( GetGame().UpdatePathgraphRegionByObject, 100, false, obj );
- }
- //Your custom spawned objects
- SpawnObject( "bldr_wall_wood4_pole", "11499.603516 342.455200 11351.873047", "100.000008 0.000000 0.000000" );
- SpawnObject( "Land_FuelStation_Feed", "11434.489258 330.371643 11365.093750", "37.000000 0.000000 0.000000" );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement