Done.
I wrote a script to clone every entity and found the entityID of the circle.
Using the line (Scene.entityByID(X)).onclick and (Scene.entityByID(X)).update i could set the script to do nothing and was able to click with no problems!
Thanks Alien_RG! I actually designed this to be used in any scene! I'm sure I could have some function parts changed to work with your scenes if you want!
this function when put into the console will spawn a square(polygon) size 1 meter x 1 meter at pos [.5, .5]
Imagine the surfaces are like a connect the dots games
The first number is an array [0,0] (this is like a pos so use [X, Y])
This is where the first "dot" is made
The next array is [1,0]
This, in a sense, is like saying create a line from the previous array ([0,0]) to this new array ([1,0])
Then again next array is [1,1] so it creates another line to this point, and then to [0,1]
Notice how there are 5 positions in the array of numbers to create a 4 vertex box this is because the last pos will always equal the first so you complete the drawing
Hope this helps! If it doesn't i can try to reword it.
Yeah you can't change a polygons vertices once spawned you'll have to spawn a new one every time you want to change it. I don't think there's any other way to do it!
Well it depends on what you want to do. For instance if you wanted to create a polygon that has one points move up you first need to create a place for the script to run.
Make a normal square anywhere in the scene and in the poststep function put this
Thank you so much kilinich!! The walls actually are 100% independent and copy and paste able! I plan on releasing a more user friendly version soon.
I will work on removing some bugs and hopefully improve rendering soon!
Thank you AtomikB! Yeah i had trouble with the explosions haha.
You can look though some forum posts
http://www.algodoo.com/forum/viewtopic.php?f=13&t=411
http://www.algodoo.com/forum/viewforum.php?f=13
http://www.algodoo.com/forum/viewforum.php?f=14
You can also look though other peoples code and try to figure it out!
Thank you Xray! Fixed the reload thing and the sim.time==0 is just to set up vars when scene opens so no scene.my. vars go undefined!
Yeah i love making these type of scenes and watching them work! And as i get better at writing these algorithms hopefully i can make some beautiful things!
Thank you! Fixed that and added some directions to subtract. That was so obvious to me i forgot to explain it.
I tired for a couple weeks to make a function to draw everything out in a polygon but it's way beyond my coding and math knowledge to do that. This was the next best way i could think of.
Do you think i should take it down and try to make it do everything automatically?
Yeah i think the same way, make it as simple as possible. I think ill take this scene down in about an hour and try to make it hands free. Which i may never be able to do. Thank you Xray!