About advanced scenes, and the Thyme scripting language used in Algodoo.
by chris1983 » Mon Aug 31, 2020 11:33 am
What do you mean by
I WANT TO KNOW HOW TO MAKE THAT THING(ATTACHMENT BELOW)
I' m new to algodoo, so
my reply won't be the best, but since the forum isn't really active, it might help you.
I made this:
https://streamable.com/lrdrgcNotice that the first step needs to keep going up (you can make it invisible).
If you're intrested, see the spoiler:
First of all, in console paste this:
- Code: Select all
_rnd= (float, decimals) => { math.toint(float * (10^decimals))/10^decimals};
y=0
Create two steps, the left and the right.
To the left step in poststep paste this
- Code: Select all
scene.my.m1 = e.this;
vel = [0, 3];
y = _rnd(pos(1), 1);
math.mod(y, 2) == 0.5 ? {
Scene.addBox({
inertiaMultiplier := 1.0;
timeToLive := 8;
textureClamped := [false, false];
attractionType := 2;
update := (e)=>{};
vel := [0.0, 1.0];
restitution := 0.5;
onCollide := (e)=>{};
textureMatrix := [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0];
textColor := [1.0, 1.0, 1.0, 1.0];
area := 1.0;
collideSet := 1;
drawBorder := true;
reflectiveness := 1.0;
size := [0.51932228, 0.1899994];
friction := 0.5;
entityID := 21;
velocityDamping := [0.0, 0.0, 0.0];
color := [0.95755696, 0.96695757, 0.95990711, 1.0];
collideWater := true;
onSpawn := (e)=>{};
textFontSize := 32.0;
onHitByLaser := (e)=>{};
pos := [-1.3605914, 1.4050003];
onDie := (e)=>{};
density := 2.0;
airFrictionMult := 1.0;
controllerAcc := 11.0;
colorHSVA := [135.0, 0.00972184, 0.96695757, 1.0];
postStep := (e)=>{
scene.my.m1 = e.this;
vel = [0, 1];
y = _rnd(pos(1), 1);
math.mod(y, 2) == 1 ? {} : {}
};
geomID := 12;
body := 17;
zDepth := 1.0;
layer := 0
})
} : {}
To the right step in poststep paste this
- Code: Select all
scene.my.m1 = e.this;
vel = [0, 3];
y = _rnd(pos(1), 1);
math.mod(y, 2) == 0.5 ? {
Scene.addBox({
inertiaMultiplier := 1.0;
timeToLive := 6.5;
textureClamped := [false, false];
attractionType := 2;
update := (e)=>{};
vel := [0.0, 1.0];
restitution := 0.5;
onCollide := (e)=>{};
textureMatrix := [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0];
textColor := [1.0, 1.0, 1.0, 1.0];
area := 1.0;
collideSet := 1;
drawBorder := true;
reflectiveness := 1.0;
size := [0.51932228, 0.1899994];
friction := 0.5;
entityID := 21;
velocityDamping := [0.0, 0.0, 0.0];
color := [0.95755696, 0.96695757, 0.95990711, 1.0];
collideWater := true;
onSpawn := (e)=>{};
textFontSize := 32.0;
onHitByLaser := (e)=>{};
pos := [-0.75966114, 1.4050003];
onDie := (e)=>{};
density := 2.0;
airFrictionMult := 1.0;
controllerAcc := 11.0;
colorHSVA := [135.0, 0.00972184, 0.96695757, 1.0];
postStep := (e)=>{
scene.my.m1 = e.this;
vel = [0, 1];
y = _rnd(pos(1), 1);
math.mod(y, 2) == 1 ? {} : {}
};
geomID := 12;
body := 17;
zDepth := 1.0;
layer := 0
})
} : {}
give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime
-
chris1983
-
- Posts: 6
- Joined: Thu Oct 04, 2018 7:51 am
Return to Thyme scripting
Who is online
Users browsing this forum: No registered users and 1 guest