laser ID
12 posts • Page 1 of 1
laser ID
When each laser is created does it have an ID like laser #1,#2,#3 and is there a way to find out what there ID is. Also can you use that ID when scripting like laser1.color = [2,5,6,4] ? Thanks!
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: laser ID
Lasers do have EntityIDs, you can find it out by selecting the laser and ctrl-c, and pasting it into somwhere and looking through until you find entityID=45, or similar, and, as far as i know, i don't think you can use the ID when scripting though.
-

bozbez - Posts: 149
- Joined: Tue Apr 12, 2011 7:01 pm
Re: laser ID
You can't use entityIDs in Thyme. It would make things so much easier though...
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: laser ID
You do use geomIDs though, they're used in spawning.
-

TC42 - Posts: 984
- Joined: Sun Jan 09, 2011 1:53 pm
- Location: $ sudo apt get-install sandwich_
Re: laser ID
Im gonna suggest that. Also do lasers have a geom ID
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: laser ID
Lasers dont have geomIDs as soon as you put them into the scene, but you can give them geomIDs by, in the script menu, typing down at the bottom, geomID = 27 (obviously the number can be changed). This destroys the entityID though (does it matter?).
-

bozbez - Posts: 149
- Joined: Tue Apr 12, 2011 7:01 pm
Re: laser ID
bozbez wrote:Lasers dont have geomIDs as soon as you put them into the scene, but you can give them geomIDs by, in the script menu, typing down at the bottom, geomID = 27 (obviously the number can be changed). This destroys the entityID though (does it matter?).
Changing geomID, entityID (as any other hidden property) via script window don't affect anything at all.
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: laser ID
Can i use geomID in scripting? like
- Code: Select all
geomID27.color = [4,56,78,44]
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: laser ID
I really wish you could do that, though. The only way you really can use geomID is in spawning, as TC42 said.
- Code: Select all
scene.addCircle({
pos := e.pos;
geomID = 142
});
scene.addLaserPen({
pos := e.pos;
geom := 142
})
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: laser ID
HavingPhun wrote:Can i use geomID in scripting? like? Also is that how you spell it because arent they case sensitive. And is that how you would code it?
- Code: Select all
geomID27.color = [4,56,78,44]
There is a way to do such things but you need to get target object somehow (collide or hit with laser) and it will work only in runtime (can't save it).
For example you can use onCollide = (e) => {scene.my.obj1 = e.this} and after that scene.my.obj1.color is valid variable.
geomID is dynamic and can be changed even on undo.
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: laser ID
Kilinich wrote:geomID is dynamic and can be changed even on undo.
Now why would they do that?
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: laser ID
Kilinich wrote:bozbez wrote:Lasers dont have geomIDs as soon as you put them into the scene, but you can give them geomIDs by, in the script menu, typing down at the bottom, geomID = 27 (obviously the number can be changed). This destroys the entityID though (does it matter?).
Changing geomID, entityID (as any other hidden property) via script window don't affect anything at all.
It does with me?
-

bozbez - Posts: 149
- Joined: Tue Apr 12, 2011 7:01 pm
12 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests





