How much near continious portal can be done?

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

How much near continious portal can be done?

Postby l4m2 » Wed Nov 18, 2020 9:30 pm

Editing pos we can teleport an item, but whole instance instantly go from one place to another unlike an item through portal that each side have part of thing.
Image
l4m2
 
Posts: 42
Joined: Fri Jun 27, 2014 6:21 am

Re: How much near continious portal can be done?

Postby hiltropper » Thu Nov 19, 2020 9:45 pm

I don't know how much you know about algodoo geometric objects, but a chance would be to manipulate the surfaces of an object. You'd have to save the surface entries, delete old object, manipulate new surfaces slightly and spawn a new object with these. Also you'd have to save and continue old speed, position and the collision position etc.
You get positions with e.this.pos or e.other.pos for object position, e.pos is where collision event happened.
Paste this into your console to experiment with:
Code: Select all

scene.addCircle({
  radius := 3.4;
  collideset :=1 ;
  onCollide := (e)=>{
        scene.addCircle({
            pos := e.pos;
            collideset := 2;
            timetolive := 1
        })
   }
})

Not gonna lie, sounds difficult. I experimented a bit, but saw no easy way. Something with object manipulation i saw a long time ago would be this:
http://www.algodoo.com/algobox/details.php?id=58601
You can get the surface data by copying the whole object an pasting it in a text editor (if you paste it into algodoo console, it will spawn the exact copy of the object).

Code: Select all
// FileVersion 21
// Phunlet created by Algodoo v2.1.0

FileInfo -> {
    title = "default";
    author = "hiltropper";
    version = 21
};
Scene.addPolygon {
    surfaces := [[[-4.1208057, 1.6117258], [-4.1090794, 1.4096942], [-4.0874538, 1.2084808], [-4.0559816, 1.0085707], [-4.0147381, 0.81044626], [-3.9638224, 0.61458302], [-3.9033575, 0.42145538], [-3.8334894, 0.23152685], [-3.7543859, 0.045254707], [-3.6662378, -0.13691092], [-3.5692577, -0.31453180], [-3.4636784, -0.48718071], [-3.3497553, -0.65444088], [-3.2277622, -0.81590986], [-3.0979919, -0.97119904], [-2.9607611, -1.1199312], [-2.8163958, -1.2617531], [-2.6652451, -1.3963199], [-2.5076733, -1.5233083], [-2.3440628, -1.6424103], [-2.1748028, -1.7533422], [-2.0003042, -1.8558354], [-1.8209877, -1.9496422], [-1.6372833, -2.0345383], [-1.4496346, -2.1103172], [-1.2584925, -2.1767983], [-1.0643215, -2.2338195], [-0.86758423, -2.2812452], [-0.66875744, -2.3189602], [-0.46832085, -2.3468733], [-0.26675415, -2.3649182], [-0.064544678, -2.3730512], [0.13782024, -2.3712521], [0.33985090, -2.3595257], [0.54106474, -2.3379002], [0.74097538, -2.3064280], [0.93909883, -2.2651844], [1.1349616, -2.2142682], [1.3280902, -2.1538038], [1.5180182, -2.0839357], [1.7042899, -2.0048323], [1.8864565, -1.9166837], [2.0640783, -1.8197031], [2.2367253, -1.7141247], [2.4039865, -1.6002011], [2.5654554, -1.4782076], [2.7207427, -1.3484397], [2.8694768, -1.2112069], [3.0112982, -1.0668411], [3.1458654, -0.91569090], [3.2728524, -0.75812101], [3.3919559, -0.59450865], [3.5028877, -0.42524862], [3.6053801, -0.25075150], [3.6991878, -0.071434021], [3.7840834, 0.11227083], [3.8598633, 0.29992008], [3.9263434, 0.49105930], [3.9833646, 0.68523216], [4.0307903, 0.88196850], [4.0685048, 1.0807958], [4.0964184, 1.2812333], [4.1144629, 1.4827995], [4.1225963, 1.6850080], [4.1220226, 1.7495494], [3.5724187, 1.7495494], [3.0228148, 1.7495494], [2.4732113, 1.7495494], [1.9236078, 1.7495494], [1.3740044, 1.7495494], [0.82440090, 1.7495494], [0.27479744, 1.7495494], [-0.27480602, 1.7495494], [-0.82441044, 1.7495494], [-1.3740139, 1.7495494], [-1.9236174, 1.7495494], [-2.4732208, 1.7495494], [-3.0228243, 1.7495494], [-3.5724277, 1.7495494], [-4.1220312, 1.7495494]]];
}


you could copy this code, paste it into your console and get a half circle object.

Sorry, that's likely not what you asked for, just my two cents. Maybe others can help better.
yup yup
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
hiltropper
 
Posts: 85
Joined: Mon Dec 20, 2010 12:02 pm
Location: Germany

Re: How much near continious portal can be done?

Postby Kitesurfer » Tue Mar 02, 2021 11:12 am

What if you clone the object when it touches the portal and only teleport the clone? When the original is all inside the portal maybe you just kill it?
Kitesurfer
 
Posts: 10
Joined: Thu Jan 07, 2021 5:27 pm


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 5 guests

cron