1. Stuck or having problems creating your mod?

WIP Beta released Car Games 1.1.2

A collection of Mini-Games played across multiple themes with medals to be won

  1. Darthbob555

    Darthbob555
    Expand Collapse

    Joined:
    Feb 14, 2016
    Messages:
    283
    Darthbob555 updated Car Games V2 with a new update entry:

    Minor Fixes

    Read the rest of this update entry...
     
  2. Darthbob555

    Darthbob555
    Expand Collapse

    Joined:
    Feb 14, 2016
    Messages:
    283
    Darthbob555 updated Car Games V2 with a new update entry:

    More Miscellaneous Fixes

    Read the rest of this update entry...
     
  3. Darthbob555

    Darthbob555
    Expand Collapse

    Joined:
    Feb 14, 2016
    Messages:
    283
    Darthbob555 updated Car Games V2 with a new update entry:

    Update to 0.14 + A few more fixes and tweaks

    Read the rest of this update entry...
     
  4. Chaddylac

    Chaddylac
    Expand Collapse

    Joined:
    Nov 4, 2018
    Messages:
    4
    Hi there, Mr. Darthbob555.
    I think I may have encountered a few bugs today. On the Technological tracks, it doesn't register hitting the multiplier, the truck-thingy on the curling track and the NOS in the flying track. This is preventing me from progressing. :(

    Other than that, a great mod. It's fun, when it works, though.
     
    • Agree Agree x 1
  5. Danny Werewolf

    Danny Werewolf
    Expand Collapse

    Joined:
    Mar 31, 2017
    Messages:
    2,246
    I never took my time to actually play through this, but now that I did...especially the ball in the hole and "Threading the needle" Reminded me that I loved Hot Wheels Stunt Track Challenge.

    I surprisingly got a 900 first try on the ball one...I remember the one in HW:STC being absolute torture for me. I love this map so much and can't wait to play more.
    --- Post updated ---
    I watched an older version of the mod (WhyBeAre's video from a year ago) and saw that the truck spawns a decent ways away from the spawn once the map loads. Only issue is, when hitting the multiplier, the truck both doesn't move nor do I think it can move, because it's behind the wall of the stadium. I saw this with free camera.
     
  6. Darthbob555

    Darthbob555
    Expand Collapse

    Joined:
    Feb 14, 2016
    Messages:
    283
    --- Post updated ---
    My suspicions were right and it was indeed a simple fix. I'll upload the update but I'm sure it won't be approved until tomorrow. If you want it sooner, I'll upload it to the CarGames group main thread now. This should allow you to progress through Theme 2.
     
    • Informative Informative x 1
  7. Chaddylac

    Chaddylac
    Expand Collapse

    Joined:
    Nov 4, 2018
    Messages:
    4

    Glad it was a simple fix! I'm looking forward to progress further in the mod.

    For me, on the curling map, the truck was nowhere to be found. Atleast before I wrote in the discussion thread last night.

    May I ask what was the problem? Script error, or something. Just being curious. xD (Briefly been into scripting, but love to learn more about stuff like that.) :)
     
  8. Darthbob555

    Darthbob555
    Expand Collapse

    Joined:
    Feb 14, 2016
    Messages:
    283
    It was indeed a script error.
    The quick story is that I was checking to see if a function exists by calling it (which of course doesn't make sense since you can't call something that doesn't exist)

    Long Story:
    I am using emulated (Lua doesn't technically have classes) inheritance (where I have a super class which has all the basic functions for an event) and so I inherit these base functions when I create a specialised sub class for each event (for example, ClassDarts inherits the functions of ClassEvent). This then allows me to reuse functions that each event has anyways (such as onScenarioRestarted()). It's mostly for making the code easier and cleaner to read.

    As well as the sub classes inheriting the super class's functions, they also add their own, specialised functions that are intrinsic to itself (ie. cannot be accessed anywhere else). If I want to call that function, I can simply call from the instance on said class, which is simple enough. However, the same piece of code will handle all different events, meaning some functions do not exist in some instances (ie. functionA does not exists in eventA but does in eventB). As such, I was checking to see if it exists by evaluation whether the function is equal to nil (evaluating a function will return true if it exists and return nil if it doesn't). Since these aren't real classes, the way I should have checked if they exist was by indexing the "class" itself (it is a table data type to Lua), by simply calling classA:functionA. I was using incorrect syntax by saying classA:functionA(), which runs the function and returns the output. This essentially tells Lua to find the function functionA in classA, run it and find the output of that function. So the error was me telling Lua to find the output to a function that doesn't exist.

    When the Lua interpreter runs, it is a line-by-line interpreter, meaning it runs the code as it is needed unlike a compiler which runs the entire thing, compiles it and then runs that. As such, Lua did not know before hand of the error, and so when it came to running, it errored. When this happens, the Lua interpreter aborts what it is currently doing to prevent any other errors that may concertina down the line due to the errored code. This then prevents the powerups from ever being setup as they are the next thing to be executed.

    I tried to explain that the best I could but I'm not sure how well I did. Hope this makes some sort of sense.

    Also, the truck in the curling event for theme 2 is behind the player car in the toroid wall if you want to find it.
     
    #68 Darthbob555, Nov 4, 2018
    Last edited: Nov 4, 2018
    • Informative Informative x 2
  9. Chaddylac

    Chaddylac
    Expand Collapse

    Joined:
    Nov 4, 2018
    Messages:
    4

    I have no idea what you were talking about.. Jk. Yeah, that's a really good explaination, it made sense. Thanks! :D
     
    • Like Like x 1
  10. Darthbob555

    Darthbob555
    Expand Collapse

    Joined:
    Feb 14, 2016
    Messages:
    283
    That's good to know that I can sometimes convey my point across ;)
     
  11. Darthbob555

    Darthbob555
    Expand Collapse

    Joined:
    Feb 14, 2016
    Messages:
    283
    Darthbob555 updated Car Games V2 with a new update entry:

    Powerup fixes

    Read the rest of this update entry...
     
  12. Nathan24™

    Nathan24™
    Expand Collapse

    Joined:
    Apr 18, 2017
    Messages:
    2,139
    I may be dumb but can you make a custom vehicle selector menu like the one used in the Dam Jump scenario?
     
  13. Chaddylac

    Chaddylac
    Expand Collapse

    Joined:
    Nov 4, 2018
    Messages:
    4
    Go to settings -> General (I think) -> unbox the competitive scenarios. Then restart the scenario if you were already in it. Now you'll be able to use whatever car you want. :)
     
  14. Darthbob555

    Darthbob555
    Expand Collapse

    Joined:
    Feb 14, 2016
    Messages:
    283
    Darthbob555 updated Car Games V2 with a new update entry:

    Fixes of the fixes

    Read the rest of this update entry...
     
  15. Darthbob555

    Darthbob555
    Expand Collapse

    Joined:
    Feb 14, 2016
    Messages:
    283
    Darthbob555 updated Car Games V2 with a new update entry:

    Update tick fixes

    Read the rest of this update entry...
     
  16. Darthbob555

    Darthbob555
    Expand Collapse

    Joined:
    Feb 14, 2016
    Messages:
    283
    Darthbob555 updated Car Games V2 with a new update entry:

    0.15 fix + couple of changes

    Read the rest of this update entry...
     
  17. Darthbob555

    Darthbob555
    Expand Collapse

    Joined:
    Feb 14, 2016
    Messages:
    283
    Darthbob555 updated Car Games V2 with a new update entry:

    Event fixes/changes + more UI



    Read the rest of this update entry...
     
  18. Darthbob555

    Darthbob555
    Expand Collapse

    Joined:
    Feb 14, 2016
    Messages:
    283
    Darthbob555 updated Car Games V2 with a new update entry:

    Behind the scenes work + scenario specific changes

    Read the rest of this update entry...
     
  19. A Turbocharged Turbocharger

    A Turbocharged Turbocharger
    Expand Collapse

    Joined:
    Nov 26, 2018
    Messages:
    55
    The distance competition in beginner doesn't ever finish
     
  20. Darthbob555

    Darthbob555
    Expand Collapse

    Joined:
    Feb 14, 2016
    Messages:
    283
    Thank you for pointing this out, I knew I would forget to put the condition back in the code :rolleyes:.
    It's all fixed in the next update and so should get approved today or tomorrow (hopefully). If you want to get it now, I'll put it up in the main thread of the CarGames group so you're not limited to that theme and can continue: (link: https://www.beamng.com/forums/car-games.551/)
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice