Profile image

Automatic gift delivery

6,361 11qazxc  1.9 years ago
Auto Credit Based on Kendog84's ZIS-5 truck w M1939 37mm AA gun

Truck is made by Kendog.

Waypoint system, attempt 3.
Have points set for wright airport only.
Previous attempt's here.
Goes to any neighbour of current point except previous visited.
If current point doesn't have any neighbours except previously visited, stop, flash headlights, exhange gifts, go back.
"Gifts" are colored dots on label. In theory it will always ride four meters to the right from line between two points. I didn't measured how it actually works, but it doesn't collides with others.

Spotlights

General Characteristics

  • Predecessor ZIS-5 truck w M1939 37mm AA gun
  • Created On Windows
  • Wingspan 7.5ft (2.3m)
  • Length 19.6ft (6.0m)
  • Height 7.5ft (2.3m)
  • Empty Weight 4,068lbs (1,845kg)
  • Loaded Weight 6,934lbs (3,145kg)

Performance

  • Wing Loading N/A
  • Wing Area 0.0ft2 (0.0m2)
  • Drag Points 0

Parts

  • Number of Parts 48
  • Control Surfaces 0
  • Performance Cost 311
  • Log in to leave a comment
  • Profile image
    28.1k YarisSedan

    @11qazxc ohhhhhhhhhhh, thanks for the help mate

    one month ago
  • Profile image
    6,361 11qazxc

    @126 some variables are lists in index=a?xa:(index=b?xb:... form. to make them shorter i omitted closing parenthesis. it works fine with ft interpreter, but variable editor widget has it's own checker that says that such code isn't correct. to pass it you need to add those parenthesis back, e.g. turn
    p_tgt.i=1?6020:(p_tgt.i=2?5885:(p_tgt.i=3?5805:(p_tgt.i=4?5805:(p_tgt.i=5?5805:(p_tgt.i=6?5805:(p_tgt.i=7?5805:(p_tgt.i=8?5805:(p_tgt.i=9?5805:(p_tgt.i=10?5805:(p_tgt.i=11?5885:(p_tgt.i=12?6020:(p_tgt.i=13?6020:(p_tgt.i=14?6020:(p_tgt.i=15?6020:(p_tgt.i=16?5880:(p_tgt.i=17?5670:(p_tgt.i=18?5670:(p_tgt.i=19?5670:(p_tgt.i=20?5685:(p_tgt.i=21?5600:(p_tgt.i=22?5600:(p_tgt.i=23?5635:0
    into
    p_tgt.i=1?6020:(p_tgt.i=2?5885:(p_tgt.i=3?5805:(p_tgt.i=4?5805:(p_tgt.i=5?5805:(p_tgt.i=6?5805:(p_tgt.i=7?5805:(p_tgt.i=8?5805:(p_tgt.i=9?5805:(p_tgt.i=10?5805:(p_tgt.i=11?5885:(p_tgt.i=12?6020:(p_tgt.i=13?6020:(p_tgt.i=14?6020:(p_tgt.i=15?6020:(p_tgt.i=16?5880:(p_tgt.i=17?5670:(p_tgt.i=18?5670:(p_tgt.i=19?5670:(p_tgt.i=20?5685:(p_tgt.i=21?5600:(p_tgt.i=22?5600:(p_tgt.i=23?5635:0))))))))))))))))))))))

    one month ago
  • Profile image
    28.1k YarisSedan

    @11qazxc i know im late but, can you atleast visualize what that looks like? it still kept saying error on my end when i tried it yesterday, either im stupid or i did something wrong.

    one month ago
  • Profile image
    6,361 11qazxc

    @DatMaluchGuy19
    Try to add 22 closing parentheses in the end of p_tgt.next.z,p_tgt.next.x,p_tgt.links.z,p_tgt.links.x and 3 closing parentheses in the end of p_tgt.next

    +1 one year ago
  • Profile image
    28.1k YarisSedan

    @11qazxc uhhh for some reason when i tried to change certain values, for some reason, it said error when i tried to save the changes for some reason...

    one year ago
  • Profile image
    28.1k YarisSedan

    @11qazxc thanks, i was actually making a simple traffic cars project, and i want to make at least one reckless street racer ai.

    one year ago
  • Profile image
    6,361 11qazxc

    @DatMaluchGuy19 VC variable, it's in meters per second, and it's signed i.e. negative value means it must go backwards.
    TC controls engine directly, you can set it to 1 if you want to go as fast as possible.

    one year ago
  • Profile image
    28.1k YarisSedan

    @11qazxc also btw, how can i change the maximum speed of the ai? i kinda want to make a reckless street racer ai that causes nothing but harm to fellow ai drivers, and also the player too.

    one year ago
  • Profile image

    Great 10/10

    one year ago
  • Profile image
    6,361 11qazxc

    @winterro
    p_tgt.i stores id of currently selected point

    p_tgt.x, p_tgt.z are coords of currently selected point
    p_tgt.links.x, p_tgt.links.z are ids of points where it can go from currently selected one.

    p_tgt.i switches to one of p_tgt.links.x%100, p_tgt.links.x//100, p_tgt.links.y%100, and p_tgt.links.y//100 every time car gets close-enough to currently selected point

    Other variables aren't significant for routing, they're used to tame car itself, to make it unable to go to previous point, to make it not headbutt others, to make it stop at dead ends, to make it remember gifts without leaving too much inside label...

    one year ago
  • Profile image
    93.3k winterro

    Mind explaining how this works? Kinda interesting

    one year ago
  • Profile image
    28.1k YarisSedan

    @11qazxc thanks! your code is awesome btw!

    one year ago
  • Profile image
    6,361 11qazxc

    @DatMaluchGuy19 Yes, you can.

    +1 one year ago
  • Profile image
    28.1k YarisSedan

    @11qazxc hey, can i use your cool ft code? i will credit you when i used it!

    +1 one year ago
  • Profile image
    25.9k Kendog84

    @DatRoadTrainGuy19
    What about the game settings?
    Playing on low physics might help a little (these trucks should work fine on low physics, since they have no suspension parts)

    +2 1.8 years ago
  • Profile image
    6,361 11qazxc

    @DatRoadTrainGuy19 311x15=4665 performance cost, but with 15 AI scripts, 15 variable sets etc..

    +1 1.8 years ago
  • Profile image
    28.1k YarisSedan

    @Kendog84 i spawned 15 or 16 of these bad boys and no joke my frames dropped from 40 to 30 to just 15 and 10 sometimes even 9 and 8 fps too

    1.8 years ago
  • Profile image
    25.9k Kendog84

    @IceCraftGaming
    Probably possible even with the current set up, but you first have to chart the route between two places (I do have a plan to do that)

    +1 1.9 years ago
  • Profile image
    35.2k Icey21

    @Kendog84 It'd be cool if you can make it do something like drive from Yeager to Bandit so it'll be like a convoy substitute

    1.9 years ago
  • Profile image
    25.9k Kendog84

    Spawned a bunch (more than 5) at the same time and watched them go, they rarely collided with each other when driving around. They did sometimes bunch up in one destination (one time, 3 trucks drove to the loading area behind the terminal building at once), and when it happened they did get stuck on each other for a while. Even then, they'd usually unstuck eventually. I don't think there's an easy fix for this though, given that they can't "see" each other. It would be great if we had access to something like gametick, and use it to offset destination coords by a few meters, but for now, I think this is already great as it is.
    I'll probably (or maybe) play around with the system later and see if I can create a different route.

    +2 1.9 years ago
  • Profile image
    25.9k Kendog84

    @BeeEngineer
    Awesome. You can even spawn the truck as AI, and follow them around or use it as target. (If you haven't tried yet)

    1.9 years ago
  • Profile image
    7,074 BeeEngineer

    @Kendog84 I like it!! 8/10 (I didn't get to see the truck drive all the way to the start because it was divebombed by a jet but I had seen enough to rate it)

    1.9 years ago
  • Profile image
    25.9k Kendog84

    @BeeEngineer
    Truck has to collect gifts first, let it drive to the loading area or hangers of Wright

    1.9 years ago
  • Profile image
    7,074 BeeEngineer

    I don't see any gifts.

    1.9 years ago
  • Profile image
    25.9k Kendog84

    This is just, incredible.
    So much potential, for many other applications (patrolling police car, airport baggage handler, "regular" traffic...)

    +1 1.9 years ago
  • Log in to see more comments