Help!!

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

Help!!

Postby Way2crazy » Tue Nov 10, 2009 2:33 am

:crazy:
Code: Select all
(e)=>{velocity = [x = 0, y = 40](m) / s}
:crazy:

    1.
    Does this have any chance of working; am i doing it wrong?

    2.
    Is here a way to change velocity?

    3.
    If so, how?
Thymer... Sorta :/

Like my avatar? Google it: gif it's pretty cool, just get the original sorce and put it for the URL of a pic like this:
http://www.imitationpickles.org/galcon/ ... /zarah.gif
Image
Image
neeed more help? Pm me :^)

My site/forum:
http://way2crazy.iforums.us/

Image


^a ninja was here
User avatar
Way2crazy
 
Posts: 20
Joined: Mon Sep 21, 2009 4:38 am

Re: Help!!

Postby standardtoaster » Tue Nov 10, 2009 2:44 am

You can't change the velocity of a preexisting object. You can spawn an object with a preexisting velocity. Velocity is a list with an x and y axis. [x, y] Velocity in a spawned object is:
Code: Select all
vel := [x, y]
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Help!!

Postby Way2crazy » Tue Nov 10, 2009 2:47 am

humm that was quick, tks
Thymer... Sorta :/

Like my avatar? Google it: gif it's pretty cool, just get the original sorce and put it for the URL of a pic like this:
http://www.imitationpickles.org/galcon/ ... /zarah.gif
Image
Image
neeed more help? Pm me :^)

My site/forum:
http://way2crazy.iforums.us/

Image


^a ninja was here
User avatar
Way2crazy
 
Posts: 20
Joined: Mon Sep 21, 2009 4:38 am

Re: Help!!

Postby standardtoaster » Tue Nov 10, 2009 2:48 am

You're welcome. :thumbup:
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Help!!

Postby Way2crazy » Tue Nov 10, 2009 4:00 am

Well, while still on this topic, I know
Code: Select all
e.other.liquify
means that an object goes to liquid. Well is ther a way to reverse it and make liquid into solid? If you can how?
Thymer... Sorta :/

Like my avatar? Google it: gif it's pretty cool, just get the original sorce and put it for the URL of a pic like this:
http://www.imitationpickles.org/galcon/ ... /zarah.gif
Image
Image
neeed more help? Pm me :^)

My site/forum:
http://way2crazy.iforums.us/

Image


^a ninja was here
User avatar
Way2crazy
 
Posts: 20
Joined: Mon Sep 21, 2009 4:38 am

Re: Help!!

Postby standardtoaster » Tue Nov 10, 2009 4:12 am

You cannot make a liquid into a solid through thyme.
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Help!!

Postby Mystery » Fri Nov 13, 2009 5:44 am

You can only make a single partial into a solid.
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: Help!!

Postby Way2crazy » Sat Nov 14, 2009 9:20 am

Ok, how do you determin if it is a circle, polygon, rectangle.. Can you give me a code?
Thymer... Sorta :/

Like my avatar? Google it: gif it's pretty cool, just get the original sorce and put it for the URL of a pic like this:
http://www.imitationpickles.org/galcon/ ... /zarah.gif
Image
Image
neeed more help? Pm me :^)

My site/forum:
http://way2crazy.iforums.us/

Image


^a ninja was here
User avatar
Way2crazy
 
Posts: 20
Joined: Mon Sep 21, 2009 4:38 am

Re: Help!!

Postby link0007 » Sat Nov 14, 2009 10:58 am

you can make an object into a string by adding an empty text to it:

Code: Select all
(e) => {e.other+""=="circle"?e.other.liquify:e.other.color = [0,0,0,1]}


This will only liquify circles.
Link: "Surely somebody hates Walter Cronkite.."
Sonic: "Probably.. But somebody hates everyone."
:D
User avatar
link0007
 
Posts: 408
Joined: Thu Jun 11, 2009 2:45 pm

Re: Help!!

Postby Way2crazy » Sat Nov 14, 2009 11:15 am

:) thank you
Thymer... Sorta :/

Like my avatar? Google it: gif it's pretty cool, just get the original sorce and put it for the URL of a pic like this:
http://www.imitationpickles.org/galcon/ ... /zarah.gif
Image
Image
neeed more help? Pm me :^)

My site/forum:
http://way2crazy.iforums.us/

Image


^a ninja was here
User avatar
Way2crazy
 
Posts: 20
Joined: Mon Sep 21, 2009 4:38 am

Re: Help!!

Postby Way2crazy » Sun Nov 15, 2009 3:14 am

How do you change the speed of a hinge with thyme? I know about custome variables but do you have to use oncolide and hit the hinge?
Thymer... Sorta :/

Like my avatar? Google it: gif it's pretty cool, just get the original sorce and put it for the URL of a pic like this:
http://www.imitationpickles.org/galcon/ ... /zarah.gif
Image
Image
neeed more help? Pm me :^)

My site/forum:
http://way2crazy.iforums.us/

Image


^a ninja was here
User avatar
Way2crazy
 
Posts: 20
Joined: Mon Sep 21, 2009 4:38 am

Re: Help!!

Postby standardtoaster » Sun Nov 15, 2009 3:16 am

Make a variable.
Code: Select all
scene.my.speed = 0

