Changing single array value
12 posts • Page 1 of 1
Changing single array value
I've tried to change a single value of an array like this:
Did not work.
I know instead I could type:
But with an array 50 values long this takes time.
So isn't there a shorter way?
- Code: Select all
scene.my.sample_array = [1,1,1,1];
scene.my.sample_array(1) = 0;
Did not work.
I know instead I could type:
- Code: Select all
scene.my.sample_array = [1,0,1,1]
But with an array 50 values long this takes time.
So isn't there a shorter way?
-

SyntaxError - Posts: 11
- Joined: Sat Apr 30, 2011 9:00 pm
-

TC42 - Posts: 984
- Joined: Sun Jan 09, 2011 1:53 pm
- Location: $ sudo apt get-install sandwich_
Re: Changing single array value
The first one should work?!
-

bozbez - Posts: 149
- Joined: Tue Apr 12, 2011 7:01 pm
Re: Changing single array value
Here, Grady tries to explain the closest thing possible to what you want.
Or, maybe you want something more like:
But I support the suggestion!
color(3) = 0
Or, maybe you want something more like:
- Code: Select all
scene.my.sampleArray = [scene.my.sampleArray0, scene.my.sampleArray1, scene.my.sampleArray2, scene.my.sampleArray3]
But I support the suggestion!
color(3) = 0
Matthias Wandel is epic, in my humble opinion.
I love my brain...
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
-

Someone Else - Posts: 1147
- Joined: Sun Nov 21, 2010 10:53 pm
- Location: The Milky Way Galaxy
Re: Changing single array value
Here, Grady tries to explain the closest thing possible to what you want.
Thats pretty complicated. I would have started to try this myself.... Maybe for hours
I don't have to understand it, if I know how to use it.
Every single programming language is able to handle this problem in a simple way.... but thyme
-

SyntaxError - Posts: 11
- Joined: Sat Apr 30, 2011 9:00 pm
Re: Changing single array value
color(3)=0
is not possible. you must type in the whole array, even when it looks like
color=[color(0),color(1),color(2),0]
then
(what is the same as color(3)=0)
is not possible. you must type in the whole array, even when it looks like
color=[color(0),color(1),color(2),0]
then
(what is the same as color(3)=0)
yup yup
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
- hiltropper
- Posts: 85
- Joined: Mon Dec 20, 2010 12:02 pm
- Location: Germany
Re: Changing single array value
As I said, I support the suggestion!
Matthias Wandel is epic, in my humble opinion.
I love my brain...
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
-

Someone Else - Posts: 1147
- Joined: Sun Nov 21, 2010 10:53 pm
- Location: The Milky Way Galaxy
Re: Changing single array value
do you mean for upcoming versions?
yup yup
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
- hiltropper
- Posts: 85
- Joined: Mon Dec 20, 2010 12:02 pm
- Location: Germany
Re: Changing single array value
That's the only place a suggestion can actually happen, isn't it?
Matthias Wandel is epic, in my humble opinion.
I love my brain...
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
-

Someone Else - Posts: 1147
- Joined: Sun Nov 21, 2010 10:53 pm
- Location: The Milky Way Galaxy
Re: Changing single array value
i was confused because thats not the suggestion forum
yup yup
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
- hiltropper
- Posts: 85
- Joined: Mon Dec 20, 2010 12:02 pm
- Location: Germany
Re: Changing single array value
When somebody asks how to do something that is impossible, I always like to turn that topic into a suggestion, as you have just seen.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
-

Someone Else - Posts: 1147
- Joined: Sun Nov 21, 2010 10:53 pm
- Location: The Milky Way Galaxy
Re: Changing single array value
nice idea
yup yup
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
- hiltropper
- Posts: 85
- Joined: Mon Dec 20, 2010 12:02 pm
- Location: Germany
12 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 4 guests





