REVO2700Angles H@ 5 ULucida GrandeUArialULucida Grande ULucida Grande ULucida GrandeUArial ULucida GrandeU courier new WLucida Grande U Consolas UCalibriUCalibri UTahoma UTahoma cREVGeneralbreakpointconditions breakpointsbreakpointstatesstackfileversion2.7home @@ angle only Pon opencard global planeAngle put 0 into planeAngle set the angle of image "plane" to 0 focus on card field "input" end opencard @ cREVGeneralscripteditorvscroll0scripteditorselection57angle and movement PDon opencard global planeAngle, planex, planey, planenextx, planenexty, xstep, ystep put item 1 of the location of image "plane" into planex put item 2 of the location of image "plane" into planey put 0 into planeAngle set the angle of image "plane" to planeAngle focus on card field "input" end opencard @ cREVGeneralscripteditorvscroll0scripteditorselection323  Field)`&r cREVGeneral revUniqueID 1345898007204  This is a three card stack that demonstrates how to change the angle of an object. View the "Angle and Movement" card to see an example of how to move an object in the direction it is pointing after setting the angle (this uses the sin and cos functions). input+x don returninfield global planeAngle put line 1 of me into planeAngle put "angle: " &planeAngle into line 1 of field "data" put empty into line 2 of field "data" put empty into line 3 of field "data" put 360-planeAngle into planeAngle set the angle of image "plane" to planeAngle wait 1 second put empty into me end returninfield $2. cREVGeneral revUniqueID 1345898384972scripteditorvscroll0scripteditorselection89  plane PGIF89a̙̙̙̙̙fffffff3f3f333f333333333333!, dihlp,teK|KG,`ql:,rZIeFrzk-S m0rnEmRxۿbu·fK}Mq[Dyrd2z1AL,'\$r{S7ŽiŁȏ͉Р҃ }vngw_]'*oVѫ9 67q_,/HX]~Q'zF *Lcf.MH͚;WxD|wKOpp׌;gZؕ@%=m]NjלV߂iJ7~& T FVjIY(r򧡄!4h(Hb,(!yH{0-` XB ʁ?C3C|9’MS0"?EP!L>(cN$iX.v@NFcJuk}%AmPq}wg"š@@>ZF:;':[o /Ep(P nJ ?̂VJؚZ0@d,q\Lu)[T-#2Șlq0Œt6X *Hyr' '@dJtiN])MX:J6m]!2=G{f+W4jY0 ^Je"6tq$]]$PJ.Pq+f.eFڈ(S| Х=Z!;G cREVGeneral revUniqueID 1345899176064 Field)@". cREVGeneral revUniqueID 1345899210720  DTo change the plane's direction, enter an angle, then press RETURN. input+x on returninfield global x put line 1 of me into x set the angle of image "plane" to -x wait 1 second put empty into me end returninfield $2. cREVGeneralscripteditorvscroll0 revUniqueID 1345898384972scripteditorselection28  plane @PPGIF89a̙̙̙̙̙fffffff3f3f333f333333333333!, dihlp,teK|KG,`ql:,rZIeFrzk-S m0rnEmRxۿbu·fK}Mq[Dyrd2z1AL,'\$r{S7ŽiŁȏ͉Р҃ }vngw_]'*oVѫ9 67q_,/HX]~Q'zF *Lcf.MH͚;WxD|wKOpp׌;gZؕ@%=m]NjלV߂iJ7~& T FVjIY(r򧡄!4h(Hb,(!yH{0-` XB ʁ?C3C|9’MS0"?EP!L>(cN$iX.v@NFcJuk}%AmPq}wg"š@@>ZF:;':[o /Ep(P nJ ?̂VJؚZ0@d,q\Lu)[T-#2Șlq0Œt6X *Hyr' '@dJtiN])MX:J6m]!2=G{f+W4jY0 ^Je"6tq$]]$PJ.Pq+f.eFڈ(S| Х=Z!; cREVGeneral revUniqueID 1345899176064 Field)@". cREVGeneral revUniqueID 1345899210720  DTo change the plane's direction, enter an angle, then press RETURN. input2+x Xon returninfield global x, y, planeAngle put line 1 of me into x put planeAngle into y put -x into planeAngle repeat until y=x set the angle of image "plane" to -y wait 1 tick put y+1 into y if y<0 then put 360 into y if y>360 then put 0 into y end repeat put empty into me end returninfield $. cREVGeneral revUniqueID 1345899808917scripteditorvscroll0scripteditorselection200  move in that directionEpon mouseUp global planeAngle, planex, planey, planenextx, planenexty, xstep, ystep put "angle: "&360-planeAngle into line 1 of field "data" put "cos: "&cos((planeAngle) * (pi /180)) into line 2 of field "data" put "sin:" &-sin((planeAngle) * (pi /180)) into line 3 of field "data" put cos((planeAngle+90) * (pi /180)) into xstep put -sin((planeAngle+90) * (pi /180)) into ystep put xstep*50 into xstep put ystep*50 into ystep move image "plane" to round(planex+xstep), round(planey+ystep) put item 1 of the location of image "plane" into planex put item 2 of the location of image "plane" into planey end mouseUp JpW cREVGeneral revUniqueID 1346117769403scripteditorvscroll0scripteditorselection117  Put Plane at Center of ScreenEpon mouseUp global planeAngle, planex, planey, planenextx, planenexty, xstep, ystep put 155 into planex put 175 into planey move image "plane" to planex, planey end mouseUp 6<S cREVGeneral revUniqueID 1346155634583scripteditorvscroll0scripteditorselection121 data)` : cREVGeneral revUniqueID 1346965047360  angle: 33 cos: 0.838671 sin:0.544639 ` 8 Field)@$b. cREVTable currentviewLEnter an angle in this field to see the effect of the plane rotating slowly. cREVGeneral revUniqueID 1347488605261  MEnter an angle in this field to see the effect of the plane rotating slowly. Angle Onlyp3on mouseUp go to card "angle only" end mouseUp L"Q cREVGeneralscripteditorvscroll0 revUniqueID 1347488687798scripteditorselection37 Angle and MovementEp;on mouseUp go to card "angle and movement" end mouseUp L"Q cREVGeneralscripteditorvscroll0 revUniqueID 1347488713723scripteditorselection45 Homep-on mouseUp go to card "home" end mouseUp pRW cREVGeneralscripteditorvscroll0 revUniqueID 1347488918029scripteditorselection31 HomeEp-on mouseUp go to card "home" end mouseUp pRU cREVGeneral revUniqueID 1347488950636scripteditorvscroll0scripteditorselection31