view

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

view

Postby Way2crazy » Sun May 30, 2010 8:32 pm

what is the script to make the screen go to a specific cordiniate?
and zoom?
User avatar
Way2crazy
 
Posts: 20
Joined: Mon Sep 21, 2009 4:38 am

Re: view

Postby Rideg » Sun May 30, 2010 9:17 pm

Scene.camera.pan = [0.0, 0.0]
Scene.camera.zoom = 5

You should use the search before you post a new topic...
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: view

Postby Matten » Mon May 31, 2010 7:35 am

The deafaults are [0,0] for pan and 150 for zoom.
How to get the co-ordinates:
1- Go to the view you want
2- Add a box
3- Go to text in the scriptmenu
4- Type: "" + scene.camera.pan + "\n" + scene.camera.zoom
5- Now you have the co-ordinates on the box!

If you want the co-ordinates on the box change when you change the view, you have to put this code between {}
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: view

Postby Rideg » Mon May 31, 2010 10:30 pm

or you can make a object in the middle of the thing you want to pan, and then copy the object into notepad to get the cords of the object. ;)
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: view

Postby Matten » Tue Jun 01, 2010 10:16 am

But it's easier to get it right in Algodoo
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: view

Postby Chronos » Tue Jun 01, 2010 10:18 am

Actually, it's not.
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: view

Postby Matten » Tue Jun 01, 2010 11:41 am

Why?
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: view

Postby Chronos » Tue Jun 01, 2010 11:51 am

Because if you forget the code, you have to load up your browser, find this topic, and copy/paste it in. Even if you remember the code, it's still a hassle. With the other way, you select the object, ctrl+c, open Notepad, ctrl+v, look for the position, and you're done. You don't even need a connection.
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: view

Postby Rideg » Tue Jun 01, 2010 4:47 pm

there should be a wa to access all the numbers for an object. yes I know the new method but I don't like using it, besides it doesn't save it when you save and load...
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: view

Postby Matten » Tue Jun 01, 2010 4:53 pm

Then it should be better that in the script menu you can see all the properties of an object, and that they can be changed. With this way you can easly make teleporters and size changers.
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: view

Postby Rideg » Tue Jun 01, 2010 4:55 pm

Matten wrote:Then it should be better that in the script menu you can see all the properties of an object, and that they can be changed. With this way you can easly make teleporters and size changers.

I just said that
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: view

Postby Matten » Tue Jun 01, 2010 7:52 pm

No, you said that they have to be accessable. I said how that should be possible. :|
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: view

Postby Rideg » Thu Jun 03, 2010 4:49 pm

Well I thought that that was kinda obvious. There's not any other suitable place to put them.
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: view

Postby Matten » Thu Jun 03, 2010 5:01 pm

Maybe in the "Object properties" menu or something.

By the way it should be cool if you have access to all properties of an object, I hope this will come quik.
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: view

Postby Rideg » Thu Jun 03, 2010 5:20 pm

hope so but changing them would be too unrealistic. But I hope that it's going to be possible without using a lagging "app.step; app.undo"
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: view

Postby Rideg » Thu Jun 03, 2010 5:22 pm

BTW I made something that you can use to get a [x, y] - velocity. Reply if you want it. ;)
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: view

Postby Matten » Thu Jun 03, 2010 5:30 pm

Well, I reply, so how is it's done

BTW: I know how to use materialVelocity
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: view

Postby Rideg » Thu Jun 03, 2010 8:02 pm

nothing about that don't even know what it means. Basically it calculate the velocity using positions and store them in Scene.my.vel ;)
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: view

Postby Matten » Thu Jun 03, 2010 8:23 pm

Oh, I tought you meant how to give an object velocity. That can be done with materialVelocity.
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: view

Postby Rideg » Thu Jun 03, 2010 9:06 pm

yeah I noticed that. Do you want the Velocity - Probe ;)
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 2 guests