What is ControllerAcc...

About advanced scenes, and the Thyme scripting language used in Algodoo.

What is ControllerAcc...

Postby EMKshadow » Sun Aug 29, 2010 10:41 pm

Hi I'm just getting into scripting and stuff and i hear a lot of people using the controllerAcc variable. Can somebody please help the noob and tell me what exactly it does and what effect it makes on the object that has it modified?

Thanks in advance
User avatar
EMKshadow
 
Posts: 29
Joined: Tue Aug 10, 2010 1:47 am

Re: What is ControllerAcc...

Postby kilebantick » Mon Aug 30, 2010 1:29 am

I'm not sure, but isn't that the balue that tells you how fast the object moves, assuming that you've set the controllACC controls? Sorry, i'm not quite sure :S
Image
User avatar
kilebantick
 
Posts: 1267
Joined: Tue Sep 01, 2009 9:50 am

Re: What is ControllerAcc...

Postby electronicboy » Mon Aug 30, 2010 1:38 am

it affect the geometry controller speed. so kile is right.
the geometry controller is barely used so that value is just used as a place holder to easily store a variable.
When asking for help, READ THE STICKIES!
electronicboy
 
Posts: 1694
Joined: Mon Aug 31, 2009 6:18 pm

Re: What is ControllerAcc...

Postby EMKshadow » Mon Aug 30, 2010 1:54 am

That explains everything thanks guys :thumbup:
User avatar
EMKshadow
 
Posts: 29
Joined: Tue Aug 10, 2010 1:47 am

Re: What is ControllerAcc...

Postby kilebantick » Mon Aug 30, 2010 5:27 am

Not a problem :)

I don't have a need to store values in ControllerACC, because i usually use scene.my variables. HOWEVER, storing information in that field, is very good if you want to make a phunlet friendly scripted object :)
Image
User avatar
kilebantick
 
Posts: 1267
Joined: Tue Sep 01, 2009 9:50 am

Re: What is ControllerAcc...

Postby Rideg » Mon Aug 30, 2010 8:13 am

Many people use the ControllerAcc because you rarely use it. I also use Color, RefractiveIndex, TextureMatrix, Friction, Restitution, or any other inObject variable that I won't use.

and as Kile' said: It's good if you want to make it phunlet friendly.
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden

Re: What is ControllerAcc...

Postby EMKshadow » Mon Aug 30, 2010 10:56 pm

Ah that's why people give it random values and have it called by random things lol. I understand it all now!
User avatar
EMKshadow
 
Posts: 29
Joined: Tue Aug 10, 2010 1:47 am

Re: What is ControllerAcc...

Postby kilebantick » Wed Sep 01, 2010 6:12 am

That's good :)

Rideg, it's not a good idea to use the Color variable, or the Texturematrix variable, as sometimes if you have quite a long string in it, it'll get deleted. Happens to me often D:
Image
User avatar
kilebantick
 
Posts: 1267
Joined: Tue Sep 01, 2009 9:50 am

Re: What is ControllerAcc...

Postby Rideg » Wed Sep 01, 2010 7:59 am

I only use them to store some variables sometimes. What do you mean, does the textureMatrix get reset? :O
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden

Re: What is ControllerAcc...

Postby electronicboy » Wed Sep 01, 2010 11:23 am

i think if there are too many values in the list, it is seen is invalid and is reset as a consequence.
When asking for help, READ THE STICKIES!
electronicboy
 
Posts: 1694
Joined: Mon Aug 31, 2009 6:18 pm

Re: What is ControllerAcc...

Postby Rideg » Wed Sep 01, 2010 1:47 pm

What? that sounds crazy :O
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden

Re: What is ControllerAcc...

Postby Matten » Thu Sep 02, 2010 9:18 am

You can also just use e.other.data = *wathever you want*. This will make a new object variable, so no chance of deleting.
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: What is ControllerAcc...

Postby kilebantick » Fri Sep 03, 2010 2:37 am

But you have to use New-Method for that to work properly, and THEN when you save the scenes, the custom variable, or "E.other.data" will completely disappear.
Image
User avatar
kilebantick
 
Posts: 1267
Joined: Tue Sep 01, 2009 9:50 am

Re: What is ControllerAcc...

Postby Rideg » Fri Sep 03, 2010 11:11 pm

I can't save geomID's when using new method and I've seen scenes on algobox that have theese saved in their scenes :(
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden

Re: What is ControllerAcc...

Postby Mystery » Sun Sep 05, 2010 5:07 am

Crash course on new method in.. 3.. 2.. 1..
Code: Select all
e.this.geomID := 1;
    App.step;
    App.undo;

GeomID is now registered as an internal variable inside the object.
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: What is ControllerAcc...

Postby Rideg » Sun Sep 05, 2010 12:26 pm

Mystery wrote:Crash course on new method in.. 3.. 2.. 1..
Code: Select all
e.this.geomID := 1;
    App.step;
    App.undo;

GeomID is now registered as an internal variable inside the object.

When I save the scene it's not there anymore...
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden

Re: What is ControllerAcc...

Postby Mystery » Sun Sep 05, 2010 2:05 pm

Run the code in on-collide every time the scene runs.
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: What is ControllerAcc...

Postby Rideg » Sun Sep 05, 2010 2:16 pm

I did that and tryed to spawn a fixate between two objects I used e.other.geomID = * it did don work :(
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden

Re: What is ControllerAcc...

Postby Mystery » Mon Sep 06, 2010 11:40 am

Rating: rated 6.7
Filesize: 43.97 kB
Comments: 7
Ratings: 3
download

http://www.algodoo.com/algobox/details.php?id=40098
You can either look at the code i used there to improve your own or simply use the same code. :)
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: What is ControllerAcc...

Postby Rideg » Mon Sep 06, 2010 7:28 pm

Mystery wrote:
Rating: rated 6.7
Filesize: 43.97 kB
Comments: 7
Ratings: 3
download

http://www.algodoo.com/algobox/details.php?id=40098
You can either look at the code i used there to improve your own or simply use the same code. :)

They don't work for me :O
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden

Re: What is ControllerAcc...

Postby Matten » Tue Sep 07, 2010 7:59 pm

Neither for me :O
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: What is ControllerAcc...

Postby Mystery » Wed Sep 08, 2010 8:45 am

What version of Algodoo are you using? I think someone said something about new method not working anymore.
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: What is ControllerAcc...

Postby Rideg » Thu Sep 09, 2010 7:06 pm

latest
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden

Re: What is ControllerAcc...

Postby Mystery » Fri Sep 10, 2010 2:49 pm

Not at all helpful.
1.7.1 or 1.7.8?
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: What is ControllerAcc...

Postby Rideg » Fri Sep 10, 2010 9:09 pm

1.7.8 is later than 1.7.1 right ?
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden

Next

Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 4 guests