onIdle

Suggest changes and improvements to Algodoo.

onIdle

Postby standardtoaster » Sun Sep 20, 2009 11:00 pm

onIdle would be pretty much the exact opposite of onCollide. If we had onIdle then we would be able to have noncolliding parts have scripts that are running all the time and we would be able to have a script that runs all the time but "pauses" when something hits it and then "resumes" when nothing is hitting it. Do you get what I mean?
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: onIdle

Postby Torpedo » Mon Sep 21, 2009 12:24 am

There is essentially a way of doing this. If you have a part where one laser consistantly hits it, and then apply another laser, the laser that hit it lasts code seems to end up taking presidence over the last piece.

I cant remember exactly how it worked but i used such an idea in my seven segment display, i think it was mainly for color change. however, if you applied a check to the color of that box, you have a positive and negetive occurance from it.
Image
User avatar
Torpedo
 
Posts: 120
Joined: Mon Aug 31, 2009 8:51 pm

Re: onIdle

Postby standardtoaster » Tue Sep 22, 2009 12:44 am

Torpedo wrote:There is essentially a way of doing this. If you have a part where one laser consistantly hits it, and then apply another laser, the laser that hit it lasts code seems to end up taking presidence over the last piece.

I cant remember exactly how it worked but i used such an idea in my seven segment display, i think it was mainly for color change. however, if you applied a check to the color of that box, you have a positive and negetive occurance from it.

Yes, but having onIdle would make scripting noncolliding objects and the like a hell of a lot easier.
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: onIdle

Postby Laraso » Tue Sep 22, 2009 1:50 am

standardtoaster wrote: ... have scripts that are running all the time ...

But then someone will end up accidentally, while working on their scene, putting a spawn code in the onIdle box that was meant for the onCollide box, while working on a really big giant important scene of awesomeness. Algodoo will then crash, and then every time they try opening Algodoo back up again it will load the onExitSave scene and Algodoo will just end up crashing again, they will have to delete the scene to get Algodoo running again. Then said person will come to these forums and complain about how easy it is to get onIdle and onCollide mixed up, and will then fight to have onIdle abolished.

Or, someone could create something really awesome with this type of thing, and you will be praised for suggesting this.

Either way, I support.
Phundamentalist... When possible!
Image
User avatar
Laraso
 
Posts: 241
Joined: Tue Sep 01, 2009 12:54 am
Location: What are you, a stalker?

Re: onIdle

Postby standardtoaster » Tue Sep 22, 2009 2:30 am

Laraso wrote:
standardtoaster wrote: ... have scripts that are running all the time ...

But then someone will end up accidentally, while working on their scene, putting a spawn code in the onIdle box that was meant for the onCollide box, while working on a really big giant important scene of awesomeness. Algodoo will then crash, and then every time they try opening Algodoo back up again it will load the onExitSave scene and Algodoo will just end up crashing again, they will have to delete the scene to get Algodoo running again. Then said person will come to these forums and complain about how easy it is to get onIdle and onCollide mixed up, and will then fight to have onIdle abolished.

Or, someone could create something really awesome with this type of thing, and you will be praised for suggesting this.

Either way, I support.

Your first argument is basically the same thing as saying that onHitByLaser is to easily confused with onCollide. If that's the case then just copy and paste the script from one place to another. Either way, thanks for the support. ;D
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: onIdle

Postby Laraso » Tue Sep 22, 2009 1:19 pm

standardtoaster wrote:Your first argument is basically the same thing as saying that onHitByLaser is to easily confused with onCollide. ... Either way, thanks for the support. ;D

Well... Someone could confuse the two, but then it would only screw up everything if it got hit by a laser. And the chances of that happening before someone has time to realize the problem then fix it aren't very high I don't think.

But with onIdle, scripts are running all the time, everytime!

And your welcome. I'm slowly getting ideas on a few things I could make with this.
Phundamentalist... When possible!
Image
User avatar
Laraso
 
Posts: 241
Joined: Tue Sep 01, 2009 12:54 am
Location: What are you, a stalker?

Re: onIdle

Postby Sonic » Tue Sep 22, 2009 6:07 pm

Won't onIdle cause a hell of a lot of lag?
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: onIdle

Postby RA2lover » Wed Sep 23, 2009 1:43 am

not if you set a refresh timer in it.

also,
RicH wrote:IN AN EFFORT TO RAISE MY POST COUNT

support.
Jrv wrote:
TC42 wrote:Quite honestly, I didn't think anyone on 4chan has that good a use of grammar, spelling, usage, mechanics, ect.
But I've never been there, so I may be wrong.


GTFO newfgt
User avatar
RA2lover
 
Posts: 607
Joined: Mon Aug 31, 2009 8:43 pm
Location: Brazil

Re: onIdle

Postby niffirg1 » Wed Sep 23, 2009 5:21 am

Supported
User avatar
niffirg1
 
Posts: 376
Joined: Mon Aug 31, 2009 10:31 pm
Location: The Great American South!

Re: onIdle

Postby Versieon » Wed Sep 23, 2009 5:33 am

I do think this would be usefull. support
User avatar
Versieon
 
Posts: 375
Joined: Tue Sep 01, 2009 4:45 pm

Re: onIdle

