Scripting/Client/Functions/SwapBuildingModel
Replaces every map building of model1 within radius with model2 (call again with the models reversed to swap back). Returns the number swapped.
Syntax
SwapBuildingModel(x, y, z, radius, model1, model2)Arguments
- float x
- float y
- float z
- float radius – Replaces every map building of
model1withinradiuswithmodel2(call again with the models reversed to swap back). - any model1 – Replaces every map building of
model1withinradiuswithmodel2(call again with the models reversed to swap back). - any model2 – Replaces every map building of
model1withinradiuswithmodel2(call again with the models reversed to swap back).
Returns
integer
Example
function onScriptLoad()
{
local pos = player.Pos;
local result = SwapBuildingModel( pos.x, pos.y, pos.z, 5.0, 0, 0 );
MessagePlayer( "SwapBuildingModel returned: " + result, player );
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
- GetScreenWidth
- WorldPosToScreen
- ScreenPosToWorld
- GetGroundZLevel
- GetGroundZLevelForPos
- GetGroundZLevelForPosLoad
- Draw3DText
- Draw3DSprite
- Draw3DTextWorld
- Draw3DSpriteWorld
- SetCameraMatrix
- SetCameraTarget
Section: Screen, world and camera
Categories: Client functions | Screen, world and camera