SiK Speed is King

Multi Theft Auto => Multi Theft Auto Discussion => Topic started by: Demiveil on November 15, 2010, 09:46:31 PM

Title: Server ghost mode.
Post by: Demiveil on November 15, 2010, 09:46:31 PM
Ok I've officially finished the first iteration of a ghost mode script. I've outlined in the suggestions board but I'll put it here too.
At current the system will count down 15 seconds, and then each vehicle will check to see if any other vehicle is within 5 metres of itself, and if there is none it will turn ghostmode off for itself. However if there is it will keep ghost mode on and the car will blink its alpha to indicated that ghost mode is trying to turn off.

I've tested it as much as I can but really I'm certain there will plenty of little issues with it, so I'm hoping that over the next few days you can all just let me know if you have any difficulties with it, or any suggestions to improve it. That'd be great.
Cheers
Title: Re: Server ghost mode.
Post by: Full_Metal on November 16, 2010, 12:28:59 AM
awesome, ill have to drop in and check it out
Title: Re: Server ghost mode.
Post by: DemonSeed on November 16, 2010, 01:05:47 AM
nice work man, but i was on xfire and msn all day and i never saw you, i wanted to test it :(
Title: Re: Server ghost mode.
Post by: PacMaan on November 16, 2010, 02:18:02 PM
Sounds like a great system - if it works! lol
Title: Re: Server ghost mode.
Post by: asablic on November 16, 2010, 03:55:52 PM
Nice work comrade!  ;)
Title: Re: Server ghost mode.
Post by: DemonSeed on November 17, 2010, 12:47:55 AM
It works great, me and demi tested it and it works perfectly :)
Title: Re: Server ghost mode.
Post by: foshizzler on November 17, 2010, 12:27:48 PM
is the ghost bar case closed?
Title: Re: Server ghost mode.
Post by: Demiveil on November 17, 2010, 06:21:37 PM
Ah what do ye mean by that exactly?
Title: Re: Server ghost mode.
Post by: AcidbRain on November 18, 2010, 06:39:28 AM
This is actually a cool script, and the one thing I'd change would be the method used to determine the distances between vehicles; you can find an improved method within the race script itself, on util_client.lua:
Code: [Select]
-- Calculate the gap between element bounding spheres
function getGapBetweenElements( elemA, elemB )
if not isElement( elemA ) or not isElement( elemB ) then
return false
end
local x,y,z = getElementPosition( elemA )
local distance = getDistanceBetweenPoints3D( x, y, z, getElementPosition( elemB ) )
distance = distance - ( getElementRadius( elemA ) or 0 )
distance = distance - ( getElementRadius( elemB ) or 0 )
return math.max( 0, distance )
end
This will get you the distance between the outer edges of the vehicles bounding spheres, instead of the distance between their centers. This may improve accuracy when you're dealing with vehicles larger than 5 units -- it's a rare occurence, but it's good to be prepared. ;)
Title: Re: Server ghost mode.
Post by: Demiveil on November 18, 2010, 07:11:05 AM
Well actually my script does account for that, infact I actually pretty much wrote that quoted function myself, using the getElementRadius. Obviously I wasn't aware that that function already existed, but yes mine does compare the radius of each vehicle in the calculation thus ensuring the gap between vehicles is over 5.
 ;)
Title: Re: Server ghost mode.
Post by: Grim_Reeper on November 18, 2010, 11:35:16 PM
Well done Demi

Would like to see this work in action :>
Title: Re: Server ghost mode.
Post by: Demiveil on January 11, 2011, 08:44:28 PM
Well whilst the system does work more or less flawlessly its reception hasn't been as positive as I would of hoped.
As such I'm opting to remove the system and go back to the good old SiK style of full ghost mode.
Title: Re: Server ghost mode.
Post by: DemonSeed on January 11, 2011, 09:44:07 PM
Yeah everyone is clamoring for the old ghost to come back, the main reason we did this is to get more players, i did not see that.

So i'm down with going back.
Title: Re: Server ghost mode.
Post by: Blacky on January 13, 2011, 06:26:10 PM
Yes, nice idea, I prefer the old ghostmode, and it's better for me now, because my ping increased a lot now. And I'm very dangerous  when I'm racing with high ping.