Arma 3 How To - Arrays

Поделиться
HTML-код
  • Опубликовано: 1 фев 2025

Комментарии • 16

  • @grinicalaveras
    @grinicalaveras 8 месяцев назад +1

    I love how well explained this is. Thank you for your effort

    • @arma3scripting
      @arma3scripting  8 месяцев назад +1

      Happy to help, keep on scripting bro 💪

  • @mycoolhandgiveit
    @mycoolhandgiveit 2 года назад +1

    hey I know this is half a year old but good work. Very detailed and well explained, huge help!

    • @arma3scripting
      @arma3scripting  2 года назад +1

      For youtube standards its still young i guess lol, feel free to ask questions if you have em , im still around just been more busy with other things recently. Thank you as well for watching

    • @mycoolhandgiveit
      @mycoolhandgiveit 2 года назад +1

      @@arma3scripting I am now actually having an issue with the getRelDir command working inconsistently. I managed to fix my issue with pulling things from an array because of your video lol.

  • @dragz4life422
    @dragz4life422 3 года назад +2

    Awesome scripting tutorial, cheers

  • @reggaeman007jah
    @reggaeman007jah 3 года назад +2

    Super useful mate!! Nice one ;)

    • @arma3scripting
      @arma3scripting  3 года назад +1

      I tried to keep it a shorter video like the others, i really did 😅 i just felt like i needed to explain it really clear so no one is left in the dark about that subject any more

    • @reggaeman007jah
      @reggaeman007jah 3 года назад +1

      @@arma3scripting bracket syntax has caught me out so many times, and I'm sure I'm not alone in that ;)

    • @arma3scripting
      @arma3scripting  3 года назад

      Maybe we'll have to do a "Top 10 syntax errors scripters make" video

  • @theslyprod7554
    @theslyprod7554 3 года назад +1

    How would one use an array to work with floor random in arma for say 20 items and have one selected at random depending on what the floor random value returns as? I've been trying to figure it out for the past 3 days for a dnd inspired arma 3 mission im making for some friends

    • @arma3scripting
      @arma3scripting  3 года назад +2

      Thats a good question, lets say we have an array filled with random items of any data type, _rdmArray [ ];
      If _rdmArray has exactly 20 items inside then its array indexes will go from 0 to 19 , so if you run _rdmNumber = floor random 20; then random will give you a number between 0 and 20 and floor will round it to a whole number so you could then use _rdmNumber as an index position to select a random element from the array, so something like ////
      _rdmArray = [ full of stuff];
      _rdmNumber = floor random 20;
      _rdmElement = _rdmArray select _rdmNumber;
      *note floor random 20; will never return 20, only a number between 0 and 19

    • @arma3scripting
      @arma3scripting  3 года назад +2

      Another simple way to do this would be using the command selectRandom, which will just select a random element from the given array, _rdmNumber = selectRandom _rdmArray; , this would be the quick and easy way, but in arma random comes in a couple different forms, using /floor select 10/ you have about a %10 chance of landing on each number so its equal chances , other syntaxes of random can give you wieghted chances so its more likely to roll higher or lower, although selectRandom isnt a true random its close enough for government work, and easy to use

  • @jimb196233
    @jimb196233 2 месяца назад +1

    I think all of these tutorial makers think experienced people are watching these. Nobody really explains how to actually how and where to do it in the editor.

    • @arma3scripting
      @arma3scripting  2 месяца назад

      @jimb196233 exactly 💯 that's why I made a more entry-level video to really help get started. Here is the link ruclips.net/video/Hrmslfnu3Pk/видео.htmlsi=M-_XNGN7GFnyWQVz