CreateAndPlaceBuildingXYD
From Original War Support Wiki
SAIL Functions/c -> CreateAndPlaceBuildingXYD
Description
Function CreateAndPlaceBuildingXYD creates building based on bc_ and uc_ parametres and places it at defined coordinates(first and second argument) turned to selected direction (third argument).
Template
CreateAndPlaceBuildingXYD(x:integer y:integer direction:integer)
As direction use numbers from 0 to 5.
Usage
uc_side:=2; //Building will be possesion of 2. side (yellow Arabian) uc_nation:=2; //Building will be Arabian (1-nation_american, 2-nation_arabian,3-nation_russian) bc_type:=b_breastwork; // Building will be breastwork CreateAndPlaceBuildingXYD(10,25,3); //Building will be placed on X:10, Y:20 with direction:3
You can also set ident of created building attributing it to variable:
variable_of_building:=CreateAndPlaceBuildingXYD(10,25,3);