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
@@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.
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
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
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
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
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.
@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
I love how well explained this is. Thank you for your effort
Happy to help, keep on scripting bro 💪
hey I know this is half a year old but good work. Very detailed and well explained, huge help!
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
@@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.
Awesome scripting tutorial, cheers
Thanks alot
Super useful mate!! Nice one ;)
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
@@arma3scripting bracket syntax has caught me out so many times, and I'm sure I'm not alone in that ;)
Maybe we'll have to do a "Top 10 syntax errors scripters make" video
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
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
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
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.
@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