Breaking Down the Script Menu - Scripting Events || Algodoo Marble Race Scripting Tutorial

Поділитися
Вставка
  • Опубліковано 24 лис 2024

КОМЕНТАРІ • 77

  • @seth2rock
    @seth2rock  4 роки тому +3

    Timestamps!
    onLaserHit: 0:40*
    onClick: 0:47
    onCollide: 1:35
    onDie: 2:15
    onHitByLaser: 3:20
    onKey: 3:54
    onSpawn: 4:41
    postStep: 6:11
    update: 6:55
    * = not demonstrated in this video

    • @lanceconradlopez8014
      @lanceconradlopez8014 2 роки тому

      put one more time stamp and name it intro and set it to 0:00 so that its in your video

  • @AndrewStabell
    @AndrewStabell 4 роки тому +7

    Nice tutorial! A way for the viewers to read the scripts better is if you increase the menu scale in the settings.
    Also, congrats on (almost) 4K subs!

    • @MarksMarbleRacing
      @MarksMarbleRacing 4 роки тому

      Was going to suggest that. I wish there was a shortcut for it.

    • @seth2rock
      @seth2rock  4 роки тому

      Hello! Thanks for the suggestion! I didn't actually know about this, so I will look into it!

  • @MathCuber24
    @MathCuber24 4 роки тому +1

    Onkey script:
    keys.isdown("x") ? {} : {}
    x is the key you want to press.
    Also this is great!

  • @MarksMarbleRacing
    @MarksMarbleRacing 4 роки тому +2

    Thanks for doing this. Scripting is my biggest weakness!!
    May I suggest you add some timestamps for each section in your pinned comment or in the description. I think it's now possible to do it within the video, although haven't tried it yet.

    • @seth2rock
      @seth2rock  4 роки тому

      Thank you so much! I enjoy your work and hope that the series can help you as it progresses! Also for your suggestion - that is a good one; I'll work on it!

  • @BootifulBlaze
    @BootifulBlaze 4 роки тому

    Awesome! I never knew the change color code! That’s awesome! I can’t wait for you next video!

  • @placidgomes1054
    @placidgomes1054 Рік тому

    I'm new to the channel I subbed and liked and ringed the bell

  • @BootifulBlaze
    @BootifulBlaze 4 роки тому

    Awesome video! Your video has helped many people! :)

  • @RomeHanna
    @RomeHanna 4 роки тому

    cool! I will watch the rest later, I saw to 6:46

  • @ryzerred761
    @ryzerred761 2 роки тому +2

    It would helped if you displayed the scripts you were writing in another box with a bigger font the way you did for the narration

  • @varodabby9375
    @varodabby9375 4 роки тому +1

    Good video ur the best :D

  • @HalfEye79
    @HalfEye79 4 роки тому

    To the onKey-event. It really could be. Thyme looks quite similar to Java. And the KeyListener from that has three events: keyTyped (which triggers only once) but also keyPressed and keyReleased which I think both are combined here. Perhaps there is a way to differentiate this. I don't know.
    And for sure, the onKey-event is for any key in the first place. You would have to tell the event, for which key he should do something.

    • @cristianserrano8390
      @cristianserrano8390 2 роки тому

      How i can do this? I want to press “a” for sonething and press “p” for other thing

    • @HalfEye79
      @HalfEye79 2 роки тому

      @@cristianserrano8390
      That is easy: The KeyListener has gotten the keys, which is pressed. So, when you press any key, the Listener goes active. You ask him, if the "a" is pressed and if yes, send it on that way. If it don't, you ask, if the "p" is pressed and if yes. send it the other way. if a different key is pressed (i.e "z") then the KeyListener does nothing after the questions.

    • @cristianserrano8390
      @cristianserrano8390 2 роки тому

      @@HalfEye79 Yes, this is JavaScript

    • @HalfEye79
      @HalfEye79 2 роки тому

      @@cristianserrano8390
      I don't know JavaScript. That was Java. (Not related!)

  • @georgecota76
    @georgecota76 3 роки тому

    Teleporter: onCollide: e.other.pos = scene.my.var1 postStep: scene.my.var1 = pos Spawner: postStep: scene.my.var1 = pos

  • @dariobasch7874
    @dariobasch7874 3 роки тому

    AMAZING!!! love it

  • @dariobasch7874
    @dariobasch7874 3 роки тому

    could you make a video about the onLaserHit event please

  • @mertcanbal1910
    @mertcanbal1910 2 роки тому

    How can I move the circle left and right with the arrow keys?

  • @prokidstudios9109
    @prokidstudios9109 4 роки тому +2

    can't see the code clearly!! but its great

  • @stevenberyl9227
    @stevenberyl9227 2 роки тому

    btw, what is the script for the test subject button?

  • @thanabodeeworrakul4680
    @thanabodeeworrakul4680 4 роки тому

    Thanks. I need to improve a lot.

  • @taggamingyt2189
    @taggamingyt2189 3 роки тому

    it helps a lot with my races 😍😍😍

  • @Johnny_Adams
    @Johnny_Adams Рік тому

    Can I make more than one counter? I suck at coding so idk

  • @BootifulBlaze
    @BootifulBlaze 4 роки тому

    I just figured out how to do the test subject thing. Except how to spawn it at a certain position. Every time I try to do it, the button teleports there too. I guess I’ll find out in your next tutorials!

    • @seth2rock
      @seth2rock  4 роки тому +1

      Maybe you have "pos = (enter position)" in your code. Try to add a semicolon like this:
      pos := (enter position)
      Hope this works!

    • @BootifulBlaze
      @BootifulBlaze 4 роки тому

      If you mean type:
      pos := [x,y]
      Then I already did that. It teleports the pad along with spawning the marble there. But thanks for helping anyways! :)

    • @s1nblitz
      @s1nblitz 2 роки тому

      @@BootifulBlaze if the marble has the teleport code, remove the code, which leaves only the teleporter to have the code

  • @the4spaceconstantstetraqua886
    @the4spaceconstantstetraqua886 11 місяців тому

    1:00
    no, they aren't per-cent-ages, they're per-unit-ages.

  • @manologomez3207
    @manologomez3207 3 роки тому

    Como Se Podría Mover Un Motor Con Una Scrip

  • @milogaming13
    @milogaming13 4 роки тому

    When u gonn do another fmr race

  • @MrMymy-hw5ik
    @MrMymy-hw5ik 4 роки тому

    and u kno u can copy the color in script menu, change it to a dif color, then paste it

  • @jumpy8598
    @jumpy8598 4 роки тому

    I can't write more that one string in OnCollide. Algodoo not allows. What to do?

    • @gougou737
      @gougou737 4 роки тому

      you do: (insert first script);
      (insert second script)

    • @seth2rock
      @seth2rock  4 роки тому

      Hi Jumpy! All the replies are right - all lines of code must be separated with a semicolon. Hope it helps!

    • @jumpy8598
      @jumpy8598 4 роки тому

      Thanks so much! It works!

  • @sianslyfield7217
    @sianslyfield7217 4 роки тому

    Me: *watches the video*
    Also Me: *goes on algodoo and copies the steps*
    Can’t do it D:

  • @DJcoolguy_90ARCHIVED
    @DJcoolguy_90ARCHIVED 2 роки тому

    Hey i found out its been 2 years and you have not posted on how to spawn things with code, can u please make tutorial.? this wont get replied lol

  • @DeltaBG
    @DeltaBG 2 роки тому

    hello there i know i should ask you and should watch the tutorial but i really need an script super fast pls help me with it so lets move on: i want a script that when you push a key on your keyboard it spawns a pre selected object pls give the script to me thats a lot

  • @Mabel_aroace_pines
    @Mabel_aroace_pines 2 роки тому

    How to get it on ipad

  • @trietpiano2054
    @trietpiano2054 2 роки тому

    Can you write da code pls? I cannot see

  • @marbleraceffect
    @marbleraceffect 4 роки тому

    Can you put the scripts in the description?

  • @MrMymy-hw5ik
    @MrMymy-hw5ik 4 роки тому

    how do u spawn a test subject

  • @marsh2618
    @marsh2618 3 роки тому

    the code goes away i think it is because of the advanced users only thing how do i fix??

    • @seth2rock
      @seth2rock  3 роки тому

      Do you make sure to add semicolons after every line of code?

    • @marsh2618
      @marsh2618 3 роки тому

      @@seth2rock oof thanks for the advice

  • @ok.3400
    @ok.3400 4 роки тому

    I need an answer now. I used the pack, when I use the Anti gravity and the "anti" anti gravity, it won't work!!

    • @seth2rock
      @seth2rock  4 роки тому

      I don't know which pack you used, but maybe I can help. Can you send the scripts both pads have? Thanks!

    • @ok.3400
      @ok.3400 4 роки тому

      ​ @seth2rock I forgot the pack's name, but here are the scripts:
      Normal:
      (e)=>{
      e.other.density = 2;
      e.other.radius = 0.25;
      e.other.postStep == (e)=>{vel = vel + [0, 0.32]
      } ? {
      e.other.postStep = (e)=>{}
      } : {}
      }
      Anti Grav:
      (e)=>{
      e.other.postStep = (e)=>
      {vel = vel + [0, 0.32]
      }
      }

    • @seth2rock
      @seth2rock  4 роки тому

      @@ok.3400 I still can't find the issue, but here's some things you can try:
      -Make sure both those scripts are in the onCollide box
      -I don't see why the density and radius scripts are necessary, even the if-statement to detect the postStep. Try changing the onCollide of the normalizing pad to
      (e)=>{
      e.other.postStep = (e)=>{}
      }
      and see if it helps.
      Hope to hear from you!

    • @ok.3400
      @ok.3400 4 роки тому

      Its the 'rainbow' marble kit..

    • @ok.3400
      @ok.3400 4 роки тому

      Btw it works thanks!

  • @MrMymy-hw5ik
    @MrMymy-hw5ik 4 роки тому

    how do u define the counter

  • @MrMymy-hw5ik
    @MrMymy-hw5ik 4 роки тому

    PLZ TELL ME HOW 2 SPAWN A TEST SUBJECT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • @d3us_ex_machina
    @d3us_ex_machina 2 роки тому

    5:05

  • @fromfhvn1127
    @fromfhvn1127 4 роки тому

    Thank you so must UwU:D

  • @d3us_ex_machina
    @d3us_ex_machina 2 роки тому

    6:50

  • @waldnesstopicinternational5040
    @waldnesstopicinternational5040 4 роки тому

    3 scammers at this video! Beware seth2rock!

  • @dd-7777
    @dd-7777 3 роки тому

    ik im late to this vid but i dont under stand this part 2:43

  • @silviumetea5727
    @silviumetea5727 7 місяців тому

    how do i run more than one script on these triggers?

  • @szyanimationsbackup1400
    @szyanimationsbackup1400 3 роки тому

    How do i make bullets in algodoo?

  • @d3us_ex_machina
    @d3us_ex_machina 2 роки тому +1

    2:36

  • @d3us_ex_machina
    @d3us_ex_machina 2 роки тому

    2:47