Scene.my issues
36 posts • Page 1 of 2 • 1, 2
Scene.my issues
If I use scene.my to change the color of an object then I open the scene later it will no longer change the color of the object. Please help. This is why i wish you could use entity ID for proggraming in thyme!
I won't be on the forums much for a while. But maybe once in a while.
-

HavingPhun - Posts: 178
- Joined: Sun Feb 06, 2011 10:42 pm
Re: Scene.my issues
What exactly happens? Does the variable imbedded in the object change? Make sure it's {scene.my.variablename}
Make sure that there is no scene.my.variablename(2) or anything like that. Be sure you treat it as an array.
Make sure that there is no scene.my.variablename(2) or anything like that. Be sure you treat it as an array.
-

TC42 - Posts: 984
- Joined: Sun Jan 09, 2011 1:53 pm
- Location: $ sudo apt get-install sandwich_
Re: Scene.my issues
Well I typed this ---
Then in the laser I wrote in onlaserhit ---
Then I save the scene and opened it up later and the scene.my variable won't change the color of the laser anymore!!
- Code: Select all
scene.my.laser1color = [1,1,1,1]
Then in the laser I wrote in onlaserhit ---
- Code: Select all
color = scene.my.laser1color
Then I save the scene and opened it up later and the scene.my variable won't change the color of the laser anymore!!
I won't be on the forums much for a while. But maybe once in a while.
-

HavingPhun - Posts: 178
- Joined: Sun Feb 06, 2011 10:42 pm
Re: Scene.my issues
yea know this problem
when you set the color to a variable and for example import the object as phunlet , the variable no longer exists in the new scene if you start the simulation so let it paused and type in any start value for your var first into the console or so ,so that the color can be set to the var (after that ,it can be changed to your values).if not the color is set to nothing that means the last known float or integer value ,no var any longer. this is caused by the effect that your scene.my. is saved correctly but after a time when it isnt longer saved in the console ,too, it will be set after the start of the simulation . at this moment it is to late for the object to take the var as value , because it didnt exist in the moment of the start , but a millisec after.
hope it was your problem but if not this is a similar one i know
when you set the color to a variable and for example import the object as phunlet , the variable no longer exists in the new scene if you start the simulation so let it paused and type in any start value for your var first into the console or so ,so that the color can be set to the var (after that ,it can be changed to your values).if not the color is set to nothing that means the last known float or integer value ,no var any longer. this is caused by the effect that your scene.my. is saved correctly but after a time when it isnt longer saved in the console ,too, it will be set after the start of the simulation . at this moment it is to late for the object to take the var as value , because it didnt exist in the moment of the start , but a millisec after.
hope it was your problem but if not this is a similar one i know
yup yup
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
- hiltropper
- Posts: 85
- Joined: Mon Dec 20, 2010 12:02 pm
- Location: Germany
Re: Scene.my issues
@HavingPhun: Do the variables still exist? Type scene.my.laser1color into the console and see what you get.
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: Scene.my issues
Yes they still exist but they don't change the color of the object anymore. This annoys me very much because I could make a working Tv or projector if i didnt have this problem!!

I won't be on the forums much for a while. But maybe once in a while.
-

HavingPhun - Posts: 178
- Joined: Sun Feb 06, 2011 10:42 pm
Re: Scene.my issues
the point is does it exist in
color = {scene.my.color}
?
if my prob is yours then it would be something like color={200,1,1,1} and the var is gone so it cant change anymore
color = {scene.my.color}
?
if my prob is yours then it would be something like color={200,1,1,1} and the var is gone so it cant change anymore
yup yup
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
- hiltropper
- Posts: 85
- Joined: Mon Dec 20, 2010 12:02 pm
- Location: Germany
Re: Scene.my issues
HavingPhun wrote:Then in the laser I wrote in onlaserhit ---
- Code: Select all
color = scene.my.laser1color
There's your problem. You want:
- Code: Select all
color = {scene.my.laser1color}
You forgot the braces.
TheWinkits wrote:They both looks of cuking amazing
-

