Geom ID changes each time.

If you have problems installing or running Algodoo, have found a bug or need in-game help - this is it!

Geom ID changes each time.

Postby Xray » Sun Aug 04, 2013 4:39 am

I created a scene that uses the function: scene.entityByGeomID() which worked correctly until I saved the scene and then opened it again. All of the geometry ID's changed to different numbers, and then the scene, of course, no longer worked correctly. Is the geom ID supposed to change each time the scene gets loaded and run, or is this a bug, and the ID numbers are not supposed to change?

If the geom ID's are supposed to change, then how could scene.entityByGeomID be of any use if it only works one time, and then fails after the scene gets saved and reloaded? Am I not doing something correctly?

Thanks
User avatar
Xray
 
Posts: 500
Joined: Sun Jun 17, 2012 6:12 am
Location: USA

Re: Geom ID changes each time.

Postby jon_joy_1999 » Sun Aug 04, 2013 9:28 pm

use entityID instead of geomID, I think
Image
BSrac = BoincStats recent average credit
I'd rather be network computing.
jon_joy_1999
 
Posts: 233
Joined: Fri Dec 09, 2011 12:51 am

Re: Geom ID changes each time.

Postby Xray » Mon Aug 05, 2013 4:04 am

Well, I used geomID because of THIS POST which explains how it can be used. So, when it failed to work, I arrived at three possible conclusions:

1. I wasn't using it correctly.
2. The original poster was mistaken about it and did not realize that the geomID number changes every time Algodoo gets reloaded.
3. geomID has a bug, i.e., the number is not supposed to change once it has been assigned to a geometry.

EDIT: I confirmed that the entityID number changes, also, just as geomID does. So that will not work either. :problem:
User avatar
Xray
 
Posts: 500
Joined: Sun Jun 17, 2012 6:12 am
Location: USA

Re: Geom ID changes each time.

Postby Ivan » Mon Aug 05, 2013 12:49 pm

Maybe something like this could work:
Code: Select all
onSpawn = {scene.my.geomID = geomID}
Image
User avatar
Ivan
 
Posts: 202
Joined: Tue Oct 06, 2009 2:01 pm
Location: Croatia

Re: Geom ID changes each time.

Postby Xray » Mon Aug 05, 2013 11:22 pm

Ivan wrote:Maybe something like this could work:
Code: Select all
onSpawn = {scene.my.geomID = geomID}


I'm sure that would work, but if there were a large number of geoms in a scene to keep track of, then I would need a different global variable for each geom. For example, I would need scene.my.geomID_A = geomID, and scene.my.geomID_B = geomID, etc. So, it could become a nightmare to keep track of a large number of them.

FYI - This issue is not a current problem for a particular scene that I'm working on. I just happened to read about it in that thread that I linked to, and began experimenting with it. That's when I discovered that it didn't seem to work as expected. I'm not going to concern myself with it any longer.

Thanks for your replies and suggestions, guys!
User avatar
Xray
 
Posts: 500
Joined: Sun Jun 17, 2012 6:12 am
Location: USA


Return to Help / Bug reports

Who is online

Users browsing this forum: No registered users and 3 guests