EasyManuals Logo

Omron CX-Supervisor Reference Manual

Omron CX-Supervisor
164 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #124 background imageLoading...
Page #124 background image
Balloon Script SECTION 7 Script Example
123
IF alt > 140.0 THEN
lift = lift - 0.2
ENDIF
ENDIF
If the fuel burner is on, and there is still fuel left, and the rate of ascent exceeds
0 (the balloon has taken off) then point 'lift' is incremented by the rate of ascent
divided by 5 to allow the balloon to climb. Otherwise the balloon must be
descending and point 'lift' is decremented by 0.2.
IF lift < -10.0 THEN
lift = -10.0
ENDIF
Once point 'lift' reaches -10, it is not allowed to go lower.
alt = alt + lift
The altitude of the balloon is incremented by point 'lift'.
IF alt <= 140.0 THEN
IF distance>630.0 AND distance<660.0 AND lift>=-
3.0 THEN
winner = TRUE
burner = FALSE
ENDIF
If the balloon has hit the ground (point 'alt' equals 140), then provided it is on
the plateaux (the position of the balloon in pixels defined by point 'distance' is
between 630 and 660) and the rate of descent is not too fast (defined by point
'lift'), then the game is won.
IF lift < -3.0 then
crash = TRUE
burner = FALSE
ENDIF
If the balloon has hit the ground (point 'alt' equals 140), then if the rate of
descent is not too fast (defined by point 'lift'), then the game is lost.
lift = 0.0
ENDIF
Point 'lift' is reset.
speed = (alt-140.0 )/100.0
IF speed < 0.0 then
speed = 0.0
ENDIF
Point 'speed' is calculated based on the altitude.
distance = distance + speed
Point 'distance' is calculated based on the speed.

Table of Contents

Other manuals for Omron CX-Supervisor

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CX-Supervisor and is the answer not in the manual?

Omron CX-Supervisor Specifications

General IconGeneral
BrandOmron
ModelCX-Supervisor
CategorySoftware
LanguageEnglish

Related product manuals