Chronos - [Most Active Member 2010]
- Posts: 4457
- Joined: Mon Aug 31, 2009 6:00 pm
- Location: Californania
Re: Scene.my issues
If he uses a laser or something to refresh it constantly, he does not need the braces.
And that's exactly what he said.
And that's exactly what he said.
FuzzyLogicBrain wrote:Then in the laser I wrote in onlaserhit ---
- Code: Select all
color = scene.my.laser1color
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: Scene.my issues
Someone Else wrote:If he uses a laser or something to refresh it constantly, he does not need the braces.
And that's exactly what he said.FuzzyLogicBrain wrote:Then in the laser I wrote in onlaserhit ---
- Code: Select all
color = scene.my.laser1color
No, see, without the braces, it'll remove that code and replace it with whatever scene.my.laser1color is at that time. With the braces, it won't remove the code, but still update the color.
TheWinkits wrote:They both looks of cuking amazing
-

Chronos - [Most Active Member 2010]
- Posts: 4457
- Joined: Mon Aug 31, 2009 6:00 pm
- Location: Californania
Re: Scene.my issues
Chronos wrote:Someone Else wrote:If he uses a laser or something to refresh it constantly, he does not need the braces.
And that's exactly what he said.FuzzyLogicBrain wrote:Then in the laser I wrote in onlaserhit ---
- Code: Select all
color = scene.my.laser1color
No, see, without the braces, it'll remove that code and replace it with whatever scene.my.laser1color is at that time. With the braces, it won't remove the code, but still update the color.
No, see, he said he put that code in onLaserHit. Thus, it will update color at each blip.
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: Scene.my issues
Someone Else wrote:Chronos wrote:Someone Else wrote:If he uses a laser or something to refresh it constantly, he does not need the braces.
And that's exactly what he said.
No, see, without the braces, it'll remove that code and replace it with whatever scene.my.laser1color is at that time. With the braces, it won't remove the code, but still update the color.
No, see, he said he put that code in onLaserHit. Thus, it will update color at each blip.
Again, you don't understand. If you don't have the braces, it will remove the original code and replace it with whatever value the variable was at. It no longer is "color = scene.my.laser1color", it's "color = [1,1,1,1]" or whatever the variable was at at the time. I'm pretty sure you need the braces.
TheWinkits wrote:They both looks of cuking amazing
-

Chronos - [Most Active Member 2010]
- Posts: 4457
- Joined: Mon Aug 31, 2009 6:00 pm
- Location: Californania
Re: Scene.my issues
Does it really do that?
I just closed Algodoo, so I can't check.
@HavingPhun: Did it show you anything funny when you typed in the code? Did it stay as color = scene.my.laser1color or did it snap to color = [1, 1, 1, 1]?
Or maybe, this is a glitch that stems from using scripted lasers. Try e.laser.color = scene.my.laser1color.
I just closed Algodoo, so I can't check.
@HavingPhun: Did it show you anything funny when you typed in the code? Did it stay as color = scene.my.laser1color or did it snap to color = [1, 1, 1, 1]?
Or maybe, this is a glitch that stems from using scripted lasers. Try e.laser.color = scene.my.laser1color.
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: Scene.my issues
Someone Else wrote:Or maybe, this is a glitch that stems from using scripted lasers. Try e.laser.color = scene.my.laser1color.
Nope, it's not a glitch. It's the intended behavior. It's always been like that, and it (hopefully) always will.
TheWinkits wrote:They both looks of cuking amazing
-

Chronos - [Most Active Member 2010]
- Posts: 4457
- Joined: Mon Aug 31, 2009 6:00 pm
- Location: Californania
Re: Scene.my issues
yes the braces are basic requirement very likely it will work with braces.
but when importing or so , you also have to set the variable first (as described above).
i checked it again few minutes ago
but when importing or so , you also have to set the variable first (as described above).
i checked it again few minutes ago
yup yup
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
- hiltropper
- Posts: 85
- Joined: Mon Dec 20, 2010 12:02 pm
- Location: Germany
Re: Scene.my issues
Now why would the Algoryx people make us always type in e.laser.color like that?
And I just tested it- color = scene.my.blah does indeed fail to fail as Chronos said it would.
And I just tested it- color = scene.my.blah does indeed fail to fail as Chronos said it would.
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: Scene.my issues
so the code would be this in onlaserhit?
Also would this work still if i am changing the values of the variable throughout the scene?
- Code: Select all
e.laser.color = {scene.my.blah}
Also would this work still if i am changing the values of the variable throughout the scene?
I won't be on the forums much for a while. But maybe once in a while.
-

