Browse Search Popular Register Upload Rules User list Login:
Search:
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!

Very good challenge!
Last edited at 2014/10/03 23:30:30 by homieeee
Haha just keep making great scenes lololoer!:tup:
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!

Thanks Fratel!
Thanks Xray! Not that i found, I figured it out by myself. Its pretty simple actually!
I would post this to forums but i cant remember by password:bonk:

I will just explain how the surfaces work. If you want i can explain my shadow code more.

Scene.addPolygon({
surfaces := [[[0,0],[1,0],[1,1],[0,1],[0,0]]];
});

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.
Last edited at 2014/10/08 23:23:43 by homieeee
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!

Good luck:tup:
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

Scene.addPolygon({
surfaces := [[[0, 0], [1, 0], [1, sin(sim.time * 10) + 1], [0, 1], [0, 0]]];
timeToLive := 0.03;
colorHSVA := [0, 1, 0.5, 1]
})

This function will spawn a box with very important parts

If your polygon is always changing you need to add a timeToLive so after a frame the old polygon is deleted and a new one takes its place.

Its a lot like a flip book

One frame it looks like something and then the next frame there's a new page with a sightly different picture

Also notice the sin function in the surfaces array

[1, sin(sim.time * 10) + 1] this makes a point that is always changing.

One frame it might be [1,.5] and then the next its [1, .6]

----

Another example script i have is a box that has one point follow the Y position of your mouse

Scene.addPolygon({
surfaces := [[[0, 0], [1, 0], [1, app.mousepos(1)], [0, 1], [0, 0]]];
timeToLive := 0.03;
colorHSVA := [0, 1, 0.5, 1]
})
No problem Xray!:) Good luck:tup:
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!
Thanks Xray!:)
Thank you faytree!
I was thinking of trying to do merge sort next something with a really low run time.
Haha! What can i say i don't like making slow cars!:cool:
Whoops i forgot to write that in the controls menu! Thanks for reminding me fixed now! :bonk:
Tracks are more trouble than they're worth, to me, but you did a great job!:tup:
Last edited at 2014/10/24 05:41:02 by homieeee
Thanks MrLucasManSwe! And i can't wait to see it!

Thank you Roman!
Thank you s_noonan!
Haha thank you Xray! Of course any of it is yours to use!
Shotgun is from http://www.algodoo.com/algobox/details.php?id=79857
Last edited at 2014/10/29 21:08:59 by homieeee
Did you just compliment your own scene?
How so Kilinich? I try to design them to be as simple a possible.
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!
If you could do that it would be awesome lololoer!:tup:
If you need any help reading the code or something just ask!
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 faytree!
Thank you s_noonan!
Thank you Alien_RG!
Time doesn't work for me in any of the mazes
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!
Thank you Xray!:)
previous | 1 2 3 4 5 6 | next