Tow Truck, Toolbox changes, restart timer changes and refuelling changes
#31
(03-17-2019, 04:37 PM)Pollux Wrote:
(03-17-2019, 02:31 PM)Pollux Wrote:
(03-17-2019, 01:08 PM)Agorith Wrote:
(03-17-2019, 12:38 PM)Pollux Wrote:
(03-17-2019, 02:18 AM)Agorith Wrote: I don't get it, was the tow truck removed and just now added back??

I made the entire tow truck system ages ago and it was even a test car for a bit. It was never fully released though.

Wasn't it on here before you were contrib/dev? I could've sworn it was
Maybe not the entire system though

There was actually a prototype version in the game from before I was contrib/dev, however whoever was working on it before couldn't figure it out so they removed all of their stuff apart from a few references to a towing system (or they commented it all out, can't remember). I believe it was announced in CodedBrain's red alert update (or one of them). For my system, I removed it all and started again. It was however still just a prototype which is why I never released it, it seems like it still has the various bugs in it which stopped me from releasing it in October (the only change Arny made is adding a distance check and mechanic only).

aaaaand there it goes aha

[Image: Pv6By4J.png]

and this is why you test stuff REEEEEEEEEEEEE
The following 2 users Like Zambie's post:
  • Pollux, Byra
#32
Lasted a long time.
The following 3 users Like JoshZ's post:
  • Pollux, Chumps, Byra
#33
Removed the best part of the update tho, whats the point of it now?...
The following 1 user Likes Byra's post:
  • Prosto
#34
1000 dollars for only 15%? That sounds quite stupid to me.. especially as cars get broken really easily etc on the server.

And was the tow truck even tested? You simply can not add a vehicle and create that much hype, and then remove the best part of the update.. I suggest reading the suggestion forums a bit more, to see what the community wants.
[Image: CYCeH3i.png]
The following 1 user Likes Random's post:
  • Zambie
#35
(03-17-2019, 07:47 PM)Random Wrote: 1000 dollars for only 15%? That sounds quite stupid to me.. especially as cars get broken really easily etc on the server.

And was the tow truck even tested? You simply can not add a vehicle and create that much hype, and then remove the best part of the update.. I suggest reading the suggestion forums a bit more, to see what the community wants.

I mean I think the idea behind increasing toolbox prices is to make mechanics more used, which is perfectly fine as long as there's some cheaper way to repair vehicles when there aren't any mechanics on (such as the gas stations being able to repair it for way cheaper if there's no mechanics).

The tow truck was tested quite extensively by me after I created it, it was even a test car on the main server at one point. I then got rid of it once I realised it can cause crashes and documented it.



Spoiler: Proof (It only says 8 days ago due to a changelog bug, this is actually late october)
[Image: 8NvrqHi.png]

[Image: 9oMUyih.png]



I even mentioned it in the suggestion and gave advice on how to fix the crashing issues it had.


Spoiler: Proof
[Image: WYVWIy8.png]



Even though it says I made the tow truck script, it really isn't my fault as what I created was a really early prototype which I knew had various bugs. I obviously never finished it as I was demoted a bit after, but I did document my test findings and even gave advice on how to fix it after my demotion. I'm being defensive about this as it is my script and I still take responsibility for stuff i've made even though i'm no longer a dev here. I just want to make it clear it was never ready for public release and I didn't hide the fact it causes crashes at all. Even though this isn't really my fault, I will explain the issue and how to fix it as it is still my script in the end.
 
Here's why the issue occurs:

This version of the tow truck was created when I was experimenting with various methods of getting the tow truck to work. In total, I explored the following methods: Having a hook which you manually connect to a car and then you reel it in (point of weld between rope end and car); having the car welded to the tow truck; having it connected to the car via a rope and finally having the car be a parent of the tow truck for the duration the tow. The one which was added in this update was the last one, because this is the version on the Alpha server so it was just directly copied over. Now those who know GLua are likely screaming due to me trying the parent method. I just want to stress this was only intended as a test due to it being the easiest approach. 

So when someone types the command on a vehicle and it passes all the validation checks, the first thing it does is parent it to tow truck. After doing this, I can easily use Entity:SetLocalPos(Vector) and Entity:SetLocalAngles(Angle) to position the vehicle correctly to make it appear as if it's attached behind. This immediately raises a bug though, due to me setting the position and angles after setting it as a parent, the weight of the object does not adjust accordingly to the new position. You can actually see this in Arny's video. The tow truck is leaning to the left as while the object appears to be directly behind, it was offset slightly when he attached it. This means that even though it looks like it is directly behind, the physics bit hasn't updated so it still thinks the weight is on the left side. 

First issue out of the way, lets go onto why it crashes. Well, simple answer is that SetParent is never meant to be used on these type of objects (http://wiki.garrysmod.com/page/Entity/SetParent). I just tried it as it would make it kinda easier, I was not surprised at all when it didn't work. It crashes when you try to park the vehicle as it freaks out about the once child object no longer being there, the server just really really doesn't like this.

How to fix it:

Well it's as simple as it seems, do not use the parent method. As I suggested in the tow truck suggestion thread currently open, exchange it for a rope connection. You can either parent a prop onto the end of the tow truck to use as an attachment point or just get the position of the end, either works. You can still pretty much use all of my existing code too as that will help set the initial position you need before you can attach a rope (just need modifications like WorldToLocal and LocalToWorld instead of the parent method, this is pretty much the same thing though). The only difference is once you get it into position, you attach a rope from the front of the vehicle to the point you defined on the tow truck (or the prop). You can then remove this constraint after you're done towing. It will look way more realistic as it's a rope (so it moves as the truck moves) and it doesn't cause crashes or weird bugs! If you want to fix it but feel kinda lazy, a weld would work just find and needs no additional points to be calculated for all cars.

Feel free to contact me over DM if you need help.
Pollux
Fearless Management
bork
__________________________________________________________________
The following 4 users Like Pollux's post:
  • TASSIA, Alphaverse, Luna, RoCKy
#36
I kind of wish there were other options to repair your car when mechanics aren't online.

I understand it can be capped when mechanics are on (even still, not sure if I like forcing the RP on people for something so basic as cars), but having a cap of 30% when no mechanics are on with no other way to fix your cars is really annoying.
The following 2 users Like Avgar's post:
  • Agorith, RoCKy
#37
I've added a little feature now that you can repair your car at Car Parking.

To do so, drive into the spot and hold shift/sprint key and it will repair your car 10% every second. You cannot use this when there is a mechanic online. It will take $100 per 10%

[Image: 7XpfpP7.jpg]
The following 2 users Like Luna's post:
  • Chumps, Avgar
#38
(03-18-2019, 05:46 PM)Arny Wrote: I've added a little feature now that you can repair your car at Car Parking.

To do so, drive into the spot and hold shift/sprint key and it will repair your car 10% every second. You cannot use this when there is a mechanic online. It will take $100 per 10%

[Image: 7XpfpP7.jpg]

It's quite a bad location tbh. since you can park your vehicle there that might just get frustrating.
FearlessRP 
____________________________________________________________________________________
[Image: Yzs7t0g.png]
If you can read this you're a coon
The following 2 users Like Chumps's post:
  • Zambie, RIC0H
#39
Now people will stop parking in the middle of the way.
[Image: UE8GhmX.png]


Forum Jump:


Users browsing this thread: 1 Guest(s)