Script access to attached hinges and lasers

Suggest changes and improvements to Algodoo.

Script access to attached hinges and lasers

Postby immibis » Thu Oct 22, 2009 5:23 am

Scripts on an object (possibly in onCollide or onLaserHit) should be able to access the properties of hinges and lasers which are attached to that object, maybe with e.this.lasers(0).size for example. (If there was more than one laser the order would be unpredictable). A similar thing should enable hinges to be accessed, like with e.this.hinges(0).motorSpeed. Again, the order would be unpredictable for more than one hinge.
Thymechanic
immibis
 
Posts: 87
Joined: Wed Sep 30, 2009 12:24 am

Re: Script access to attached hinges and lasers

Postby Conundrumer » Thu Oct 22, 2009 5:46 am

A temporary solution is to make motors out of circles inscribed in rings with materialvel
User avatar
Conundrumer
 
Posts: 344
Joined: Mon Aug 31, 2009 5:55 pm
Location: NYC

Re: Script access to attached hinges and lasers

Postby immibis » Thu Oct 22, 2009 8:27 am

You still can't access them from what they're attached to.
Thymechanic
immibis
 
Posts: 87
Joined: Wed Sep 30, 2009 12:24 am

Re: Script access to attached hinges and lasers

Postby Bronie12345 » Thu Oct 22, 2009 4:57 pm

you can acces them through the ray already (only the lasers), but as far as i know, not through the attached object

would be nice for hinges, but unnneccasary for lasers
When you make a comment at a scene, at least be brave enough to subscribe to that scene...
Don't go into a topic unprepared... Read the whole topic, including all the comments, before posting.

92% of teenagers have resorted to rap music. If you are part of the 8% who listens to real music, put this in your signature.
90% of teenagers today would die if Myspace/Facebook were completely destroyed. If you are one of the 10% who would be laughing their heads off, add this to your signature.
User avatar
Bronie12345
 
Posts: 451
Joined: Mon Aug 31, 2009 8:52 pm
Location: The Netherlands

Re: Script access to attached hinges and lasers

Postby Sonic » Thu Oct 22, 2009 6:23 pm

We can do this already, but just not in the way you describe. This is unnessesary. I don't support.
I do stuff and break things. You know how it is.
Image
User avatar
Sonic
 
Posts: 1467
Joined: Tue Sep 01, 2009 6:18 pm
Location: America!!!

Re: Script access to attached hinges and lasers

Postby Bronie12345 » Thu Oct 22, 2009 10:37 pm

not the way who describes?
When you make a comment at a scene, at least be brave enough to subscribe to that scene...
Don't go into a topic unprepared... Read the whole topic, including all the comments, before posting.

92% of teenagers have resorted to rap music. If you are part of the 8% who listens to real music, put this in your signature.
90% of teenagers today would die if Myspace/Facebook were completely destroyed. If you are one of the 10% who would be laughing their heads off, add this to your signature.
User avatar
Bronie12345
 
Posts: 451
Joined: Mon Aug 31, 2009 8:52 pm
Location: The Netherlands

Re: Script access to attached hinges and lasers

Postby immibis » Fri Oct 23, 2009 5:10 am

Me.
Using Bronie's way for lasers, that means a) the laser has to collide with the object it's attached to, (b) that object has to be transparent, (c) that object has to be immortal (for a cutter laser), (d) the laser's script has to differentiate between hitting that object and others, OR the object's script has to differentiate between that laser and others.
Thymechanic
immibis
 
Posts: 87
Joined: Wed Sep 30, 2009 12:24 am

Re: Script access to attached hinges and lasers

Postby fox11trot » Fri Oct 23, 2009 6:08 am

i was just going to sugjest this!!!

i fully support idk why anyone wouldnt because it would make phunlet safe hinge/ spring scripting possible
fox11trot
 
Posts: 62
Joined: Tue Sep 01, 2009 7:25 am

Re: Script access to attached hinges and lasers

Postby Conundrumer » Fri Oct 23, 2009 6:13 am

fox11trot wrote:i was just going to sugjest this!!!

i fully support idk why anyone wouldnt because it would make phunlet safe hinge/ spring scripting possible

Technically, anything is phunlet safe since you can delete everything but the phunlet thing and save the scene as a phunlet, thus saving the variables and stuff
immibis wrote:You still can't access them from what they're attached to.

Collision menus.
User avatar
Conundrumer
 
Posts: 344
Joined: Mon Aug 31, 2009 5:55 pm
Location: NYC

Re: Script access to attached hinges and lasers

Postby immibis » Fri Oct 23, 2009 7:44 am

Conundrumer wrote:
fox11trot wrote:i was just going to sugjest this!!!

i fully support idk why anyone wouldnt because it would make phunlet safe hinge/ spring scripting possible

Technically, anything is phunlet safe since you can delete everything but the phunlet thing and save the scene as a phunlet, thus saving the variables and stuff
It's phunlet safe if you can have multiple copies of it that are identical but don't interfere with each other.
Conundrumer wrote:
immibis wrote:You still can't access them from what they're attached to.

Collision menus.

If this suggestion was implemented, an onCollide script could have: "e.this.hinges(0).motorSpeed = 5;" which is a lot easier than your way.

Is there any particular reason you don't support this?
Thymechanic
immibis
 
Posts: 87
Joined: Wed Sep 30, 2009 12:24 am

Re: Script access to attached hinges and lasers

Postby Sonic » Fri Oct 23, 2009 6:02 pm

Not everything has to be Phunlet safe!
I do stuff and break things. You know how it is.
Image
User avatar
Sonic
 
Posts: 1467
Joined: Tue Sep 01, 2009 6:18 pm
Location: America!!!

Re: Script access to attached hinges and lasers

Postby Bronie12345 » Fri Oct 23, 2009 6:24 pm

even if you don't have this, you can make stuff phunlet safe (just controll stuff on other ways)
i always try to find new ways to make my stuff phunlet-safe :P
When you make a comment at a scene, at least be brave enough to subscribe to that scene...
Don't go into a topic unprepared... Read the whole topic, including all the comments, before posting.

92% of teenagers have resorted to rap music. If you are part of the 8% who listens to real music, put this in your signature.
90% of teenagers today would die if Myspace/Facebook were completely destroyed. If you are one of the 10% who would be laughing their heads off, add this to your signature.
User avatar
Bronie12345
 
Posts: 451
Joined: Mon Aug 31, 2009 8:52 pm
Location: The Netherlands

Re: Script access to attached hinges and lasers

Postby fox11trot » Sat Oct 24, 2009 2:21 am

Ok, think about it,
you cant make hinge scripts phunlet safe unless you want to be able to put only one copy of the phunlet in the scene because, right now, the only way to change variables in hinges, springs, lasers, and pens, with oncollide or onlaserhit, is to use scene.my variables
fox11trot
 
Posts: 62
Joined: Tue Sep 01, 2009 7:25 am

Re: Script access to attached hinges and lasers

Postby Username? » Sun Oct 25, 2009 2:13 pm

It's nearly the same suggestion like this
Check my most scripted scene
Code: Select all
       /^°>#
____.<=/`°`    #<°^==>._____
     ``         ´´  ´´
User avatar
Username?
 
Posts: 65
Joined: Sun Sep 20, 2009 8:06 pm


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 17 guests