Postby Fujitsu » Wed Sep 23, 2009 7:00 am

I've actually run into a need for this many, many, many times. :D
Image
Gimmie money.
User avatar
Fujitsu
 
Posts: 328
Joined: Tue Sep 01, 2009 12:28 am
Location: Canada

Re: onIdle

Postby Chronos » Wed Sep 23, 2009 11:53 am

RA2lover wrote:
RicH wrote:IN AN EFFORT TO RAISE MY POST COUNT

support.

ditto (to both those ;))
TheWinkits wrote:They both looks of cuking amazing
User avatar
Chronos
[Most Active Member 2010]
 
Posts: 4457
Joined: Mon Aug 31, 2009 6:00 pm
Location: Californania

Re: onIdle

Postby Versieon » Wed Sep 23, 2009 11:20 pm

Now that I think about it, it would probobly be more usefull if it was an "onalways" script box. Tht way you could have things running all the time and able to collide or have it function like onidle. That way we could have both functions it one script area instead of just onidle
User avatar
Versieon
 
Posts: 375
Joined: Tue Sep 01, 2009 4:45 pm

Re: onIdle

Postby KarateBrot » Sun May 09, 2010 8:05 am

After Ivanlul's question about this kind of thing I tried to make a solution for it and here it is:
http://www.algodoo.com/forum/viewtopic.php?f=13&t=2136
I just posted it here in case that anyone is still interested in using something like onIdle


Versieon wrote:Now that I think about it, it would probobly be more usefull if it was an "onalways" script box. Tht way you could have things running all the time and able to collide or have it function like onidle. That way we could have both functions it one script area instead of just onidle

You can also do this with the code
Last edited by KarateBrot on Sun May 09, 2010 4:26 pm, edited 1 time in total.
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: onIdle

Postby Matten » Sun May 09, 2010 4:16 pm

A while ago I was creating a scene. But I needed to make a loop for spawned movable objects. I couldn't find a way to solve this, but with an onIdle/loop script it would! Support!
Cave Johnson wrote:Do you know who I am? I'm the man who's gonna burn your house down! With the lemons! I'm gonna get my engineers to invent a combustible lemon that burns your house down!
User avatar
Matten
 
Posts: 435
Joined: Mon Apr 05, 2010 2:03 pm
Location: The Netherlands

Re: onIdle

Postby Dakta » Mon May 10, 2010 12:33 am

Uhm... To make something execute all the time, follow KarateBrot's link to the howto.
.. ,__,_____
. / __.==--" - - - - - - - - ""
./#(-'
.`-' From http://www.ascii-art.de/. Modded by me to work in Arial. Image
a Mammoth wrote:be boring and interesting.

Mystery wrote:If you were jailbreaker you shouldn't have when't up the 3.1.3
I didn't know you could go up 3.1.3! Thanks Mystery person!
User avatar
Dakta
 
Posts: 417
Joined: Sat Sep 12, 2009 4:36 pm

Re: onIdle

Postby Rrobba » Mon May 10, 2010 9:28 pm

This could be useful in certain situations, but not all. Anyway I'll support because it could come in handy.
Image
I don't suffer from insanity. I enjoy every minute of it.
User avatar
Rrobba
[Best Sig 2010]
 
Posts: 1480
Joined: Mon Aug 31, 2009 6:01 pm
Location: Gibraltar

Re: onIdle

Postby Matten » Wed May 12, 2010 8:00 pm

Dakta wrote:Uhm... To make something execute all the time, follow KarateBrot's link to the howto.

I mean that the spawned objects need a loop, and with Karatebrot's way I would have a lot of script. With a loop script it would be very easy
Cave Johnson wrote:Do you know who I am? I'm the man who's gonna burn your house down! With the lemons! I'm gonna get my engineers to invent a combustible lemon that burns your house down!
User avatar
Matten
 
Posts: 435
Joined: Mon Apr 05, 2010 2:03 pm
Location: The Netherlands

Re: onIdle

Postby Dakta » Thu May 13, 2010 4:40 am

Admittedly yes, but I still say that implementing every single user requested feature is a stupid effort that leaves the software with too many things to reasonably support.
.. ,__,_____
. / __.==--" - - - - - - - - ""
./#(-'
.`-' From http://www.ascii-art.de/. Modded by me to work in Arial. Image
a Mammoth wrote:be boring and interesting.

Mystery wrote:If you were jailbreaker you shouldn't have when't up the 3.1.3
I didn't know you could go up 3.1.3! Thanks Mystery person!
User avatar
Dakta
 
Posts: 417
Joined: Sat Sep 12, 2009 4:36 pm

Re: onIdle

Postby fox11trot » Fri May 14, 2010 7:51 am

well just to add, an object's zdepth (objects in front of other objects) determines the priority over other scripts

so if you have too lasers both doing a script, the one that is on top of the other (overlapping) will take script priority


I support this though :thumbup:
fox11trot
 
Posts: 62
Joined: Tue Sep 01, 2009 7:25 am

Re: onIdle

Postby Mr_Stabby » Fri May 14, 2010 9:36 am

i only like it if it contains a refresh timer limit thingy coz otherwise it would be a lag monster
Mr_Stabby
 
Posts: 155
Joined: Wed Dec 16, 2009 12:16 am


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 5 guests