HavingPhun - Posts: 178
- Joined: Sun Feb 06, 2011 10:42 pm
Re: Scene.my issues
HavingPhun wrote:Also would this work still if i am changing the values of the variable throughout the scene?
That's why you want the braces. Otherwise, it'll change it once, then stop. That code should work (unless you typoed).
TheWinkits wrote:They both looks of cuking amazing
-

Chronos - [Most Active Member 2010]
- Posts: 4457
- Joined: Mon Aug 31, 2009 6:00 pm
- Location: Californania
Re: Scene.my issues
It should work without the braces, but the braces won't hurt.
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: Scene.my issues
No, it shouldn't work without braces. The braces are needed for dynamic values.
-

TC42 - Posts: 984
- Joined: Sun Jan 09, 2011 1:53 pm
- Location: $ sudo apt get-install sandwich_
Re: Scene.my issues
What I understand is this:
- Code: Select all
Without the braces, it will refresh each event. Every collision, blip, whatever.
With the braces, it will refresh whenever the value is changed.
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: Scene.my issues
Someone Else wrote:What I understand is this:
- Code: Select all
Without the braces, it will refresh each event. Every collision, blip, whatever.
With the braces, it will refresh whenever the value is changed.
You're actually wrong. The way it goes is:
With the braces, it will refresh each event.
Without the braces, it will change once, then the value in the box will no longer be the variable. It'll be the value the variable was at the time the code was entered.
TheWinkits wrote:They both looks of cuking amazing
-

Chronos - [Most Active Member 2010]
- Posts: 4457
- Joined: Mon Aug 31, 2009 6:00 pm
- Location: Californania
Re: Scene.my issues
You're certain of that.
I'm not.
This is what I set up:
Thus proving that my understanding was correct.
If there was a smilie depicting a face with its thumbs in its ears, its fingers sticking up and wiggling, and its tongue sticking out, I would show five of those.
I'm not.
This is what I set up:
- Code: Select all
I declared scene.my.blah = [1, 1, 1, 1]
In a laser, I made the onLaserHit color = scene.my.blah. I also tried e.laser.color = scene.my.blah to the same effect.
I placed two circles above the beam- one would hit the beam almost immediately, the other would take a few seconds.
Below the beam, I placed a box with onCollide scene.my.blah = [0, 1, 0, 1].
I started the sim.
The first circle hit the beam and the beam turned white.
The first circle hit the box to no visible effect.
The second circle hit the beam, turning the beam green.
The second circle hit the box to no effect.
I checked the onLaserHit. It had not changed.
I then repeated the experiment, but with color = {scene.my.blah}.
When I started the sim, the beam turned green when the first circle hit the box and changed the variable, not when the second circle hit the beam.
Thus proving that my understanding was correct.
If there was a smilie depicting a face with its thumbs in its ears, its fingers sticking up and wiggling, and its tongue sticking out, I would show five of those.
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: Scene.my issues
Someone Else wrote:You're certain of that.
I'm not.
This is what I set up:
- Code: Select all
I declared scene.my.blah = [1, 1, 1, 1]
In a laser, I made the onLaserHit color = scene.my.blah. I also tried e.laser.color = scene.my.blah to the same effect.
I placed two circles above the beam- one would hit the beam almost immediately, the other would take a few seconds.
Below the beam, I placed a box with onCollide scene.my.blah = [0, 1, 0, 1].
I started the sim.
The first circle hit the beam and the beam turned white.
The first circle hit the box to no visible effect.
The second circle hit the beam, turning the beam green.
The second circle hit the box to no effect.
I checked the onLaserHit. It had not changed.
I then repeated the experiment, but with color = {scene.my.blah}.
When I started the sim, the beam turned green when the first circle hit the box and changed the variable, not when the second circle hit the beam.
Thus proving that my understanding was correct.
If there was a smilie depicting a face with its thumbs in its ears, its fingers sticking up and wiggling, and its tongue sticking out, I would show five of those.
You're completely doing it wrong. I'm uploading a video of me proving my point.
TheWinkits wrote:They both looks of cuking amazing
-

Chronos - [Most Active Member 2010]
- Posts: 4457
- Joined: Mon Aug 31, 2009 6:00 pm
- Location: Californania
Re: Scene.my issues
Chronos wrote:You're completely doing it wrong. I'm uploading a video of me proving my point.
...
Well?
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
36 posts • Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 2 guests




