#Include it to your script
PosInfo[] getTilePosInRadius( Vec2f center, u8 radius )
Returns an array of PosInfos. They have the position of the tile and its distance to the center.
Usage example:
void removeMarkersInRadius( string markName, Vec2f position, f32 radius )Code:PosInfo[] testList = getTilePosInRadius( Vec2f( 100.0f, 50.0f ), 40.0f ); for ( int i = 0; i < testList.length(); i++ ) getMap().server_DestroyTile( testList[i].pos, 10.5f/( testList[i].dist + 1.0f ) );
Removes markers in a radius.
Code:removeMarkersInRadius( "blue spawn", Vec2f( 100.0f, 50.0f ), 40.0f );
-
Hey Guest, is it this your first time on the forums?Dismiss Notice
Visit the Beginner's Box
Introduce yourself, read some of the ins and outs of the community, access to useful links and information.
VectorWorks 2013-12-17
Some useful vector-related functions