[Help]Getting the geom count
5 posts • Page 1 of 1
[Help]Getting the geom count
Hello everyone, does there is any function or method to obtain the full number of disponible geoms?
Also an array with the geoms id will be useful, but how to obtain array's count?
Before all, thanks
Also an array with the geoms id will be useful, but how to obtain array's count?
Before all, thanks
- Luezma
- Posts: 14
- Joined: Thu Dec 13, 2012 7:19 pm
- Location: Argentina
Re: [Help]Getting the geom count
Hi Luezma!
I think there is no accesible function for getting the number of geoms and their IDs. Could you tell us what you need this for as there might theoretically be some hard, complicated and unefficient ways to accomplish it.
The only thing I can give you the answer to is how to obtain an array's count - the function string.length, which accepts both strings and arrays as arguments.
I think there is no accesible function for getting the number of geoms and their IDs. Could you tell us what you need this for as there might theoretically be some hard, complicated and unefficient ways to accomplish it.
The only thing I can give you the answer to is how to obtain an array's count - the function string.length, which accepts both strings and arrays as arguments.
-

Ivan - Posts: 203
- Joined: Tue Oct 06, 2009 2:01 pm
- Location: Croatia
Re: [Help]Getting the geom count
In the tool-bar in the upper-left hand corner, left click on "File", then click on "Show sim-info". This may be what you are looking for.
-

Xray - Posts: 501
- Joined: Sun Jun 17, 2012 6:12 am
- Location: USA
Re: [Help]Getting the geom count
Sorry, but I need real time geom id list to analize exact geoms with special properties
- Luezma
- Posts: 14
- Joined: Thu Dec 13, 2012 7:19 pm
- Location: Argentina
Re: [Help]Getting the geom count
Add to all geoms onSpawn event some code to put their IDs into array.
scene.my.tick = 0;
scene.my.IDs = [];
select all,
onSpawn = (e) => {scene.my.tick == sim.tick ? {scene.my.IDs = scene.my.IDs ++ [e.this.entityID]}:{scene.my.IDs=[]; scene.my.tick = sim.tick}}
scene.my.tick = 0;
scene.my.IDs = [];
select all,
onSpawn = (e) => {scene.my.tick == sim.tick ? {scene.my.IDs = scene.my.IDs ++ [e.this.entityID]}:{scene.my.IDs=[]; scene.my.tick = sim.tick}}
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
5 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests



