Author: Fight9
Author Website:

Requirements: No addons required

Version: 1

Short description: A customizable and dynamic vehicle marker script.

Date: 2013-12-25 10:26


Comments: (2)
Rating:



 







VicMarker

by
Fight9


Description:
This script is very simple in principle but has a huge amount of options that make it helpful. I was working on a high command mission and was annoyed that I could never get getIn waypoints close to my empty vehicles; they needed markers! In most basic form, the script adds a dynamic marker to your vehicle and tracks its position. At the same time, it detects whether the vehicle is alive, disabled, or dead. The marker and text change depending on its status. You can define a total of 9 parameters when calling the script, but only if you want. If you like the markers and colors I have chosen, you can stick with the default ones and are not required to define them in the parameters.


Features:
- Script creates a marker and follows the vehicle
- Vehicles have three states: Alive, Disabled, and Dead
- All three states have customizable icons
- Definable icon, color, hints, and whether the icon is removed with destruction
- Makers are updated every 3 seconds with new vehicle positions
- The Script uses the vehicles name as its marker name, so if you need to find the marker in another script or trigger, it would be easily definable
- Script includes a complete list of marker icons and colors available


Installation / Usage:
To use the script, all you have to do is move the vicMarker.sqf into your mission folder and add this line to your vehicles INIT (name your vehicle!):
null = [this] execVM "vicMarker.sqf";
If you want to change any of the marker parameters, here are the default ones being used (Look in the sqf file for a full list of icons and colors):
null = [this, "Victor Name", false, true, "b_support", "ColorWest", "b_maint", "ColorBlack", "hd_warning", "ColorRed"] execVM "vicMarker.sqf";
Here is all those parameters explained:
null = [this, " Marker Display Name", Display Status Hints (true/false), display destroyed marker (true/false), "Alive Marker Type", "Alive marker color", "Disabled Marker Type", "Disabled Marker Color", "Destroyed Marker Type", "Destroyed Marker Color"] execVM "vicMarker.sqf";
You can also use this in a trigger, your unit.sqf, or another script by replacing 'this' with the vehicle name:
null = [Victor1] execVM "vicMarker.sqf";


Known issues:
- The Hints are local and don't like to work in MP. Until I can figure out how to send them globally, I have them disabled by default (changeable in parameters).
- If you don't name your vehicle nor declare a display name in the parameters, the name ends up being a long string of numbers and the model file name.
- The "Disabled" state is defined by the canMove command. If often requires half of the tires to be gone or the engine on red. Vehicles are mostly disabled before then though


Future plans:
- Add vehicle/unit/faction detection and define marker icons accordingly
- Find a better way to detect damage on a vehicle
- Optimize?


Notes:
I have been teaching myself scripting over the last couple of weeks and have finally been able to create something that was worth a release.

If any of you amazing scripters around here have a few moments to look at this and tell me what I did wrong, or what I could improve on, I would appreciate it a lot. I am releasing this because I figure that it might help me learn more advanced techniques. I'm sure my methods are often wrong...


Changelog:
v1
- first release


Forum topic:
- BI forums




Enable javascript to be able to download from Armaholic please!



Tags: No tags