Hello
Another release for today @surtek gave me an idea, but I did it on a different way. The first code spawns carepackages in a regular polygon from a beginning point (that is one of its corners). The pyramid function makes a 4 sided pyramid (if you touch a bit the code you can easily make them 5 sided or whatever).
Point is the beginning corner, sides is the ammount of sides of the polygon and sidelenght the ammount of carepackages of side (it will be the number you put + 2 )
Examples of use (my partner tested it on Afghan, is in front of TF141 spawn point):
Credits:
- @surtek for idea
- OMA Rhino for testing
Thanks
Another release for today @surtek gave me an idea, but I did it on a different way. The first code spawns carepackages in a regular polygon from a beginning point (that is one of its corners). The pyramid function makes a 4 sided pyramid (if you touch a bit the code you can easily make them 5 sided or whatever).
Code:
SpawnPolygon( point, sides, sidelenght )
{
angle = ( 360 / sides );
thing = spawn( "script_model", point );
thing.angles = ( 0, 0, 0 );
for( i = 0; i <= ( sides - 1 ); i ++ )
{
for( j = 0; j <= sidelenght; j ++ )
{
block = spawn( "script_model", thing.origin );
block setModel("com_plasticcase_friendly");
block.angles = thing.angles;
block Solid();
block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
thing MoveTo( thing.origin + anglesToForward( thing.angles ) * 55, 0.07 );
wait ( 0.08 );
}
block = spawn( "script_model", thing.origin );
block setModel("com_plasticcase_friendly");
block.angles = thing.angles;
block Solid();
block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
thing.angles = ( 0, thing.angles[1] + angle, 0 );
wait ( 0.1 );
}
thing delete();
}
MakePyramid( point, sidelenght )
{
for( i = 0; i <= sidelenght; i ++ )
{
SpawnPolygon( point + i * ( 30, 30, 27 ), 4, sidelenght - i );
wait 1;
}
}
Point is the beginning corner, sides is the ammount of sides of the polygon and sidelenght the ammount of carepackages of side (it will be the number you put + 2 )
Examples of use (my partner tested it on Afghan, is in front of TF141 spawn point):
Code:
//SpawnPolygon( ( 259, -566, 190 ), 6, 5 );
MakePyramid( ( 259, -566, 150 ), 6 );
Credits:
- @surtek for idea
- OMA Rhino for testing
Thanks