Jump to content
jacmac

Generic Vehicle Service

Recommended Posts

http://files.enjin.com.s3.amazonaws.com/148378/module_gallery/original/1505223.jpg (164 kB)

http://files.enjin.com.s3.amazonaws.com/148378/module_gallery/original/1505225.jpg (425 kB)

http://files.enjin.com.s3.amazonaws.com/148378/module_gallery/original/1505229.jpg (570 kB)

Generic_Vehicle_Service_G (New Link)

The included test mission called GVS_Test_Mission.Stratis has been updated. In the test mission, simply land on the helipad or drive the vehicle into the coned area.

Documentation Updated:

/*=================================================================================================================
 Generic Vehicle Service by Jacmac

 Version History:
 A - Initial Release 3/22/2013
 B - Updated documentation, no script alterations 3/26/2013
 C - Revised trigger reuse handling, now server controlled 4/21/2013
 D - Major revisions to how GVS works; triggers, sounds, in vehicle signs, & on screen display changes 10/13/2013
 E - Updated gvs_triggers.sqf due to createTriggers and isServer being a fail 10/13/2013
 F - Updated gvs_triggers.sqf with UAV support, mods to generic_vehicle_Service.sqf for UAV detection 10/19/2013
 G - Added crazy work-around for the turret reloading problem until the developers fix the ARMA bug, quieted loop sounds 3/14/2014

 Features:
 -Rearms, Repairs, and Refuels Land, Helecopter, Plane, or UAV as desired
 -Wait times are adjustable and refuel/repair occurs only as needed,
   for example 50% repair is 5x longer than 10% repair. That could be
   50 seconds vs 10 seconds or 5 minutes vs 1 minute.
 -Uses display names where possible rather than type names in messages to players.
 -Use this with a marker placed on the map (see below).
 -Displays live activity in a dialog control rather than messages
   going out through vehicle chat.
 -Diaplay control is now based on layers, so interference with other scripts/mods using RscTitles 
 	should be eliminated, however see below for more information.
 -gvs_watcher disallows a vehicle from re-using any service point for a 
 	specified period.
 -Triggers on player being the driver of the vehicle, but the player 
 	does not need to remain	in the vehicle while it is being serviced.
 -Introducing 3D sounds into this version
 -Greatly simplified the method of trigger creation using markers, it is more or less automatic
  	now instead of a manual process

 Requirements:
 gvs_init.sqf									GVS initialization
 gvs_triggers.sqf								Generates triggers from markers
 gvs_watcher.sqf                       		Delays use (reuse) of service points
 sounds.sqf									Sound utility functions
 cfg_lookup.sqf                        		Utility functions
 simple_text_control.sqf               		Display/Dialog control for structured text
 colors_include.hpp                    		Color definitions
 control_include.hpp							Standard control includes
 stc_include.hpp								Simple text display control definitions
 Misc sound files (.ogg files included)

 Add the following into your mission's description.ext:
 #include "gvs\colors_include.hpp"
 #include "gvs\control_include.hpp"
 #include "gvs\stc_include.hpp"

 Add the following into your mission's init.sqf:
 execVM "gvs\gvs_init.sqf";

 To use GVS:
 	0. Copy the gvs directory into your mission folder.
   1. Create marker(s) on the map.
   2. Name the marker(s) gvs_veh_x, gvs_hel_x, gvs_uav_x and/or gvs_pla_x where x = some number (e.g. gvs_hel_0 is a helecopter service point).
   3. Uniquely name vehicles as desired.
   4. Run the mission

 Display Information:
 GVS uses RscTitles for the information display. It is very possible that missions you try to integrate GVS into will also
 use RscTitles. By default layer 301 is used for GVS, you can change it if you happen to be using 301 already, numbers in 
 the tens of thousands have been tested successfully. I you integrate GVS into a mission that is already utilizing RscTitles,
 for example "Domination", you will have to integrate the display class definitions. For example, in the Domination description.ext
 consider the following code:

 class RscTitles {
#include "x_dlg\RscTitles.hpp"
#include "gvs\stc_include_alt.hpp" //Alterntive display class definitions
};

 The display location and background color can be changed by altering the _display_Settings variable
 Text colors can also be altered by changing the constants through out the code prefixed with 'RGB'
 Colors can be found in colors_include.hpp

 Additional Notes:
 REQUIREMENT: Your vehicles must be uniquely named. GVS uses the names of vehicles to control re-use of a GVS trigger.
 This means if you put 10 Hunters on the map all named "BigHunter1", the first one to use a GVS will lock all of the others out
 until the re-use timer expires for "BigHunter1". For script spawned vehicles you will need to implement something like this if
 you want them to be able to use a GVS trigger:

 Example 1:
 	_kh60_Pos = [3962,4618];
 	_veh = "O_Ka60_F" createVehicle _kh60_Pos;
_varName="ka60_1";							// <----This must be unique per vehicle
_veh SetVehicleVarName _varName;
_veh Call Compile Format ["%1=_this ; PublicVariable ""%1""",_varName];

 Example 2:
_xloc = (floor ((random 100) + 3950));
_yloc = (floor ((random 50) + 4550));
_veh = "B_Quadbike_F" createVehicle [_xloc,_yloc];
Global_QUAD = Global_QUAD + 1;
_varName=("Quadbike_" + (str Global_QUAD)); // <----This must be unique per vehicle
_veh SetVehicleVarName _varName;
_veh Call Compile Format ["%1=_this ; PublicVariable ""%1""",_varName];

 Long term re-use of a trigger is controlled per vehicle instead of per player, this is a major change from the previous version.
 Each trigger you set up with GVS needs a public variable associated with it and these need to be initialized in init.sqf.
 The public variables prevent the GVS trigger from being immediately used by anyone or any vehicle on the server, while
 it is currently in use. This prevents scenarios where one player triggers GVS, then get out of a vehicle and another
 player gets in the same vehicle and causes a second triggering of the GVS (this was seen to cause problems).

 The default time for re-using a trigger has been changed to 200 seconds in gvs_watcher.sqf. A player can possibly trigger
 two or more vehicles to use various GVS triggers for different vehicle if they are all in close proximity, this can mean
 that the display of the information will get a little wonky, but everything will function normally as far as the vehicles
 rearming and repairing.

=================================================================================================================*/

