Changing Selected Object's Properties
9 posts • Page 1 of 1
Changing Selected Object's Properties
Is it possible to change the currently selected object's properties with thyme?
If it is, hotkeys could be used to change an objects collideSet to 0 or an objects friction to 0 at the press of a button instead of going through the menus every time.
If it is, hotkeys could be used to change an objects collideSet to 0 or an objects friction to 0 at the press of a button instead of going through the menus every time.
Noobs are the best 
-

phunHunger - Posts: 31
- Joined: Mon Apr 26, 2010 10:01 pm
Re: Changing Selected Object's Properties
I don't think that's possible, but it certainly would be useful.
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 Selected Object's Properties
Ok, let me get this straight :
You want to be able to change the properties of an object with thyme
You want to be able to use a key to do that
Ok, both are possible, if I understand you correctly.
If you want to change the properties with thyme, then open the console, using F11 or tilde(~)
Type the name of some scene.my.* variable. If you don't know what this is, it is basically just a variable in the form "scene.my.variable". It does not need to be called "variable", it can be anything from "pig" to "Switzerland".
Then, type a value. it can be a number (which is known as an "integer", although it can be a decimal), a string (something like, [1, 5]), a boolean (true or false), or (crap, I can't remember the last one!).
So, it should look something like this :
scene.my.pig = 4
Now, go to the script menu of the object you want to alter
Say you want to change density. In the density box of the object, type
{scene.my.pig}
MAKE SURE TO ADD THE CURLY BRACKETS!
Now, this makes the density of the object 4, in this case
Return to the console. now type "keys.bind("chose your letter",{your variable here = whatever your new value is})"
It should look like this :
keys.bind("f",{scene.my.pig = 10})
Now, when you press "f", it changes the density to 10.
I hope this helped!
I hope I didn't forget more then the last name of the value...
On an unrelated note, how does "[*]" and "[/*]" work? I know they make the arrows, but I can't get them to work.
Ok, both are possible, if I understand you correctly.
scene.my.pig = 4
{scene.my.pig}
MAKE SURE TO ADD THE CURLY BRACKETS!
It should look like this :
keys.bind("f",{scene.my.pig = 10})
Now, when you press "f", it changes the density to 10.
I hope this helped!
I hope I didn't forget more then the last name of the value...
On an unrelated note, how does "[*]" and "[/*]" work? I know they make the arrows, but I can't get them to work.
Phundementalism?
Ain't nobody got thyme fo dat.
Ain't nobody got thyme fo dat.
-

mold999 - Posts: 225
- Joined: Sun Jan 02, 2011 1:35 am
- Location: [176436, 3763234]
Re: Changing Selected Object's Properties
I understand what you're saying but I was wondering if there was a preset, global variable for the currently selected/highlighted object as in...
Selected.collideSet = 0
and so forth.
Selected being the object that you have just clicked on and have highlighted.
Selected.collideSet = 0
and so forth.
Selected being the object that you have just clicked on and have highlighted.
Noobs are the best 
-

phunHunger - Posts: 31
- Joined: Mon Apr 26, 2010 10:01 pm
Re: Changing Selected Object's Properties
nope, there is no way of adressing a selected object.
Well, none that i've heard of?
Well, none that i've heard of?
When asking for help, READ THE STICKIES!
- electronicboy
- Posts: 1694
- Joined: Mon Aug 31, 2009 6:18 pm
Re: Changing Selected Object's Properties
mold999 wrote::arrow: Then, type a value. it can be a number (which is known as an "integer", although it can be a decimal), a string (something like, [1, 5]), a boolean (true or false), or (crap, I can't remember the last one!).
That sentence generally failed
I rewrite it for ya:
An improvement, I think, although it could be clearer :/ .
-

bozbez - Posts: 149
- Joined: Tue Apr 12, 2011 7:01 pm
Re: Changing Selected Object's Properties
I think the proper syntax would be this:
Also, the [/*] is a lie. Just use [*] and it will work. But only in [list ]here.[/list] And remove the space in the {list}. I just added that so it wouldn't turn into
- Code: Select all
scene.selected.collideSet = 4
keys.bind("f", scene.selected.collideSet = 4)
Also, the [/*] is a lie. Just use [*] and it will work. But only in [list ]here.[/list] And remove the space in the {list}. I just added that so it wouldn't turn into
- this.
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 Selected Object's Properties
or scene.focus...
-

bozbez - Posts: 149
- Joined: Tue Apr 12, 2011 7:01 pm
Re: Changing Selected Object's Properties
Or that. It doesn't much matter to me. Just depends on what Emil thinks...
But I do think that scene.something is the right scope.
But I do think that scene.something is the right scope.
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
9 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests




