Following several requests, I make a simple but effective tutorial that will allow you to MOVE a marker to a random position from an array.
To start, you will have to create a file in the folder life_server\Functions\Systems which will be called "fn_dynMarkers.sqf", add in it :
We will better understand the code:
We define the different positions of the desired marker (for example: Kavala, Athira, Pyrgos), at the server startup, the script will select 1 random position and move the marker present on the map (in the example "weed_1", on the random position). You can add as many random position as you want, just add data to the array:
To know the desired position for the marker, teleport to the desired location and type in the debug console:
Once your markers and their positions are set, go to the life_server init and add all of them at the end:
Enjoy ! You've managed to create dynamic markers (which can be used to create random farm road, etc).
If you like this tutorial more, don't hesitate to put a little like to motivate me to do more !
To start, you will have to create a file in the folder life_server\Functions\Systems which will be called "fn_dynMarkers.sqf", add in it :
S’il vous plaît,
Connexion
ou
S'inscrire pour voir le code !
We will better understand the code:
We define the different positions of the desired marker (for example: Kavala, Athira, Pyrgos), at the server startup, the script will select 1 random position and move the marker present on the map (in the example "weed_1", on the random position). You can add as many random position as you want, just add data to the array:
S’il vous plaît,
Connexion
ou
S'inscrire pour voir le code !
To know the desired position for the marker, teleport to the desired location and type in the debug console:
S’il vous plaît,
Connexion
ou
S'inscrire pour voir le code !
Once your markers and their positions are set, go to the life_server init and add all of them at the end:
S’il vous plaît,
Connexion
ou
S'inscrire pour voir le code !
Enjoy ! You've managed to create dynamic markers (which can be used to create random farm road, etc).
If you like this tutorial more, don't hesitate to put a little like to motivate me to do more !
Dernière édition: