Car driving script request/question (GTA Style)

● ARCHIVED · READ-ONLY
Started by oooo191 4 posts View original ↗
  1. Hi everyone i was wondering if anyone could help me  :)  

    Im looking for a way to make a car in RPG maker VX ACE to have acceleration, Brakes and smooth turning
    i know using some Victor Ace scripts i can get multiple frames for the wheels but i was wondering if anyone
    has a way to make a vehicle act like a vehicle for example a car from lets say retro city rampage or GTA 1 and 2
    i can imagine this has either been tackled many times and im willing to go through hell and earth to get this to work
    does anyone know a way :) thanks

    :rock-left:
  2. Bump - anyone got some car scripts?
  3. I've searched and didn't found any :)

    I'd imagine any such engine/system will need at least these components(each being an advanced complex script):

    - Animation spritesheet handling script for displaying the cars driving with different directions and cornering(the animation spritesheets themselves won't be provided of course)

    - Basic 2D kinematics script for replicating the cars' velocities and accelerations(the cars acceleration and deceleration settings, and maximum velocities are set by users)

    - 2D collision detection and resolution script for basic shapes to mimic collision with the cars and other some objects(its difficulty depends on how convoluted the shapes are in your game)

    - Basic friction script for simulating different behaviors when the cars drive on different terrains and perhaps weathers if you want(the terrain frictions and weather impacts are set by users)

    I think all these are needed even if your car driving script requests are meant to be easy and simple.

    P.S.: 2D pixel movements are actually needed too, but finding one that work for you should be easy :D
  4. Don't think you need a script to achieved what you want if it's something like the old school race car mini game.

    Seen an example before where all is done using eventing only.

    Edit:

    Gave it a try and turns out i only need 1 event on Auto to do the trick.

    [1] Setup a race track map (Not the starter map)

    [2] Put an event in the map and set it to auto (auto prevents the player from doing anything)

    [3] In the event, do this:

    Spoiler
        Condition Check: Button pressed: C (C button to move)

               Condition Check: Button pressed: Left (must be inside C condition check)

                          Move route : move left (speed down when moving left/right)

                           Variable A -= 1 (Set up a condition check Variable >=0 so it won't go over minus)

               end

               Condition Check: Button pressed: Right (must be inside C condition check)

                          Move route : move right

                           Variable A -= 1 (speed down when moving left/right)

               end

               Moveroute: move forward (move forward while C is pressed)

               Variable A += 1

               Condition Check: Variable A >= 60 (Acceleration Part)

                         Do nothing here           

               else

                    Condition Check: Variable A >= 50

                          Move route : wait(1 frame) wait

                    else

                         Condition Check: Variable A >= 40

                               Move route : wait(2 frame) wait (the longer the frame wait, the slower the vehicle goes)

                         end

               end

        else

               Condition Check: Variable A >= 0

                   Variable A -= 10 (Speed down when not pressing C)

               end

        end
    [4] Give it a test, fix the player's facing in move route and change his/her sprite to a vehicle before transferring to the race track map.

    Edit:

    Well, it sounds complicated with words alone. Here's the sample.

    Download Link: Click Me