scripting issue

If you have problems installing or running Algodoo, have found a bug or need in-game help - this is it!

scripting issue

Postby phunisawesome » Sat Nov 07, 2009 12:33 am

i need help with my jet powered van im making. i know it sounds stupid but when I tried to save the completed scene and then load again it to make sure everthing is good, the variable {scene.my.jet} which is used to power the car is gone. I have made sure when i save to put the variable in but even if I do it always saves without it. Im sooooo close please help if you can :thumbup: the file size is to big :o so i cant attach it to the post. i have also made a scene in phunbox called jet van leave a comment on the scene if thats easyer for you. the part that needs to stay scripted it the large purple block on the van . In attraction it needs to say
Code: Select all
{scene.my.jet}
without going away at all. good luck hopfully its easy.
phunisawesome
 
Posts: 2
Joined: Sat Nov 07, 2009 12:12 am

Re: scripting issue

Postby Fujitsu » Sat Nov 07, 2009 1:17 am

This is a known problem in Algodoo, as far as I know, the only way to rectify your problem is to make sure that the variable isn't replacing a float/integer/boolean/string equal to the variable, i.e.

Code: Select all
Attraction = 5.0 

Replaced with:

Scene.my.variable = 5.0
Attraction = {scene.my.Variable}
Image
Gimmie money.
User avatar
Fujitsu
 
Posts: 328
Joined: Tue Sep 01, 2009 12:28 am
Location: Canada

Re: scripting issue

Postby standardtoaster » Sat Nov 07, 2009 1:19 am

You can either unzip the scene and hardcode it in or you can do it an easier way. Have a laser(if you have Algodoo) or make a beacon that is colliding with the purple block.
Code: Select all
e.other.attraction = scene.my.jet
//onCollide

e.geom.attraction = scene.my.jet
//onLaserHit or onHitByLaser
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: scripting issue

Postby phunisawesome » Sat Nov 07, 2009 5:26 am

thanks so much i finished it wth the
Code: Select all
e.other.attraction = e.other.attraction - 500
thanks for the help :D
phunisawesome
 
Posts: 2
Joined: Sat Nov 07, 2009 12:12 am


Return to Help / Bug reports

Who is online

Users browsing this forum: No registered users and 6 guests