[OPEN] What is the proper way to put in a line into the init.c file to call to another (Example): buildings.c or Chernobuildings.c.?

jay8454

New Member
What is the proper way to put in a line into the init.c file to call to another (Example): buildings.c or Chernobuildings.c. made with the DayZCommunityOfflineMode editor?

In the old Arma2 Dayz Mod it was truly easy here is an OLD (Example Call to Another File the old init.sqf): [] execVM "addons\buildings.sqf" (End) Then it would put the building coordinates in and like magic it was in the game. When what where and how the $,# what are those things trying to communicate?

I am failing to understand how to do something so simple any help?
 

A-E-e

New Member
For examples:
Add this to top of your init.c file and make sure the path is right.

C++:
#include "$CurrentDir:\\mpmissions\\missionfolder\\custom\\cherno\\ Chernobuildings.c"
And also in init.c. Inside void main(), add line "spawnCherno();"

Inside the Chernobuildings.c you add your "SpawnObject" commands



Code:
void spawnCherno()
{
    //Cherno
    SpawnObject( "Object", "X Y Z", "ROTATION XYZ" );
    SpawnObject( "Object", "X Y Z", "ROTATION XYZ" );
    SpawnObject( "Object", "X Y Z", "ROTATION XYZ" );
    SpawnObject( "Object", "X Y Z", "ROTATION XYZ" );
    SpawnObject( "Object", "X Y Z", "ROTATION XYZ" );
    SpawnObject( "Object", "X Y Z", "ROTATION XYZ" );
    SpawnObject( "Object", "X Y Z", "ROTATION XYZ" );
    SpawnObject( "Object", "X Y Z", "ROTATION XYZ" );
    SpawnObject( "Object", "X Y Z", "ROTATION XYZ" );
    SpawnObject( "Object", "X Y Z", "ROTATION XYZ" );
    SpawnObject( "Object", "X Y Z", "ROTATION XYZ" );
    SpawnObject( "Object", "X Y Z", "ROTATION XYZ" );
}
 
Top