This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
How do you make an array of numbers? As in, MATLAB's x=[1:200] or x=[1:0.5:75] If you can't do this then is there a way to achieve the same effect without typing in a massive amount of numbers?
as in an in game permanent text? or? im confused bout what you need? :?
As a variable, sorry.
define array for each i set array[i] = i.?
@Nerfpl: Go
I would be typing that A LOT. That's why I want to make a range. I don't want to enter every single dang value into an array that's massive
for is a loop. pseudo-code
i=0; start = 0; step = 1; // 1 will be 0,1,2,3 where 2 will be 0,2,4,6 length = 100; // array length while i < length array[i] = (i+start)*step; i++; next;
if that's what you mean anyway
you can't create function/method to do this because you can't give/return array. Galaxy++ can tho from what i know.
++
still it's kinda pointless unless you aim to work inside this array. otherwise any array index you want will always equal (index+start)*step
Wait so galaxy can or cannot do a while loop?
of course it can lol :) which language can't anyway. It's basic thing
Thank you! I really appreciate it!
@Thunder44: Go
You must be an engineer (or a researcher) :P MATLAB, my best friend and my worst enemy >_>
Yep, on track for EE. Im only a freshman in college though. Trying to make ANOTHER zombie defence map. Yes it is done to death, but o well!
How do you make an array of numbers? As in, MATLAB's x=[1:200] or x=[1:0.5:75] If you can't do this then is there a way to achieve the same effect without typing in a massive amount of numbers?
as in an in game permanent text? or? im confused bout what you need? :?
As a variable, sorry.
define array
for each i set array[i] = i.?
@Nerfpl: Go
I would be typing that A LOT. That's why I want to make a range. I don't want to enter every single dang value into an array that's massive
for is a loop.
pseudo-code
if that's what you mean anyway
you can't create function/method to do this because you can't give/return array. Galaxy
++
can tho from what i know.still it's kinda pointless unless you aim to work inside this array. otherwise any array index you want will always equal (index+start)*step
Wait so galaxy can or cannot do a while loop?
of course it can lol :) which language can't anyway. It's basic thing
Thank you! I really appreciate it!
@Thunder44: Go
You must be an engineer (or a researcher) :P MATLAB, my best friend and my worst enemy >_>
Yep, on track for EE. Im only a freshman in college though. Trying to make ANOTHER zombie defence map. Yes it is done to death, but o well!