For some reason the program crashes, I have no idea why... help?
EXPORTED WRONG! Gimme a day to get to the computer so I can tweak the exporter into a more java friendly style....
[spr]
- Code: Select All Code
Chap02-03-04FirstEncounter's Code
Created by: Suraru
World
Events
When the world starts
Do: World.main ( );
Methods
public void main ( ) {
World.setup ( );
World.play ( );
}
public void setup ( ) {
// PreSetup
if ( ( Player.isGay ( ) ) ) { . }
Do Nothing
} else {
spiderRobot .resize( 3 );
}
}
public void play ( ) {
Number Distance = 1 ;
Distance .set( value , ( spiderRobot .distanceTo( rock(Front) ) ) );
doInOrder {
doInOrder { . . . . }
CheekyAlien .move( UP , 1 meter );
CheekyAlien .say( Slithy Troves? );
spiderRobot.neck .turn( LEFT , 1 revolution );
spiderRobot .turnToFace( alienOnWheels.neck03 );
}
doTogether { . . . . . . . . }
// Moon Hop
spiderRobot .move( FORWARD , ( ( Distance - ( subject = rock(Front) .getWidth() ) ) ) );
doInOrder {
spiderRobot .move( UP , 0.5 meters ); duration = 0.5 seconds
spiderRobot .move( DOWN , 0.5 meters ); duration = 0.5 seconds
}
World.Move Leg ( Leg = spiderRobot.body.rearLegBase.rearLegUpperJoint );
World.Move Leg ( Leg = spiderRobot.body.backRightLegBase.backRightLegUpperJoint );
World.Move Leg ( Leg = spiderRobot.body.frontRightLegBase );
World.Move Leg ( Leg = spiderRobot.body.frontLeftLegBase );
World.Move Leg ( Leg = spiderRobot.body.backLeftLegBase );
}
doInOrder {
// Alien Hide
CheekyAlien .move( DOWN , 1 meter );
if ( ( spiderRobot .isShorterThan( rock(Front) ) ) ) {
spiderRobot.neck .move( UP , 0.2 meters );
wait( 0.25 seconds );
spiderRobot.neck .move( DOWN , 0.2 meters );
} else {
spiderRobot .turn( RIGHT , 1 revolution );
}
spiderRobot .turnToFace( Camera );
spiderRobot.neck.head .set( color , (1, 0, 0) );
spiderRobot.neck.head .say( Houston, we have a problem! ); duration = 2 seconds
}
}
}
public void Move_Leg ( Object Leg) {
doInOrder {
Leg .turn( FORWARD , 0.08 revolutions ); duration = 0.5 seconds
Leg .turn( BACKWARD , 0.08 revolutions ); duration = 0.5 seconds
}
}