In the onCollide of an object put:
Code: Select all
scene.my.speed = scene.my.speed + 1

In the MotorSpeed section of the script menu on the hinge put:
Code: Select all
{scene.my.speed}


How's that?
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Help!!

Postby Way2crazy » Sun Nov 15, 2009 3:45 am

Ah! :^) I can't thank you enough
Thymer... Sorta :/

Like my avatar? Google it: gif it's pretty cool, just get the original sorce and put it for the URL of a pic like this:
http://www.imitationpickles.org/galcon/ ... /zarah.gif
Image
Image
neeed more help? Pm me :^)

My site/forum:
http://way2crazy.iforums.us/

Image


^a ninja was here
User avatar
Way2crazy
 
Posts: 20
Joined: Mon Sep 21, 2009 4:38 am

Re: Help!!

Postby algadoodle123 » Wed Nov 18, 2009 2:34 am

what are you planning to create? or are you just expanding your knowledge for the knowledge?
**/\ /\
>( ' ; ' )<***<---------- cat
*((")("))
i'm right-side-up
uʍop-ǝpısdn ɯ,ı
http://www.sherv.net/flip.html
User avatar
algadoodle123
 
Posts: 66
Joined: Tue Sep 08, 2009 6:04 pm

Re: Help!!

Postby Way2crazy » Wed Nov 18, 2009 2:47 am

im expanding my knowledge for maby future things
Thymer... Sorta :/

Like my avatar? Google it: gif it's pretty cool, just get the original sorce and put it for the URL of a pic like this:
http://www.imitationpickles.org/galcon/ ... /zarah.gif
Image
Image
neeed more help? Pm me :^)

My site/forum:
http://way2crazy.iforums.us/

Image


^a ninja was here
User avatar
Way2crazy
 
Posts: 20
Joined: Mon Sep 21, 2009 4:38 am

Re: Help!!

Postby Way2crazy » Fri Nov 20, 2009 6:04 pm

Ok, :^) last few questions:


Can you make an on colide an when the on colide happens, you follow an object?

Can you make a "count down" timer do anything when say( it goes from 10 sec. To 0) do anything when it reaches 0?

And lastly, can you "on colide" something and delete something further away from the colision?
Thymer... Sorta :/

Like my avatar? Google it: gif it's pretty cool, just get the original sorce and put it for the URL of a pic like this:
http://www.imitationpickles.org/galcon/ ... /zarah.gif
Image
Image
neeed more help? Pm me :^)

My site/forum:
http://way2crazy.iforums.us/

Image


^a ninja was here
User avatar
Way2crazy
 
Posts: 20
Joined: Mon Sep 21, 2009 4:38 am

Re: Help!!

Postby standardtoaster » Fri Nov 20, 2009 6:22 pm

Code: Select all
sim.time - e.this.controllerAcc >= 10 ? {do what you want} : {}
//make sure the controller accelerator of the object is set to 0

Code: Select all
sim.time - e.this.controllerAcc >= 10 ? {do what you want; e.this.controllerAcc = sim.time} : {}

To execute those scripts you need to use a beacon.

Code: Select all
scene.my.density = 2

In the density part of the script menu on the far away object put:
Code: Select all
{scene.my.density}

In the onCollide of an object put:
Code: Select all
scene.my.density = 0

This will work well if you are using Algodoo. If you are using phun for this it will probably crash. Phun can't handle zero density very well.
In order to follow the object through onCollide you will need to know the objects entityID you can do that through the new method.
Code: Select all
e.other.entityID := 1; scene.addGroup({name := "tracked" entityIDs := [e.other.entityID]})

I am sure that that script will work, but I'm not very keen on the "new method." If that script doesn't work then you can try this method:
Code: Select all
scene.my.collideSet = 0

In the collideSet of the circle on the beacon put:
Code: Select all
{scene.my.collideSet}

onCollide of an object:
Code: Select all
scene.my.collideSet = 1

In the onCollide of the circle put:
Code: Select all
scene.camera.pan = e.pos


Keep in mind that all of these scripts are from the top of my head.
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Help!!

Postby Way2crazy » Sat Nov 21, 2009 1:40 am

:^) pure brain power, you are a god
Thymer... Sorta :/

Like my avatar? Google it: gif it's pretty cool, just get the original sorce and put it for the URL of a pic like this:
http://www.imitationpickles.org/galcon/ ... /zarah.gif
Image
Image
neeed more help? Pm me :^)

My site/forum:
http://way2crazy.iforums.us/

Image


^a ninja was here
User avatar
Way2crazy
 
Posts: 20
Joined: Mon Sep 21, 2009 4:38 am

Re: Help!!

Postby Dadasas » Sun Nov 22, 2009 2:25 am

link0007 wrote:
Code: Select all
(e) => {e.other+""=="circle"?e.other.liquify ; e.other.color = [0,0,0,1]}


Fix'd :D .
User avatar
Dadasas
 
Posts: 46
Joined: Tue Sep 01, 2009 2:03 am

Re: Help!!

Postby standardtoaster » Sun Nov 22, 2009 2:49 am

That script doesn't work. Function call applied to Non-function
Code: Select all
e.other + "" == "circle" ? {e.other.liquify} : {e.other.color = [0, 0, 0, 1]}

This one does.
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 5 guests

cron