Edited by Jacmac
New version.

Share this post


Link to post
Share on other sites

Your download link is broken. :confused:

Download not available

Download permission denied by uploader. (0b67c2f5)

This is what it says when trying to download.

Share this post


Link to post
Share on other sites

Thanks for the vehicle repair point script.. I like the dialog box.. Thanks for your work!! Downloaded

Hey Jacmac, check this out as well:

Downloaded for testing in Arma 3 .. WEEEEE

Share this post


Link to post
Share on other sites
Hey Jacmac, check this out as well:

The dialogs look good in that. I don't have that kind of knowledge right now, but it's something I'll be working on over time.

Share this post


Link to post
Share on other sites

"lookup_object_info.sqf" doesn't exist in the ZIP file, Error message shows "can't find this file."

Share this post


Link to post
Share on other sites
"lookup_object_info.sqf" doesn't exist in the ZIP file, Error message shows "can't find this file."

My mistake, please remove "call compile preProcessFile "lookup_object_info.sqf";" from your init.sqf. The line is a left over in the documentation, I'll edit it. Thanks for letting me know.

Share this post


Link to post
Share on other sites

Resource title UC_showtext_small not found?

havent been able to get anything to come up or working. i also googled UC_ShowText_small and google told me to go take a hike...lmao

followed the instructions, not my first rodeo, and im on Dev .52 could that have something to do with it?

Share this post


Link to post
Share on other sites

I'll make a demo mission, verify that it works, and update this post with the mission and any changed files. I don't think Dev .52 is a problem, but I'm not 100% positive of that.

---------- Post added at 02:04 PM ---------- Previous post was at 01:42 PM ----------

Resource title UC_showtext_small not found?

havent been able to get anything to come up or working. i also googled UC_ShowText_small and google told me to go take a hike.

Can you try adding "#include stc_include.hpp" to the file named "simple_text_control.sqf"? I think I must have somehow left this out, although if that is true, I'm not quite sure how I'm able to use it now. I will create a demo mission and verify all of this later, but that might fix your immediate problem.

As a side note: UC_showtext_small is a class in stc_include.hpp for the structured text dialog.

Share this post


Link to post
Share on other sites

OK Update on script failure:

I added :

#include "stc_include.hpp" in the "simple_text_control.sqf"

Which seemed to fix the missing UC_ShowText_small error.

I am still however am not seeing the vehicle get repaired, refueled nor any dialog popping up.

progress at least!

Share this post


Link to post
Share on other sites
OK Update on script failure:

I added :

#include "stc_include.hpp" in the "simple_text_control.sqf"

Which seemed to fix the missing UC_ShowText_small error.

I am still however am not seeing the vehicle get repaired, refueled nor any dialog popping up.

progress at least!

I suspect that your trigger might have a problem. Anyway, I'll create a demo mission and post it, which should clear things up.

Share this post


Link to post
Share on other sites

My next suspect was my trigger. i noticed many people said to set it to anyone but i wonder if anyone is broken so im trying it on blufor now and see what i can come up with

Share this post


Link to post
Share on other sites
My next suspect was my trigger. i noticed many people said to set it to anyone but i wonder if anyone is broken so im trying it on blufor now and see what i can come up with

just tried it, that does not work either.

Share this post


Link to post
Share on other sites

agreed. gonna do a full wipe, and wait for his new zip package and try that.

on the other hand i did try a different script from someone else...also wasnt working. so it may be arma 3 update? ill try again

---------- Post added at 05:18 PM ---------- Previous post was at 05:06 PM ----------

just got the other script working. so the game can do it. i want to use yours because i like the options and small interface.

Share this post


Link to post
Share on other sites

Documentation is updated and a test mission is in the download. There was a key piece of information left out - you have to add some lines to description.ext.

Share this post


Link to post
Share on other sites

This needs updating bud with the new classnames ... Good script man :)

Share this post


Link to post
Share on other sites

I am having problems using this with the INS Revive script as it already defines the rsc titles... any idea how to fix that please.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×