High Value Target script

  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2345

High Value Target script

« posted: Apr 10, 2016, 06:34 AM »
It has come to my attention how terribly written is the HvT script that many servers uses, so I rewrote it: https://gist.github.com/AgentRev/1e328573fda045614ea21bfd827f5f0b

- "High Value Target" shortened to "VIP" to waste less space on the map
- Money amount rounded to thousands (e.g. "$100k")
- Marker deleted on death and logout
- Added a sleep in the main loop as not to kill framerate by 25%
  • Offline CREAMPIE
  • Armaholic
  • Veteran
  • ******
  • Posts: 1077
  • ^_^;;

Re: High Value Target script

« Reply #1 posted: Apr 10, 2016, 08:47 AM »
It has come to my attention how terribly written is the HvT script that many servers uses, so I rewrote it: https://gist.github.com/AgentRev/1e328573fda045614ea21bfd827f5f0b

- "High Value Target" shortened to "VIP" to waste less space on the map
- Money amount rounded to thousands (e.g. "$100k")
- Marker deleted on death and logout
- Added a sleep in the main loop as not to kill framerate by 25%

lol Hi Rev !

- from the grassy knoll -
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2345

Re: High Value Target script

« Reply #2 posted: Apr 10, 2016, 08:50 AM »
Code: [Select]
for "_i" from 0 to 1 step 0 do
I mean seriously who the heck wrote that line... it gave me brain cancer

Re: High Value Target script

« Reply #3 posted: Apr 10, 2016, 10:54 AM »
Code: [Select]
for "_i" from 0 to 1 step 0 do
I mean seriously who the heck wrote that line... it gave me brain cancer

That is probably my doing  ::)
As i still don't know what i do and why... that stuff is remnants of the bounty thing i tried to do, if i remember correctly

I believe i got it from
http://killzonekid.com/arma-scripting-tutorials-loops/

As i thought a loop was necessary


Thanks for the rewrite and for helping me understad the possible uses of "diag_tickTime"
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2345

Re: High Value Target script

« Reply #4 posted: Apr 10, 2016, 11:00 AM »
I believe i got it from
http://killzonekid.com/arma-scripting-tutorials-loops/

Yeah but that kind of loop by KK was meant to eat as much processing power as possible, it runs like a hundred times per single frame. That's insane. He was just doing scientific-like research into the unscheduled environment of the game, trying to push the limits.

"diag_tickTime" is basically the same as "time" but not slowed down due to lag, i.e. real time.

Re: High Value Target script

« Reply #5 posted: Apr 10, 2016, 11:09 AM »
"diag_tickTime" is basically the same as "time" but not slowed down due to lag, i.e. real time.

Thanks for explaining it  :), i never used any of them.
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: High Value Target script

« Reply #6 posted: Jun 20, 2016, 03:58 PM »
That is probably my doing  ::)
As i still don't know what i do and why... that stuff is remnants of the bounty thing i tried to do, if i remember correctly

I believe i got it from
http://killzonekid.com/arma-scripting-tutorials-loops/

As i thought a loop was necessary


Thanks for the rewrite and for helping me understad the possible uses of "diag_tickTime"
Nope, that's my fuck up. It works though lool :P
And I got it from the Killzonekid tutorial.

It used to check on some animation change. But that would make the marker dissapear as soon as you got in a vehicle.

Re: High Value Target script

« Reply #7 posted: Jun 22, 2016, 03:59 AM »
Complete noob here. Where does this script go? I am sure if I wasnt a dumbass I could look at the code and figure it out.

Re: High Value Target script

« Reply #8 posted: Jun 22, 2016, 07:41 AM »
Place the HvT script folder in:

..\A3Wasteland_v1.3f.Tanoa\addons

then go to

..\A3Wasteland_v1.3f.Tanoa

and edit init.sqf with the following:

if (hasInterface || isServer) then
{
   //init 3rd Party Scripts
   [] execVM "addons\HvT\HvT.sqf";  // <<<<<< add this line to implement HvT
   [] execVM "addons\R3F_ARTY_AND_LOG\init.sqf";
   [] execVM "addons\proving_ground\init.sqf";
   [] execVM "addons\JumpMF\init.sqf";
   [] execVM "addons\outlw_magRepack\MagRepack_init.sqf";
   [] execVM "addons\lsd_nvg\init.sqf";
   [] execVM "addons\stickyCharges\init.sqf";
   if (isNil "drn_DynamicWeather_MainThread") then { drn_DynamicWeather_MainThread = [] execVM "addons\scripts\DynamicWeatherEffects.sqf" };
};


Complete noob here. Where does this script go? I am sure if I wasnt a dumbass I could look at the code and figure it out.

  • Offline dekela
  • First Blood
  • ***
  • Posts: 79

Re: High Value Target script

« Reply #9 posted: Jun 26, 2016, 03:07 PM »
running this new script, we still had a marker when the VIP disconnected. anyone else getting the same?
thanks
  • Offline nrz7
  • Geared Up
  • **
  • Posts: 21

Re: High Value Target script

« Reply #10 posted: Jun 30, 2016, 06:16 PM »
I can confirm it. This script is broken from the 1.60 update. When a player disconnects, the marker remains visible.

Can anyone help us to find the error?

Thanks.
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2345

Re: High Value Target script

« Reply #11 posted: Jul 02, 2016, 03:54 PM »
  • Offline soulkobk
  • First Blood
  • ***
  • Posts: 94
  • soulkobk.blogspot.com.au

Re: High Value Target script

« Reply #12 posted: Jul 03, 2016, 03:35 PM »
or here's a version I did the other day (confirmed working in version 1.60.x) ... <link removed>
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2345

Re: High Value Target script

« Reply #13 posted: Jul 03, 2016, 03:41 PM »
or here's a version I did the other day (confirmed working in version 1.60.x)

no. just, no. you never delete the player save on disconnect unless the player is dead/injured. you do not penalize a player because of a game crash / connection loss / power outage, ever. This is why I don't do that with combat logging. Breaking Point did this and it was absolutely terrible and unreliable.
  • Offline nrz7
  • Geared Up
  • **
  • Posts: 21

Re: High Value Target script

« Reply #14 posted: Jul 03, 2016, 11:18 PM »
Tried in my server and working. Thanks!