Dumb Spawning in Algodoo v2.1.0

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

Dumb Spawning in Algodoo v2.1.0

Postby BAZOOKA » Sat Apr 27, 2013 6:55 am

Help please! I'm trying to build a V12 engine for a sample car (which I think may turn out quite crappy). First, I tried to spawn some stuff normally by using a laser and a box. However, all the spawned stuff glued together for no reason! Is it because I used the ctrl-c and ctrl-v method?
Some science teacher said one day,'Remember to leave the water dry...'
User avatar
BAZOOKA
 
Posts: 22
Joined: Fri Oct 26, 2012 5:45 pm

Re: Dumb Spawning in Algodoo v2.1.0

Postby electronicboy » Sat Apr 27, 2013 2:18 pm

BAZOOKA wrote: Is it because I used the ctrl-c and ctrl-v method?

Yes, it probably is.
From the code for the item spawning, remove all variables but those needed, and defietly remove variables that give the object an Identification (e.g. entityID).
If you're stuck, paste the code on here and someone will be able to clean it out in little time.
When asking for help, READ THE STICKIES!
electronicboy
 
Posts: 1694
Joined: Mon Aug 31, 2009 6:18 pm

Re: Dumb Spawning in Algodoo v2.1.0

Postby BAZOOKA » Sun Apr 28, 2013 4:20 pm

OK, here comes the full script unedited for my engine explosion...
Code: Select all
// FileVersion 21
// Phunlet created by Algodoo v2.1.0

FileInfo -> {
    title = "Unfinished V Engine Prototype";
    author = "Bazooka";
    version = 21
};
Scene.addCircle {
    inertiaMultiplier := 1.0000000;
    resources := [];
    timeToLive := +inf;
    textureClamped := [false, false];
    adhesion := 0.00000000;
    attractionType := 2;
    attraction := 0.00000000;
    texture := "";
    update := (e)=>{};
    controllerInvertX := false;
    controllerInvertY := false;
    showMomentum := false;
    vel := [0.00000000, 0.00000000];
    restitution := 0.00000000;
    onCollide := (e)=>{};
    killer := false;
    materialVelocity := 0.00000000;
    showForceArrows := false;
    controllerReverseXY := false;
    refractiveIndex := 1.5000000;
    textureMatrix := [1.0000000, 0.00000000, 0.00000000, 0.00000000, 1.0000000, 0.00000000, 0.00000000, 0.00000000, 1.0000000];
    protractor := false;
    immortal := false;
    area := 0.11044662;
    collideSet := 1;
    drawBorder := true;
    reflectiveness := 1.0000000;
    friction := 0.00000000;
    entityID := 35;
    velocityDamping := [0.00000000, 0.00000000, 0.00000000];
    onClick := (e)=>{};
    color := [1.0000000, 0.00000000, 0.00000000, 0.50000000];
    collideWater := true;
    onSpawn := (e)=>{};
    materialName := "";
    onHitByLaser := (e)=>{};
    drawCake := true;
    pos := [1.0842988e-009, 2.7500000];
    onDie := (e)=>{};
    density := 25.000000;
    airFrictionMult := 1.0000000;
    controllerAcc := 11.000000;
    colorHSVA := [0.00000000, 1.0000000, 1.0000000, 0.50000000];
    radius := 0.18750000;
    angvel := 0.00000000;
    heteroCollide := false;
    glued := false;
    onKey := (e)=>{};
    showVelocity := false;
    postStep := (e)=>{};
    opaqueBorders := true;
    geomID := 23;
    body := 31;
    edgeBlur := 0.00000000;
    angle := 0.00000000;
    zDepth := 9.0000000;
    layer := 0
}

Please highlight with Font colour and tell me which parts are not needed. :)
Some science teacher said one day,'Remember to leave the water dry...'
User avatar
BAZOOKA
 
Posts: 22
Joined: Fri Oct 26, 2012 5:45 pm

Re: Dumb Spawning in Algodoo v2.1.0

Postby electronicboy » Sun Apr 28, 2013 10:18 pm

BAZOOKA wrote:OK, here comes the full script unedited for my engine explosion...
// FileVersion 21
// Phunlet created by Algodoo v2.1.0

FileInfo -> {
title = "Unfinished V Engine Prototype";
author = "Bazooka";
version = 21
};
Scene.addCircle {
inertiaMultiplier := 1.0000000;
resources := [];
timeToLive := +inf;
textureClamped := [false, false];
adhesion := 0.00000000;
attractionType := 2;
attraction := 0.00000000;
texture := "";
update := (e)=>{};
controllerInvertX := false;
controllerInvertY := false;
showMomentum := false;
vel := [0.00000000, 0.00000000];
restitution := 0.00000000;
onCollide := (e)=>{};
killer := false;
materialVelocity := 0.00000000;
showForceArrows := false;
controllerReverseXY := false;
refractiveIndex := 1.5000000;
textureMatrix := [1.0000000, 0.00000000, 0.00000000, 0.00000000, 1.0000000, 0.00000000, 0.00000000, 0.00000000, 1.0000000];
protractor := false;
immortal := false;
area := 0.11044662;
collideSet := 1;
drawBorder := true;
reflectiveness := 1.0000000;
friction := 0.00000000;
entityID := 35;
velocityDamping := [0.00000000, 0.00000000, 0.00000000];
onClick := (e)=>{};
color := [1.0000000, 0.00000000, 0.00000000, 0.50000000];
collideWater := true;
onSpawn := (e)=>{};
materialName := "";
onHitByLaser := (e)=>{};
drawCake := true;
pos := [1.0842988e-009, 2.7500000];
onDie := (e)=>{};
density := 25.000000;
airFrictionMult := 1.0000000;
controllerAcc := 11.000000;
colorHSVA := [0.00000000, 1.0000000, 1.0000000, 0.50000000];
radius := 0.18750000;
angvel := 0.00000000;
heteroCollide := false;
glued := false;
onKey := (e)=>{};
showVelocity := false;
postStep := (e)=>{};
opaqueBorders := true;
geomID := 23;
body := 31;

edgeBlur := 0.00000000;
angle := 0.00000000;
zDepth := 9.0000000;
layer := 0
}

Please highlight with Font colour and tell me which parts are not needed. :)


Red - Parts of the code causing problems, These are currently creating the "glue" effect in algodoo.

I would help clear out the rest of the code, but it's in a state where it will do, and I'm currently busy! :P
Ps, remove everything above scene.addcircle; it's useless data which isn't needed at all!
When asking for help, READ THE STICKIES!
electronicboy
 
Posts: 1694
Joined: Mon Aug 31, 2009 6:18 pm

Re: Dumb Spawning in Algodoo v2.1.0

Postby BAZOOKA » Tue Apr 30, 2013 3:23 pm

Thanks! I'll see if I can show you the engine when I'm done!
Some science teacher said one day,'Remember to leave the water dry...'
User avatar
BAZOOKA
 
Posts: 22
Joined: Fri Oct 26, 2012 5:45 pm


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 4 guests