Instead of adding the players manually, you can loop from 1 to 12 at map init and add Events to corresponding trigger.
Also why is Player 12 exempted?
Wait hold on, the Init trigger is not finished, is only for demonstration to test it on player 1. I will work on that on my next version.
Player 12 is exempted because there must be a computer player in a game to be able to play, and even if you somehow with jass or something go around this, i`ve never seen a map where you dont have atleast 1 NPC player, especially for a car game (where i suppose you can use my trigger) you need a tournament NPC player or something like that, Neutral Passive is just not good enough.
----------------------------------------------------------------------
Ok at the moment i`m woking on the spell, wait 30 maybe 45 minutes and i will post the new version where i will definitely correct that movement bug ASAP, i have a very good idea how to synchronize the acceleration/deceleration, i will use the rotation scheme to do it, because there even if you hold the RIGHT/LEFT arrow simultaneously it works perfectly, the same way i will do with UP/DOWN arrows. While the deceleration will be an absolute value always, so that it will always go to 0 speed when substracted, while the BACKWARDS move will be negative speed with a mirror NEGATIVE TOP SPEED at its cap, so that if you push the UP/DOWN simultaneously it will either substract/add a speed to it, and because the Reverse move is slower than the forward acceleration, it will go ahead, but it will slow down the car, as if its only the ACCELERATION pushed, then the car will accelerate at TOP SPEED.
Version 1.1
Changelog:
-Fixed sliding bug (fractional division leftover could cause the car to not stop is fixed)
-Fixed acceleration/deceleration sync, now you can do both at a time and it will add/subtract from the current speed
-Added custom car model and horn effect
-Reworked the triggers and removed unnecesary variables
-Added speedometer, however it might memory leak, but it is not meant to use in the main system, it is just for misc/debug stuff for now, the main system is MOVEMENTSYSTEM folder, everything else is misc or init stuff
I`ve fixed the car stopping/ and or going wild like a boomerang if keys are pressed in bad order, it was a crucial bug so im glad that its fixed, i had to rework the triggers a bit, and it was easy to fix.
Past version used unit facing (Car facing) for forward and (Car Facing-180*) for backwards which caused the bug as if you cant add or subtract speed to different angled variables, so i`m not only using Car facing, but the reverse direction is now using negative speed and negative top speed.So if i decide to work on a speedometer too then i will have to use absolute value of that, but otherwise its perfect now.
On the other hand the camera system is still a bit too crude and choppy but i will work on that, maybe i will use a custom camera system for that, as suggested by
deathismyfriend
I will also try to add a collision system, and a car health system if it collides it loses health, maybe some nice animations for the car to get on fire if it collides with something.