New Method Don't Save?

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

New Method Don't Save?

Postby Rideg » Sun Jul 04, 2010 11:58 am

Hello, Well the title describes my problem.
I rarely use the new method because it don't save in my scene. Should it be saved, or am I just unlucky?

So basically: Can I save a "GeomID = 1" (without quotes) in an object, and then save the scene and load it and when I select the object I'll see GeomID = 1 in the script menu?

If so, why can't I do 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: New Method Don't Save?

Postby Mystery » Sun Jul 04, 2010 12:42 pm

The correct code is
Code: Select all
geomID := 1
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: New Method Don't Save?

Postby Rideg » Mon Jul 05, 2010 4:23 pm

I always write 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: New Method Don't Save?

Postby Rideg » Mon Jul 05, 2010 11:03 pm

Please help me this is really anoying. I want to make some nice scenes that I need to have this. :cry:
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: New Method Don't Save?

Postby Versieon » Tue Jul 06, 2010 12:16 am

internal object variables are not saved with the scene yet as far as i know, and just putting GeomID := 1 in the script menu dosn't mean that it changes it to 1.
The point of the new method is to retrive the hidden information through script, which is saved.
so, if you want to have an object have a GeomID, you will have to use the New Method to retrive the one algodoo gives it, save it to a variable, and then use it in the scene.
User avatar
Versieon
 
Posts: 375
Joined: Tue Sep 01, 2009 4:45 pm

Re: New Method Don't Save?

Postby Mystery » Tue Jul 06, 2010 2:54 am

Oh that probably it, you forgot the method from new-method.
Put in GeomID := 1
Either in the console or oncollide pump in
Code: Select all
app.step; app.undo

Then geomID should change to its real GeomID
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: New Method Don't Save?

Postby Rideg » Tue Jul 06, 2010 12:53 pm

I also did that. But it's not there when I load the scene (after I saved it ofcourse)
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: New Method Don't Save?

Postby Mystery » Tue Jul 06, 2010 3:04 pm

It shouldn't actually be a problem even if geomid isn't displayed you can still use it, you find it once and you should be done with it put it in the code somewhere else where it is needed and move on with your life.

Also post what version you are using.
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: New Method Don't Save?

Postby simey j dude » Tue Jul 06, 2010 3:45 pm

Code: Select all
e.other.geomID = 3;
    e.this.geomID = 3;
    app.step;
    app.undo;
   
to show true geomID.
User avatar
simey j dude
 
Posts: 61
Joined: Sat Sep 05, 2009 3:11 am
Location: under your bed!

Re: New Method Don't Save?

Postby Rideg » Tue Jul 06, 2010 8:06 pm

OKey I'll try this;
@Mystery: I'm using the [v 1.7.4] BETA
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: New Method Don't Save?

Postby Rideg » Tue Jul 06, 2010 8:07 pm

But hey, I've seen uploaded scenes with geomID :?
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: New Method Don't Save?

Postby Mystery » Wed Jul 07, 2010 4:24 am

My guess is a bug or really a fix of a bug :P in 1.7.4 but like i said before it doesn't matter in the slightest.
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: New Method Don't Save?

Postby Rideg » Wed Jul 07, 2010 4:35 pm

guess you're right. Hope it'll work sometime :P
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 5 guests