diff --git a/ai/ant01.txt b/ai/ant01.txt index a8d0f224..c550bccf 100644 --- a/ai/ant01.txt +++ b/ai/ant01.txt @@ -1,53 +1,53 @@ -extern void object::Attack( ) -{ - object p; - float dist, prox; - point nav1, nav2, dest; - boolean advance = true; - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - while ( true ) - { - p = radar(WingedShooter, 0, 360, 0, 50); - if ( p == null ) - { - nav1.x = position.x-5; - nav1.y = position.y; - nav2.x = position.x+5; - nav2.y = position.y; - - while ( true ) - { - goto(nav1); - p = radar(WingedShooter, 0, 360, 0, 50); - if ( p != null ) break; - - goto(nav2); - p = radar(WingedShooter, 0, 360, 0, 50); - if ( p != null ) break; - } - } - else - { - dist = distance(p.position, position); - if ( dist <= 40 && !advance ) - { - fire(p.position); - advance = true; - } - else - { - prox = dist-5; - if ( prox > 40 ) prox = 40; - if ( prox < 5 ) prox = 5; - dest.x = (position.x-p.position.x)*prox/dist + p.position.x; - dest.y = (position.y-p.position.y)*prox/dist + p.position.y; - dest.z = (position.z-p.position.z)*prox/dist + p.position.z; - goto(dest); - advance = false; - } - } - } -} +extern void object::Attack( ) +{ + object p; + float dist, prox; + point nav1, nav2, dest; + boolean advance = true; + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + while ( true ) + { + p = radar(WingedShooter, 0, 360, 0, 50); + if ( p == null ) + { + nav1.x = position.x-5; + nav1.y = position.y; + nav2.x = position.x+5; + nav2.y = position.y; + + while ( true ) + { + goto(nav1); + p = radar(WingedShooter, 0, 360, 0, 50); + if ( p != null ) break; + + goto(nav2); + p = radar(WingedShooter, 0, 360, 0, 50); + if ( p != null ) break; + } + } + else + { + dist = distance(p.position, position); + if ( dist <= 40 && !advance ) + { + fire(p.position); + advance = true; + } + else + { + prox = dist-5; + if ( prox > 40 ) prox = 40; + if ( prox < 5 ) prox = 5; + dest.x = (position.x-p.position.x)*prox/dist + p.position.x; + dest.y = (position.y-p.position.y)*prox/dist + p.position.y; + dest.z = (position.z-p.position.z)*prox/dist + p.position.z; + goto(dest); + advance = false; + } + } + } +} diff --git a/ai/ant02.txt b/ai/ant02.txt index 602a78fb..95ad3309 100644 --- a/ai/ant02.txt +++ b/ai/ant02.txt @@ -1,95 +1,95 @@ -extern void object::Attack( ) -{ - int list[]; - int i; - object p; - float dist, prox; - point dest; - boolean advance = true; - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - list[i++] = Derrick; - list[i++] = BotFactory; - list[i++] = PowerStation; - list[i++] = Converter; - list[i++] = RepairCenter; - list[i++] = DefenseTower; - list[i++] = ResearchCenter; - list[i++] = RadarStation; - list[i++] = ExchangePost; - list[i++] = PowerPlant; - list[i++] = AutoLab; - list[i++] = NuclearPlant; - - wait(cmdline(0)); - - while ( true ) - { - p = radar(list, 0, 360, 0, 1000); - if ( p == null ) - { - wait(2); - } - else - { - dist = distance(p.position, position); - if ( dist <= 40 && !advance ) - { - fire(p.position); - advance = true; - } - else - { -//? if ( RetBaseDistance() > 20 ) - { - prox = dist-(5+rand()*5); - if ( prox < 5 ) prox = 5; - dest.x = (position.x-p.position.x)*prox/dist + p.position.x; - dest.y = (position.y-p.position.y)*prox/dist + p.position.y; - dest.z = (position.z-p.position.z)*prox/dist + p.position.z; - goto(dest); - advance = false; - } - } - } - } -} - -// Calcule la distance jusqu'à la base. - -float object::RetBaseDistance() -{ - object p; - float dist; - - p = radar(SpaceShip, 0, 360, 0, 1000); - if ( p == null ) return 1000; - dist = distance(p.position, position); - return dist; -} - +extern void object::Attack( ) +{ + int list[]; + int i; + object p; + float dist, prox; + point dest; + boolean advance = true; + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + list[i++] = Derrick; + list[i++] = BotFactory; + list[i++] = PowerStation; + list[i++] = Converter; + list[i++] = RepairCenter; + list[i++] = DefenseTower; + list[i++] = ResearchCenter; + list[i++] = RadarStation; + list[i++] = ExchangePost; + list[i++] = PowerPlant; + list[i++] = AutoLab; + list[i++] = NuclearPlant; + + wait(cmdline(0)); + + while ( true ) + { + p = radar(list, 0, 360, 0, 1000); + if ( p == null ) + { + wait(2); + } + else + { + dist = distance(p.position, position); + if ( dist <= 40 && !advance ) + { + fire(p.position); + advance = true; + } + else + { +//? if ( RetBaseDistance() > 20 ) + { + prox = dist-(5+rand()*5); + if ( prox < 5 ) prox = 5; + dest.x = (position.x-p.position.x)*prox/dist + p.position.x; + dest.y = (position.y-p.position.y)*prox/dist + p.position.y; + dest.z = (position.z-p.position.z)*prox/dist + p.position.z; + goto(dest); + advance = false; + } + } + } + } +} + +// Calcule la distance jusqu'à la base. + +float object::RetBaseDistance() +{ + object p; + float dist; + + p = radar(SpaceShip, 0, 360, 0, 1000); + if ( p == null ) return 1000; + dist = distance(p.position, position); + return dist; +} + diff --git a/ai/ant03.txt b/ai/ant03.txt index f36e8cc8..1b4dd7a3 100644 --- a/ai/ant03.txt +++ b/ai/ant03.txt @@ -1,91 +1,91 @@ -extern void object::Attack( ) -{ - int list[]; - int i; - object p; - float dist, prox; - point nav1, nav2, dest; - boolean advance = true; - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - list[i++] = Derrick; - list[i++] = BotFactory; - list[i++] = PowerStation; - list[i++] = Converter; - list[i++] = RepairCenter; - list[i++] = DefenseTower; - list[i++] = ResearchCenter; - list[i++] = RadarStation; - list[i++] = ExchangePost; - list[i++] = PowerPlant; - list[i++] = AutoLab; - list[i++] = NuclearPlant; - - while ( true ) - { - p = radar(list, 0, 360, 0, 40); - if ( p == null ) - { - nav1.x = position.x-5; - nav1.y = position.y; - nav2.x = position.x+5; - nav2.y = position.y; - - while ( true ) - { - goto(nav1); - p = radar(list, 0, 360, 0, 40); - if ( p != null ) break; - - goto(nav2); - p = radar(list, 0, 360, 0, 40); - if ( p != null ) break; - } - } - else - { - dist = distance(p.position, position); - if ( dist <= 40 && !advance ) - { - fire(p.position); - advance = true; - } - else - { - prox = dist-5; - if ( prox > 40 ) prox = 40; - if ( prox < 5 ) prox = 5; - dest.x = (position.x-p.position.x)*prox/dist + p.position.x; - dest.y = (position.y-p.position.y)*prox/dist + p.position.y; - dest.z = (position.z-p.position.z)*prox/dist + p.position.z; - goto(dest); - advance = false; - } - } - } -} +extern void object::Attack( ) +{ + int list[]; + int i; + object p; + float dist, prox; + point nav1, nav2, dest; + boolean advance = true; + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + list[i++] = Derrick; + list[i++] = BotFactory; + list[i++] = PowerStation; + list[i++] = Converter; + list[i++] = RepairCenter; + list[i++] = DefenseTower; + list[i++] = ResearchCenter; + list[i++] = RadarStation; + list[i++] = ExchangePost; + list[i++] = PowerPlant; + list[i++] = AutoLab; + list[i++] = NuclearPlant; + + while ( true ) + { + p = radar(list, 0, 360, 0, 40); + if ( p == null ) + { + nav1.x = position.x-5; + nav1.y = position.y; + nav2.x = position.x+5; + nav2.y = position.y; + + while ( true ) + { + goto(nav1); + p = radar(list, 0, 360, 0, 40); + if ( p != null ) break; + + goto(nav2); + p = radar(list, 0, 360, 0, 40); + if ( p != null ) break; + } + } + else + { + dist = distance(p.position, position); + if ( dist <= 40 && !advance ) + { + fire(p.position); + advance = true; + } + else + { + prox = dist-5; + if ( prox > 40 ) prox = 40; + if ( prox < 5 ) prox = 5; + dest.x = (position.x-p.position.x)*prox/dist + p.position.x; + dest.y = (position.y-p.position.y)*prox/dist + p.position.y; + dest.z = (position.z-p.position.z)*prox/dist + p.position.z; + goto(dest); + advance = false; + } + } + } +} diff --git a/ai/ant04.txt b/ai/ant04.txt index 320acd8e..723ec9b8 100644 --- a/ai/ant04.txt +++ b/ai/ant04.txt @@ -1,59 +1,59 @@ -extern void object::Attack( ) -{ - int list[], i; - object p; - float dist, prox; - point nav1, nav2, dest; - boolean advance = true; - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - - nav1.x = cmdline(0); - nav1.y = cmdline(1); - nav2.x = cmdline(2); - nav2.y = cmdline(3); - - while ( true ) - { - while ( true ) - { - p = radar(list, 0, 360, 0, 40); - if ( p == null ) break; - fire(p.position); - } - goto(nav1); - - while ( true ) - { - p = radar(list, 0, 360, 0, 40); - if ( p == null ) break; - fire(p.position); - } - goto(nav2); - } -} +extern void object::Attack( ) +{ + int list[], i; + object p; + float dist, prox; + point nav1, nav2, dest; + boolean advance = true; + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + + nav1.x = cmdline(0); + nav1.y = cmdline(1); + nav2.x = cmdline(2); + nav2.y = cmdline(3); + + while ( true ) + { + while ( true ) + { + p = radar(list, 0, 360, 0, 40); + if ( p == null ) break; + fire(p.position); + } + goto(nav1); + + while ( true ) + { + p = radar(list, 0, 360, 0, 40); + if ( p == null ) break; + fire(p.position); + } + goto(nav2); + } +} diff --git a/ai/ant05.txt b/ai/ant05.txt index be2c8234..5bc68048 100644 --- a/ai/ant05.txt +++ b/ai/ant05.txt @@ -1,62 +1,62 @@ -extern void object::Attack( ) -{ - int list[], i; - object p; - float dist, prox; - point nav1, nav2, dest; - boolean advance = true; - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - - nav1.x = cmdline(0); - nav1.y = cmdline(1); - nav2.x = cmdline(2); - nav2.y = cmdline(3); - - while ( true ) - { - p = radar(list, 0, 360, 0, 40); - if ( p == null ) - { - while ( true ) - { - goto(nav1); - p = radar(list, 0, 360, 0, 40); - if ( p != null ) break; - - goto(nav2); - p = radar(list, 0, 360, 0, 40); - if ( p != null ) break; - } - } - else - { - fire(p.position); - } - } -} +extern void object::Attack( ) +{ + int list[], i; + object p; + float dist, prox; + point nav1, nav2, dest; + boolean advance = true; + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + + nav1.x = cmdline(0); + nav1.y = cmdline(1); + nav2.x = cmdline(2); + nav2.y = cmdline(3); + + while ( true ) + { + p = radar(list, 0, 360, 0, 40); + if ( p == null ) + { + while ( true ) + { + goto(nav1); + p = radar(list, 0, 360, 0, 40); + if ( p != null ) break; + + goto(nav2); + p = radar(list, 0, 360, 0, 40); + if ( p != null ) break; + } + } + else + { + fire(p.position); + } + } +} diff --git a/ai/ant06.txt b/ai/ant06.txt index b11512cc..8813d3d5 100644 --- a/ai/ant06.txt +++ b/ai/ant06.txt @@ -1,18 +1,18 @@ -extern void object::Attack( ) -{ - point nav1, nav2; - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - nav1.x = cmdline(0); - nav1.y = cmdline(1); - nav2.x = cmdline(2); - nav2.y = cmdline(3); - - while ( true ) - { - goto(nav1); - goto(nav2); - } -} +extern void object::Attack( ) +{ + point nav1, nav2; + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + nav1.x = cmdline(0); + nav1.y = cmdline(1); + nav2.x = cmdline(2); + nav2.y = cmdline(3); + + while ( true ) + { + goto(nav1); + goto(nav2); + } +} diff --git a/ai/ant07.txt b/ai/ant07.txt index 948260ce..3d35aa88 100644 --- a/ai/ant07.txt +++ b/ai/ant07.txt @@ -1,86 +1,86 @@ -extern void object::Attack( ) -{ - int list[]; - int i; - object p; - float dist, prox; - point nav1, nav2, dest; - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - list[i++] = Derrick; - list[i++] = BotFactory; - list[i++] = PowerStation; - list[i++] = Converter; - list[i++] = RepairCenter; - list[i++] = DefenseTower; - list[i++] = ResearchCenter; - list[i++] = RadarStation; - list[i++] = ExchangePost; - list[i++] = PowerPlant; - list[i++] = AutoLab; - list[i++] = NuclearPlant; - - while ( true ) - { - p = radar(list, 0, 360, 0, 30); - if ( p == null ) - { - nav1.x = position.x-5; - nav1.y = position.y; - nav2.x = position.x+5; - nav2.y = position.y; - - while ( true ) - { - goto(nav1); - p = radar(list, 0, 360, 0, 30); - if ( p != null ) break; - - goto(nav2); - p = radar(list, 0, 360, 0, 30); - if ( p != null ) break; - } - } - else - { - dist = distance(p.position, position); - if ( dist < 5 ) - { - fire(p.position); - } - else - { - prox = dist+5; // fuite - dest.x = (position.x-p.position.x)*prox/dist + p.position.x; - dest.y = (position.y-p.position.y)*prox/dist + p.position.y; - dest.z = (position.z-p.position.z)*prox/dist + p.position.z; - goto(dest); - } - } - } -} +extern void object::Attack( ) +{ + int list[]; + int i; + object p; + float dist, prox; + point nav1, nav2, dest; + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + list[i++] = Derrick; + list[i++] = BotFactory; + list[i++] = PowerStation; + list[i++] = Converter; + list[i++] = RepairCenter; + list[i++] = DefenseTower; + list[i++] = ResearchCenter; + list[i++] = RadarStation; + list[i++] = ExchangePost; + list[i++] = PowerPlant; + list[i++] = AutoLab; + list[i++] = NuclearPlant; + + while ( true ) + { + p = radar(list, 0, 360, 0, 30); + if ( p == null ) + { + nav1.x = position.x-5; + nav1.y = position.y; + nav2.x = position.x+5; + nav2.y = position.y; + + while ( true ) + { + goto(nav1); + p = radar(list, 0, 360, 0, 30); + if ( p != null ) break; + + goto(nav2); + p = radar(list, 0, 360, 0, 30); + if ( p != null ) break; + } + } + else + { + dist = distance(p.position, position); + if ( dist < 5 ) + { + fire(p.position); + } + else + { + prox = dist+5; // fuite + dest.x = (position.x-p.position.x)*prox/dist + p.position.x; + dest.y = (position.y-p.position.y)*prox/dist + p.position.y; + dest.z = (position.z-p.position.z)*prox/dist + p.position.z; + goto(dest); + } + } + } +} diff --git a/ai/ant08.txt b/ai/ant08.txt index 8bae4dd5..d4da51c2 100644 --- a/ai/ant08.txt +++ b/ai/ant08.txt @@ -1,67 +1,67 @@ -extern void object::Attack( ) -{ - int list[], i; - object p; - float dist, prox; - point nav1, nav2, dest; - boolean advance = true; - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - - nav1.x = cmdline(0); - nav1.y = cmdline(1); - nav2.x = cmdline(2); - nav2.y = cmdline(3); - - while ( true ) - { - while ( ismovie() != 0 ) // film en cours ? - { - wait(1); - } - - p = radar(list, 0, 360, 0, 40); - if ( p == null ) - { - while ( true ) - { - goto(nav1); - p = radar(list, 0, 360, 0, 40); - if ( p != null ) break; - - goto(nav2); - p = radar(list, 0, 360, 0, 40); - if ( p != null ) break; - } - } - else - { - fire(p.position); - } - } -} +extern void object::Attack( ) +{ + int list[], i; + object p; + float dist, prox; + point nav1, nav2, dest; + boolean advance = true; + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + + nav1.x = cmdline(0); + nav1.y = cmdline(1); + nav2.x = cmdline(2); + nav2.y = cmdline(3); + + while ( true ) + { + while ( ismovie() != 0 ) // film en cours ? + { + wait(1); + } + + p = radar(list, 0, 360, 0, 40); + if ( p == null ) + { + while ( true ) + { + goto(nav1); + p = radar(list, 0, 360, 0, 40); + if ( p != null ) break; + + goto(nav2); + p = radar(list, 0, 360, 0, 40); + if ( p != null ) break; + } + } + else + { + fire(p.position); + } + } +} diff --git a/ai/ant09.txt b/ai/ant09.txt index 2a9c456f..40197146 100644 --- a/ai/ant09.txt +++ b/ai/ant09.txt @@ -1,91 +1,91 @@ -extern void object::Attack( ) -{ - int list[]; - int i; - object p; - float dist, prox; - point nav1, nav2, dest; - boolean advance = true; - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - list[i++] = Derrick; - list[i++] = BotFactory; - list[i++] = PowerStation; - list[i++] = Converter; - list[i++] = RepairCenter; - list[i++] = DefenseTower; - list[i++] = ResearchCenter; - list[i++] = RadarStation; - list[i++] = ExchangePost; - list[i++] = PowerPlant; - list[i++] = AutoLab; - list[i++] = NuclearPlant; - - while ( true ) - { - p = radar(list, 0, 360, 0, 200); - if ( p == null ) - { - nav1.x = position.x-5; - nav1.y = position.y; - nav2.x = position.x+5; - nav2.y = position.y; - - while ( true ) - { - goto(nav1); - p = radar(list, 0, 360, 0, 200); - if ( p != null ) break; - - goto(nav2); - p = radar(list, 0, 360, 0, 200); - if ( p != null ) break; - } - } - else - { - dist = distance(p.position, position); - if ( dist <= 40 && !advance ) - { - fire(p.position); - advance = true; - } - else - { - prox = dist-5; - if ( prox > 40 ) prox = 40; - if ( prox < 5 ) prox = 5; - dest.x = (position.x-p.position.x)*prox/dist + p.position.x; - dest.y = (position.y-p.position.y)*prox/dist + p.position.y; - dest.z = (position.z-p.position.z)*prox/dist + p.position.z; - goto(dest); - advance = false; - } - } - } -} +extern void object::Attack( ) +{ + int list[]; + int i; + object p; + float dist, prox; + point nav1, nav2, dest; + boolean advance = true; + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + list[i++] = Derrick; + list[i++] = BotFactory; + list[i++] = PowerStation; + list[i++] = Converter; + list[i++] = RepairCenter; + list[i++] = DefenseTower; + list[i++] = ResearchCenter; + list[i++] = RadarStation; + list[i++] = ExchangePost; + list[i++] = PowerPlant; + list[i++] = AutoLab; + list[i++] = NuclearPlant; + + while ( true ) + { + p = radar(list, 0, 360, 0, 200); + if ( p == null ) + { + nav1.x = position.x-5; + nav1.y = position.y; + nav2.x = position.x+5; + nav2.y = position.y; + + while ( true ) + { + goto(nav1); + p = radar(list, 0, 360, 0, 200); + if ( p != null ) break; + + goto(nav2); + p = radar(list, 0, 360, 0, 200); + if ( p != null ) break; + } + } + else + { + dist = distance(p.position, position); + if ( dist <= 40 && !advance ) + { + fire(p.position); + advance = true; + } + else + { + prox = dist-5; + if ( prox > 40 ) prox = 40; + if ( prox < 5 ) prox = 5; + dest.x = (position.x-p.position.x)*prox/dist + p.position.x; + dest.y = (position.y-p.position.y)*prox/dist + p.position.y; + dest.z = (position.z-p.position.z)*prox/dist + p.position.z; + goto(dest); + advance = false; + } + } + } +} diff --git a/ai/ant10.txt b/ai/ant10.txt index 4ff0358c..113b8a0e 100644 --- a/ai/ant10.txt +++ b/ai/ant10.txt @@ -1,93 +1,93 @@ -extern void object::Attack( ) -{ - int list[]; - int i; - object p; - float dist, prox; - point dest; - boolean advance = true; - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - list[i++] = Derrick; - list[i++] = BotFactory; - list[i++] = PowerStation; - list[i++] = Converter; - list[i++] = RepairCenter; - list[i++] = DefenseTower; - list[i++] = ResearchCenter; - list[i++] = RadarStation; - list[i++] = ExchangePost; - list[i++] = PowerPlant; - list[i++] = AutoLab; - list[i++] = NuclearPlant; - - while ( true ) - { - p = radar(list, 0, 360, 0, 1000); - if ( p == null ) - { - wait(2); - } - else - { - dist = distance(p.position, position); - if ( dist <= 40 && !advance ) - { - fire(p.position); - advance = true; - } - else - { -//? if ( RetBaseDistance() > 20 ) - { - prox = dist-(5+rand()*5); - if ( prox < 5 ) prox = 5; - dest.x = (position.x-p.position.x)*prox/dist + p.position.x; - dest.y = (position.y-p.position.y)*prox/dist + p.position.y; - dest.z = (position.z-p.position.z)*prox/dist + p.position.z; - goto(dest); - advance = false; - } - } - } - } -} - -// Calcule la distance jusqu'à la base. - -float object::RetBaseDistance() -{ - object p; - float dist; - - p = radar(SpaceShip, 0, 360, 0, 1000); - if ( p == null ) return 1000; - dist = distance(p.position, position); - return dist; -} - +extern void object::Attack( ) +{ + int list[]; + int i; + object p; + float dist, prox; + point dest; + boolean advance = true; + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + list[i++] = Derrick; + list[i++] = BotFactory; + list[i++] = PowerStation; + list[i++] = Converter; + list[i++] = RepairCenter; + list[i++] = DefenseTower; + list[i++] = ResearchCenter; + list[i++] = RadarStation; + list[i++] = ExchangePost; + list[i++] = PowerPlant; + list[i++] = AutoLab; + list[i++] = NuclearPlant; + + while ( true ) + { + p = radar(list, 0, 360, 0, 1000); + if ( p == null ) + { + wait(2); + } + else + { + dist = distance(p.position, position); + if ( dist <= 40 && !advance ) + { + fire(p.position); + advance = true; + } + else + { +//? if ( RetBaseDistance() > 20 ) + { + prox = dist-(5+rand()*5); + if ( prox < 5 ) prox = 5; + dest.x = (position.x-p.position.x)*prox/dist + p.position.x; + dest.y = (position.y-p.position.y)*prox/dist + p.position.y; + dest.z = (position.z-p.position.z)*prox/dist + p.position.z; + goto(dest); + advance = false; + } + } + } + } +} + +// Calcule la distance jusqu'à la base. + +float object::RetBaseDistance() +{ + object p; + float dist; + + p = radar(SpaceShip, 0, 360, 0, 1000); + if ( p == null ) return 1000; + dist = distance(p.position, position); + return dist; +} + diff --git a/ai/ant11.txt b/ai/ant11.txt index 275d2df8..8b68b1b1 100644 --- a/ai/ant11.txt +++ b/ai/ant11.txt @@ -1,95 +1,95 @@ -extern void object::Attack( ) -{ - int list[]; - int i; - object p; - float dist, prox; - point dest; - boolean advance = true; - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - list[i++] = Derrick; - list[i++] = BotFactory; - list[i++] = PowerStation; - list[i++] = Converter; - list[i++] = RepairCenter; - list[i++] = DefenseTower; - list[i++] = ResearchCenter; - list[i++] = RadarStation; - list[i++] = ExchangePost; - list[i++] = PowerPlant; - list[i++] = AutoLab; - list[i++] = NuclearPlant; - - wait(cmdline(0)); - - while ( true ) - { - p = radar(list, 0, 360, 0, 1000); - if ( p == null ) - { - wait(2); - } - else - { - dist = distance(p.position, position); - if ( dist <= 20 && !advance ) - { - fire(p.position); - advance = true; - } - else - { -//? if ( RetBaseDistance() > 20 ) - { - prox = dist-(5+rand()*5); - if ( prox < 5 ) prox = 5; - dest.x = (position.x-p.position.x)*prox/dist + p.position.x; - dest.y = (position.y-p.position.y)*prox/dist + p.position.y; - dest.z = (position.z-p.position.z)*prox/dist + p.position.z; - goto(dest, 0, 6); - advance = false; - } - } - } - } -} - -// Calcule la distance jusqu'à la base. - -float object::RetBaseDistance() -{ - object p; - float dist; - - p = radar(SpaceShip, 0, 360, 0, 1000); - if ( p == null ) return 1000; - dist = distance(p.position, position); - return dist; -} - +extern void object::Attack( ) +{ + int list[]; + int i; + object p; + float dist, prox; + point dest; + boolean advance = true; + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + list[i++] = Derrick; + list[i++] = BotFactory; + list[i++] = PowerStation; + list[i++] = Converter; + list[i++] = RepairCenter; + list[i++] = DefenseTower; + list[i++] = ResearchCenter; + list[i++] = RadarStation; + list[i++] = ExchangePost; + list[i++] = PowerPlant; + list[i++] = AutoLab; + list[i++] = NuclearPlant; + + wait(cmdline(0)); + + while ( true ) + { + p = radar(list, 0, 360, 0, 1000); + if ( p == null ) + { + wait(2); + } + else + { + dist = distance(p.position, position); + if ( dist <= 20 && !advance ) + { + fire(p.position); + advance = true; + } + else + { +//? if ( RetBaseDistance() > 20 ) + { + prox = dist-(5+rand()*5); + if ( prox < 5 ) prox = 5; + dest.x = (position.x-p.position.x)*prox/dist + p.position.x; + dest.y = (position.y-p.position.y)*prox/dist + p.position.y; + dest.z = (position.z-p.position.z)*prox/dist + p.position.z; + goto(dest, 0, 6); + advance = false; + } + } + } + } +} + +// Calcule la distance jusqu'à la base. + +float object::RetBaseDistance() +{ + object p; + float dist; + + p = radar(SpaceShip, 0, 360, 0, 1000); + if ( p == null ) return 1000; + dist = distance(p.position, position); + return dist; +} + diff --git a/ai/ant12.txt b/ai/ant12.txt index 577e9938..215a99b9 100644 --- a/ai/ant12.txt +++ b/ai/ant12.txt @@ -1,92 +1,92 @@ -extern void object::Attack( ) -{ - int list[], i; - object p; - float dist, prox; - point nav1, nav2, dest; - boolean lock, advance; - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - - nav1.x = cmdline(0); - nav1.y = cmdline(1); - nav2.x = cmdline(2); - nav2.y = cmdline(3); - - lock = false; - while ( !lock ) - { - p = radar(list, 0, 360, 0, 40); - if ( p != null ) - { - fire(p.position); - lock = true; - break; - } - goto(nav1); - - p = radar(list, 0, 360, 0, 40); - if ( p != null ) - { - fire(p.position); - lock = true; - break; - } - goto(nav2); - } - - advance = true; - while ( true ) - { - p = radar(list, 0, 360, 0, 1000); - if ( p == null ) - { - wait(1); - } - else - { - dist = distance(p.position, position); - if ( dist <= 40 && !advance ) - { - fire(p.position); - advance = true; - } - else - { - prox = dist-5; - if ( prox > 40 ) prox = 40; - if ( prox < 5 ) prox = 5; - dest.x = (position.x-p.position.x)*prox/dist + p.position.x; - dest.y = (position.y-p.position.y)*prox/dist + p.position.y; - dest.z = (position.z-p.position.z)*prox/dist + p.position.z; - goto(dest); - advance = false; - } - } - } -} +extern void object::Attack( ) +{ + int list[], i; + object p; + float dist, prox; + point nav1, nav2, dest; + boolean lock, advance; + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + + nav1.x = cmdline(0); + nav1.y = cmdline(1); + nav2.x = cmdline(2); + nav2.y = cmdline(3); + + lock = false; + while ( !lock ) + { + p = radar(list, 0, 360, 0, 40); + if ( p != null ) + { + fire(p.position); + lock = true; + break; + } + goto(nav1); + + p = radar(list, 0, 360, 0, 40); + if ( p != null ) + { + fire(p.position); + lock = true; + break; + } + goto(nav2); + } + + advance = true; + while ( true ) + { + p = radar(list, 0, 360, 0, 1000); + if ( p == null ) + { + wait(1); + } + else + { + dist = distance(p.position, position); + if ( dist <= 40 && !advance ) + { + fire(p.position); + advance = true; + } + else + { + prox = dist-5; + if ( prox > 40 ) prox = 40; + if ( prox < 5 ) prox = 5; + dest.x = (position.x-p.position.x)*prox/dist + p.position.x; + dest.y = (position.y-p.position.y)*prox/dist + p.position.y; + dest.z = (position.z-p.position.z)*prox/dist + p.position.z; + goto(dest); + advance = false; + } + } + } +} diff --git a/ai/antatt30.txt b/ai/antatt30.txt index fcdd3d51..366e6b11 100644 --- a/ai/antatt30.txt +++ b/ai/antatt30.txt @@ -1,145 +1,145 @@ -extern void object::Attack( ) -{ - int list[], i; // liste des objets cherchés - object target; // info sur la cible - point lastPos; // dernière position (pr test si bloquée) - float distTar; // distance de la cible - float dirTar; // direction de la cible - float r; // valeur aléatoire - float mp; // puissance moteur - float tangle; // angle d'esquive en cas d'eau - boolean ifmove; // si on avance en tirant ou pas - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - list[i++] = Derrick; - list[i++] = BotFactory; - list[i++] = PowerStation; - list[i++] = Converter; - list[i++] = RepairCenter; - list[i++] = DefenseTower; - list[i++] = ResearchCenter; - list[i++] = RadarStation; - list[i++] = ExchangePost; - list[i++] = PowerPlant; - list[i++] = AutoLab; - list[i++] = NuclearPlant; - - wait(cmdline(0)); // attend pour entrer en action - lastPos = position; // initialise - ifmove = true; - while ( true ) // répète à l'infini - { - target = radar(list); - dirTar = direction(target.position); - distTar = distance(position, target.position); - if(distTar<30) - { - turn(dirTar); - fire(target.position); - target = radar(list); - turn(direction(target.position)); - for(int i=0; i<3; i=i+1) - { - if(topo(position)<2 or distance(position, target.position) < 8 or !ifmove) - { - ifmove = false; - } - else - { - lastPos = position; - motor(1,1); - wait(0.5); - if (distance(position, lastPos) < 0.2) ifmove = false; - } - } - } - else - { - ifmove = true; - if (distance(lastPos, position) < 0.2) - { //si elle est bloquée par obstacle - lastPos = position; - turn(rand()*360-180); - motor(1,1); - wait(1); - target = radar(list); - turn(direction(target.position)); - } - else - { - lastPos = position; - if (topo(position)>1) - { - mp = direction(target.position)/180; - //if (mp>1) mp = 1; - //if (mp<-1) mp = -1; - if (mp>0) - { - motor(1-mp,1); - } - else - { - motor(1,1+mp); - } - wait(1); - } - else - { - motor (-0.5, -0.5); - wait(1.5); - target = radar(list); - turn(direction(target.position)); - tangle = 0; - do - { - tangle = tangle + 22.5; - if (tp(tangle) == 0) break; - tangle = -tangle; - if (tp(tangle) == 0) break; - tangle = -tangle; - if (tangle > 180) break; - } - while (true); - turn(tangle); - motor(1,1); - wait(2); - } - } - } - } -} - -int object::tp(float angle) -{ - point tpoint; - - tpoint.x = position.x + cos(orientation + angle)*10; - tpoint.y = position.y + sin(orientation + angle)*10; - tpoint.z = 0; - if (topo(tpoint) < 1.5) return(1); else return(0); -} +extern void object::Attack( ) +{ + int list[], i; // liste des objets cherchés + object target; // info sur la cible + point lastPos; // dernière position (pr test si bloquée) + float distTar; // distance de la cible + float dirTar; // direction de la cible + float r; // valeur aléatoire + float mp; // puissance moteur + float tangle; // angle d'esquive en cas d'eau + boolean ifmove; // si on avance en tirant ou pas + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + list[i++] = Derrick; + list[i++] = BotFactory; + list[i++] = PowerStation; + list[i++] = Converter; + list[i++] = RepairCenter; + list[i++] = DefenseTower; + list[i++] = ResearchCenter; + list[i++] = RadarStation; + list[i++] = ExchangePost; + list[i++] = PowerPlant; + list[i++] = AutoLab; + list[i++] = NuclearPlant; + + wait(cmdline(0)); // attend pour entrer en action + lastPos = position; // initialise + ifmove = true; + while ( true ) // répète à l'infini + { + target = radar(list); + dirTar = direction(target.position); + distTar = distance(position, target.position); + if(distTar<30) + { + turn(dirTar); + fire(target.position); + target = radar(list); + turn(direction(target.position)); + for(int i=0; i<3; i=i+1) + { + if(topo(position)<2 or distance(position, target.position) < 8 or !ifmove) + { + ifmove = false; + } + else + { + lastPos = position; + motor(1,1); + wait(0.5); + if (distance(position, lastPos) < 0.2) ifmove = false; + } + } + } + else + { + ifmove = true; + if (distance(lastPos, position) < 0.2) + { //si elle est bloquée par obstacle + lastPos = position; + turn(rand()*360-180); + motor(1,1); + wait(1); + target = radar(list); + turn(direction(target.position)); + } + else + { + lastPos = position; + if (topo(position)>1) + { + mp = direction(target.position)/180; + //if (mp>1) mp = 1; + //if (mp<-1) mp = -1; + if (mp>0) + { + motor(1-mp,1); + } + else + { + motor(1,1+mp); + } + wait(1); + } + else + { + motor (-0.5, -0.5); + wait(1.5); + target = radar(list); + turn(direction(target.position)); + tangle = 0; + do + { + tangle = tangle + 22.5; + if (tp(tangle) == 0) break; + tangle = -tangle; + if (tp(tangle) == 0) break; + tangle = -tangle; + if (tangle > 180) break; + } + while (true); + turn(tangle); + motor(1,1); + wait(2); + } + } + } + } +} + +int object::tp(float angle) +{ + point tpoint; + + tpoint.x = position.x + cos(orientation + angle)*10; + tpoint.y = position.y + sin(orientation + angle)*10; + tpoint.z = 0; + if (topo(tpoint) < 1.5) return(1); else return(0); +} diff --git a/ai/antattaw.txt b/ai/antattaw.txt index 64c7edf2..bd4f9c99 100644 --- a/ai/antattaw.txt +++ b/ai/antattaw.txt @@ -1,145 +1,145 @@ -extern void object::Attack( ) -{ - int list[], i; // liste des objets cherchés - object target; // info sur la cible - point lastPos; // dernière position (pr test si bloquée) - float distTar; // distance de la cible - float dirTar; // direction de la cible - float r; // valeur aléatoire - float mp; // puissance moteur - float tangle; // angle d'esquive en cas d'eau - boolean ifmove; // si on avance en tirant ou pas - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - list[i++] = Derrick; - list[i++] = BotFactory; - list[i++] = PowerStation; - list[i++] = Converter; - list[i++] = RepairCenter; - list[i++] = DefenseTower; - list[i++] = ResearchCenter; - list[i++] = RadarStation; - list[i++] = ExchangePost; - list[i++] = PowerPlant; - list[i++] = AutoLab; - list[i++] = NuclearPlant; - - wait(cmdline(0)); // attend pour entrer en action - lastPos = position; // initialise - ifmove = true; - while ( true ) // répète à l'infini - { - target = radar(list); - dirTar = direction(target.position); - distTar = distance(position, target.position); - if(distTar<40) - { - turn(dirTar); - fire(target.position); - target = radar(list); - turn(direction(target.position)); - for(int i=0; i<3; i=i+1) - { - if(topo(position)<2 or distance(position, target.position) < 8 or !ifmove) - { - ifmove = false; - } - else - { - lastPos = position; - motor(1,1); - wait(0.5); - if (distance(position, lastPos) < 0.2) ifmove = false; - } - } - } - else - { - ifmove = true; - if (distance(lastPos, position) < 0.2) - { //si elle est bloquée par obstacle - lastPos = position; - turn(rand()*360-180); - motor(1,1); - wait(1); - target = radar(list); - turn(direction(target.position)); - } - else - { - lastPos = position; - if (topo(position)>1) - { - mp = direction(target.position)/180; - //if (mp>1) mp = 1; - //if (mp<-1) mp = -1; - if (mp>0) - { - motor(1-mp,1); - } - else - { - motor(1,1+mp); - } - wait(1); - } - else - { - motor (-0.5, -0.5); - wait(1.5); - target = radar(list); - turn(direction(target.position)); - tangle = 0; - do - { - tangle = tangle + 22.5; - if (tp(tangle) == 0) break; - tangle = -tangle; - if (tp(tangle) == 0) break; - tangle = -tangle; - if (tangle > 180) break; - } - while (true); - turn(tangle); - motor(1,1); - wait(2); - } - } - } - } -} - -int object::tp(float angle) -{ - point tpoint; - - tpoint.x = position.x + cos(orientation + angle)*10; - tpoint.y = position.y + sin(orientation + angle)*10; - tpoint.z = 0; - if (topo(tpoint) < 1.5) return(1); else return(0); -} +extern void object::Attack( ) +{ + int list[], i; // liste des objets cherchés + object target; // info sur la cible + point lastPos; // dernière position (pr test si bloquée) + float distTar; // distance de la cible + float dirTar; // direction de la cible + float r; // valeur aléatoire + float mp; // puissance moteur + float tangle; // angle d'esquive en cas d'eau + boolean ifmove; // si on avance en tirant ou pas + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + list[i++] = Derrick; + list[i++] = BotFactory; + list[i++] = PowerStation; + list[i++] = Converter; + list[i++] = RepairCenter; + list[i++] = DefenseTower; + list[i++] = ResearchCenter; + list[i++] = RadarStation; + list[i++] = ExchangePost; + list[i++] = PowerPlant; + list[i++] = AutoLab; + list[i++] = NuclearPlant; + + wait(cmdline(0)); // attend pour entrer en action + lastPos = position; // initialise + ifmove = true; + while ( true ) // répète à l'infini + { + target = radar(list); + dirTar = direction(target.position); + distTar = distance(position, target.position); + if(distTar<40) + { + turn(dirTar); + fire(target.position); + target = radar(list); + turn(direction(target.position)); + for(int i=0; i<3; i=i+1) + { + if(topo(position)<2 or distance(position, target.position) < 8 or !ifmove) + { + ifmove = false; + } + else + { + lastPos = position; + motor(1,1); + wait(0.5); + if (distance(position, lastPos) < 0.2) ifmove = false; + } + } + } + else + { + ifmove = true; + if (distance(lastPos, position) < 0.2) + { //si elle est bloquée par obstacle + lastPos = position; + turn(rand()*360-180); + motor(1,1); + wait(1); + target = radar(list); + turn(direction(target.position)); + } + else + { + lastPos = position; + if (topo(position)>1) + { + mp = direction(target.position)/180; + //if (mp>1) mp = 1; + //if (mp<-1) mp = -1; + if (mp>0) + { + motor(1-mp,1); + } + else + { + motor(1,1+mp); + } + wait(1); + } + else + { + motor (-0.5, -0.5); + wait(1.5); + target = radar(list); + turn(direction(target.position)); + tangle = 0; + do + { + tangle = tangle + 22.5; + if (tp(tangle) == 0) break; + tangle = -tangle; + if (tp(tangle) == 0) break; + tangle = -tangle; + if (tangle > 180) break; + } + while (true); + turn(tangle); + motor(1,1); + wait(2); + } + } + } + } +} + +int object::tp(float angle) +{ + point tpoint; + + tpoint.x = position.x + cos(orientation + angle)*10; + tpoint.y = position.y + sin(orientation + angle)*10; + tpoint.z = 0; + if (topo(tpoint) < 1.5) return(1); else return(0); +} diff --git a/ai/antattsw.txt b/ai/antattsw.txt index d80557b3..1d7a300b 100644 --- a/ai/antattsw.txt +++ b/ai/antattsw.txt @@ -1,145 +1,145 @@ -extern void object::Attack( ) -{ - int list[], i; // liste des objets cherchés - object target; // info sur la cible - point lastPos; // dernière position (pr test si bloquée) - float distTar; // distance de la cible - float dirTar; // direction de la cible - float r; // valeur aléatoire - float mp; // puissance moteur - float tangle; // angle d'esquive en cas d'eau - boolean ifmove; // si on avance en tirant ou pas - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - list[i++] = Derrick; - list[i++] = BotFactory; - list[i++] = PowerStation; - list[i++] = Converter; - list[i++] = RepairCenter; - list[i++] = DefenseTower; - list[i++] = ResearchCenter; - list[i++] = RadarStation; - list[i++] = ExchangePost; - list[i++] = PowerPlant; - list[i++] = AutoLab; - list[i++] = NuclearPlant; - -// wait(cmdline(0)); // attend pour entrer en action - lastPos = position; // initialise - ifmove = true; - while ( true ) // répète à l'infini - { - target = radar(list); - dirTar = direction(target.position); - distTar = distance(position, target.position); - if(distTar<40) - { - turn(dirTar); - fire(target.position); - target = radar(list); - turn(direction(target.position)); - for(int i=0; i<3; i=i+1) - { - if(topo(position)<2 or distance(position, target.position) < 8 or !ifmove) - { - ifmove = false; - } - else - { - lastPos = position; - motor(1,1); - wait(0.5); - if (distance(position, lastPos) < 0.2) ifmove = false; - } - } - } - else - { - ifmove = true; - if (distance(lastPos, position) < 0.2) - { //si elle est bloquée par obstacle - lastPos = position; - turn(rand()*360-180); - motor(1,1); - wait(1); - target = radar(list); - turn(direction(target.position)); - } - else - { - lastPos = position; - if (topo(position)>1) - { - mp = direction(target.position)/180; - //if (mp>1) mp = 1; - //if (mp<-1) mp = -1; - if (mp>0) - { - motor(1-mp,1); - } - else - { - motor(1,1+mp); - } - wait(1); - } - else - { - motor (-0.5, -0.5); - wait(1.5); - target = radar(list); - turn(direction(target.position)); - tangle = 0; - do - { - tangle = tangle + 22.5; - if (tp(tangle) == 0) break; - tangle = -tangle; - if (tp(tangle) == 0) break; - tangle = -tangle; - if (tangle > 180) break; - } - while (true); - turn(tangle); - motor(1,1); - wait(2); - } - } - } - } -} - -int object::tp(float angle) -{ - point tpoint; - - tpoint.x = position.x + cos(orientation + angle)*10; - tpoint.y = position.y + sin(orientation + angle)*10; - tpoint.z = 0; - if (topo(tpoint) < 1.5) return(1); else return(0); -} +extern void object::Attack( ) +{ + int list[], i; // liste des objets cherchés + object target; // info sur la cible + point lastPos; // dernière position (pr test si bloquée) + float distTar; // distance de la cible + float dirTar; // direction de la cible + float r; // valeur aléatoire + float mp; // puissance moteur + float tangle; // angle d'esquive en cas d'eau + boolean ifmove; // si on avance en tirant ou pas + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + list[i++] = Derrick; + list[i++] = BotFactory; + list[i++] = PowerStation; + list[i++] = Converter; + list[i++] = RepairCenter; + list[i++] = DefenseTower; + list[i++] = ResearchCenter; + list[i++] = RadarStation; + list[i++] = ExchangePost; + list[i++] = PowerPlant; + list[i++] = AutoLab; + list[i++] = NuclearPlant; + +// wait(cmdline(0)); // attend pour entrer en action + lastPos = position; // initialise + ifmove = true; + while ( true ) // répète à l'infini + { + target = radar(list); + dirTar = direction(target.position); + distTar = distance(position, target.position); + if(distTar<40) + { + turn(dirTar); + fire(target.position); + target = radar(list); + turn(direction(target.position)); + for(int i=0; i<3; i=i+1) + { + if(topo(position)<2 or distance(position, target.position) < 8 or !ifmove) + { + ifmove = false; + } + else + { + lastPos = position; + motor(1,1); + wait(0.5); + if (distance(position, lastPos) < 0.2) ifmove = false; + } + } + } + else + { + ifmove = true; + if (distance(lastPos, position) < 0.2) + { //si elle est bloquée par obstacle + lastPos = position; + turn(rand()*360-180); + motor(1,1); + wait(1); + target = radar(list); + turn(direction(target.position)); + } + else + { + lastPos = position; + if (topo(position)>1) + { + mp = direction(target.position)/180; + //if (mp>1) mp = 1; + //if (mp<-1) mp = -1; + if (mp>0) + { + motor(1-mp,1); + } + else + { + motor(1,1+mp); + } + wait(1); + } + else + { + motor (-0.5, -0.5); + wait(1.5); + target = radar(list); + turn(direction(target.position)); + tangle = 0; + do + { + tangle = tangle + 22.5; + if (tp(tangle) == 0) break; + tangle = -tangle; + if (tp(tangle) == 0) break; + tangle = -tangle; + if (tangle > 180) break; + } + while (true); + turn(tangle); + motor(1,1); + wait(2); + } + } + } + } +} + +int object::tp(float angle) +{ + point tpoint; + + tpoint.x = position.x + cos(orientation + angle)*10; + tpoint.y = position.y + sin(orientation + angle)*10; + tpoint.z = 0; + if (topo(tpoint) < 1.5) return(1); else return(0); +} diff --git a/ai/antec.txt b/ai/antec.txt index 4d2855c9..d1902e9b 100644 --- a/ai/antec.txt +++ b/ai/antec.txt @@ -1,115 +1,115 @@ -extern void object::Attack( ) -{ - int list[], i; // liste des objets cherchés - object target; // info sur la cible - point center; // coordonnées du centre de la zone - point lastPos; // dernière position (pr test si bloquée) - float distCent; // rayon de la zone - float distLim; // rayon à ne pas dépasser - float r; // valeur aléatoire - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - - center.x = cmdline(0); // prend les coordonnée - center.y = cmdline(1); // du centre de la zone - center.z = 0; // à exclure - distCent = cmdline(2); // rayon de la zone - distLim = cmdline(3); - - lastPos = position; // initialise - turn(rand()*360-180); - motor(1,1); // en avant toute - while ( true ) // répère à l'infini - { - target = radar(list, 0, 360, 0, 40); - if (target == null or topo(position)<0)// pas de cible à proximité - { // ou pieds dans l'eau - if (distance2d(position, center) < distCent - or distance2d(position, center) > distLim - or topo(position)<0) - { // si la fourmi est dans la zone interdite - motor(0, 0); //s'arrête - wait(0.5); //marque un arrêt - motor (-0.5, -0.5);//recule lentement - wait (1.5); //attend qu'ait reculé - if (distance2d(position, center) < distCent+20) - { //si trop proche du centre - if (direction(center)>0) turn(direction(center)-180); else turn(direction(center)+180); - motor (1, 1); //puis en avant toute - do - { - wait(1); - } - while (distance2d(position, center) < distCent or topo(position)<0); - } - else - { //si trop loin du centre - turn(direction(center)); - motor (1, 1); //puis en avant toute - do - { - wait(1); //tant que pas dans la zone - } - while (distance2d(position, center) > distLim or topo(position)<0); - } - } - else - { //si elle est bien dans la zone - if (distance2d(lastPos, position) < 0.2) - { //si elle est bloquée par obstacle - turn(rand()*360-180); - motor(1,1); - wait(1); - } - r = rand(); - if (r > 0.7) - { //dans un cas sur dix - motor (1, 0.8);// tourne à droite - wait(rand()*3);// pendant un moment - motor (1, 1); // puis tout droit - } - if (r < 0.3) - { //dans un cas sur dix - motor (0.8, 1);// tourne à gauche - wait(rand()*3);// pendant un moment - motor (1, 1); // puis tout droit - } - lastPos = position; - wait(1); //attend un moment - } - } - else - { // si cible à proximité - turn(direction(target.position)); - fire(target.position); // et tire deux fois - motor(1,1); // avance - wait(1.5); // pendant 1.5 s - } - } -} - +extern void object::Attack( ) +{ + int list[], i; // liste des objets cherchés + object target; // info sur la cible + point center; // coordonnées du centre de la zone + point lastPos; // dernière position (pr test si bloquée) + float distCent; // rayon de la zone + float distLim; // rayon à ne pas dépasser + float r; // valeur aléatoire + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + + center.x = cmdline(0); // prend les coordonnée + center.y = cmdline(1); // du centre de la zone + center.z = 0; // à exclure + distCent = cmdline(2); // rayon de la zone + distLim = cmdline(3); + + lastPos = position; // initialise + turn(rand()*360-180); + motor(1,1); // en avant toute + while ( true ) // répère à l'infini + { + target = radar(list, 0, 360, 0, 40); + if (target == null or topo(position)<0)// pas de cible à proximité + { // ou pieds dans l'eau + if (distance2d(position, center) < distCent + or distance2d(position, center) > distLim + or topo(position)<0) + { // si la fourmi est dans la zone interdite + motor(0, 0); //s'arrête + wait(0.5); //marque un arrêt + motor (-0.5, -0.5);//recule lentement + wait (1.5); //attend qu'ait reculé + if (distance2d(position, center) < distCent+20) + { //si trop proche du centre + if (direction(center)>0) turn(direction(center)-180); else turn(direction(center)+180); + motor (1, 1); //puis en avant toute + do + { + wait(1); + } + while (distance2d(position, center) < distCent or topo(position)<0); + } + else + { //si trop loin du centre + turn(direction(center)); + motor (1, 1); //puis en avant toute + do + { + wait(1); //tant que pas dans la zone + } + while (distance2d(position, center) > distLim or topo(position)<0); + } + } + else + { //si elle est bien dans la zone + if (distance2d(lastPos, position) < 0.2) + { //si elle est bloquée par obstacle + turn(rand()*360-180); + motor(1,1); + wait(1); + } + r = rand(); + if (r > 0.7) + { //dans un cas sur dix + motor (1, 0.8);// tourne à droite + wait(rand()*3);// pendant un moment + motor (1, 1); // puis tout droit + } + if (r < 0.3) + { //dans un cas sur dix + motor (0.8, 1);// tourne à gauche + wait(rand()*3);// pendant un moment + motor (1, 1); // puis tout droit + } + lastPos = position; + wait(1); //attend un moment + } + } + else + { // si cible à proximité + turn(direction(target.position)); + fire(target.position); // et tire deux fois + motor(1,1); // avance + wait(1.5); // pendant 1.5 s + } + } +} + diff --git a/ai/antice.txt b/ai/antice.txt index a22bd958..f2d22f73 100644 --- a/ai/antice.txt +++ b/ai/antice.txt @@ -1,110 +1,110 @@ -extern void object::Attack( ) -{ - int list[], i; // liste des objets cherchés - object target; // info sur la cible - point center; // coordonnées du centre de la zone - point lastPos; // dernière position (pr test si bloquée) - float distCent; // rayon de la zone - float r; // valeur aléatoire - float stdHight; // Altitude du point de départ - float tolHight; // tolérance acceptée par rapport à stdHight - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; -// list[i++] = Me; - - center.x = cmdline(0); // prend les coordonnée - center.y = cmdline(1); // du centre de la zone - center.z = 0; // à patrouiller - distCent = cmdline(2); // rayon de la zone - stdHight = topo(position);//L'altitude dont il ne faut pas s'écarter - tolHight = 9; - - lastPos = position; // initialise - motor(1,1); // en avant toute - while ( true ) // répère à l'infini - { - target = radar(WingedShooter); - if (target.position.y < 20 - or abs(topo(position)-stdHight) > tolHight)//pas de cible à proximité - { // ou s'écarte trop de l'altitude de départ - if (distance2d(position, center) > distCent or - abs(topo(position)-stdHight) > tolHight) - { // si la fourmi est en dehors de la zone - motor(0, 0); //s'arrête - wait(0.5); //marque un arrêt - motor (-0.5, -0.5);//recule lentement - wait (1.5); //attend qu'ait reculé - turn(direction(center)); - motor (1, 1); //puis en avant toute - do - { - lastPos = position; - wait(1); //tant que pas dans la zone - if (distance2d(lastPos, position) < 0.2) - { //si elle est bloquée par obstacle - turn(rand()*360-180); - motor(1,1); - wait(1); - turn(direction(center)); - } - } - while (distance2d(position, center) > distCent or - abs(topo(position)-stdHight) > tolHight); - } - else - { //si elle est bien dans la zone - if (distance2d(lastPos, position) < 0.2) - { //si elle est bloquée par obstacle - turn(rand()*360-180); - motor(1,1); - wait(1); - } - r = rand(); - if (r > 0.6) - { //dans un cas sur dix - motor (1, 0.5);// tourne à droite - wait(rand()*3);// pendant un moment - motor (1, 1); // puis tout droit - } - if (r < 0.4) - { //dans un cas sur dix - motor (0.5, 1);// tourne à gauche - wait(rand()*3);// pendant un moment - motor (1, 1); // puis tout droit - } - lastPos = position; - wait(1); //attend un moment - } - } - else - { // si cible à proximité - turn(direction(target.position)); - fire(target.position); // tourne vers la cible - } - } -} - +extern void object::Attack( ) +{ + int list[], i; // liste des objets cherchés + object target; // info sur la cible + point center; // coordonnées du centre de la zone + point lastPos; // dernière position (pr test si bloquée) + float distCent; // rayon de la zone + float r; // valeur aléatoire + float stdHight; // Altitude du point de départ + float tolHight; // tolérance acceptée par rapport à stdHight + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; +// list[i++] = Me; + + center.x = cmdline(0); // prend les coordonnée + center.y = cmdline(1); // du centre de la zone + center.z = 0; // à patrouiller + distCent = cmdline(2); // rayon de la zone + stdHight = topo(position);//L'altitude dont il ne faut pas s'écarter + tolHight = 9; + + lastPos = position; // initialise + motor(1,1); // en avant toute + while ( true ) // répère à l'infini + { + target = radar(WingedShooter); + if (target.position.y < 20 + or abs(topo(position)-stdHight) > tolHight)//pas de cible à proximité + { // ou s'écarte trop de l'altitude de départ + if (distance2d(position, center) > distCent or + abs(topo(position)-stdHight) > tolHight) + { // si la fourmi est en dehors de la zone + motor(0, 0); //s'arrête + wait(0.5); //marque un arrêt + motor (-0.5, -0.5);//recule lentement + wait (1.5); //attend qu'ait reculé + turn(direction(center)); + motor (1, 1); //puis en avant toute + do + { + lastPos = position; + wait(1); //tant que pas dans la zone + if (distance2d(lastPos, position) < 0.2) + { //si elle est bloquée par obstacle + turn(rand()*360-180); + motor(1,1); + wait(1); + turn(direction(center)); + } + } + while (distance2d(position, center) > distCent or + abs(topo(position)-stdHight) > tolHight); + } + else + { //si elle est bien dans la zone + if (distance2d(lastPos, position) < 0.2) + { //si elle est bloquée par obstacle + turn(rand()*360-180); + motor(1,1); + wait(1); + } + r = rand(); + if (r > 0.6) + { //dans un cas sur dix + motor (1, 0.5);// tourne à droite + wait(rand()*3);// pendant un moment + motor (1, 1); // puis tout droit + } + if (r < 0.4) + { //dans un cas sur dix + motor (0.5, 1);// tourne à gauche + wait(rand()*3);// pendant un moment + motor (1, 1); // puis tout droit + } + lastPos = position; + wait(1); //attend un moment + } + } + else + { // si cible à proximité + turn(direction(target.position)); + fire(target.position); // tourne vers la cible + } + } +} + diff --git a/ai/antich.txt b/ai/antich.txt index 999afb83..76b0d57d 100644 --- a/ai/antich.txt +++ b/ai/antich.txt @@ -1,110 +1,110 @@ -extern void object::Attack( ) -{ - int list[], i; // liste des objets cherchés - object target; // info sur la cible - point center; // coordonnées du centre de la zone - point lastPos; // dernière position (pr test si bloquée) - float distCent; // rayon de la zone - float r; // valeur aléatoire - float stdHight; // Altitude du point de départ - float tolHight; // tolérance acceptée par rapport à stdHight - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - - center.x = cmdline(0); // prend les coordonnée - center.y = cmdline(1); // du centre de la zone - center.z = 0; // à patrouiller - distCent = cmdline(2); // rayon de la zone - stdHight = topo(position);//L'altitude dont il ne faut pas s'écarter - tolHight = 1; - - lastPos = position; // initialise - motor(1,1); // en avant toute - while ( true ) // répère à l'infini - { - target = radar(list, 0, 360, 0, 40); - if (target == null - or abs(topo(position)-stdHight) > tolHight)//pas de cible à proximité - { // ou s'écarte trop de l'altitude de départ - if (distance2d(position, center) > distCent or - abs(topo(position)-stdHight) > tolHight) - { // si la fourmi est en dehors de la zone - motor(0, 0); //s'arrête - wait(0.5); //marque un arrêt - motor (-0.5, -0.5);//recule lentement - wait (1.5); //attend qu'ait reculé - turn(direction(center)); - motor (1, 1); //puis en avant toute - do - { - lastPos = position; - wait(1); //tant que pas dans la zone - if (distance2d(lastPos, position) < 0.2) - { //si elle est bloquée par obstacle - turn(rand()*360-180); - motor(1,1); - wait(1); - turn(direction(center)); - } - } - while (distance2d(position, center) > distCent or - abs(topo(position)-stdHight) > tolHight); - } - else - { //si elle est bien dans la zone - if (distance2d(lastPos, position) < 0.2) - { //si elle est bloquée par obstacle - turn(rand()*360-180); - motor(1,1); - wait(1); - } - r = rand(); - if (r > 0.6) - { //dans un cas sur dix - motor (1, 0.5);// tourne à droite - wait(rand()*3);// pendant un moment - motor (1, 1); // puis tout droit - } - if (r < 0.4) - { //dans un cas sur dix - motor (0.5, 1);// tourne à gauche - wait(rand()*3);// pendant un moment - motor (1, 1); // puis tout droit - } - lastPos = position; - wait(1); //attend un moment - } - } - else - { // si cible à proximité - turn(direction(target.position)); - fire(target.position); // tourne vers la cible - } - } -} - +extern void object::Attack( ) +{ + int list[], i; // liste des objets cherchés + object target; // info sur la cible + point center; // coordonnées du centre de la zone + point lastPos; // dernière position (pr test si bloquée) + float distCent; // rayon de la zone + float r; // valeur aléatoire + float stdHight; // Altitude du point de départ + float tolHight; // tolérance acceptée par rapport à stdHight + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + + center.x = cmdline(0); // prend les coordonnée + center.y = cmdline(1); // du centre de la zone + center.z = 0; // à patrouiller + distCent = cmdline(2); // rayon de la zone + stdHight = topo(position);//L'altitude dont il ne faut pas s'écarter + tolHight = 1; + + lastPos = position; // initialise + motor(1,1); // en avant toute + while ( true ) // répère à l'infini + { + target = radar(list, 0, 360, 0, 40); + if (target == null + or abs(topo(position)-stdHight) > tolHight)//pas de cible à proximité + { // ou s'écarte trop de l'altitude de départ + if (distance2d(position, center) > distCent or + abs(topo(position)-stdHight) > tolHight) + { // si la fourmi est en dehors de la zone + motor(0, 0); //s'arrête + wait(0.5); //marque un arrêt + motor (-0.5, -0.5);//recule lentement + wait (1.5); //attend qu'ait reculé + turn(direction(center)); + motor (1, 1); //puis en avant toute + do + { + lastPos = position; + wait(1); //tant que pas dans la zone + if (distance2d(lastPos, position) < 0.2) + { //si elle est bloquée par obstacle + turn(rand()*360-180); + motor(1,1); + wait(1); + turn(direction(center)); + } + } + while (distance2d(position, center) > distCent or + abs(topo(position)-stdHight) > tolHight); + } + else + { //si elle est bien dans la zone + if (distance2d(lastPos, position) < 0.2) + { //si elle est bloquée par obstacle + turn(rand()*360-180); + motor(1,1); + wait(1); + } + r = rand(); + if (r > 0.6) + { //dans un cas sur dix + motor (1, 0.5);// tourne à droite + wait(rand()*3);// pendant un moment + motor (1, 1); // puis tout droit + } + if (r < 0.4) + { //dans un cas sur dix + motor (0.5, 1);// tourne à gauche + wait(rand()*3);// pendant un moment + motor (1, 1); // puis tout droit + } + lastPos = position; + wait(1); //attend un moment + } + } + else + { // si cible à proximité + turn(direction(target.position)); + fire(target.position); // tourne vers la cible + } + } +} + diff --git a/ai/antich2.txt b/ai/antich2.txt index 25ceb42f..1a9ca9a8 100644 --- a/ai/antich2.txt +++ b/ai/antich2.txt @@ -1,113 +1,113 @@ -extern void object::Attack( ) -{ - int list[], i; // liste des objets cherchés - object target; // info sur la cible - point center; // coordonnées du centre de la zone - point lastPos; // dernière position (pr test si bloquée) - float distCent; // rayon de la zone - float r; // valeur aléatoire - float stdHight; // Altitude du point de départ - float tolHight; // tolérance acceptée par rapport à stdHight - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - - center.x = cmdline(0); // prend les coordonnée - center.y = cmdline(1); // du centre de la zone - center.z = 0; // à patrouiller - distCent = cmdline(2); // rayon de la zone - stdHight = topo(position);//L'altitude dont il ne faut pas s'écarter - tolHight = cmdline(3); // tolérance admise - - lastPos = position; // initialise - motor(1,1); // en avant toute - while ( true ) // répère à l'infini - { - target = radar(list, 0, 360, 0, 40); - if (target == null - or topo(position)-stdHight > tolHight - or stdHight-topo(position) > tolHight)//pas de cible à proximité - { // ou s'écarte trop de l'altitude de départ - if (distance2d(position, center) > distCent - or abs(topo(position)-stdHight) > tolHight) - { // si la fourmi est en dehors de la zone - motor(0, 0); //s'arrête - wait(0.5); //marque un arrêt - motor (-0.5, -0.5);//recule lentement - wait (1.5); //attend qu'ait reculé - turn(direction(center)); - motor (1, 1); //puis en avant toute - do - { - lastPos = position; - wait(1); //tant que pas dans la zone - if (distance2d(lastPos, position) < 0.2) - { //si elle est bloquée par obstacle - turn(rand()*360-180); - motor(1,1); - wait(1); - turn(direction(center)); - } - } - while (distance2d(position, center) > distCent or - abs(topo(position)-stdHight) > tolHight); - } - else - { //si elle est bien dans la zone - if (distance2d(lastPos, position) < 0.2) - { //si elle est bloquée par obstacle - turn(rand()*360-180); - motor(1,1); - wait(1); - } - r = rand(); - if (r > 0.6) - { //dans un cas sur dix - motor (1, 0.7);// tourne à droite - wait(rand()*3);// pendant un moment - motor (1, 1); // puis tout droit - } - if (r < 0.4) - { //dans un cas sur dix - motor (0.7, 1);// tourne à gauche - wait(rand()*3);// pendant un moment - motor (1, 1); // puis tout droit - } - lastPos = position; - wait(1); //attend un moment - } - } - else - { // si cible à proximité - turn(direction(target.position)); - fire(target.position); // tourne vers la cible - motor(1,1); // avance - wait(1.5); // pendant 1.5 s - } - } -} - +extern void object::Attack( ) +{ + int list[], i; // liste des objets cherchés + object target; // info sur la cible + point center; // coordonnées du centre de la zone + point lastPos; // dernière position (pr test si bloquée) + float distCent; // rayon de la zone + float r; // valeur aléatoire + float stdHight; // Altitude du point de départ + float tolHight; // tolérance acceptée par rapport à stdHight + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + + center.x = cmdline(0); // prend les coordonnée + center.y = cmdline(1); // du centre de la zone + center.z = 0; // à patrouiller + distCent = cmdline(2); // rayon de la zone + stdHight = topo(position);//L'altitude dont il ne faut pas s'écarter + tolHight = cmdline(3); // tolérance admise + + lastPos = position; // initialise + motor(1,1); // en avant toute + while ( true ) // répère à l'infini + { + target = radar(list, 0, 360, 0, 40); + if (target == null + or topo(position)-stdHight > tolHight + or stdHight-topo(position) > tolHight)//pas de cible à proximité + { // ou s'écarte trop de l'altitude de départ + if (distance2d(position, center) > distCent + or abs(topo(position)-stdHight) > tolHight) + { // si la fourmi est en dehors de la zone + motor(0, 0); //s'arrête + wait(0.5); //marque un arrêt + motor (-0.5, -0.5);//recule lentement + wait (1.5); //attend qu'ait reculé + turn(direction(center)); + motor (1, 1); //puis en avant toute + do + { + lastPos = position; + wait(1); //tant que pas dans la zone + if (distance2d(lastPos, position) < 0.2) + { //si elle est bloquée par obstacle + turn(rand()*360-180); + motor(1,1); + wait(1); + turn(direction(center)); + } + } + while (distance2d(position, center) > distCent or + abs(topo(position)-stdHight) > tolHight); + } + else + { //si elle est bien dans la zone + if (distance2d(lastPos, position) < 0.2) + { //si elle est bloquée par obstacle + turn(rand()*360-180); + motor(1,1); + wait(1); + } + r = rand(); + if (r > 0.6) + { //dans un cas sur dix + motor (1, 0.7);// tourne à droite + wait(rand()*3);// pendant un moment + motor (1, 1); // puis tout droit + } + if (r < 0.4) + { //dans un cas sur dix + motor (0.7, 1);// tourne à gauche + wait(rand()*3);// pendant un moment + motor (1, 1); // puis tout droit + } + lastPos = position; + wait(1); //attend un moment + } + } + else + { // si cible à proximité + turn(direction(target.position)); + fire(target.position); // tourne vers la cible + motor(1,1); // avance + wait(1.5); // pendant 1.5 s + } + } +} + diff --git a/ai/anticp.txt b/ai/anticp.txt index 8c4ca786..c990f571 100644 --- a/ai/anticp.txt +++ b/ai/anticp.txt @@ -1,216 +1,216 @@ -extern void object::Attack( ) -{ - int list[], i; // liste des objets cherchés - object target; // info sur la cible - point center; // coordonnées du centre de la zone - point lastPos; // dernière position (pr test si bloquée) - float distCent; // rayon de la zone - float r; // valeur aléatoire - float distTar; // distance de la cible - float dirTar; // direction de la cible - float mp; // puissance moteur - float tangle; // angle d'esquive en cas d'eau - boolean ifmove; // si on avance en tirant ou pas - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - - center.x = cmdline(0); // prend les coordonnée - center.y = cmdline(1); // du centre de la zone - center.z = 0; // à patrouiller - distCent = cmdline(2); // rayon de la zone - - lastPos = position; // initialise - motor(1,1); // en avant toute - while (radar(list, 0, 360, 0, 40) == null) // répète jusqu'à contact - { - target = radar(list, 0, 360, 0, 40); - if (target == null or topo(position)<0)// pas de cible à proximité - { // ou pieds dans l'eau - if (distance2d(position, center) > distCent or topo(position)<0) - { // si la fourmi est en dehors de la zone - motor(0, 0); //s'arrête - wait(0.5); //marque un arrêt - motor (-0.5, -0.5);//recule lentement - wait (1.5); //attend qu'ait reculé - if (direction(center)>0) motor (0,1); else motor (1,0); - do wait(0.2); //tourne vers le centre - while (direction(center) > 20 - or direction(center) < -20); - //tant que pas orienté vers le centre - motor (1, 1); //puis en avant toute - do - { - lastPos = position; - wait(0.5); //tant que pas dans la zone - if (distance2d(lastPos, position) < 0.2) - { //si elle est bloquée par obstacle - turn(rand()*360-180); - motor(1,1); - wait(1); - turn(direction(center)); - } - } - while (distance2d(position, center) > distCent or topo(position)<0); - } - else - { //si elle est bien dans la zone - if (distance2d(lastPos, position) < 0.2) - { //si elle est bloquée par obstacle - turn(rand()*360-180); - motor(1,1); - wait(1); - } - r = rand(); - if (r > 0.9) - { //dans un cas sur dix - motor (1, 0.5);// tourne à droite - wait(rand()*3);// pendant un moment - motor (1, 1); // puis tout droit - } - if (r < 0.1) - { //dans un cas sur dix - motor (0.5, 1);// tourne à gauche - wait(rand()*3);// pendant un moment - motor (1, 1); // puis tout droit - } - lastPos = position; - wait(0.2); //attend un moment - } - } - else - { // si cible à proximité - turn(direction(target.position)); - fire(target.position); // tourne vers la cible - fire(target.position); // et tire deux fois - motor(1,1); // avance - wait(1.5); // pendant 1.5 s - } - } - - //a eu un contact avec l'astronaute - lastPos = position; // initialise - ifmove = true; - while ( true ) // répète à l'infini - { - target = radar(list); - dirTar = direction(target.position); - distTar = distance(position, target.position); - if (target != null) - { - if(distTar<40) - { - turn(dirTar); - fire(target.position); - target = radar(list); - turn(direction(target.position)); - for(int i=0; i<3; i=i+1) - { - if(topo(position)<1.5 or distance(position, target.position) < 8 or !ifmove) - { - ifmove = false; - } - else - { - lastPos = position; - motor(1,1); - wait(1); - if (distance(position, lastPos) < 0.2) ifmove = false; - } - } - } - else - { - ifmove = true; - if (distance(lastPos, position) < 0.2) - { //si elle est bloquée par obstacle - lastPos = position; - turn(rand()*360-180); - motor(1,1); - wait(1); - target = radar(list); - turn(direction(target.position)); - } - else - { - lastPos = position; - if (topo(position)>1.5) - { - mp = direction(target.position)/180; - //if (mp>1) mp = 1; - //if (mp<-1) mp = -1; - if (mp>0) - { - motor(1-mp,1); - } - else - { - motor(1,1+mp); - } - wait(1); - } - else - { - motor (-0.5, -0.5); - wait(1.5); - target = radar(list); - turn(direction(target.position)); - tangle = 0; - do - { - tangle = tangle + 22.5; - if (tp(tangle) == 0) break; - tangle = -tangle; - if (tp(tangle) == 0) break; - tangle = -tangle; - if (tangle > 180) break; - } - while (true); - turn(tangle); - motor(1,1); - wait(2); - } - } - } - } - else - { - wait(1); - } - } -} - -int object::tp(float angle) -{ - point tpoint; - - tpoint.x = position.x + cos(orientation + angle)*10; - tpoint.y = position.y + sin(orientation + angle)*10; - tpoint.z = 0; - if (topo(tpoint) < 2) return(1); else return(0); -} - +extern void object::Attack( ) +{ + int list[], i; // liste des objets cherchés + object target; // info sur la cible + point center; // coordonnées du centre de la zone + point lastPos; // dernière position (pr test si bloquée) + float distCent; // rayon de la zone + float r; // valeur aléatoire + float distTar; // distance de la cible + float dirTar; // direction de la cible + float mp; // puissance moteur + float tangle; // angle d'esquive en cas d'eau + boolean ifmove; // si on avance en tirant ou pas + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + + center.x = cmdline(0); // prend les coordonnée + center.y = cmdline(1); // du centre de la zone + center.z = 0; // à patrouiller + distCent = cmdline(2); // rayon de la zone + + lastPos = position; // initialise + motor(1,1); // en avant toute + while (radar(list, 0, 360, 0, 40) == null) // répète jusqu'à contact + { + target = radar(list, 0, 360, 0, 40); + if (target == null or topo(position)<0)// pas de cible à proximité + { // ou pieds dans l'eau + if (distance2d(position, center) > distCent or topo(position)<0) + { // si la fourmi est en dehors de la zone + motor(0, 0); //s'arrête + wait(0.5); //marque un arrêt + motor (-0.5, -0.5);//recule lentement + wait (1.5); //attend qu'ait reculé + if (direction(center)>0) motor (0,1); else motor (1,0); + do wait(0.2); //tourne vers le centre + while (direction(center) > 20 + or direction(center) < -20); + //tant que pas orienté vers le centre + motor (1, 1); //puis en avant toute + do + { + lastPos = position; + wait(0.5); //tant que pas dans la zone + if (distance2d(lastPos, position) < 0.2) + { //si elle est bloquée par obstacle + turn(rand()*360-180); + motor(1,1); + wait(1); + turn(direction(center)); + } + } + while (distance2d(position, center) > distCent or topo(position)<0); + } + else + { //si elle est bien dans la zone + if (distance2d(lastPos, position) < 0.2) + { //si elle est bloquée par obstacle + turn(rand()*360-180); + motor(1,1); + wait(1); + } + r = rand(); + if (r > 0.9) + { //dans un cas sur dix + motor (1, 0.5);// tourne à droite + wait(rand()*3);// pendant un moment + motor (1, 1); // puis tout droit + } + if (r < 0.1) + { //dans un cas sur dix + motor (0.5, 1);// tourne à gauche + wait(rand()*3);// pendant un moment + motor (1, 1); // puis tout droit + } + lastPos = position; + wait(0.2); //attend un moment + } + } + else + { // si cible à proximité + turn(direction(target.position)); + fire(target.position); // tourne vers la cible + fire(target.position); // et tire deux fois + motor(1,1); // avance + wait(1.5); // pendant 1.5 s + } + } + + //a eu un contact avec l'astronaute + lastPos = position; // initialise + ifmove = true; + while ( true ) // répète à l'infini + { + target = radar(list); + dirTar = direction(target.position); + distTar = distance(position, target.position); + if (target != null) + { + if(distTar<40) + { + turn(dirTar); + fire(target.position); + target = radar(list); + turn(direction(target.position)); + for(int i=0; i<3; i=i+1) + { + if(topo(position)<1.5 or distance(position, target.position) < 8 or !ifmove) + { + ifmove = false; + } + else + { + lastPos = position; + motor(1,1); + wait(1); + if (distance(position, lastPos) < 0.2) ifmove = false; + } + } + } + else + { + ifmove = true; + if (distance(lastPos, position) < 0.2) + { //si elle est bloquée par obstacle + lastPos = position; + turn(rand()*360-180); + motor(1,1); + wait(1); + target = radar(list); + turn(direction(target.position)); + } + else + { + lastPos = position; + if (topo(position)>1.5) + { + mp = direction(target.position)/180; + //if (mp>1) mp = 1; + //if (mp<-1) mp = -1; + if (mp>0) + { + motor(1-mp,1); + } + else + { + motor(1,1+mp); + } + wait(1); + } + else + { + motor (-0.5, -0.5); + wait(1.5); + target = radar(list); + turn(direction(target.position)); + tangle = 0; + do + { + tangle = tangle + 22.5; + if (tp(tangle) == 0) break; + tangle = -tangle; + if (tp(tangle) == 0) break; + tangle = -tangle; + if (tangle > 180) break; + } + while (true); + turn(tangle); + motor(1,1); + wait(2); + } + } + } + } + else + { + wait(1); + } + } +} + +int object::tp(float angle) +{ + point tpoint; + + tpoint.x = position.x + cos(orientation + angle)*10; + tpoint.y = position.y + sin(orientation + angle)*10; + tpoint.z = 0; + if (topo(tpoint) < 2) return(1); else return(0); +} + diff --git a/ai/antics.txt b/ai/antics.txt index 769132a4..4d038605 100644 --- a/ai/antics.txt +++ b/ai/antics.txt @@ -1,103 +1,103 @@ -extern void object::Attack( ) -{ - int list[], i; // liste des objets cherchés - object target; // info sur la cible - point center; // coordonnées du centre de la zone - point lastPos; // dernière position (pr test si bloquée) - float distCent; // rayon de la zone - float r; // valeur aléatoire - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - - center.x = cmdline(0); // prend les coordonnée - center.y = cmdline(1); // du centre de la zone - center.z = 0; // à patrouiller - distCent = cmdline(2); // rayon de la zone - - lastPos = position; // initialise - motor(1,1); // en avant toute - while ( true ) // répère à l'infini - { - target = radar(list, 0, 360, 0, 40); - if (target == null or topo(position)<0)// pas de cible à proximité - { // ou pieds dans l'eau - if (distance2d(position, center) > distCent or topo(position)<0) - { // si la fourmi est en dehors de la zone - motor(0, 0); //s'arrête - wait(0.5); //marque un arrêt - motor (-0.5, -0.5);//recule lentement - wait (1.5); //attend qu'ait reculé - turn(direction(center)); - motor (1, 1); //puis en avant toute - do - { - lastPos = position; - wait(1); //tant que pas dans la zone - if (distance2d(lastPos, position) < 0.2) - { //si elle est bloquée par obstacle - turn(rand()*360-180); - motor(1,1); - wait(1); - turn(direction(center)); - } - } - while (distance2d(position, center) > distCent or topo(position)<0); - } - else - { //si elle est bien dans la zone - if (distance2d(lastPos, position) < 0.2) - { //si elle est bloquée par obstacle - turn(rand()*360-180); - motor(1,1); - wait(1); - } - r = rand(); - if (r > 0.6) - { //dans un cas sur dix - motor (1, 0.5);// tourne à droite - wait(rand()*3);// pendant un moment - motor (1, 1); // puis tout droit - } - if (r < 0.4) - { //dans un cas sur dix - motor (0.5, 1);// tourne à gauche - wait(rand()*3);// pendant un moment - motor (1, 1); // puis tout droit - } - lastPos = position; - wait(1); //attend un moment - } - } - else - { // si cible à proximité - turn(direction(target.position)); - fire(target.position); // tourne vers la cible - } - } -} - +extern void object::Attack( ) +{ + int list[], i; // liste des objets cherchés + object target; // info sur la cible + point center; // coordonnées du centre de la zone + point lastPos; // dernière position (pr test si bloquée) + float distCent; // rayon de la zone + float r; // valeur aléatoire + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + + center.x = cmdline(0); // prend les coordonnée + center.y = cmdline(1); // du centre de la zone + center.z = 0; // à patrouiller + distCent = cmdline(2); // rayon de la zone + + lastPos = position; // initialise + motor(1,1); // en avant toute + while ( true ) // répère à l'infini + { + target = radar(list, 0, 360, 0, 40); + if (target == null or topo(position)<0)// pas de cible à proximité + { // ou pieds dans l'eau + if (distance2d(position, center) > distCent or topo(position)<0) + { // si la fourmi est en dehors de la zone + motor(0, 0); //s'arrête + wait(0.5); //marque un arrêt + motor (-0.5, -0.5);//recule lentement + wait (1.5); //attend qu'ait reculé + turn(direction(center)); + motor (1, 1); //puis en avant toute + do + { + lastPos = position; + wait(1); //tant que pas dans la zone + if (distance2d(lastPos, position) < 0.2) + { //si elle est bloquée par obstacle + turn(rand()*360-180); + motor(1,1); + wait(1); + turn(direction(center)); + } + } + while (distance2d(position, center) > distCent or topo(position)<0); + } + else + { //si elle est bien dans la zone + if (distance2d(lastPos, position) < 0.2) + { //si elle est bloquée par obstacle + turn(rand()*360-180); + motor(1,1); + wait(1); + } + r = rand(); + if (r > 0.6) + { //dans un cas sur dix + motor (1, 0.5);// tourne à droite + wait(rand()*3);// pendant un moment + motor (1, 1); // puis tout droit + } + if (r < 0.4) + { //dans un cas sur dix + motor (0.5, 1);// tourne à gauche + wait(rand()*3);// pendant un moment + motor (1, 1); // puis tout droit + } + lastPos = position; + wait(1); //attend un moment + } + } + else + { // si cible à proximité + turn(direction(target.position)); + fire(target.position); // tourne vers la cible + } + } +} + diff --git a/ai/antict.txt b/ai/antict.txt index de7575e5..be1d53b3 100644 --- a/ai/antict.txt +++ b/ai/antict.txt @@ -1,105 +1,105 @@ -extern void object::Attack( ) -{ - int list[], i; // liste des objets cherchés - object target; // info sur la cible - point center; // coordonnées du centre de la zone - point lastPos; // dernière position (pr test si bloquée) - float distCent; // rayon de la zone - float r; // valeur aléatoire - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - - center.x = cmdline(0); // prend les coordonnée - center.y = cmdline(1); // du centre de la zone - center.z = 0; // à patrouiller - distCent = cmdline(2); // rayon de la zone - - lastPos = position; // initialise - motor(1,1); // en avant toute - while ( true ) // répète à l'infini - { - target = radar(list, 0, 360, 0, 40); - if (target == null or topo(position)<0)// pas de cible à proximité - { // ou pieds dans l'eau - if (distance2d(position, center) > distCent or topo(position)<0) - { // si la fourmi est en dehors de la zone - motor(0, 0); //s'arrête - wait(0.5); //marque un arrêt - motor (-0.5, -0.5);//recule lentement - wait (1.5); //attend qu'ait reculé - turn(direction(center)); - motor (1, 1); //puis en avant toute - do - { - lastPos = position; - wait(0.5); //tant que pas dans la zone - if (distance2d(lastPos, position) < 0.2) - { //si elle est bloquée par obstacle - turn(rand()*360-180); - motor(1,1); - wait(1); - turn(direction(center)); - } - } - while (distance2d(position, center) > distCent or topo(position)<0); - } - else - { //si elle est bien dans la zone - if (distance2d(lastPos, position) < 0.2) - { //si elle est bloquée par obstacle - turn(rand()*360-180); - motor(1,1); - wait(1); - } - r = rand(); - if (r > 0.6) - { //dans un cas sur dix - motor (1, 0.7);// tourne à droite - wait(rand()*3);// pendant un moment - motor (1, 1); // puis tout droit - } - if (r < 0.4) - { //dans un cas sur dix - motor (0.7, 1);// tourne à gauche - wait(rand()*3);// pendant un moment - motor (1, 1); // puis tout droit - } - lastPos = position; - wait(1); //attend un moment - } - } - else - { // si cible à proximité - turn(direction(target.position)); - fire(target.position); // et tire deux fois - motor(1,1); // avance - wait(1.5); // pendant 1.5 s - } - } -} - +extern void object::Attack( ) +{ + int list[], i; // liste des objets cherchés + object target; // info sur la cible + point center; // coordonnées du centre de la zone + point lastPos; // dernière position (pr test si bloquée) + float distCent; // rayon de la zone + float r; // valeur aléatoire + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + + center.x = cmdline(0); // prend les coordonnée + center.y = cmdline(1); // du centre de la zone + center.z = 0; // à patrouiller + distCent = cmdline(2); // rayon de la zone + + lastPos = position; // initialise + motor(1,1); // en avant toute + while ( true ) // répète à l'infini + { + target = radar(list, 0, 360, 0, 40); + if (target == null or topo(position)<0)// pas de cible à proximité + { // ou pieds dans l'eau + if (distance2d(position, center) > distCent or topo(position)<0) + { // si la fourmi est en dehors de la zone + motor(0, 0); //s'arrête + wait(0.5); //marque un arrêt + motor (-0.5, -0.5);//recule lentement + wait (1.5); //attend qu'ait reculé + turn(direction(center)); + motor (1, 1); //puis en avant toute + do + { + lastPos = position; + wait(0.5); //tant que pas dans la zone + if (distance2d(lastPos, position) < 0.2) + { //si elle est bloquée par obstacle + turn(rand()*360-180); + motor(1,1); + wait(1); + turn(direction(center)); + } + } + while (distance2d(position, center) > distCent or topo(position)<0); + } + else + { //si elle est bien dans la zone + if (distance2d(lastPos, position) < 0.2) + { //si elle est bloquée par obstacle + turn(rand()*360-180); + motor(1,1); + wait(1); + } + r = rand(); + if (r > 0.6) + { //dans un cas sur dix + motor (1, 0.7);// tourne à droite + wait(rand()*3);// pendant un moment + motor (1, 1); // puis tout droit + } + if (r < 0.4) + { //dans un cas sur dix + motor (0.7, 1);// tourne à gauche + wait(rand()*3);// pendant un moment + motor (1, 1); // puis tout droit + } + lastPos = position; + wait(1); //attend un moment + } + } + else + { // si cible à proximité + turn(direction(target.position)); + fire(target.position); // et tire deux fois + motor(1,1); // avance + wait(1.5); // pendant 1.5 s + } + } +} + diff --git a/ai/anticv.txt b/ai/anticv.txt index bf448920..468197b7 100644 --- a/ai/anticv.txt +++ b/ai/anticv.txt @@ -1,106 +1,106 @@ -extern void object::Attack( ) -{ - int list[], i; // liste des objets cherchés - object target; // info sur la cible - point center; // coordonnées du centre de la zone - point lastPos; // dernière position (pr test si bloquée) - float distCent; // rayon de la zone - float r; // valeur aléatoire - float mp; // vitesse maxi - float minAlt; // altitude minimale (danger lave!) - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - - center.x = cmdline(0); // prend les coordonnée - center.y = cmdline(1); // du centre de la zone - center.z = 0; // à patrouiller - distCent = cmdline(2); // rayon de la zone - mp = 0.4; - minAlt = cmdline(3); - - lastPos = position; // initialise - motor(mp, mp); // en avant toute - while ( true ) // répère à l'infini - { - target = radar(list, 0, 360, 0, 40); - if (target == null or topo(position) distCent or topo(position) distCent or topo(position) 0.6) - { //dans un cas sur dix - motor (mp, mp*0.5);// tourne à droite - wait(rand()*2);// pendant un moment - motor (mp, mp); // puis tout droit - } - if (r < 0.4) - { //dans un cas sur dix - motor (mp*0.5, mp);// tourne à gauche - wait(rand()*2);// pendant un moment - motor (mp, mp); // puis tout droit - } - lastPos = position; - if(r>0.4 and r<0.6) wait(1);//attend un moment - } - } - else - { // si cible à proximité - turn(direction(target.position)); - fire(target.position); // tourne vers la cible - } - } -} +extern void object::Attack( ) +{ + int list[], i; // liste des objets cherchés + object target; // info sur la cible + point center; // coordonnées du centre de la zone + point lastPos; // dernière position (pr test si bloquée) + float distCent; // rayon de la zone + float r; // valeur aléatoire + float mp; // vitesse maxi + float minAlt; // altitude minimale (danger lave!) + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + + center.x = cmdline(0); // prend les coordonnée + center.y = cmdline(1); // du centre de la zone + center.z = 0; // à patrouiller + distCent = cmdline(2); // rayon de la zone + mp = 0.4; + minAlt = cmdline(3); + + lastPos = position; // initialise + motor(mp, mp); // en avant toute + while ( true ) // répère à l'infini + { + target = radar(list, 0, 360, 0, 40); + if (target == null or topo(position) distCent or topo(position) distCent or topo(position) 0.6) + { //dans un cas sur dix + motor (mp, mp*0.5);// tourne à droite + wait(rand()*2);// pendant un moment + motor (mp, mp); // puis tout droit + } + if (r < 0.4) + { //dans un cas sur dix + motor (mp*0.5, mp);// tourne à gauche + wait(rand()*2);// pendant un moment + motor (mp, mp); // puis tout droit + } + lastPos = position; + if(r>0.4 and r<0.6) wait(1);//attend un moment + } + } + else + { // si cible à proximité + turn(direction(target.position)); + fire(target.position); // tourne vers la cible + } + } +} diff --git a/ai/antsurp1.txt b/ai/antsurp1.txt index 71cff213..4d74b696 100644 --- a/ai/antsurp1.txt +++ b/ai/antsurp1.txt @@ -1,48 +1,48 @@ -extern void object::Attack( ) -{ - int list[], i; // liste des objets cherchés - object target; // info sur la cible - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - - while (true) - { - while (radar(list, 0, 360, 0, 20) == null) wait(1); - move(5); - target = radar(list, 0, 360, 0, 40); - while (target != null) - { - fire(target.position); - target = radar(list, 0, 360, 0, 40); - } - turn(90 - orientation); - move(5); - turn(180); - } -} - +extern void object::Attack( ) +{ + int list[], i; // liste des objets cherchés + object target; // info sur la cible + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + + while (true) + { + while (radar(list, 0, 360, 0, 20) == null) wait(1); + move(5); + target = radar(list, 0, 360, 0, 40); + while (target != null) + { + fire(target.position); + target = radar(list, 0, 360, 0, 40); + } + turn(90 - orientation); + move(5); + turn(180); + } +} + diff --git a/ai/antsurp2.txt b/ai/antsurp2.txt index 8d8cdea7..8c70be1b 100644 --- a/ai/antsurp2.txt +++ b/ai/antsurp2.txt @@ -1,40 +1,40 @@ -extern void object::Attack( ) -{ - int list[], i; // liste des objets cherchés - object target; // info sur la cible - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - - while (true) - { - while (radar(list, 0, 360, 0, 40) == null) wait(1); - target = radar(list, 0, 360, 0, 40); - fire(target.position); - } -} - +extern void object::Attack( ) +{ + int list[], i; // liste des objets cherchés + object target; // info sur la cible + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + + while (true) + { + while (radar(list, 0, 360, 0, 40) == null) wait(1); + target = radar(list, 0, 360, 0, 40); + fire(target.position); + } +} + diff --git a/ai/antt41.txt b/ai/antt41.txt index d3408bb3..e59520d9 100644 --- a/ai/antt41.txt +++ b/ai/antt41.txt @@ -1,137 +1,137 @@ -extern void object::Attack( ) -{ - int list[], i; // liste des objets cherchés - object target; // info sur la cible - object queen; // info sur la reine - point center; // coordonnées du centre de la zone - float distCent; // rayon de la zone - float r; // valeur aléatoire - int ifTarget; // si on a trouvé une cible et quel genre - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - - center.x = -65; // prend les coordonnée - center.y = 255; // du centre de la zone - center.z = 0; // à patrouiller - distCent = 140; // rayon de la zone - - motor(1,1); // en avant toute - ifTarget = 0; // pas de cible précise - while ( true ) // répète à l'infini - { - queen = radar(AlienQueen); - if (rand() < 0.2 and queen != null) ifTarget = 2;//on retourne vers la reine - if (queen == null and ifTarget == 2) ifTarget = 0; - target = radar(list, 0, 360, 0, 40); - if (target != null) - { - shoot(target.position); - } - else - { - if (ifTarget == 2) - { - if(distance2d(position, queen.position)>8) head(queen.position); - else ifTarget = 0; - } - else Random(center, distCent); - } - } -} - -void object::head(point tarPos) -{ - float mp;// puissance du moteur - mp = direction(tarPos)/180; - //if (mp>1) mp = 1; - //if (mp<-1) mp = -1; - if (mp>0) - { - motor(1-mp,1); - } - else - { - motor(1,1+mp); - } - wait(1); -} - -void object::Random(point center, float distCent) -{ - if (distance2d(position, center) > distCent or topo(position)<2) - { - HorsZone(center, distCent); - } - else - { - DansZone(); - } -} - -void object::HorsZone(point center, float distCent) -{ // si la fourmi est en dehors de la zone - motor(0, 0); //s'arrête - wait(0.5); //marque un arrêt - motor (-0.5, -0.5);//recule lentement - wait (1.5); //attend qu'ait reculé - turn(direction(center)); - motor (1, 1); //puis en avant toute - do - { - wait(1); //tant que pas dans la zone - } - while (distance2d(position, center) > distCent or topo(position)<2); -} - -void object::DansZone() -{ //si elle est bien dans la zone - float r = rand(); - if (r > 0.6) - { //dans un cas sur dix - motor (1, 0.7); // tourne à droite - wait(rand()*3); // pendant un moment - motor (1, 1); // puis tout droit - } - if (r < 0.4) - { //dans un cas sur dix - motor (0.7, 1); // tourne à gauche - wait(rand()*3); // pendant un moment - motor (1, 1); // puis tout droit - } - motor(1,1); - wait(1); // attend un moment -} - -void object::shoot(point tarPos) -{ // si cible à proximité - turn(direction(tarPos)); - fire(tarPos); // tourne vers la cible - fire(tarPos); // et tire deux fois - motor(1,1); // avance - wait(1.5); // pendant 1.5 s -} +extern void object::Attack( ) +{ + int list[], i; // liste des objets cherchés + object target; // info sur la cible + object queen; // info sur la reine + point center; // coordonnées du centre de la zone + float distCent; // rayon de la zone + float r; // valeur aléatoire + int ifTarget; // si on a trouvé une cible et quel genre + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + + center.x = -65; // prend les coordonnée + center.y = 255; // du centre de la zone + center.z = 0; // à patrouiller + distCent = 140; // rayon de la zone + + motor(1,1); // en avant toute + ifTarget = 0; // pas de cible précise + while ( true ) // répète à l'infini + { + queen = radar(AlienQueen); + if (rand() < 0.2 and queen != null) ifTarget = 2;//on retourne vers la reine + if (queen == null and ifTarget == 2) ifTarget = 0; + target = radar(list, 0, 360, 0, 40); + if (target != null) + { + shoot(target.position); + } + else + { + if (ifTarget == 2) + { + if(distance2d(position, queen.position)>8) head(queen.position); + else ifTarget = 0; + } + else Random(center, distCent); + } + } +} + +void object::head(point tarPos) +{ + float mp;// puissance du moteur + mp = direction(tarPos)/180; + //if (mp>1) mp = 1; + //if (mp<-1) mp = -1; + if (mp>0) + { + motor(1-mp,1); + } + else + { + motor(1,1+mp); + } + wait(1); +} + +void object::Random(point center, float distCent) +{ + if (distance2d(position, center) > distCent or topo(position)<2) + { + HorsZone(center, distCent); + } + else + { + DansZone(); + } +} + +void object::HorsZone(point center, float distCent) +{ // si la fourmi est en dehors de la zone + motor(0, 0); //s'arrête + wait(0.5); //marque un arrêt + motor (-0.5, -0.5);//recule lentement + wait (1.5); //attend qu'ait reculé + turn(direction(center)); + motor (1, 1); //puis en avant toute + do + { + wait(1); //tant que pas dans la zone + } + while (distance2d(position, center) > distCent or topo(position)<2); +} + +void object::DansZone() +{ //si elle est bien dans la zone + float r = rand(); + if (r > 0.6) + { //dans un cas sur dix + motor (1, 0.7); // tourne à droite + wait(rand()*3); // pendant un moment + motor (1, 1); // puis tout droit + } + if (r < 0.4) + { //dans un cas sur dix + motor (0.7, 1); // tourne à gauche + wait(rand()*3); // pendant un moment + motor (1, 1); // puis tout droit + } + motor(1,1); + wait(1); // attend un moment +} + +void object::shoot(point tarPos) +{ // si cible à proximité + turn(direction(tarPos)); + fire(tarPos); // tourne vers la cible + fire(tarPos); // et tire deux fois + motor(1,1); // avance + wait(1.5); // pendant 1.5 s +} diff --git a/ai/antt42.txt b/ai/antt42.txt index 72ce1f54..6c6f5cbe 100644 --- a/ai/antt42.txt +++ b/ai/antt42.txt @@ -1,132 +1,132 @@ -extern void object::Attack( ) -{ - int list[], i; // liste des objets cherchés - object target; // info sur la cible - point center; // coordonnées du centre de la zone - float distCent; // rayon de la zone - float r; // valeur aléatoire - int ifTarget; // si on a trouvé une cible et quel genre - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - - center.x = -65; // prend les coordonnée - center.y = 255; // du centre de la zone - center.z = 0; // à patrouiller - distCent = 140; // rayon de la zone - - motor(1,1); // en avant toute - ifTarget = 0; // pas de cible précise - while ( true ) // répète à l'infini - { - target = radar(list); - if(target.position.y > 65) - { - if(distance2d(position, target.position)<40) - { - shoot(target.position); - } - else - { - head(target.position); - } - } - else Random(center, distCent); - } -} - -void object::head(point tarPos) -{ - float mp;// puissance du moteur - mp = direction(tarPos)/180; - //if (mp>1) mp = 1; - //if (mp<-1) mp = -1; - if (mp>0) - { - motor(1-mp,1); - } - else - { - motor(1,1+mp); - } - wait(1); -} - -void object::Random(point center, float distCent) -{ - if (distance2d(position, center) > distCent or topo(position)<2) - { - HorsZone(center, distCent); - } - else - { - DansZone(); - } -} - -void object::HorsZone(point center, float distCent) -{ // si la fourmi est en dehors de la zone - motor(0, 0); //s'arrête - wait(0.5); //marque un arrêt - motor (-0.5, -0.5);//recule lentement - wait (1.5); //attend qu'ait reculé - turn(direction(center)); - motor (1, 1); //puis en avant toute - do - { - wait(1); //tant que pas dans la zone - } - while (distance2d(position, center) > distCent or topo(position)<2); -} - -void object::DansZone() -{ //si elle est bien dans la zone - float r = rand(); - if (r > 0.8) - { //dans un cas sur dix - motor (1, 0.8); // tourne à droite - wait(rand()*2); // pendant un moment - motor (1, 1); // puis tout droit - } - if (r < 0.2) - { //dans un cas sur dix - motor (0.8, 1); // tourne à gauche - wait(rand()*2); // pendant un moment - motor (1, 1); // puis tout droit - } - motor(1,1); - wait(1); //attend un moment -} - -void object::shoot(point tarPos) -{ // si cible à proximité - turn(direction(tarPos)); - fire(tarPos); // tourne vers la cible - fire(tarPos); // et tire deux fois - motor(1,1); // avance - wait(1.5); // pendant 1.5 s -} +extern void object::Attack( ) +{ + int list[], i; // liste des objets cherchés + object target; // info sur la cible + point center; // coordonnées du centre de la zone + float distCent; // rayon de la zone + float r; // valeur aléatoire + int ifTarget; // si on a trouvé une cible et quel genre + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + + center.x = -65; // prend les coordonnée + center.y = 255; // du centre de la zone + center.z = 0; // à patrouiller + distCent = 140; // rayon de la zone + + motor(1,1); // en avant toute + ifTarget = 0; // pas de cible précise + while ( true ) // répète à l'infini + { + target = radar(list); + if(target.position.y > 65) + { + if(distance2d(position, target.position)<40) + { + shoot(target.position); + } + else + { + head(target.position); + } + } + else Random(center, distCent); + } +} + +void object::head(point tarPos) +{ + float mp;// puissance du moteur + mp = direction(tarPos)/180; + //if (mp>1) mp = 1; + //if (mp<-1) mp = -1; + if (mp>0) + { + motor(1-mp,1); + } + else + { + motor(1,1+mp); + } + wait(1); +} + +void object::Random(point center, float distCent) +{ + if (distance2d(position, center) > distCent or topo(position)<2) + { + HorsZone(center, distCent); + } + else + { + DansZone(); + } +} + +void object::HorsZone(point center, float distCent) +{ // si la fourmi est en dehors de la zone + motor(0, 0); //s'arrête + wait(0.5); //marque un arrêt + motor (-0.5, -0.5);//recule lentement + wait (1.5); //attend qu'ait reculé + turn(direction(center)); + motor (1, 1); //puis en avant toute + do + { + wait(1); //tant que pas dans la zone + } + while (distance2d(position, center) > distCent or topo(position)<2); +} + +void object::DansZone() +{ //si elle est bien dans la zone + float r = rand(); + if (r > 0.8) + { //dans un cas sur dix + motor (1, 0.8); // tourne à droite + wait(rand()*2); // pendant un moment + motor (1, 1); // puis tout droit + } + if (r < 0.2) + { //dans un cas sur dix + motor (0.8, 1); // tourne à gauche + wait(rand()*2); // pendant un moment + motor (1, 1); // puis tout droit + } + motor(1,1); + wait(1); //attend un moment +} + +void object::shoot(point tarPos) +{ // si cible à proximité + turn(direction(tarPos)); + fire(tarPos); // tourne vers la cible + fire(tarPos); // et tire deux fois + motor(1,1); // avance + wait(1.5); // pendant 1.5 s +} diff --git a/ai/antt43.txt b/ai/antt43.txt index 236de513..6589aa64 100644 --- a/ai/antt43.txt +++ b/ai/antt43.txt @@ -1,132 +1,132 @@ -extern void object::Attack( ) -{ - int list[], i; // liste des objets cherchés - object target; // info sur la cible - point center; // coordonnées du centre de la zone - float distCent; // rayon de la zone - float r; // valeur aléatoire - int ifTarget; // si on a trouvé une cible et quel genre - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - - center.x = -65; // prend les coordonnée - center.y = 255; // du centre de la zone - center.z = 0; // à patrouiller - distCent = 140; // rayon de la zone - - motor(1,1); // en avant toute - ifTarget = 0; // pas de cible précise - while ( true ) // répète à l'infini - { - target = radar(list); - if(target.position.y > 180) - { - if(distance2d(position, target.position)<40) - { - shoot(target.position); - } - else - { - head(target.position); - } - } - else Random(center, distCent); - } -} - -void object::head(point tarPos) -{ - float mp;// puissance du moteur - mp = direction(tarPos)/180; - //if (mp>1) mp = 1; - //if (mp<-1) mp = -1; - if (mp>0) - { - motor(1-mp,1); - } - else - { - motor(1,1+mp); - } - wait(1); -} - -void object::Random(point center, float distCent) -{ - if (distance2d(position, center) > distCent or topo(position)<2) - { - HorsZone(center, distCent); - } - else - { - DansZone(); - } -} - -void object::HorsZone(point center, float distCent) -{ // si la fourmi est en dehors de la zone - motor(0, 0); //s'arrête - wait(0.5); //marque un arrêt - motor (-0.5, -0.5);//recule lentement - wait (1.5); //attend qu'ait reculé - turn(direction(center)); - motor (1, 1); //puis en avant toute - do - { - wait(1); //tant que pas dans la zone - } - while (distance2d(position, center) > distCent or topo(position)<2); -} - -void object::DansZone() -{ //si elle est bien dans la zone - float r = rand(); - if (r > 0.8) - { //dans un cas sur dix - motor (1, 0.8); // tourne à droite - wait(rand()*2); // pendant un moment - motor (1, 1); // puis tout droit - } - if (r < 0.2) - { //dans un cas sur dix - motor (0.8, 1); // tourne à gauche - wait(rand()*2); // pendant un moment - motor (1, 1); // puis tout droit - } - motor(1,1); - wait(1); // attend un moment -} - -void object::shoot(point tarPos) -{ // si cible à proximité - turn(direction(tarPos)); - fire(tarPos); // tourne vers la cible - fire(tarPos); // et tire deux fois - motor(1,1); // avance - wait(1.5); // pendant 1.5 s -} +extern void object::Attack( ) +{ + int list[], i; // liste des objets cherchés + object target; // info sur la cible + point center; // coordonnées du centre de la zone + float distCent; // rayon de la zone + float r; // valeur aléatoire + int ifTarget; // si on a trouvé une cible et quel genre + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + + center.x = -65; // prend les coordonnée + center.y = 255; // du centre de la zone + center.z = 0; // à patrouiller + distCent = 140; // rayon de la zone + + motor(1,1); // en avant toute + ifTarget = 0; // pas de cible précise + while ( true ) // répète à l'infini + { + target = radar(list); + if(target.position.y > 180) + { + if(distance2d(position, target.position)<40) + { + shoot(target.position); + } + else + { + head(target.position); + } + } + else Random(center, distCent); + } +} + +void object::head(point tarPos) +{ + float mp;// puissance du moteur + mp = direction(tarPos)/180; + //if (mp>1) mp = 1; + //if (mp<-1) mp = -1; + if (mp>0) + { + motor(1-mp,1); + } + else + { + motor(1,1+mp); + } + wait(1); +} + +void object::Random(point center, float distCent) +{ + if (distance2d(position, center) > distCent or topo(position)<2) + { + HorsZone(center, distCent); + } + else + { + DansZone(); + } +} + +void object::HorsZone(point center, float distCent) +{ // si la fourmi est en dehors de la zone + motor(0, 0); //s'arrête + wait(0.5); //marque un arrêt + motor (-0.5, -0.5);//recule lentement + wait (1.5); //attend qu'ait reculé + turn(direction(center)); + motor (1, 1); //puis en avant toute + do + { + wait(1); //tant que pas dans la zone + } + while (distance2d(position, center) > distCent or topo(position)<2); +} + +void object::DansZone() +{ //si elle est bien dans la zone + float r = rand(); + if (r > 0.8) + { //dans un cas sur dix + motor (1, 0.8); // tourne à droite + wait(rand()*2); // pendant un moment + motor (1, 1); // puis tout droit + } + if (r < 0.2) + { //dans un cas sur dix + motor (0.8, 1); // tourne à gauche + wait(rand()*2); // pendant un moment + motor (1, 1); // puis tout droit + } + motor(1,1); + wait(1); // attend un moment +} + +void object::shoot(point tarPos) +{ // si cible à proximité + turn(direction(tarPos)); + fire(tarPos); // tourne vers la cible + fire(tarPos); // et tire deux fois + motor(1,1); // avance + wait(1.5); // pendant 1.5 s +} diff --git a/ai/charge1.txt b/ai/charge1.txt index f676b523..d95d9d08 100644 --- a/ai/charge1.txt +++ b/ai/charge1.txt @@ -1,13 +1,13 @@ -extern void object::Recharge1() -{ - point start; // variable for initial pos. - object item; // info. about power station - - start = position; // store initial position - - item = radar(PowerStation); // look for station - goto(item.position); // go to the power station - wait(5); // wait 5 seconds - - goto(start); // go back to initial pos. -} +extern void object::Recharge1() +{ + point start; // variable for initial pos. + object item; // info. about power station + + start = position; // store initial position + + item = radar(PowerStation); // look for station + goto(item.position); // go to the power station + wait(5); // wait 5 seconds + + goto(start); // go back to initial pos. +} diff --git a/ai/charge2.txt b/ai/charge2.txt index b0e3487d..7fefae8c 100644 --- a/ai/charge2.txt +++ b/ai/charge2.txt @@ -1,18 +1,18 @@ -extern void object::Recharge2() -{ - point start; // variable for initial pos. - object item; // info. about power station - - start = position; // store initial position - - item = radar(PowerStation); // look for station - goto(item.position); // go to the power station - - while ( energyCell.energyLevel < 1 ) - { - wait(1); // wait until recharged - } - - goto(start); // go back to initial pos. - message("Recharge completed"); -} +extern void object::Recharge2() +{ + point start; // variable for initial pos. + object item; // info. about power station + + start = position; // store initial position + + item = radar(PowerStation); // look for station + goto(item.position); // go to the power station + + while ( energyCell.energyLevel < 1 ) + { + wait(1); // wait until recharged + } + + goto(start); // go back to initial pos. + message("Recharge completed"); +} diff --git a/ai/charge3.txt b/ai/charge3.txt index 855726b9..3c91822f 100644 --- a/ai/charge3.txt +++ b/ai/charge3.txt @@ -1,18 +1,18 @@ -extern void object::Recharge3() -{ - point start; // variable for initial pos. - object item; // info. about power station - - start = position; // store initial position - - item = radar(PowerCaptor); // look for station - goto(item.position); // go to the power station - - while ( energyCell.energyLevel < 1 ) - { - wait(1); // wait until recharged - } - - goto(start); // go back to initial pos. - message("Recharge completed"); -} +extern void object::Recharge3() +{ + point start; // variable for initial pos. + object item; // info. about power station + + start = position; // store initial position + + item = radar(PowerCaptor); // look for station + goto(item.position); // go to the power station + + while ( energyCell.energyLevel < 1 ) + { + wait(1); // wait until recharged + } + + goto(start); // go back to initial pos. + message("Recharge completed"); +} diff --git a/ai/convert.txt b/ai/convert.txt index 65657ac8..48834ca2 100644 --- a/ai/convert.txt +++ b/ai/convert.txt @@ -1,57 +1,57 @@ -extern void object::Convert( ) -{ - object p; - point pConvert; - - p = radar(Converter); - if ( p == null ) - { - message("Vous devez d'abord construire un convertisseur"); - return; - } - pConvert = p.position; - - while ( true ) - { - if ( load.category != TitaniumOre ) - { - p = radar(TitaniumOre); - if ( p == null ) - { - message("Minerai pas trouvé"); - return; - } - goto(p.position); - grab(); // prend minerai - - p = radar(Converter); - if ( p == null ) - { - message("Convertisseur pas trouvé"); - return; - } - goto(p.position); - drop(); // dépose minerai - move(-4); - wait(15); // attend conversion - move(4); - grab(); // prend métal - move(-4); - } - - p = radar(SpaceShip); - if ( p == null ) - { - message("Vaisseau spatial pas trouvé"); - return; - } - goto(p.position); - drop(); // dépose minerai - - if ( energyCell.energyLevel < 0.25 ) - { - message("Veuillez changer la pile"); - return; - } - } -} +extern void object::Convert( ) +{ + object p; + point pConvert; + + p = radar(Converter); + if ( p == null ) + { + message("Vous devez d'abord construire un convertisseur"); + return; + } + pConvert = p.position; + + while ( true ) + { + if ( load.category != TitaniumOre ) + { + p = radar(TitaniumOre); + if ( p == null ) + { + message("Minerai pas trouvé"); + return; + } + goto(p.position); + grab(); // prend minerai + + p = radar(Converter); + if ( p == null ) + { + message("Convertisseur pas trouvé"); + return; + } + goto(p.position); + drop(); // dépose minerai + move(-4); + wait(15); // attend conversion + move(4); + grab(); // prend métal + move(-4); + } + + p = radar(SpaceShip); + if ( p == null ) + { + message("Vaisseau spatial pas trouvé"); + return; + } + goto(p.position); + drop(); // dépose minerai + + if ( energyCell.energyLevel < 0.25 ) + { + message("Veuillez changer la pile"); + return; + } + } +} diff --git a/ai/exchg1.txt b/ai/exchg1.txt index 1e0f1284..da8534b3 100644 --- a/ai/exchg1.txt +++ b/ai/exchg1.txt @@ -1,11 +1,11 @@ -extern void object::SwitchCell1() -{ - grab(InFront); // take the new cell in front - drop(Behind); // and drop it behind - - grab(EnergyCell); // take the cell from the bot - drop(InFront); // and drop it in front - - grab(Behind); // take the new cell - drop(EnergyCell); // and drop it on the bot -} +extern void object::SwitchCell1() +{ + grab(InFront); // take the new cell in front + drop(Behind); // and drop it behind + + grab(EnergyCell); // take the cell from the bot + drop(InFront); // and drop it in front + + grab(Behind); // take the new cell + drop(EnergyCell); // and drop it on the bot +} diff --git a/ai/flash.txt b/ai/flash.txt index f84668fd..0d89e989 100644 --- a/ai/flash.txt +++ b/ai/flash.txt @@ -1,8 +1,8 @@ -extern void object::Flash( ) -{ - while ( true ) - { - if ( energyCell.energyLevel == 0 ) break; - wait(1); - } -} +extern void object::Flash( ) +{ + while ( true ) + { + if ( energyCell.energyLevel == 0 ) break; + wait(1); + } +} diff --git a/ai/human01.txt b/ai/human01.txt index 55d87ede..caf1dfee 100644 --- a/ai/human01.txt +++ b/ai/human01.txt @@ -1,47 +1,47 @@ -extern void object::Activity( ) -{ - float d1, d2; - - errmode(0); // ne stoppe pas si erreur - - while ( true ) - { - d1 = 2+rand()*2; - d2 = 1+rand()*3; - - turn(-50); - turn(110); - turn(30); - move(d1); - wait(0.5); - turn(-90); - if ( rand() < 0.5 ) - { - wait(2+rand()*2); - } - else - { - turn(-60); - turn(110); - turn(-50); - } - turn(-90); - move(d1+d2); - wait(0.5); - turn(90); - if ( rand() < 0.5 ) - { - wait(2+rand()*2); - } - else - { - turn(-30); - turn(60); - turn(-30); - } - turn(90); - move(d2); - wait(0.5); - turn(-90); - } -} +extern void object::Activity( ) +{ + float d1, d2; + + errmode(0); // ne stoppe pas si erreur + + while ( true ) + { + d1 = 2+rand()*2; + d2 = 1+rand()*3; + + turn(-50); + turn(110); + turn(30); + move(d1); + wait(0.5); + turn(-90); + if ( rand() < 0.5 ) + { + wait(2+rand()*2); + } + else + { + turn(-60); + turn(110); + turn(-50); + } + turn(-90); + move(d1+d2); + wait(0.5); + turn(90); + if ( rand() < 0.5 ) + { + wait(2+rand()*2); + } + else + { + turn(-30); + turn(60); + turn(-30); + } + turn(90); + move(d2); + wait(0.5); + turn(-90); + } +} diff --git a/ai/human02.txt b/ai/human02.txt index 7a60a1c1..b8533e8b 100644 --- a/ai/human02.txt +++ b/ai/human02.txt @@ -1,16 +1,16 @@ -extern void object::Activity( ) -{ - errmode(0); // ne stoppe pas si erreur - - while ( true ) - { - turn(-144); - move(2); - turn(-90); - wait(5+rand()*8); - turn(-90); - move(2); - turn(-36); - wait(2+rand()*5); - } -} +extern void object::Activity( ) +{ + errmode(0); // ne stoppe pas si erreur + + while ( true ) + { + turn(-144); + move(2); + turn(-90); + wait(5+rand()*8); + turn(-90); + move(2); + turn(-36); + wait(2+rand()*5); + } +} diff --git a/ai/human03.txt b/ai/human03.txt index ffc8774f..64977eaa 100644 --- a/ai/human03.txt +++ b/ai/human03.txt @@ -1,22 +1,22 @@ -extern void object::Activity( ) -{ - float dist; - - errmode(0); // ne stoppe pas si erreur - - while ( true ) - { - dist = 2+rand()*3; - - turn(90); - move(dist); - wait(0.5); - turn(-90); - wait(2+rand()*3); - turn(-90); - move(dist); - wait(0.5); - turn(90); - wait(1+rand()*1); - } -} +extern void object::Activity( ) +{ + float dist; + + errmode(0); // ne stoppe pas si erreur + + while ( true ) + { + dist = 2+rand()*3; + + turn(90); + move(dist); + wait(0.5); + turn(-90); + wait(2+rand()*3); + turn(-90); + move(dist); + wait(0.5); + turn(90); + wait(1+rand()*1); + } +} diff --git a/ai/human04.txt b/ai/human04.txt index 247a77e9..02a36bba 100644 --- a/ai/human04.txt +++ b/ai/human04.txt @@ -1,10 +1,10 @@ -extern void object::Activity( ) -{ - errmode(0); // ne stoppe pas si erreur - - while ( true ) - { - goto(15,-6, 0,0,1); - goto(2,-6, 0,0,1); - } -} +extern void object::Activity( ) +{ + errmode(0); // ne stoppe pas si erreur + + while ( true ) + { + goto(15,-6, 0,0,1); + goto(2,-6, 0,0,1); + } +} diff --git a/ai/human05.txt b/ai/human05.txt index 7521fed6..52cbe85d 100644 --- a/ai/human05.txt +++ b/ai/human05.txt @@ -1,13 +1,13 @@ -extern void object::Activity( ) -{ - errmode(0); // ne stoppe pas si erreur - - while ( true ) - { - wait(2); - goto(-13,-16, 0,0,1); - turn(180); - goto(14,-12, 0,0,1); - turn(180); - } -} +extern void object::Activity( ) +{ + errmode(0); // ne stoppe pas si erreur + + while ( true ) + { + wait(2); + goto(-13,-16, 0,0,1); + turn(180); + goto(14,-12, 0,0,1); + turn(180); + } +} diff --git a/ai/human06.txt b/ai/human06.txt index d7d5fbd1..38965523 100644 --- a/ai/human06.txt +++ b/ai/human06.txt @@ -1,29 +1,29 @@ -extern void object::Activity( ) -{ - errmode(0); // ne stoppe pas si erreur - - while ( true ) - { - goto(-10,-12, 0,0,1); - wait(1); - grab(); - turn(180); - goto( -3,-12, 0,0,1); - drop(); - wait(1); - turn(180); - - goto(-10,-12, 0,0,1); - turn(180); - goto( -3,-12, 0,0,1); - wait(1); - grab(); - turn(180); - - goto(-10,-12, 0,0,1); - drop(); - turn(180); - goto( -3,-12, 0,0,1); - turn(180); - } -} +extern void object::Activity( ) +{ + errmode(0); // ne stoppe pas si erreur + + while ( true ) + { + goto(-10,-12, 0,0,1); + wait(1); + grab(); + turn(180); + goto( -3,-12, 0,0,1); + drop(); + wait(1); + turn(180); + + goto(-10,-12, 0,0,1); + turn(180); + goto( -3,-12, 0,0,1); + wait(1); + grab(); + turn(180); + + goto(-10,-12, 0,0,1); + drop(); + turn(180); + goto( -3,-12, 0,0,1); + turn(180); + } +} diff --git a/ai/human07.txt b/ai/human07.txt index 4510eb35..43f27e9b 100644 --- a/ai/human07.txt +++ b/ai/human07.txt @@ -1,23 +1,23 @@ -extern void object::Activity( ) -{ - errmode(0); // ne stoppe pas si erreur - - while ( true ) - { - motor(-0.2, 0.2); - wait(1); - motor(0.2, -0.2); - wait(1); - motor(0, 0); - wait(4); - - motor(0.4, -0.4); - wait(2); - motor(0, 0); - wait(1); - motor(-0.4, 0.4); - wait(2); - motor(0, 0); - wait(1); - } -} +extern void object::Activity( ) +{ + errmode(0); // ne stoppe pas si erreur + + while ( true ) + { + motor(-0.2, 0.2); + wait(1); + motor(0.2, -0.2); + wait(1); + motor(0, 0); + wait(4); + + motor(0.4, -0.4); + wait(2); + motor(0, 0); + wait(1); + motor(-0.4, 0.4); + wait(2); + motor(0, 0); + wait(1); + } +} diff --git a/ai/kill1.txt b/ai/kill1.txt index 1672745e..708ca081 100644 --- a/ai/kill1.txt +++ b/ai/kill1.txt @@ -1,18 +1,18 @@ -extern void object::KillAnt1() -{ - object item; // info. about object - - goto(-30, 0); // go west - aim(0); // aim straight - - while ( true ) // repeat forever: - { - item = radar(AlienAnt, 0, 360, 0, 40); - if ( item != null ) // ant detected ? - { - turn(direction(item.position)); - fire(0.5); // shoot 0.5 s - } - wait(1); // wait 1 second - } -} +extern void object::KillAnt1() +{ + object item; // info. about object + + goto(-30, 0); // go west + aim(0); // aim straight + + while ( true ) // repeat forever: + { + item = radar(AlienAnt, 0, 360, 0, 40); + if ( item != null ) // ant detected ? + { + turn(direction(item.position)); + fire(0.5); // shoot 0.5 s + } + wait(1); // wait 1 second + } +} diff --git a/ai/lady01.txt b/ai/lady01.txt index fb9cce93..8612edf3 100644 --- a/ai/lady01.txt +++ b/ai/lady01.txt @@ -1,48 +1,48 @@ -extern void object::Produce( ) -{ - point path[4]; - int i; - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - path[0].x = cmdline(0); - path[0].y = cmdline(1); - path[1].x = cmdline(2); - path[1].y = cmdline(3); - path[2].x = cmdline(4); - path[2].y = cmdline(5); - path[3].x = cmdline(6); - path[3].y = cmdline(7); - - i = 1; - while ( true ) - { - goto(path[i%4]); - - if ( i%5 == 4 && WaspCount() < 2 ) - { - produce(position, orientation, AlienWasp, "wasp01.txt"); - } - - i ++; - } -} - -int object::WaspCount() -{ - object item; - int total = 0; - int i = 0; - - while ( true ) - { - item = retobject(i++); - if ( item == null ) return total; - - if ( item.category == AlienWasp ) - { - total ++; - } - } -} +extern void object::Produce( ) +{ + point path[4]; + int i; + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + path[0].x = cmdline(0); + path[0].y = cmdline(1); + path[1].x = cmdline(2); + path[1].y = cmdline(3); + path[2].x = cmdline(4); + path[2].y = cmdline(5); + path[3].x = cmdline(6); + path[3].y = cmdline(7); + + i = 1; + while ( true ) + { + goto(path[i%4]); + + if ( i%5 == 4 && WaspCount() < 2 ) + { + produce(position, orientation, AlienWasp, "wasp01.txt"); + } + + i ++; + } +} + +int object::WaspCount() +{ + object item; + int total = 0; + int i = 0; + + while ( true ) + { + item = retobject(i++); + if ( item == null ) return total; + + if ( item.category == AlienWasp ) + { + total ++; + } + } +} diff --git a/ai/lady02.txt b/ai/lady02.txt index 775c1d3e..22b3ee2e 100644 --- a/ai/lady02.txt +++ b/ai/lady02.txt @@ -1,74 +1,74 @@ -extern void object::Produce( ) -{ - point path[7]; - int i; - float r; - - errmode(0); // ne stoppe pas si erreur - ipf(10); // 10 instructions / second - while ( ismovie() != 0 ) wait(1); - - path[0].x = cmdline(0); - path[0].y = cmdline(1); - path[1].x = cmdline(2); - path[1].y = cmdline(3); - path[2].x = cmdline(4); - path[2].y = cmdline(5); - path[3].x = cmdline(6); - path[3].y = cmdline(7); - path[4].x = cmdline(8); - path[4].y = cmdline(9); - path[5].x = cmdline(10); - path[5].y = cmdline(11); - path[6].x = cmdline(12); - path[6].y = cmdline(13); - - i = 1; - while ( true ) - { - goto(path[i%7]); - - if ( rand() < 0.2 ) // attaqueuse 1x / 5 - { - produce(position, orientation, AlienAnt, "antattsw.txt"); - } - else - { - if ( AlienCount() < 10 ) - { - r = rand(); - if( r < 0.3 ) - { - produce(position, orientation, AlienAnt, "antt41.txt"); - } - if( r >= 0.6 ) - { - produce(position, orientation, AlienAnt, "antt42.txt"); - } - if( r < 0.6 and r >= 0.3 ) - { - produce(position, orientation, AlienAnt, "antt43.txt"); - } - } - } - i ++; - } -} - -int object::AlienCount() -{ - object item; - int total = 0; - int i = 0; - - while ( true ) - { - item = retobject(i++); - if ( item == null ) return total; - - if ( item.category == AlienAnt ) - { - total ++; - } - } -} +extern void object::Produce( ) +{ + point path[7]; + int i; + float r; + + errmode(0); // ne stoppe pas si erreur + ipf(10); // 10 instructions / second + while ( ismovie() != 0 ) wait(1); + + path[0].x = cmdline(0); + path[0].y = cmdline(1); + path[1].x = cmdline(2); + path[1].y = cmdline(3); + path[2].x = cmdline(4); + path[2].y = cmdline(5); + path[3].x = cmdline(6); + path[3].y = cmdline(7); + path[4].x = cmdline(8); + path[4].y = cmdline(9); + path[5].x = cmdline(10); + path[5].y = cmdline(11); + path[6].x = cmdline(12); + path[6].y = cmdline(13); + + i = 1; + while ( true ) + { + goto(path[i%7]); + + if ( rand() < 0.2 ) // attaqueuse 1x / 5 + { + produce(position, orientation, AlienAnt, "antattsw.txt"); + } + else + { + if ( AlienCount() < 10 ) + { + r = rand(); + if( r < 0.3 ) + { + produce(position, orientation, AlienAnt, "antt41.txt"); + } + if( r >= 0.6 ) + { + produce(position, orientation, AlienAnt, "antt42.txt"); + } + if( r < 0.6 and r >= 0.3 ) + { + produce(position, orientation, AlienAnt, "antt43.txt"); + } + } + } + i ++; + } +} + +int object::AlienCount() +{ + object item; + int total = 0; + int i = 0; + + while ( true ) + { + item = retobject(i++); + if ( item == null ) return total; + + if ( item.category == AlienAnt ) + { + total ++; + } + } +} diff --git a/ai/run1.txt b/ai/run1.txt index d61a7bf4..ee95ba50 100644 --- a/ai/run1.txt +++ b/ai/run1.txt @@ -1,49 +1,49 @@ -extern void object::Run() -{ - point circuit[]; - int i, max; - - i = 0; - circuit[i].x = 35; circuit[i].y = 55; circuit[i++].z = 10; - circuit[i].x = 37; circuit[i].y = 90; circuit[i++].z = 10; - circuit[i].x = 98; circuit[i].y = 82; circuit[i++].z = 10; - circuit[i].x = 134; circuit[i].y = 104; circuit[i++].z = 10; - circuit[i].x = 112; circuit[i].y = 161; circuit[i++].z = 10; - circuit[i].x = 148; circuit[i].y = 190; circuit[i++].z = 10; - circuit[i].x = 205; circuit[i].y = 216; circuit[i++].z = 10; - circuit[i].x = 244; circuit[i].y = 219; circuit[i++].z = 10; - circuit[i].x = 255; circuit[i].y = 76; circuit[i++].z = 4; - circuit[i].x = 185; circuit[i].y = 45; circuit[i++].z = 10; - circuit[i].x = 162; circuit[i].y = -1; circuit[i++].z = 10; - circuit[i].x = 139; circuit[i].y = -45; circuit[i++].z = 90; - circuit[i].x = 165; circuit[i].y = -80; circuit[i++].z = 10; - circuit[i].x = 235; circuit[i].y =-134; circuit[i++].z = 10; - circuit[i].x = 226; circuit[i].y =-203; circuit[i++].z = 10; - circuit[i].x = 185; circuit[i].y =-262; circuit[i++].z = 90; - circuit[i].x = 173; circuit[i].y =-300; circuit[i++].z = 90; - circuit[i].x = 144; circuit[i].y =-340; circuit[i++].z = 90; - circuit[i].x = 35; circuit[i].y =-322; circuit[i++].z = 10; - circuit[i].x = -27; circuit[i].y =-240; circuit[i++].z = 10; - circuit[i].x = -87; circuit[i].y =-250; circuit[i++].z = 10; - circuit[i].x =-137; circuit[i].y =-259; circuit[i++].z = 10; - circuit[i].x =-182; circuit[i].y =-274; circuit[i++].z = 10; - max = i; - -// for ( i=0 ; i 25 ) prox = 25; - dest.x = (position.x-p.position.x)*prox/dist + p.position.x; - dest.y = (position.y-p.position.y)*prox/dist + p.position.y; - dest.z = (position.z-p.position.z)*prox/dist + p.position.z; - goto(dest); - } - } - } -} +extern void object::Attack( ) +{ + int list[]; + int i; + object p; + float dist, prox; + point dest; + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + list[i++] = Derrick; + list[i++] = BotFactory; + list[i++] = PowerStation; + list[i++] = Converter; + list[i++] = RepairCenter; + list[i++] = DefenseTower; + list[i++] = AlienNest; + list[i++] = ResearchCenter; + list[i++] = RadarStation; + list[i++] = ExchangePost; + list[i++] = PowerPlant; + list[i++] = AutoLab; + list[i++] = NuclearPlant; + + while ( true ) + { + p = radar(list, 0, 360, 0, 30); + if ( p == null ) + { + wait(2); + } + else + { + dist = distance(p.position, position); + if ( dist <= 10 ) + { + fire(); + } + else + { + prox = dist-5; + if ( prox > 25 ) prox = 25; + dest.x = (position.x-p.position.x)*prox/dist + p.position.x; + dest.y = (position.y-p.position.y)*prox/dist + p.position.y; + dest.z = (position.z-p.position.z)*prox/dist + p.position.z; + goto(dest); + } + } + } +} diff --git a/ai/spider03.txt b/ai/spider03.txt index b290313f..584ad068 100644 --- a/ai/spider03.txt +++ b/ai/spider03.txt @@ -1,59 +1,59 @@ -extern void object::Attack( ) -{ - int list[], i; - object p; - float dist, prox; - point nav1, nav2, dest; - boolean advance = true; - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - - nav1.x = cmdline(0); - nav1.y = cmdline(1); - nav2.x = cmdline(2); - nav2.y = cmdline(3); - - while ( true ) - { - while ( true ) - { - p = radar(list, 0, 360, 0, 10); - if ( p == null ) break; - fire(); - } - goto(nav1); - - while ( true ) - { - p = radar(list, 0, 360, 0, 10); - if ( p == null ) break; - fire(); - } - goto(nav2); - } -} +extern void object::Attack( ) +{ + int list[], i; + object p; + float dist, prox; + point nav1, nav2, dest; + boolean advance = true; + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + + nav1.x = cmdline(0); + nav1.y = cmdline(1); + nav2.x = cmdline(2); + nav2.y = cmdline(3); + + while ( true ) + { + while ( true ) + { + p = radar(list, 0, 360, 0, 10); + if ( p == null ) break; + fire(); + } + goto(nav1); + + while ( true ) + { + p = radar(list, 0, 360, 0, 10); + if ( p == null ) break; + fire(); + } + goto(nav2); + } +} diff --git a/ai/spidict.txt b/ai/spidict.txt index d2491382..d584bfba 100644 --- a/ai/spidict.txt +++ b/ai/spidict.txt @@ -1,102 +1,102 @@ -extern void object::Attack( ) -{ - int list[], i; // liste des objets cherchés - object target; // info sur la cible - point center; // coordonnées du centre de la zone - point lastPos; // dernière position (pr test si bloquée) - float distCent; // rayon de la zone - float r; // valeur aléatoire - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - - center.x = cmdline(0); // prend les coordonnée - center.y = cmdline(1); // du centre de la zone - center.z = 0; // à patrouiller - distCent = cmdline(2); // rayon de la zone - - lastPos = position; // initialise - motor(1,1); // en avant toute - while ( true ) // répère à l'infini - { - target = radar(list, 0, 360, 0, 10); - if (target == null or topo(position)<0)// pas de cible à proximité - { // ou pieds dans l'eau - if (distance2d(position, center) > distCent or topo(position)<0) - { // si la fourmi est en dehors de la zone - motor(0, 0); //s'arrête - wait(0.5); //marque un arrêt - motor (-0.5, -0.5);//recule lentement - wait (1.5); //attend qu'ait reculé - turn(direction(center)); - motor (1, 1); //puis en avant toute - do - { - lastPos = position; - wait(1); //tant que pas dans la zone - if (distance2d(lastPos, position) < 0.2) - { //si elle est bloquée par obstacle - turn(rand()*360-180); - motor(1,1); - wait(1); - turn(direction(center)); - } - } - while (distance2d(position, center) > distCent or topo(position)<0); - } - else - { //si elle est bien dans la zone - if (distance2d(lastPos, position) < 0.2) - { //si elle est bloquée par obstacle - turn(rand()*360-180); - motor(1,1); - wait(1); - } - r = rand(); - if (r > 0.6) - { //dans un cas sur dix - motor (1, 0.7);// tourne à droite - wait(rand()*3);// pendant un moment - motor (1, 1); // puis tout droit - } - if (r < 0.4) - { //dans un cas sur dix - motor (0.7, 1);// tourne à gauche - wait(rand()*3);// pendant un moment - motor (1, 1); // puis tout droit - } - lastPos = position; - wait(1); //attend un moment - } - } - else - { // si cible à proximité - fire(); - } - } -} - +extern void object::Attack( ) +{ + int list[], i; // liste des objets cherchés + object target; // info sur la cible + point center; // coordonnées du centre de la zone + point lastPos; // dernière position (pr test si bloquée) + float distCent; // rayon de la zone + float r; // valeur aléatoire + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + + center.x = cmdline(0); // prend les coordonnée + center.y = cmdline(1); // du centre de la zone + center.z = 0; // à patrouiller + distCent = cmdline(2); // rayon de la zone + + lastPos = position; // initialise + motor(1,1); // en avant toute + while ( true ) // répère à l'infini + { + target = radar(list, 0, 360, 0, 10); + if (target == null or topo(position)<0)// pas de cible à proximité + { // ou pieds dans l'eau + if (distance2d(position, center) > distCent or topo(position)<0) + { // si la fourmi est en dehors de la zone + motor(0, 0); //s'arrête + wait(0.5); //marque un arrêt + motor (-0.5, -0.5);//recule lentement + wait (1.5); //attend qu'ait reculé + turn(direction(center)); + motor (1, 1); //puis en avant toute + do + { + lastPos = position; + wait(1); //tant que pas dans la zone + if (distance2d(lastPos, position) < 0.2) + { //si elle est bloquée par obstacle + turn(rand()*360-180); + motor(1,1); + wait(1); + turn(direction(center)); + } + } + while (distance2d(position, center) > distCent or topo(position)<0); + } + else + { //si elle est bien dans la zone + if (distance2d(lastPos, position) < 0.2) + { //si elle est bloquée par obstacle + turn(rand()*360-180); + motor(1,1); + wait(1); + } + r = rand(); + if (r > 0.6) + { //dans un cas sur dix + motor (1, 0.7);// tourne à droite + wait(rand()*3);// pendant un moment + motor (1, 1); // puis tout droit + } + if (r < 0.4) + { //dans un cas sur dix + motor (0.7, 1);// tourne à gauche + wait(rand()*3);// pendant un moment + motor (1, 1); // puis tout droit + } + lastPos = position; + wait(1); //attend un moment + } + } + else + { // si cible à proximité + fire(); + } + } +} + diff --git a/ai/strain1.txt b/ai/strain1.txt index 78704a2b..c54326cf 100644 --- a/ai/strain1.txt +++ b/ai/strain1.txt @@ -1,20 +1,20 @@ -extern void object::Attack( ) -{ - point traject[10]; - int nb, i; - - errmode(0); - nb = cmdline(0)+1; - - traject[0] = position; - for ( i=1 ; i 9) - { - jet(-1); - } - - wait(0.2); - } - - fire(1); - } - -} - +extern void object::Solution() +{ + + object item; + + aim(-20); + + while (true) + { + + while (radar(AlienAnt, 0, 360, 0, 20) == null) + { + item = radar(AlienAnt); + turn(direction(item.position)); + motor(1,1); + jet(0); + + if (position.z-topo(position) < 6) + { + jet(1); + } + + if (position.z-topo(position) > 9) + { + jet(-1); + } + + wait(0.2); + } + + fire(1); + } + +} + diff --git a/ai/tcell1.txt b/ai/tcell1.txt index 826b592f..f74c5385 100644 --- a/ai/tcell1.txt +++ b/ai/tcell1.txt @@ -1,14 +1,14 @@ -extern void object::Solution() -{ - - grab(); - turn(90); - drop(); - - turn(-180); - - grab(); - turn(90); - drop(); - -} +extern void object::Solution() +{ + + grab(); + turn(90); + drop(); + + turn(-180); + + grab(); + turn(90); + drop(); + +} diff --git a/ai/tcell2.txt b/ai/tcell2.txt index 39ad3f5b..8a78660f 100644 --- a/ai/tcell2.txt +++ b/ai/tcell2.txt @@ -1,18 +1,18 @@ -extern void object::Solution() -{ - - object item; - - while(true) - { - item = radar(PowerCell); - goto(item.position); - grab(); - - item = radar(WingedShooter); - goto(item.position); - drop(); - - } - -} +extern void object::Solution() +{ + + object item; + + while(true) + { + item = radar(PowerCell); + goto(item.position); + grab(); + + item = radar(WingedShooter); + goto(item.position); + drop(); + + } + +} diff --git a/ai/tchasse1.txt b/ai/tchasse1.txt index be40cd96..f8bf2b9e 100644 --- a/ai/tchasse1.txt +++ b/ai/tchasse1.txt @@ -1,33 +1,32 @@ -extern void object::Solution( ) -{ - aim(-3); - while ( true ) - { - object target; - float a, b; - - target = radar(TargetBot); - if ( target == null ) break; - a = direction(target.position); - turn(a); - - target = radar(TargetBot); - if ( target == null ) break; - b = direction(target.position); - if ( a == b ) // standing still ? - { - wait(0.2); - - target = radar(TargetBot); - if ( target == null ) break; - a = direction(target.position); - - if ( a == b ) - { - fire(2); - wait(2); - } - } - } -} - \ No newline at end of file +extern void object::Solution( ) +{ + aim(-3); + while ( true ) + { + object target; + float a, b; + + target = radar(TargetBot); + if ( target == null ) break; + a = direction(target.position); + turn(a); + + target = radar(TargetBot); + if ( target == null ) break; + b = direction(target.position); + if ( a == b ) // standing still ? + { + wait(0.2); + + target = radar(TargetBot); + if ( target == null ) break; + a = direction(target.position); + + if ( a == b ) + { + fire(2); + wait(2); + } + } + } +} diff --git a/ai/tchasse2.txt b/ai/tchasse2.txt index 2dc5b8c5..4d6351bb 100644 --- a/ai/tchasse2.txt +++ b/ai/tchasse2.txt @@ -1,10 +1,10 @@ -extern void object::Chasse( ) -{ - while ( true ) - { - float x = 10+rand()*20; - float y = -62; - goto(x,y,0); - wait(1); - } -} +extern void object::Chasse( ) +{ + while ( true ) + { + float x = 10+rand()*20; + float y = -62; + goto(x,y,0); + wait(1); + } +} diff --git a/ai/tchasse3.txt b/ai/tchasse3.txt index 78ec9c47..aaad9199 100644 --- a/ai/tchasse3.txt +++ b/ai/tchasse3.txt @@ -1,10 +1,10 @@ -extern void object::Chasse( ) -{ - while ( true ) - { - float x = 33; - float y = -85+rand()*20; - goto(x,y,0); - wait(1); - } -} +extern void object::Chasse( ) +{ + while ( true ) + { + float x = 33; + float y = -85+rand()*20; + goto(x,y,0); + wait(1); + } +} diff --git a/ai/tchasse4.txt b/ai/tchasse4.txt index 697fc251..34c99ed9 100644 --- a/ai/tchasse4.txt +++ b/ai/tchasse4.txt @@ -1,10 +1,10 @@ -extern void object::Chasse( ) -{ - while ( true ) - { - float x = 10+rand()*20; - float y = -88; - goto(x,y,0); - wait(1); - } -} +extern void object::Chasse( ) +{ + while ( true ) + { + float x = 10+rand()*20; + float y = -88; + goto(x,y,0); + wait(1); + } +} diff --git a/ai/tchasse5.txt b/ai/tchasse5.txt index 4860f775..3713b88b 100644 --- a/ai/tchasse5.txt +++ b/ai/tchasse5.txt @@ -1,10 +1,10 @@ -extern void object::Chasse( ) -{ - while ( true ) - { - float x = 7; - float y = -85+rand()*20; - goto(x,y,0); - wait(1); - } -} +extern void object::Chasse( ) +{ + while ( true ) + { + float x = 7; + float y = -85+rand()*20; + goto(x,y,0); + wait(1); + } +} diff --git a/ai/tdragst.txt b/ai/tdragst.txt index a055f4b9..bff6308b 100644 --- a/ai/tdragst.txt +++ b/ai/tdragst.txt @@ -1,17 +1,16 @@ -extern void object::Solution( ) -{ - point start; - start = position; // remember starting position - - motor(1, 1); // full throttle - - while ( true ) // repeat forever - { - float len = distance(position, start); - if ( len > 25-2 ) - { - motor( (25-len)/2, (25-len)/2 ); - } - } -} - \ No newline at end of file +extern void object::Solution( ) +{ + point start; + start = position; // remember starting position + + motor(1, 1); // full throttle + + while ( true ) // repeat forever + { + float len = distance(position, start); + if ( len > 25-2 ) + { + motor( (25-len)/2, (25-len)/2 ); + } + } +} diff --git a/ai/tevite.txt b/ai/tevite.txt index 744a8b77..20443b18 100644 --- a/ai/tevite.txt +++ b/ai/tevite.txt @@ -1,19 +1,19 @@ -extern void object::Solution( ) -{ - while ( true ) - { - float left, right; - - left = radar(WayPoint, 45, 120, 0, 20); - right = radar(WayPoint, -45, 120, 0, 20); - - if ( left == 0 && right == 0 ) // nothing ? - { - turn(180); // turn around - } - else - { - motor(left, right); - } - } -} +extern void object::Solution( ) +{ + while ( true ) + { + float left, right; + + left = radar(WayPoint, 45, 120, 0, 20); + right = radar(WayPoint, -45, 120, 0, 20); + + if ( left == 0 && right == 0 ) // nothing ? + { + turn(180); // turn around + } + else + { + motor(left, right); + } + } +} diff --git a/ai/texch1.txt b/ai/texch1.txt index 107b5667..01a61c8a 100644 --- a/ai/texch1.txt +++ b/ai/texch1.txt @@ -1,11 +1,11 @@ -extern void object::Solution( ) -{ - float dir; - - for ( int i=0 ; i<5 ; i=i+1 ) - { - move(20); - dir = receive("Direction"); - turn(dir); - } -} +extern void object::Solution( ) +{ + float dir; + + for ( int i=0 ; i<5 ; i=i+1 ) + { + move(20); + dir = receive("Direction"); + turn(dir); + } +} diff --git a/ai/texch2.txt b/ai/texch2.txt index 0a2fdd28..6a02ca2d 100644 --- a/ai/texch2.txt +++ b/ai/texch2.txt @@ -1,16 +1,16 @@ -extern void object::Solution( ) -{ - float dir, len; - - while ( true ) - { - dir = receive("Direction"); - if ( dir == nan ) break; - - len = receive("Length"); - if ( len == nan ) break; - - turn(dir); - move(len); - } -} +extern void object::Solution( ) +{ + float dir, len; + + while ( true ) + { + dir = receive("Direction"); + if ( dir == nan ) break; + + len = receive("Length"); + if ( len == nan ) break; + + turn(dir); + move(len); + } +} diff --git a/ai/tfollow1.txt b/ai/tfollow1.txt index c07b2e08..f954d9b8 100644 --- a/ai/tfollow1.txt +++ b/ai/tfollow1.txt @@ -1,33 +1,33 @@ -extern void object::Solution( ) -{ - while ( true ) - { - object target; - float dir, len; - - target = radar(TargetBot); - if ( target == null ) - { - motor(0, 0); // stop - break; - } - - len = distance(position, target.position); - if ( len < 5 ) // too close ? - { - motor(len/5-1, len/5-1); // move backward - } - else - { - dir = direction(target.position); - if ( dir < 0 ) // on the right ? - { - motor(1, 1+dir/90); - } - else // on the left ? - { - motor(1-dir/90, 1); - } - } - } -} +extern void object::Solution( ) +{ + while ( true ) + { + object target; + float dir, len; + + target = radar(TargetBot); + if ( target == null ) + { + motor(0, 0); // stop + break; + } + + len = distance(position, target.position); + if ( len < 5 ) // too close ? + { + motor(len/5-1, len/5-1); // move backward + } + else + { + dir = direction(target.position); + if ( dir < 0 ) // on the right ? + { + motor(1, 1+dir/90); + } + else // on the left ? + { + motor(1-dir/90, 1); + } + } + } +} diff --git a/ai/tfollow2.txt b/ai/tfollow2.txt index 819bb376..fa3d7d61 100644 --- a/ai/tfollow2.txt +++ b/ai/tfollow2.txt @@ -1,43 +1,42 @@ -extern void object::Hare( ) -{ - int nb = 0; - - while ( true ) - { - point dest; - float dist; - object bot; - - do - { - dest.x = 8+rand()*24; - dest.y = -89.5+rand()*24; - dist = distance(dest, position); - } - while ( dist < 10 ); - goto(dest); - wait(2); - - bot = radar(PracticeBot, 0, 360, 0, 10); - if ( bot == null ) - { - nb = 0; - message("Failure, you are too far away. Start again 10x."); - } - else - { - nb ++; - if ( nb < 10 ) - { - message("Distance OK, "+(10-nb)+" more to come"); - } - else - { - message("Well done, let's go home."); - goto(-2, -77.5, 0); - break; - } - } - } -} - \ No newline at end of file +extern void object::Hare( ) +{ + int nb = 0; + + while ( true ) + { + point dest; + float dist; + object bot; + + do + { + dest.x = 8+rand()*24; + dest.y = -89.5+rand()*24; + dist = distance(dest, position); + } + while ( dist < 10 ); + goto(dest); + wait(2); + + bot = radar(PracticeBot, 0, 360, 0, 10); + if ( bot == null ) + { + nb = 0; + message("Failure, you are too far away. Start again 10x."); + } + else + { + nb ++; + if ( nb < 10 ) + { + message("Distance OK, "+(10-nb)+" more to come"); + } + else + { + message("Well done, let's go home."); + goto(-2, -77.5, 0); + break; + } + } + } +} diff --git a/ai/tfor.txt b/ai/tfor.txt index ef1cc0af..8a68d3f6 100644 --- a/ai/tfor.txt +++ b/ai/tfor.txt @@ -1,10 +1,10 @@ -extern void object::Solution( ) -{ - for ( int i=0 ; i<6 ; i=i+1 ) // repeat 6 times - { - move(5); // move 5m forward - turn(90); // quarter turn left - fire(1); // shoot - turn(-90); // quarter turn right - } -} +extern void object::Solution( ) +{ + for ( int i=0 ; i<6 ; i=i+1 ) // repeat 6 times + { + move(5); // move 5m forward + turn(90); // quarter turn left + fire(1); // shoot + turn(-90); // quarter turn right + } +} diff --git a/ai/tfor2.txt b/ai/tfor2.txt index 611b3f2e..d24cdc44 100644 --- a/ai/tfor2.txt +++ b/ai/tfor2.txt @@ -1,10 +1,10 @@ -extern void object::Solution( ) -{ - for ( int i=0 ; i<4 ; i=i+1 ) // repeat 4 times - { - move(10); // move 10m forward - turn(90); // quarter turn left - fire(1); // destroy the target - turn(-180); // turns around - } -} +extern void object::Solution( ) +{ + for ( int i=0 ; i<4 ; i=i+1 ) // repeat 4 times + { + move(10); // move 10m forward + turn(90); // quarter turn left + fire(1); // destroy the target + turn(-180); // turns around + } +} diff --git a/ai/titan1.txt b/ai/titan1.txt index 496565c2..c1608036 100644 --- a/ai/titan1.txt +++ b/ai/titan1.txt @@ -1,16 +1,16 @@ -extern void object::CollectTitanium1() -{ - // 1) Variable definition. - object item; // info. about objects - - // 2) Go to the titanium ore and grab it. - item = radar(TitaniumOre);// look for titanium ore - goto(item.position); // go to the position - grab(); // grab the titanium - - // 3) Go to the converter and drop it. - item = radar(Converter); // look for converter - goto(item.position); // go to the position - drop(); // drop the titanium - move(-2.5); // step back 2.5 m -} +extern void object::CollectTitanium1() +{ + // 1) Variable definition. + object item; // info. about objects + + // 2) Go to the titanium ore and grab it. + item = radar(TitaniumOre);// look for titanium ore + goto(item.position); // go to the position + grab(); // grab the titanium + + // 3) Go to the converter and drop it. + item = radar(Converter); // look for converter + goto(item.position); // go to the position + drop(); // drop the titanium + move(-2.5); // step back 2.5 m +} diff --git a/ai/titan2.txt b/ai/titan2.txt index 14ab0a5a..6e23265f 100644 --- a/ai/titan2.txt +++ b/ai/titan2.txt @@ -1,24 +1,24 @@ -extern void object::CollectTitanium2() -{ - // 1) Variable definition. - object item; // info. about objects - - // 2) Go to the titanium ore and grab it. - item = radar(TitaniumOre);// look for titanium ore - goto(item.position); // go to the position - grab(); // grab the titanium - - // 3) Go to the converter and drop it. - item = radar(Converter); // look for converter - goto(item.position); // go to the position - drop(); // drop the titanium - move(-2.5); // step back 2.5 m - - // 4) If power cell half empty, recharges. - if ( energyCell.energyLevel < 0.5 ) - { // if so: - item = radar(PowerStation); // look for station - goto(item.position); // go there - wait(5); // wait - } -} +extern void object::CollectTitanium2() +{ + // 1) Variable definition. + object item; // info. about objects + + // 2) Go to the titanium ore and grab it. + item = radar(TitaniumOre);// look for titanium ore + goto(item.position); // go to the position + grab(); // grab the titanium + + // 3) Go to the converter and drop it. + item = radar(Converter); // look for converter + goto(item.position); // go to the position + drop(); // drop the titanium + move(-2.5); // step back 2.5 m + + // 4) If power cell half empty, recharges. + if ( energyCell.energyLevel < 0.5 ) + { // if so: + item = radar(PowerStation); // look for station + goto(item.position); // go there + wait(5); // wait + } +} diff --git a/ai/titan3.txt b/ai/titan3.txt index cd818b86..b7afe5b5 100644 --- a/ai/titan3.txt +++ b/ai/titan3.txt @@ -1,48 +1,48 @@ -extern void object::CollectTitanium3() -{ - // 1) Variable definition. - object item; // info. about objects - - while (true) // repeat forever - { - // 2) Go to the titanium ore and grab it. - item = radar(TitaniumOre);// look for titanium ore - goto(item.position); // go to the position - grab(); // grab the titanium - - // 3) Go to the converter and drop it. - item = radar(Converter); // look for converter - goto(item.position); // go to the position - drop(); // drop the titanium - move(-2.5); // step back 2.5 m - - // 4) Wait until titanium converted and grabs - do - { - wait(1); // wait for cube - item = radar(Titanium, 0, 45, 0, 5); - } - while ( item == null ); - - goto(item.position); - grab(); // take it - - // 5) Go to free space and drop it - goto(space(position)); // go to free space - drop(); // drop titanium - - // If power cell half empty, recharges. - if ( energyCell.energyLevel < 0.5 ) - { // if so: - item = radar(PowerStation); - if ( item != null ) // station found ? - { - goto(item.position); // go there - while ( energyCell.energyLevel < 1 ) - { // until recharged: - wait(1); // wait - } - } - } - } -} +extern void object::CollectTitanium3() +{ + // 1) Variable definition. + object item; // info. about objects + + while (true) // repeat forever + { + // 2) Go to the titanium ore and grab it. + item = radar(TitaniumOre);// look for titanium ore + goto(item.position); // go to the position + grab(); // grab the titanium + + // 3) Go to the converter and drop it. + item = radar(Converter); // look for converter + goto(item.position); // go to the position + drop(); // drop the titanium + move(-2.5); // step back 2.5 m + + // 4) Wait until titanium converted and grabs + do + { + wait(1); // wait for cube + item = radar(Titanium, 0, 45, 0, 5); + } + while ( item == null ); + + goto(item.position); + grab(); // take it + + // 5) Go to free space and drop it + goto(space(position)); // go to free space + drop(); // drop titanium + + // If power cell half empty, recharges. + if ( energyCell.energyLevel < 0.5 ) + { // if so: + item = radar(PowerStation); + if ( item != null ) // station found ? + { + goto(item.position); // go there + while ( energyCell.energyLevel < 1 ) + { // until recharged: + wait(1); // wait + } + } + } + } +} diff --git a/ai/titan4.txt b/ai/titan4.txt index d7d61f84..16617972 100644 --- a/ai/titan4.txt +++ b/ai/titan4.txt @@ -1,50 +1,50 @@ -extern void object::CollectTitanium4() -{ - // 1) Variable definition. - object item; // info. about objects - - while (true) // repeat forever - { - // 2) Go to the titanium ore and grab it. - item = radar(TitaniumOre);// look for titanium ore - goto(item.position); // go to the position - grab(); // grab the titanium - - // 3) Go to the converter and drop it. - item = radar(Converter); // look for converter - goto(item.position); // go to the position - drop(); // drop the titanium - move(-2.5); // step back 2.5 m - - // 4) Wait until titanium converted and grabs - do - { - wait(1); // wait for cube - item = radar(Titanium, 0, 45, 0, 5); - } - while ( item == null ); - - goto(item.position); - grab(); // take it - - // 5) Go to free space and drop it - goto(space(position)); // go to free space - drop(); // drop titanium - - // If power cell half empty, recharges. - if ( energyCell.energyLevel < 0.5 ) - { // if so: - item = radar(PowerCaptor); - if ( item != null ) // station found ? - { - goto(item.position); // go there - while ( energyCell.energyLevel < 1 ) - { // until recharged: - wait(1); // wait - } - } - } - } -} - - +extern void object::CollectTitanium4() +{ + // 1) Variable definition. + object item; // info. about objects + + while (true) // repeat forever + { + // 2) Go to the titanium ore and grab it. + item = radar(TitaniumOre);// look for titanium ore + goto(item.position); // go to the position + grab(); // grab the titanium + + // 3) Go to the converter and drop it. + item = radar(Converter); // look for converter + goto(item.position); // go to the position + drop(); // drop the titanium + move(-2.5); // step back 2.5 m + + // 4) Wait until titanium converted and grabs + do + { + wait(1); // wait for cube + item = radar(Titanium, 0, 45, 0, 5); + } + while ( item == null ); + + goto(item.position); + grab(); // take it + + // 5) Go to free space and drop it + goto(space(position)); // go to free space + drop(); // drop titanium + + // If power cell half empty, recharges. + if ( energyCell.energyLevel < 0.5 ) + { // if so: + item = radar(PowerCaptor); + if ( item != null ) // station found ? + { + goto(item.position); // go there + while ( energyCell.energyLevel < 1 ) + { // until recharged: + wait(1); // wait + } + } + } + } +} + + diff --git a/ai/tlaby1.txt b/ai/tlaby1.txt index e6dc01a1..a6c2a63f 100644 --- a/ai/tlaby1.txt +++ b/ai/tlaby1.txt @@ -1,26 +1,26 @@ -extern void object::Solution( ) -{ - object front, left, right; - - front = radar(Barrier, 0, 45, 0, 5); - left = radar(Barrier, 90, 45, 0, 5); - right = radar(Barrier, -90, 45, 0, 5); - - if ( front == null ) - { - move(5); - return; - } - if ( left == null ) - { - turn(90); - move(5); - return; - } - if ( right == null ) - { - turn(-90); - move(5); - return; - } -} +extern void object::Solution( ) +{ + object front, left, right; + + front = radar(Barrier, 0, 45, 0, 5); + left = radar(Barrier, 90, 45, 0, 5); + right = radar(Barrier, -90, 45, 0, 5); + + if ( front == null ) + { + move(5); + return; + } + if ( left == null ) + { + turn(90); + move(5); + return; + } + if ( right == null ) + { + turn(-90); + move(5); + return; + } +} diff --git a/ai/tlaby2.txt b/ai/tlaby2.txt index 74208a08..d365ba84 100644 --- a/ai/tlaby2.txt +++ b/ai/tlaby2.txt @@ -1,28 +1,28 @@ -extern void object::Solution( ) -{ - while ( true ) - { - object front, left, right; - - front = radar(Barrier, 0, 45, 0, 5); - left = radar(Barrier, 90, 45, 0, 5); - right = radar(Barrier, -90, 45, 0, 5); - - if ( front == null ) - { - move(5); - continue; - } - if ( left == null ) - { - turn(90); - continue; - } - if ( right == null ) - { - turn(-90); - continue; - } - break; - } -} +extern void object::Solution( ) +{ + while ( true ) + { + object front, left, right; + + front = radar(Barrier, 0, 45, 0, 5); + left = radar(Barrier, 90, 45, 0, 5); + right = radar(Barrier, -90, 45, 0, 5); + + if ( front == null ) + { + move(5); + continue; + } + if ( left == null ) + { + turn(90); + continue; + } + if ( right == null ) + { + turn(-90); + continue; + } + break; + } +} diff --git a/ai/tmove1.txt b/ai/tmove1.txt index 6d79d09a..d2de1ab1 100644 --- a/ai/tmove1.txt +++ b/ai/tmove1.txt @@ -1,10 +1,10 @@ -extern void object::Solution( ) -{ - move(20); // go to checkpoint 1 - turn(90); - move(20); // go to checkpoint 2 - turn(-90); - move(20); // go to checkpoint 3 - turn(-90); - move(20); // go to finishing pad -} +extern void object::Solution( ) +{ + move(20); // go to checkpoint 1 + turn(90); + move(20); // go to checkpoint 2 + turn(-90); + move(20); // go to checkpoint 3 + turn(-90); + move(20); // go to finishing pad +} diff --git a/ai/tmove2.txt b/ai/tmove2.txt index 0b2989bf..eb10f51a 100644 --- a/ai/tmove2.txt +++ b/ai/tmove2.txt @@ -1,15 +1,15 @@ -extern void object::Solution( ) -{ - float dist, dir; - - dist = 20; - dir = 90; - - move(dist); // go to checkpoint 1 - turn(dir); - move(dist); // go to checkpoint 2 - turn(-dir); - move(dist); // go to checkpoint 3 - turn(-dir); - move(dist); // goeto finishing pad -} +extern void object::Solution( ) +{ + float dist, dir; + + dist = 20; + dir = 90; + + move(dist); // go to checkpoint 1 + turn(dir); + move(dist); // go to checkpoint 2 + turn(-dir); + move(dist); // go to checkpoint 3 + turn(-dir); + move(dist); // goeto finishing pad +} diff --git a/ai/tmove3.txt b/ai/tmove3.txt index 4bfee335..7c40796c 100644 --- a/ai/tmove3.txt +++ b/ai/tmove3.txt @@ -1,15 +1,15 @@ -extern void object::Solution( ) -{ - float dist, dir; - - dist = 20; - dir = 90; - - move(dist); - turn(dir); - move(dist*2); - turn(dir); - move(dist); - turn(dir); - move(dist); -} +extern void object::Solution( ) +{ + float dist, dir; + + dist = 20; + dir = 90; + + move(dist); + turn(dir); + move(dist*2); + turn(dir); + move(dist); + turn(dir); + move(dist); +} diff --git a/ai/tower1.txt b/ai/tower1.txt index e22cbcae..a9254fbb 100644 --- a/ai/tower1.txt +++ b/ai/tower1.txt @@ -1,31 +1,31 @@ -extern void object::ServiceTower1() -{ - object tower; // info. about tower - object station; // info. about station - - // 1) go to the defense tower - tower = radar(DefenseTower); // look for tower - goto(tower.position); // go there - - while ( true ) // repeat forever - { - // 2) wait until power cell is empty - while ( tower.energyCell.energyLevel > 0.2 ) - { - wait(2); - } - grab(); // grab the power cell - - // 3) go to the power station to recharge - station = radar(PowerStation); - goto(station.position); // go there - while ( load.energyLevel < 1 ) - { - wait(1); // wait until recharged - } - - // 4) go back to defense tower - goto(tower.position); // go to tower - drop(); // drop the power cell - } -} +extern void object::ServiceTower1() +{ + object tower; // info. about tower + object station; // info. about station + + // 1) go to the defense tower + tower = radar(DefenseTower); // look for tower + goto(tower.position); // go there + + while ( true ) // repeat forever + { + // 2) wait until power cell is empty + while ( tower.energyCell.energyLevel > 0.2 ) + { + wait(2); + } + grab(); // grab the power cell + + // 3) go to the power station to recharge + station = radar(PowerStation); + goto(station.position); // go there + while ( load.energyLevel < 1 ) + { + wait(1); // wait until recharged + } + + // 4) go back to defense tower + goto(tower.position); // go to tower + drop(); // drop the power cell + } +} diff --git a/ai/tproc1.txt b/ai/tproc1.txt index 445a724a..0228378e 100644 --- a/ai/tproc1.txt +++ b/ai/tproc1.txt @@ -1,15 +1,14 @@ -extern void object::Solution( ) -{ - Square(15); - Square(25); -} - -void object::Square(float length) -{ - for ( int i=0 ; i<4 ; i=i+1 ) - { - move(length); - turn(90); - } -} - \ No newline at end of file +extern void object::Solution( ) +{ + Square(15); + Square(25); +} + +void object::Square(float length) +{ + for ( int i=0 ; i<4 ; i=i+1 ) + { + move(length); + turn(90); + } +} diff --git a/ai/tproc2.txt b/ai/tproc2.txt index b64df6ec..31f63098 100644 --- a/ai/tproc2.txt +++ b/ai/tproc2.txt @@ -1,18 +1,18 @@ -void object::Part(float length) -{ - for ( int i=0 ; i<2 ; i=i+1 ) - { - move(length); - turn(90); - } -} - -extern void object::Solution( ) -{ - float rest = 25; - while ( rest > 0 ) - { - Part(rest); - rest = rest-5; - } -} +void object::Part(float length) +{ + for ( int i=0 ; i<2 ; i=i+1 ) + { + move(length); + turn(90); + } +} + +extern void object::Solution( ) +{ + float rest = 25; + while ( rest > 0 ) + { + Part(rest); + rest = rest-5; + } +} diff --git a/ai/tprot1.txt b/ai/tprot1.txt index 2fee3cb8..a23f3589 100644 --- a/ai/tprot1.txt +++ b/ai/tprot1.txt @@ -1,24 +1,24 @@ -extern void object::Solution( ) -{ - object item; - float dir, dist; - - while ( true ) - { - do - { - item = radar(AlienAnt, 0, 360, 0, 100); - } - while ( item == null ); - - dir = direction(item.position); - turn(dir); - - dist = distance(item.position, position); - if ( dist < 40 ) - { - fire(0.2); - wait(2); - } - } -} +extern void object::Solution( ) +{ + object item; + float dir, dist; + + while ( true ) + { + do + { + item = radar(AlienAnt, 0, 360, 0, 100); + } + while ( item == null ); + + dir = direction(item.position); + turn(dir); + + dist = distance(item.position, position); + if ( dist < 40 ) + { + fire(0.2); + wait(2); + } + } +} diff --git a/ai/tprot1a.txt b/ai/tprot1a.txt index 3c6b5a5c..aae701ab 100644 --- a/ai/tprot1a.txt +++ b/ai/tprot1a.txt @@ -1,53 +1,53 @@ -extern void object::Attack( ) -{ - object p; - float dist, prox; - point nav1, nav2, dest; - boolean advance = true; - - wait(5); - - while ( true ) - { - p = radar(WheeledShooter); - if ( p == null ) - { - nav1.x = position.x-5; - nav1.y = position.y; - nav2.x = position.x+5; - nav2.y = position.y; - - while ( true ) - { - goto(nav1); - p = radar(WheeledShooter); - if ( p != null ) break; - - goto(nav2); - p = radar(WheeledShooter); - if ( p != null ) break; - } - } - else - { - dist = distance(p.position, position); - if ( dist <= 25 && !advance ) - { - fire(p.position); - advance = true; - wait(2); - } - else - { - prox = dist-5; - if ( prox > 25 ) prox = 25; - if ( prox < 15 ) prox = 15; - dest.x = (position.x-p.position.x)*prox/dist + p.position.x; - dest.y = (position.y-p.position.y)*prox/dist + p.position.y; - dest.z = (position.z-p.position.z)*prox/dist + p.position.z; - goto(dest); - advance = false; - } - } - } -} +extern void object::Attack( ) +{ + object p; + float dist, prox; + point nav1, nav2, dest; + boolean advance = true; + + wait(5); + + while ( true ) + { + p = radar(WheeledShooter); + if ( p == null ) + { + nav1.x = position.x-5; + nav1.y = position.y; + nav2.x = position.x+5; + nav2.y = position.y; + + while ( true ) + { + goto(nav1); + p = radar(WheeledShooter); + if ( p != null ) break; + + goto(nav2); + p = radar(WheeledShooter); + if ( p != null ) break; + } + } + else + { + dist = distance(p.position, position); + if ( dist <= 25 && !advance ) + { + fire(p.position); + advance = true; + wait(2); + } + else + { + prox = dist-5; + if ( prox > 25 ) prox = 25; + if ( prox < 15 ) prox = 15; + dest.x = (position.x-p.position.x)*prox/dist + p.position.x; + dest.y = (position.y-p.position.y)*prox/dist + p.position.y; + dest.z = (position.z-p.position.z)*prox/dist + p.position.z; + goto(dest); + advance = false; + } + } + } +} diff --git a/ai/tradar1.txt b/ai/tradar1.txt index afad79e3..1148deaf 100644 --- a/ai/tradar1.txt +++ b/ai/tradar1.txt @@ -1,26 +1,25 @@ -extern void object::Solution( ) -{ - while ( true ) - { - object spot; - float dir; - - spot = radar(WayPoint); - if ( spot == null ) // no more ? - { - motor(0, 0); // stops - break; - } - - dir = direction(spot.position); - if ( dir < 0 ) // on the right ? - { - motor(1, 1+dir/90); - } - else // on the left ? - { - motor(1-dir/90, 1); - } - } -} - \ No newline at end of file +extern void object::Solution( ) +{ + while ( true ) + { + object spot; + float dir; + + spot = radar(WayPoint); + if ( spot == null ) // no more ? + { + motor(0, 0); // stops + break; + } + + dir = direction(spot.position); + if ( dir < 0 ) // on the right ? + { + motor(1, 1+dir/90); + } + else // on the left ? + { + motor(1-dir/90, 1); + } + } +} diff --git a/ai/tradar2.txt b/ai/tradar2.txt index 262c8133..a43910ba 100644 --- a/ai/tradar2.txt +++ b/ai/tradar2.txt @@ -1,32 +1,32 @@ -extern void object::Sow( ) -{ - while ( true ) - { - float x, y; - x = 8+rand()*24; - y = -89.5+rand()*24; - goto(x,y,0); - produce(position, 0, WayPoint, ""); - - while ( Compte(WayPoint) >= 20 ) - { - wait(2); - } - } -} - -int Compte(int cat) -{ - int i, total; - object p; - - total = 0; - for ( i=0 ; i<10000 ; i++ ) - { - p = retobject(i); - if ( p == null ) break; - if ( p.category == cat ) total ++; - } - return total; -} - +extern void object::Sow( ) +{ + while ( true ) + { + float x, y; + x = 8+rand()*24; + y = -89.5+rand()*24; + goto(x,y,0); + produce(position, 0, WayPoint, ""); + + while ( Compte(WayPoint) >= 20 ) + { + wait(2); + } + } +} + +int Compte(int cat) +{ + int i, total; + object p; + + total = 0; + for ( i=0 ; i<10000 ; i++ ) + { + p = retobject(i); + if ( p == null ) break; + if ( p.category == cat ) total ++; + } + return total; +} + diff --git a/ai/tremot1a.txt b/ai/tremot1a.txt index ab0769c1..7b1fa965 100644 --- a/ai/tremot1a.txt +++ b/ai/tremot1a.txt @@ -1,14 +1,14 @@ -extern void object::Remote( ) -{ - send("order", 1, 100); // send "grab" order - wait(5); - - send("order", 3, 100); // send "move(10)" order - wait(5); - - send("order", 2, 100); // send "drop" order - wait(5); - - send("order", 4, 100); // send "move(-10)" order - wait(5); -} +extern void object::Remote( ) +{ + send("order", 1, 100); // send "grab" order + wait(5); + + send("order", 3, 100); // send "move(10)" order + wait(5); + + send("order", 2, 100); // send "drop" order + wait(5); + + send("order", 4, 100); // send "move(-10)" order + wait(5); +} diff --git a/ai/tremot1b.txt b/ai/tremot1b.txt index eacc089d..89247d68 100644 --- a/ai/tremot1b.txt +++ b/ai/tremot1b.txt @@ -1,46 +1,46 @@ -extern void object::Slave( ) -{ - float order; - - errmode(0); // don't stop on errors - - while ( true ) - { - // wait for order completion ... - while ( !testinfo("order", 100) ) - { - wait(1); - } - - // get the order - order = receive("order", 100); - - if ( order == 1 ) - { - message("grab( )"); - grab(); - } - else if ( order == 2 ) - { - message("drop( )"); - drop(); - } - else if ( order == 3 ) - { - message("move(10)"); - move(10); - } - else if ( order == 4 ) - { - message("move(-10)"); - move(-10); - } - else - { - message("Unknown order"); - } - - // signal "end of work" - deleteinfo("order", 100); - } -} +extern void object::Slave( ) +{ + float order; + + errmode(0); // don't stop on errors + + while ( true ) + { + // wait for order completion ... + while ( !testinfo("order", 100) ) + { + wait(1); + } + + // get the order + order = receive("order", 100); + + if ( order == 1 ) + { + message("grab( )"); + grab(); + } + else if ( order == 2 ) + { + message("drop( )"); + drop(); + } + else if ( order == 3 ) + { + message("move(10)"); + move(10); + } + else if ( order == 4 ) + { + message("move(-10)"); + move(-10); + } + else + { + message("Unknown order"); + } + + // signal "end of work" + deleteinfo("order", 100); + } +} diff --git a/ai/tremot2a.txt b/ai/tremot2a.txt index 1fdc1cd4..b1e12718 100644 --- a/ai/tremot2a.txt +++ b/ai/tremot2a.txt @@ -1,25 +1,25 @@ -extern void object::Remote( ) -{ - SendToPost(1, 20); // move(20); - SendToPost(2, 90); // turn(90); - SendToPost(1, 20); // move(20); - SendToPost(2, 90); // turn(90); - SendToPost(1, 10); // move(10); - SendToPost(2, 90); // turn(90); - SendToPost(1, 10); // move(10); - SendToPost(2,-90); // turn(-90); - SendToPost(1, 10); // move(10); -} - -void object::SendToPost(float order, float param) -{ - // send the order and the parameter - send("order", order, 100); - send("param", param, 100); - - // wait for end of work - while ( testinfo("order", 100) ) - { - wait(1); - } -} +extern void object::Remote( ) +{ + SendToPost(1, 20); // move(20); + SendToPost(2, 90); // turn(90); + SendToPost(1, 20); // move(20); + SendToPost(2, 90); // turn(90); + SendToPost(1, 10); // move(10); + SendToPost(2, 90); // turn(90); + SendToPost(1, 10); // move(10); + SendToPost(2,-90); // turn(-90); + SendToPost(1, 10); // move(10); +} + +void object::SendToPost(float order, float param) +{ + // send the order and the parameter + send("order", order, 100); + send("param", param, 100); + + // wait for end of work + while ( testinfo("order", 100) ) + { + wait(1); + } +} diff --git a/ai/tremot2b.txt b/ai/tremot2b.txt index d4104754..670bd9a4 100644 --- a/ai/tremot2b.txt +++ b/ai/tremot2b.txt @@ -1,35 +1,35 @@ -extern void object::Slave( ) -{ - float order, param; - - while ( true ) - { - // wait for order ... - while ( !testinfo("order", 100) ) - { - wait(1); - } - - // read the order and the parameter - order = receive("order", 100); - param = receive("param", 100); - - if ( order == 1 ) - { - message("move("+param+")"); - move(param); - } - else if ( order == 2 ) - { - message("turn("+param+")"); - turn(param); - } - else - { - message("Unknown order"); - } - - // signal "end of work" - deleteinfo("order", 100); - } -} +extern void object::Slave( ) +{ + float order, param; + + while ( true ) + { + // wait for order ... + while ( !testinfo("order", 100) ) + { + wait(1); + } + + // read the order and the parameter + order = receive("order", 100); + param = receive("param", 100); + + if ( order == 1 ) + { + message("move("+param+")"); + move(param); + } + else if ( order == 2 ) + { + message("turn("+param+")"); + turn(param); + } + else + { + message("Unknown order"); + } + + // signal "end of work" + deleteinfo("order", 100); + } +} diff --git a/ai/tremot3a.txt b/ai/tremot3a.txt index a238f3bd..3d7ae997 100644 --- a/ai/tremot3a.txt +++ b/ai/tremot3a.txt @@ -1,22 +1,22 @@ -extern void object::Remote3( ) -{ - SendOrder("move(20)"); - SendOrder("turn(90)"); - SendOrder("move(20)"); - SendOrder("turn(90)"); - SendOrder("move(10)"); - SendOrder("turn(90)"); - SendOrder("move(10)"); - SendOrder("turn(-90)"); - SendOrder("move(10)"); -} - -void object::SendOrder(string order) -{ - exchange list(); - - while ( list.put(order) == false ) - { - wait(1); - } -} +extern void object::Remote3( ) +{ + SendOrder("move(20)"); + SendOrder("turn(90)"); + SendOrder("move(20)"); + SendOrder("turn(90)"); + SendOrder("move(10)"); + SendOrder("turn(90)"); + SendOrder("move(10)"); + SendOrder("turn(-90)"); + SendOrder("move(10)"); +} + +void object::SendOrder(string order) +{ + exchange list(); + + while ( list.put(order) == false ) + { + wait(1); + } +} diff --git a/ai/tremot3b.txt b/ai/tremot3b.txt index 97f75a11..c8965a4a 100644 --- a/ai/tremot3b.txt +++ b/ai/tremot3b.txt @@ -1,52 +1,52 @@ -public class exchange -{ - static private string m_order = ""; - - // Put an order - synchronized bool put(string order) - { - if ( m_order == "" ) - { - m_order = order; - return true; - } - else - { - return false; - } - } - - // Get an order - synchronized string get() - { - string ret = m_order; - m_order = ""; - return ret; - } -} - -extern void object::Slave3( ) -{ - exchange list(); - string todo; - - while ( true ) - { - while ( true ) - { - todo = list.get(); - if ( todo != "" ) break; - wait(1); - } - message(todo); - - if ( strfind(todo, "move") == 0 ) - { - move(strval(strmid(todo,5))); - } - if ( strfind(todo, "turn") == 0 ) - { - turn(strval(strmid(todo,5))); - } - } -} +public class exchange +{ + static private string m_order = ""; + + // Put an order + synchronized bool put(string order) + { + if ( m_order == "" ) + { + m_order = order; + return true; + } + else + { + return false; + } + } + + // Get an order + synchronized string get() + { + string ret = m_order; + m_order = ""; + return ret; + } +} + +extern void object::Slave3( ) +{ + exchange list(); + string todo; + + while ( true ) + { + while ( true ) + { + todo = list.get(); + if ( todo != "" ) break; + wait(1); + } + message(todo); + + if ( strfind(todo, "move") == 0 ) + { + move(strval(strmid(todo,5))); + } + if ( strfind(todo, "turn") == 0 ) + { + turn(strval(strmid(todo,5))); + } + } +} diff --git a/ai/tremot4a.txt b/ai/tremot4a.txt index fcbe5cb5..be18ba6f 100644 --- a/ai/tremot4a.txt +++ b/ai/tremot4a.txt @@ -1,26 +1,26 @@ -extern void object::Remote4( ) -{ - SendOrder(1, 20); // move(20); - SendOrder(2, 90); // turn(90); - SendOrder(1, 20); // move(20); - SendOrder(2, 90); // turn(90); - SendOrder(1, 10); // move(10); - SendOrder(2, 90); // turn(90); - SendOrder(1, 10); // move(10); - SendOrder(2,-90); // turn(-90); - SendOrder(1, 10); // move(10); -} - -void object::SendOrder(float order, float param) -{ - exchange list(); - order todo(); - - todo.m_type = order; - todo.m_param = param; - - while ( list.put(todo) == false ) - { - wait(1); - } -} +extern void object::Remote4( ) +{ + SendOrder(1, 20); // move(20); + SendOrder(2, 90); // turn(90); + SendOrder(1, 20); // move(20); + SendOrder(2, 90); // turn(90); + SendOrder(1, 10); // move(10); + SendOrder(2, 90); // turn(90); + SendOrder(1, 10); // move(10); + SendOrder(2,-90); // turn(-90); + SendOrder(1, 10); // move(10); +} + +void object::SendOrder(float order, float param) +{ + exchange list(); + order todo(); + + todo.m_type = order; + todo.m_param = param; + + while ( list.put(todo) == false ) + { + wait(1); + } +} diff --git a/ai/tremot4b.txt b/ai/tremot4b.txt index c3ab383a..0296b812 100644 --- a/ai/tremot4b.txt +++ b/ai/tremot4b.txt @@ -1,68 +1,68 @@ -public class order -{ - int m_type = nan; - float m_param; -} - -public class exchange -{ - static private order m_order = new order; - - // Put an order - synchronized bool put(order a) - { - if ( m_order.m_type == nan ) - { - m_order = a; - return true; - } - else - { - return false; - } - } - - // Get an order - synchronized order get() - { - return m_order; - } - - // Delete an order. - synchronized void delete() - { - m_order.m_type = nan; - } -} - -extern void object::Slave4( ) -{ - exchange list(); - order todo; - - while ( true ) - { - while ( true ) - { - todo = list.get(); - if ( todo.m_type != nan ) break; - wait(1); - } - - if ( todo.m_type == 1 ) - { - message("move("+todo.m_param+")"); - move(todo.m_param); - } - else if ( todo.m_type == 2 ) - { - message("turn("+todo.m_param+")"); - turn(todo.m_param); - } - else - { - message("Unknown order"); - } - list.delete(); - } -} +public class order +{ + int m_type = nan; + float m_param; +} + +public class exchange +{ + static private order m_order = new order; + + // Put an order + synchronized bool put(order a) + { + if ( m_order.m_type == nan ) + { + m_order = a; + return true; + } + else + { + return false; + } + } + + // Get an order + synchronized order get() + { + return m_order; + } + + // Delete an order. + synchronized void delete() + { + m_order.m_type = nan; + } +} + +extern void object::Slave4( ) +{ + exchange list(); + order todo; + + while ( true ) + { + while ( true ) + { + todo = list.get(); + if ( todo.m_type != nan ) break; + wait(1); + } + + if ( todo.m_type == 1 ) + { + message("move("+todo.m_param+")"); + move(todo.m_param); + } + else if ( todo.m_type == 2 ) + { + message("turn("+todo.m_param+")"); + turn(todo.m_param); + } + else + { + message("Unknown order"); + } + list.delete(); + } +} diff --git a/ai/tremot5a.txt b/ai/tremot5a.txt index 04e0d56c..57c7cf23 100644 --- a/ai/tremot5a.txt +++ b/ai/tremot5a.txt @@ -1,22 +1,22 @@ -extern void object::Remote5( ) -{ - SendOrder(1, 20); // move(20); - SendOrder(2, 90); // turn(90); - SendOrder(1, 20); // move(20); - SendOrder(2, 90); // turn(90); - SendOrder(1, 10); // move(10); - SendOrder(2, 90); // turn(90); - SendOrder(1, 10); // move(10); - SendOrder(2,-90); // turn(-90); - SendOrder(1, 10); // move(10); -} - -void object::SendOrder(float order, float param) -{ - exchange list(); - order todo(); - - todo.m_type = order; - todo.m_param = param; - list.put(todo); -} +extern void object::Remote5( ) +{ + SendOrder(1, 20); // move(20); + SendOrder(2, 90); // turn(90); + SendOrder(1, 20); // move(20); + SendOrder(2, 90); // turn(90); + SendOrder(1, 10); // move(10); + SendOrder(2, 90); // turn(90); + SendOrder(1, 10); // move(10); + SendOrder(2,-90); // turn(-90); + SendOrder(1, 10); // move(10); +} + +void object::SendOrder(float order, float param) +{ + exchange list(); + order todo(); + + todo.m_type = order; + todo.m_param = param; + list.put(todo); +} diff --git a/ai/tremot5b.txt b/ai/tremot5b.txt index 4a16f983..211949af 100644 --- a/ai/tremot5b.txt +++ b/ai/tremot5b.txt @@ -1,62 +1,62 @@ -public class order -{ - int m_type; - float m_param; -} - -public class exchange -{ - static private order m_fifo[] = null; - - // Put an order into the fifo - synchronized void put(order a) - { - m_fifo[sizeof(m_fifo)] = a; - } - - // Get an order from the fifo - synchronized order get() - { - if ( sizeof(m_fifo) == 0 ) return null; - - order a = m_fifo[0]; - order copy[] = null; - for ( int i=1 ; i item.position.z) - { - jet(-0.3); - } - - if(position.z < item.position.z - 1) - { - jet(0.3); - } - - wait(0.2); - } - item = radar(AlienWasp); - turn(direction(item.position)); - fire(1); - } - -} +extern void object::Solution() +{ + + object item; + + aim(0); + + while (true) + { + while(radar(AlienWasp, 0, 360, 0, 20) == null) + { + item = radar(AlienWasp); + turn(direction(item.position)); + motor(1,1); + + jet(0); + if(position.z > item.position.z) + { + jet(-0.3); + } + + if(position.z < item.position.z - 1) + { + jet(0.3); + } + + wait(0.2); + } + item = radar(AlienWasp); + turn(direction(item.position)); + fire(1); + } + +} diff --git a/ai/twasp2.txt b/ai/twasp2.txt index 016e539e..cc91930c 100644 --- a/ai/twasp2.txt +++ b/ai/twasp2.txt @@ -1,56 +1,56 @@ -extern void object::Solution() -{ - - object item; - float angle; - - aim(0); - - while (true) - { - while(radar(AlienWasp, 0, 360, 0, 20) == null) - { - item = radar(AlienWasp); - turn(direction(item.position)); - motor(1,1); - - jet(0); - if(position.z > item.position.z) - { - jet(-0.3); - } - - if(position.z < item.position.z - 1) - { - jet(0.3); - } - - wait(0.2); - } - item = radar(AlienWasp); - angle = direction(item.position); - turn(angle); - if (angle < 0) - { - motor(1,0.5); - } - else - { - motor(0.5,1); - } - - jet(0); - if(position.z > item.position.z) - { - jet(-0.3); - } - - if(position.z < item.position.z - 1) - { - jet(0.3); - } - - fire(1); - } - -} +extern void object::Solution() +{ + + object item; + float angle; + + aim(0); + + while (true) + { + while(radar(AlienWasp, 0, 360, 0, 20) == null) + { + item = radar(AlienWasp); + turn(direction(item.position)); + motor(1,1); + + jet(0); + if(position.z > item.position.z) + { + jet(-0.3); + } + + if(position.z < item.position.z - 1) + { + jet(0.3); + } + + wait(0.2); + } + item = radar(AlienWasp); + angle = direction(item.position); + turn(angle); + if (angle < 0) + { + motor(1,0.5); + } + else + { + motor(0.5,1); + } + + jet(0); + if(position.z > item.position.z) + { + jet(-0.3); + } + + if(position.z < item.position.z - 1) + { + jet(0.3); + } + + fire(1); + } + +} diff --git a/ai/wait.txt b/ai/wait.txt index 5d8f66fe..f850dc29 100644 --- a/ai/wait.txt +++ b/ai/wait.txt @@ -1,7 +1,7 @@ -extern void object::Wait( ) -{ - while ( true ) - { - wait(2); - } -} +extern void object::Wait( ) +{ + while ( true ) + { + wait(2); + } +} diff --git a/ai/wasp01.txt b/ai/wasp01.txt index 360c4159..ca62fcc9 100644 --- a/ai/wasp01.txt +++ b/ai/wasp01.txt @@ -1,110 +1,110 @@ -extern void object::Attack( ) -{ - int list[], i; - object p; - float dist; - point dest; - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - list[i++] = Derrick; - list[i++] = BotFactory; - list[i++] = PowerStation; - list[i++] = Converter; - list[i++] = RepairCenter; - list[i++] = DefenseTower; - list[i++] = ResearchCenter; - list[i++] = RadarStation; - list[i++] = ExchangePost; - list[i++] = PowerPlant; - list[i++] = AutoLab; - list[i++] = NuclearPlant; - list[i++] = Titanium; - list[i++] = PowerCell; - list[i++] = NuclearCell; - - while ( true ) - { - if ( load == null ) // ne porte rien ? - { - p = radar(OrgaMatter); // cherche matière - if ( p == null ) - { - jet(1); // monte - dest = position; - dest.x += (rand()-0.5)*10; - dest.y += (rand()-0.5)*10; - goto(dest); // va n'importe où - wait(2); - } - else - { - dest = p.position; - dest.z = position.z; - dist = distance(dest, position); - if ( dist > 1.25 ) - { - jet(1); // monte - goto(p.position); // va sur le matière - } - else - { - jet(-1); // descend - while ( altitude > 0 ); - grab(); // prend la matière - } - } - } - else // porte matière ? - { - jet(1); // monte - p = radar(list, 0, 360, 0, 1000, 1, FilterOnlyLanding); - if ( p == null ) - { - dest = position; - dest.x += (rand()-0.5)*10; - dest.y += (rand()-0.5)*10; - goto(dest); // va n'importe où - wait(2); - } - else - { - dest = p.position; - dest.z = position.z; - dist = distance(dest, position); - if ( dist > 1.25 ) - { - goto(p.position); // va sur la cible - } - else - { - drop(); // lâche la matière - } - } - } - } -} +extern void object::Attack( ) +{ + int list[], i; + object p; + float dist; + point dest; + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + list[i++] = Derrick; + list[i++] = BotFactory; + list[i++] = PowerStation; + list[i++] = Converter; + list[i++] = RepairCenter; + list[i++] = DefenseTower; + list[i++] = ResearchCenter; + list[i++] = RadarStation; + list[i++] = ExchangePost; + list[i++] = PowerPlant; + list[i++] = AutoLab; + list[i++] = NuclearPlant; + list[i++] = Titanium; + list[i++] = PowerCell; + list[i++] = NuclearCell; + + while ( true ) + { + if ( load == null ) // ne porte rien ? + { + p = radar(OrgaMatter); // cherche matière + if ( p == null ) + { + jet(1); // monte + dest = position; + dest.x += (rand()-0.5)*10; + dest.y += (rand()-0.5)*10; + goto(dest); // va n'importe où + wait(2); + } + else + { + dest = p.position; + dest.z = position.z; + dist = distance(dest, position); + if ( dist > 1.25 ) + { + jet(1); // monte + goto(p.position); // va sur le matière + } + else + { + jet(-1); // descend + while ( altitude > 0 ); + grab(); // prend la matière + } + } + } + else // porte matière ? + { + jet(1); // monte + p = radar(list, 0, 360, 0, 1000, 1, FilterOnlyLanding); + if ( p == null ) + { + dest = position; + dest.x += (rand()-0.5)*10; + dest.y += (rand()-0.5)*10; + goto(dest); // va n'importe où + wait(2); + } + else + { + dest = p.position; + dest.z = position.z; + dist = distance(dest, position); + if ( dist > 1.25 ) + { + goto(p.position); // va sur la cible + } + else + { + drop(); // lâche la matière + } + } + } + } +} diff --git a/ai/wasp02.txt b/ai/wasp02.txt index 8d7821e0..fdea70fc 100644 --- a/ai/wasp02.txt +++ b/ai/wasp02.txt @@ -1,74 +1,74 @@ -extern void object::Attack( ) -{ - int list[], i; - object p; - float dist; - point dest, center; - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = Derrick; - - while ( true ) - { - if ( load == null ) // ne porte rien ? - { - p = radar(OrgaMatter); // cherche matière - if ( p == null ) - { - jet(1); // monte - dest = position; - dest.x += (rand()-0.5)*10; - dest.y += (rand()-0.5)*10; - goto(dest); // va n'importe où - wait(2); - } - else - { - center = p.position; - dest = p.position; - dest.z = position.z; - dist = distance(dest, position); - if ( dist > 1.25 ) - { - jet(1); // monte - goto(p.position); // va sur la matière - } - else - { - jet(-1); // descend - while ( altitude > 0 ); - grab(); // prend la matière - } - } - } - else // porte matière ? - { - jet(1); // monte - p = radar(list, 0, 360, 0, 1000, 1, FilterOnlyLanding); - if ( p == null ) - { - dest = center; - dest.x += (rand()-0.5)*100; - dest.y += (rand()-0.5)*100; - goto(dest, 0, 1, 0); // va n'importe où - } - else - { - dest = p.position; - dest.z = position.z; - dist = distance(dest, position); - if ( dist > 1.25 ) - { - goto(p.position); // va sur la cible - } - else - { - drop(); // lâche la matière - } - } - } - } -} +extern void object::Attack( ) +{ + int list[], i; + object p; + float dist; + point dest, center; + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = Derrick; + + while ( true ) + { + if ( load == null ) // ne porte rien ? + { + p = radar(OrgaMatter); // cherche matière + if ( p == null ) + { + jet(1); // monte + dest = position; + dest.x += (rand()-0.5)*10; + dest.y += (rand()-0.5)*10; + goto(dest); // va n'importe où + wait(2); + } + else + { + center = p.position; + dest = p.position; + dest.z = position.z; + dist = distance(dest, position); + if ( dist > 1.25 ) + { + jet(1); // monte + goto(p.position); // va sur la matière + } + else + { + jet(-1); // descend + while ( altitude > 0 ); + grab(); // prend la matière + } + } + } + else // porte matière ? + { + jet(1); // monte + p = radar(list, 0, 360, 0, 1000, 1, FilterOnlyLanding); + if ( p == null ) + { + dest = center; + dest.x += (rand()-0.5)*100; + dest.y += (rand()-0.5)*100; + goto(dest, 0, 1, 0); // va n'importe où + } + else + { + dest = p.position; + dest.z = position.z; + dist = distance(dest, position); + if ( dist > 1.25 ) + { + goto(p.position); // va sur la cible + } + else + { + drop(); // lâche la matière + } + } + } + } +} diff --git a/ai/wasp03.txt b/ai/wasp03.txt index cdb7cb17..f181e480 100644 --- a/ai/wasp03.txt +++ b/ai/wasp03.txt @@ -1,110 +1,110 @@ -extern void object::Attack( ) -{ - int list[], i; - object p; - float dist; - point dest; - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = Me; - list[i++] = Derrick; - list[i++] = BotFactory; - list[i++] = PowerStation; - list[i++] = Converter; - list[i++] = RepairCenter; - list[i++] = DefenseTower; - list[i++] = ResearchCenter; - list[i++] = RadarStation; - list[i++] = ExchangePost; - list[i++] = PowerPlant; - list[i++] = AutoLab; - list[i++] = NuclearPlant; - list[i++] = Titanium; -// list[i++] = PowerCell; - list[i++] = NuclearCell; - - while ( true ) - { - if ( load == null ) // ne porte rien ? - { - p = radar(OrgaMatter); // cherche matière - if ( p == null ) - { - jet(1); // monte - dest = position; - dest.x += (rand()-0.5)*10; - dest.y += (rand()-0.5)*10; - goto(dest); // va n'importe où - wait(2); - } - else - { - dest = p.position; - dest.z = position.z; - dist = distance(dest, position); - if ( dist > 1.25 ) - { - jet(1); // monte - goto(p.position); // va sur la matière - } - else - { - jet(-1); // descend - while ( altitude > 0 ); - grab(); // prend la matière - } - } - } - else // porte matière ? - { - jet(1); // monte - p = radar(list, 0, 360, 0, 1000, 1, FilterOnlyLanding); - if ( p == null ) - { - dest = position; - dest.x += (rand()-0.5)*10; - dest.y += (rand()-0.5)*10; - goto(dest); // va n'importe où - wait(2); - } - else - { - dest = p.position; - dest.z = position.z; - dist = distance(dest, position); - if ( dist > 1.25 ) - { - goto(p.position); // va sur la cible - } - else - { - drop(); // lâche la matière - } - } - } - } -} +extern void object::Attack( ) +{ + int list[], i; + object p; + float dist; + point dest; + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = Me; + list[i++] = Derrick; + list[i++] = BotFactory; + list[i++] = PowerStation; + list[i++] = Converter; + list[i++] = RepairCenter; + list[i++] = DefenseTower; + list[i++] = ResearchCenter; + list[i++] = RadarStation; + list[i++] = ExchangePost; + list[i++] = PowerPlant; + list[i++] = AutoLab; + list[i++] = NuclearPlant; + list[i++] = Titanium; +// list[i++] = PowerCell; + list[i++] = NuclearCell; + + while ( true ) + { + if ( load == null ) // ne porte rien ? + { + p = radar(OrgaMatter); // cherche matière + if ( p == null ) + { + jet(1); // monte + dest = position; + dest.x += (rand()-0.5)*10; + dest.y += (rand()-0.5)*10; + goto(dest); // va n'importe où + wait(2); + } + else + { + dest = p.position; + dest.z = position.z; + dist = distance(dest, position); + if ( dist > 1.25 ) + { + jet(1); // monte + goto(p.position); // va sur la matière + } + else + { + jet(-1); // descend + while ( altitude > 0 ); + grab(); // prend la matière + } + } + } + else // porte matière ? + { + jet(1); // monte + p = radar(list, 0, 360, 0, 1000, 1, FilterOnlyLanding); + if ( p == null ) + { + dest = position; + dest.x += (rand()-0.5)*10; + dest.y += (rand()-0.5)*10; + goto(dest); // va n'importe où + wait(2); + } + else + { + dest = p.position; + dest.z = position.z; + dist = distance(dest, position); + if ( dist > 1.25 ) + { + goto(p.position); // va sur la cible + } + else + { + drop(); // lâche la matière + } + } + } + } +} diff --git a/ai/waspe1.txt b/ai/waspe1.txt index 864f7ec4..d5b092ce 100644 --- a/ai/waspe1.txt +++ b/ai/waspe1.txt @@ -1,36 +1,36 @@ -extern void object::Guêpes() -{ -float p;// puissance max des moteurs -float r;// nombre aléatoire -point c;// centre de la zone permise - -c.x = 0; -c.y = 0; -c.z = 0; - -p = 1; -jet( rand()*4 + 1); - -while (true) -{ -if (distance(position, c) > 275) -{ -if (direction(c) > 0) motor(0.7*p, p); else motor(p, 0.7*p); -while (abs(direction(c)) > 30) wait(1); -} - -motor(p,p); -r = rand(); -if (r < 0.4) -{ -motor(p, p-rand()*0.8); -} -if (r > 0.6) -{ -motor(p-rand()*0.8, p); -} -if (r <= 0.7 and r >= 0.3) jet(rand()*4 + 1); - -wait(1); -} -} +extern void object::Guêpes() +{ +float p;// puissance max des moteurs +float r;// nombre aléatoire +point c;// centre de la zone permise + +c.x = 0; +c.y = 0; +c.z = 0; + +p = 1; +jet( rand()*4 + 1); + +while (true) +{ +if (distance(position, c) > 275) +{ +if (direction(c) > 0) motor(0.7*p, p); else motor(p, 0.7*p); +while (abs(direction(c)) > 30) wait(1); +} + +motor(p,p); +r = rand(); +if (r < 0.4) +{ +motor(p, p-rand()*0.8); +} +if (r > 0.6) +{ +motor(p-rand()*0.8, p); +} +if (r <= 0.7 and r >= 0.3) jet(rand()*4 + 1); + +wait(1); +} +} diff --git a/ai/win904a.txt b/ai/win904a.txt index c2fd8d18..4da560ee 100644 --- a/ai/win904a.txt +++ b/ai/win904a.txt @@ -1,17 +1,17 @@ -extern void object::Win( ) -{ - errmode(0); // ne stoppe pas si erreur - - while ( true ) - { - goto( 5, -28, 0,1,1); - goto( 0, -16, 0,1,1); - goto( -2, 2, 0,1,1); - goto(-15, -5, 0,1,1); - goto( -2, 2, 0,0,1); - turn(-90); - goto( 0, -16, 0,1,1); - goto( 0, -28, 0,1,1); - goto( 10, -47, 0,1,1); - } -} +extern void object::Win( ) +{ + errmode(0); // ne stoppe pas si erreur + + while ( true ) + { + goto( 5, -28, 0,1,1); + goto( 0, -16, 0,1,1); + goto( -2, 2, 0,1,1); + goto(-15, -5, 0,1,1); + goto( -2, 2, 0,0,1); + turn(-90); + goto( 0, -16, 0,1,1); + goto( 0, -28, 0,1,1); + goto( 10, -47, 0,1,1); + } +} diff --git a/ai/win904b.txt b/ai/win904b.txt index 8a68f39e..73929f2e 100644 --- a/ai/win904b.txt +++ b/ai/win904b.txt @@ -1,10 +1,10 @@ -extern void object::Win( ) -{ - errmode(0); // ne stoppe pas si erreur - - while ( true ) - { - goto( 13, 4, 0,0,1); - goto(-12, 13, 0,0,1); - } -} +extern void object::Win( ) +{ + errmode(0); // ne stoppe pas si erreur + + while ( true ) + { + goto( 13, 4, 0,0,1); + goto(-12, 13, 0,0,1); + } +} diff --git a/ai/win904c.txt b/ai/win904c.txt index d5fdf411..d4bbcd6f 100644 --- a/ai/win904c.txt +++ b/ai/win904c.txt @@ -1,11 +1,11 @@ -extern void object::Win( ) -{ - errmode(0); // ne stoppe pas si erreur - - while ( true ) - { - goto(5, 40, 8); - wait(5); - goto(-8, -124, 8); - } -} +extern void object::Win( ) +{ + errmode(0); // ne stoppe pas si erreur + + while ( true ) + { + goto(5, 40, 8); + wait(5); + goto(-8, -124, 8); + } +} diff --git a/ai/wingsh02.txt b/ai/wingsh02.txt index 54508910..b83a51b9 100644 --- a/ai/wingsh02.txt +++ b/ai/wingsh02.txt @@ -1,37 +1,37 @@ -extern void object::Attaque1() -{ - -object alien; - -while(true) -{ -if(energyCell != null) if(energyCell.energyLevel > 0.5) break; -} - -aim(-20); - -while(true) -{ -jet(0.4); -while(position.z - topo(position) < 1.5) -{ -wait(1); -} - -alien = radar(AlienAnt, 0, 360, 0, 1000, -1); -if (alien == null) break; -turn(direction(alien.position)); -motor(1,1); -while(distance(position, alien.position) > 50) -{ -wait(0.2); -alien = radar(AlienAnt, 0, 360, 0, 1000, -1); -if (alien == null) break; -turn(direction(alien.position)); -motor(1,1); -} -fire(3); -wait(4); -} - -} +extern void object::Attaque1() +{ + +object alien; + +while(true) +{ +if(energyCell != null) if(energyCell.energyLevel > 0.5) break; +} + +aim(-20); + +while(true) +{ +jet(0.4); +while(position.z - topo(position) < 1.5) +{ +wait(1); +} + +alien = radar(AlienAnt, 0, 360, 0, 1000, -1); +if (alien == null) break; +turn(direction(alien.position)); +motor(1,1); +while(distance(position, alien.position) > 50) +{ +wait(0.2); +alien = radar(AlienAnt, 0, 360, 0, 1000, -1); +if (alien == null) break; +turn(direction(alien.position)); +motor(1,1); +} +fire(3); +wait(4); +} + +} diff --git a/ai/wingshoo.txt b/ai/wingshoo.txt index 7237ff8f..47acc1c1 100644 --- a/ai/wingshoo.txt +++ b/ai/wingshoo.txt @@ -1,34 +1,34 @@ -extern void object::Attaque1() -{ - -object alien; - -while(true) -{ -if(energyCell != null) if(energyCell.energyLevel > 0.5) break; -} - -aim(-20); - -while(true) -{ -jet(0.4); -while(position.z - topo(position) < 1.5) -{ -wait(1); -} - -alien = radar(AlienSpider); -turn(direction(alien.position)); -motor(1,1); -while(distance(position, alien.position) > 15) -{ -alien = radar(AlienSpider); -turn(direction(alien.position)); -motor(1,1); -wait(0.2); -} -fire(1); -} - -} +extern void object::Attaque1() +{ + +object alien; + +while(true) +{ +if(energyCell != null) if(energyCell.energyLevel > 0.5) break; +} + +aim(-20); + +while(true) +{ +jet(0.4); +while(position.z - topo(position) < 1.5) +{ +wait(1); +} + +alien = radar(AlienSpider); +turn(direction(alien.position)); +motor(1,1); +while(distance(position, alien.position) > 15) +{ +alien = radar(AlienSpider); +turn(direction(alien.position)); +motor(1,1); +wait(0.2); +} +fire(1); +} + +} diff --git a/ai/worm01.txt b/ai/worm01.txt index 4f4f0aa3..e88c3638 100644 --- a/ai/worm01.txt +++ b/ai/worm01.txt @@ -1,31 +1,31 @@ -extern void object::Attack( ) -{ - int enemy; - object p; - float dist, prox; - point dest; - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - enemy = WheeledGrabber; - - while ( true ) - { - p = radar(enemy); // cherche cible - if ( p == null ) - { - wait(2); - } - else - { - dist = distance(p.position, position); - prox = dist/2; // on se rapproche - if ( prox < 2.5 ) prox = 2.5; // pas trop tout de même - dest.x = (position.x-p.position.x)*prox/dist + p.position.x; - dest.y = (position.y-p.position.y)*prox/dist + p.position.y; - dest.z = (position.z-p.position.z)*prox/dist + p.position.z; - goto(dest); // va sur la cible - } - } -} +extern void object::Attack( ) +{ + int enemy; + object p; + float dist, prox; + point dest; + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + enemy = WheeledGrabber; + + while ( true ) + { + p = radar(enemy); // cherche cible + if ( p == null ) + { + wait(2); + } + else + { + dist = distance(p.position, position); + prox = dist/2; // on se rapproche + if ( prox < 2.5 ) prox = 2.5; // pas trop tout de même + dest.x = (position.x-p.position.x)*prox/dist + p.position.x; + dest.y = (position.y-p.position.y)*prox/dist + p.position.y; + dest.z = (position.z-p.position.z)*prox/dist + p.position.z; + goto(dest); // va sur la cible + } + } +} diff --git a/ai/worm02.txt b/ai/worm02.txt index b2203af7..a0b68706 100644 --- a/ai/worm02.txt +++ b/ai/worm02.txt @@ -1,111 +1,111 @@ -extern void object::Attack( ) -{ - int list[]; - int i; - object p; - float dim, dist, prox; - point nav1, nav2, nav3, nav4, dest, center; - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = RadarStation; -// list[i++] = DefenseTower; - - while ( true ) - { - p = TargetSearch(list); // cherche cible - if ( p == null ) - { - dim = 1+rand()*2; - nav1.x = position.x+dim; - nav1.y = position.y+dim; - nav2.x = position.x+dim; - nav2.y = position.y-dim; - nav3.x = position.x-dim; - nav3.y = position.y-dim; - nav4.x = position.x-dim; - nav4.y = position.y+dim; - - while ( true ) - { - goto(nav1); - p = TargetSearch(list); - if ( p != null ) break; - - goto(nav2); - p = TargetSearch(list); - if ( p != null ) break; - - goto(nav3); - p = TargetSearch(list); - if ( p != null ) break; - - goto(nav4); - p = TargetSearch(list); - if ( p != null ) break; - } - } - else - { - dist = distance(p.position, position); - prox = dist/2; // on se rapproche - if ( prox < 2.5 ) - { - dest.x = position.x+(rand()-0.5)*8; - dest.y = position.y+(rand()-0.5)*8; - dest.z = position.z; - } - else - { - dest.x = (position.x-p.position.x)*prox/dist + p.position.x; - dest.y = (position.y-p.position.y)*prox/dist + p.position.y; - dest.z = (position.z-p.position.z)*prox/dist + p.position.z; - } - goto(dest); // va sur la cible - } - } -} - -// Cherche une cible sur l'île. Si la cible est plus loin, -// elle est ignorée. - -object object::TargetSearch(int[] list) -{ - object p; - point center; - float dist; - - p = radar(list); - if ( p == null ) return null; - - center.x = 0; - center.y = 100; // sommet de l'île - center.z = p.position.z; - dist = distance(p.position, center); - if ( dist > 80 ) return null; // ignore si trop loin - - return p; -} +extern void object::Attack( ) +{ + int list[]; + int i; + object p; + float dim, dist, prox; + point nav1, nav2, nav3, nav4, dest, center; + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = RadarStation; +// list[i++] = DefenseTower; + + while ( true ) + { + p = TargetSearch(list); // cherche cible + if ( p == null ) + { + dim = 1+rand()*2; + nav1.x = position.x+dim; + nav1.y = position.y+dim; + nav2.x = position.x+dim; + nav2.y = position.y-dim; + nav3.x = position.x-dim; + nav3.y = position.y-dim; + nav4.x = position.x-dim; + nav4.y = position.y+dim; + + while ( true ) + { + goto(nav1); + p = TargetSearch(list); + if ( p != null ) break; + + goto(nav2); + p = TargetSearch(list); + if ( p != null ) break; + + goto(nav3); + p = TargetSearch(list); + if ( p != null ) break; + + goto(nav4); + p = TargetSearch(list); + if ( p != null ) break; + } + } + else + { + dist = distance(p.position, position); + prox = dist/2; // on se rapproche + if ( prox < 2.5 ) + { + dest.x = position.x+(rand()-0.5)*8; + dest.y = position.y+(rand()-0.5)*8; + dest.z = position.z; + } + else + { + dest.x = (position.x-p.position.x)*prox/dist + p.position.x; + dest.y = (position.y-p.position.y)*prox/dist + p.position.y; + dest.z = (position.z-p.position.z)*prox/dist + p.position.z; + } + goto(dest); // va sur la cible + } + } +} + +// Cherche une cible sur l'île. Si la cible est plus loin, +// elle est ignorée. + +object object::TargetSearch(int[] list) +{ + object p; + point center; + float dist; + + p = radar(list); + if ( p == null ) return null; + + center.x = 0; + center.y = 100; // sommet de l'île + center.z = p.position.z; + dist = distance(p.position, center); + if ( dist > 80 ) return null; // ignore si trop loin + + return p; +} diff --git a/ai/worm03.txt b/ai/worm03.txt index 522bfca1..f41dd3e6 100644 --- a/ai/worm03.txt +++ b/ai/worm03.txt @@ -1,90 +1,90 @@ -extern void object::Attack( ) -{ - int list[]; - int i; - object p; - float dim, dist, prox; - point nav1, nav2, nav3, nav4, dest; - - errmode(0); // ne stoppe pas si erreur - while ( ismovie() != 0 ) wait(1); - - i = 0; - list[i++] = WingedGrabber; - list[i++] = TrackedGrabber; - list[i++] = WheeledGrabber; - list[i++] = LeggedGrabber; - list[i++] = WingedShooter; - list[i++] = TrackedShooter; - list[i++] = WheeledShooter; - list[i++] = LeggedShooter; - list[i++] = WingedOrgaShooter; - list[i++] = TrackedOrgaShooter; - list[i++] = WheeledOrgaShooter; - list[i++] = LeggedOrgaShooter; - list[i++] = WingedSniffer; - list[i++] = TrackedSniffer; - list[i++] = WheeledSniffer; - list[i++] = LeggedSniffer; - list[i++] = Thumper; - list[i++] = PhazerShooter; - list[i++] = Recycler; - list[i++] = Shielder; - list[i++] = Subber; - list[i++] = RadarStation; -// list[i++] = DefenseTower; - - while ( true ) - { - p = radar(list, 0, 360, 0, 60); // cherche cible - if ( p == null ) - { - dim = 1+rand()*2; - nav1.x = position.x+dim; - nav1.y = position.y+dim; - nav2.x = position.x+dim; - nav2.y = position.y-dim; - nav3.x = position.x-dim; - nav3.y = position.y-dim; - nav4.x = position.x-dim; - nav4.y = position.y+dim; - - while ( true ) - { - goto(nav1); - p = radar(list, 0, 360, 0, 60); - if ( p != null ) break; - - goto(nav2); - p = radar(list, 0, 360, 0, 60); - if ( p != null ) break; - - goto(nav3); - p = radar(list, 0, 360, 0, 60); - if ( p != null ) break; - - goto(nav4); - p = radar(list, 0, 360, 0, 60); - if ( p != null ) break; - } - } - else - { - dist = distance(p.position, position); - prox = dist/2; // on se rapproche - if ( prox < 2.5 ) - { - dest.x = position.x+(rand()-0.5)*8; - dest.y = position.y+(rand()-0.5)*8; - dest.z = position.z; - } - else - { - dest.x = (position.x-p.position.x)*prox/dist + p.position.x; - dest.y = (position.y-p.position.y)*prox/dist + p.position.y; - dest.z = (position.z-p.position.z)*prox/dist + p.position.z; - } - goto(dest); // va sur la cible - } - } -} +extern void object::Attack( ) +{ + int list[]; + int i; + object p; + float dim, dist, prox; + point nav1, nav2, nav3, nav4, dest; + + errmode(0); // ne stoppe pas si erreur + while ( ismovie() != 0 ) wait(1); + + i = 0; + list[i++] = WingedGrabber; + list[i++] = TrackedGrabber; + list[i++] = WheeledGrabber; + list[i++] = LeggedGrabber; + list[i++] = WingedShooter; + list[i++] = TrackedShooter; + list[i++] = WheeledShooter; + list[i++] = LeggedShooter; + list[i++] = WingedOrgaShooter; + list[i++] = TrackedOrgaShooter; + list[i++] = WheeledOrgaShooter; + list[i++] = LeggedOrgaShooter; + list[i++] = WingedSniffer; + list[i++] = TrackedSniffer; + list[i++] = WheeledSniffer; + list[i++] = LeggedSniffer; + list[i++] = Thumper; + list[i++] = PhazerShooter; + list[i++] = Recycler; + list[i++] = Shielder; + list[i++] = Subber; + list[i++] = RadarStation; +// list[i++] = DefenseTower; + + while ( true ) + { + p = radar(list, 0, 360, 0, 60); // cherche cible + if ( p == null ) + { + dim = 1+rand()*2; + nav1.x = position.x+dim; + nav1.y = position.y+dim; + nav2.x = position.x+dim; + nav2.y = position.y-dim; + nav3.x = position.x-dim; + nav3.y = position.y-dim; + nav4.x = position.x-dim; + nav4.y = position.y+dim; + + while ( true ) + { + goto(nav1); + p = radar(list, 0, 360, 0, 60); + if ( p != null ) break; + + goto(nav2); + p = radar(list, 0, 360, 0, 60); + if ( p != null ) break; + + goto(nav3); + p = radar(list, 0, 360, 0, 60); + if ( p != null ) break; + + goto(nav4); + p = radar(list, 0, 360, 0, 60); + if ( p != null ) break; + } + } + else + { + dist = distance(p.position, position); + prox = dist/2; // on se rapproche + if ( prox < 2.5 ) + { + dest.x = position.x+(rand()-0.5)*8; + dest.y = position.y+(rand()-0.5)*8; + dest.z = position.z; + } + else + { + dest.x = (position.x-p.position.x)*prox/dist + p.position.x; + dest.y = (position.y-p.position.y)*prox/dist + p.position.y; + dest.z = (position.z-p.position.z)*prox/dist + p.position.z; + } + goto(dest); // va sur la cible + } + } +} diff --git a/help/authors.txt b/help/authors.txt index 926a1c22..392b4ee5 100644 --- a/help/authors.txt +++ b/help/authors.txt @@ -1,7 +1,7 @@ -Development team: Beta tester core team: - -- Daniel Roux - Adrien Roux - Michael Jubin -- Denis Dumoulin - Didier Raboud - Daniel Sauthier -- Otto Kölbl - Nicolas Beuchat - Nicolas Stubi -- Michael Walz - Joël Roux - Patrick Thévoz -- Didier Gertsch +Development team: Beta tester core team: + +- Daniel Roux - Adrien Roux - Michael Jubin +- Denis Dumoulin - Didier Raboud - Daniel Sauthier +- Otto Kölbl - Nicolas Beuchat - Nicolas Stubi +- Michael Walz - Joël Roux - Patrick Thévoz +- Didier Gertsch diff --git a/help/cbot.txt b/help/cbot.txt index 0160fc8a..87b2a004 100644 --- a/help/cbot.txt +++ b/help/cbot.txt @@ -1,91 +1,91 @@ -\b;Programming - the CBOT language -The CBOT language is very close in structure and syntax to C++ and Java. It has been adapted for the specific purposes of COLOBOT, and for an efficient pedagogical approach. -This language is made up of instructions (see below), \l;blocks\u cbot\bloc;, \l;functions\u cbot\function;, \l;classes\u cbot\class;, \l;variables\u cbot\var;, \l;arrays\u cbot\array;, \l;expressions\u cbot\expr; and \l;conditions\u cbot\cond;. - -o \c;\token;Instructions\norm;\n; -In the program editor, an instruction in the CBOT language is always displayed on an orange background. If an instruction hasn't got an orange background, this means that it has been misspelled. Instruction names are always written in lower case. - -o \c;\type;Type\norm;\n; -The \l;type\u cbot\type; of a variable appears with a green background. - -o \c;\const;Constants\norm;\n; -Constants like \l;categories\u cbot\category; are displayed with a red background. - -\t;Instructions in the CBOT language: -\c;\l;extern\u cbot\extern; \n;Indicate the main function -\c;\l;if\u cbot\if; \n;Choice structure -\c;\l;else\u cbot\if; \n;Alternative choice structure -\c;\l;for\u cbot\for; \n;Loop structure -\c;\l;while\u cbot\while; \n;Control structure -\c;\l;do\u cbot\do; \n;Control structure -\c;\l;break\u cbot\break; \n;Exit from a loop -\c;\l;continue\u cbot\continue; \n;Continues the loop -\c;\l;return\u cbot\return; \n;Exit from a function -\c;\l;sizeof\u cbot\sizeof; \n;Size of an array - -\t;Specific instructions for bots: -\c;\l;radar\u cbot\radar; \n;Object detection -\c;\l;direction\u cbot\direct; \n;Calculates a rotation angle -\c;\l;distance\u cbot\dist; \n;Calculates a distance -\c;\l;distance2d\u cbot\dist2d; \n;Calculates a distance -\c;\l;wait\u cbot\wait; \n;Waits -\c;\l;move\u cbot\move; \n;Moves forward or backward -\c;\l;turn\u cbot\turn; \n;Turns -\c;\l;goto\u cbot\goto; \n;Goes to a given position -\c;\l;motor\u cbot\motor; \n;Direct motor control -\c;\l;jet\u cbot\jet; \n;Direct jet engine control -\c;\l;message\u cbot\message; \n;Displays a message -\c;\l;retobject\u cbot\retobj; \n;Returns an object from a function -\c;\l;errmode\u cbot\errmode; \n;Error treatement control -\c;\l;abstime\u cbot\abstime; \n;Returns the absolute time - -\t;Instructions about topology: -\c;\l;space\u cbot\space; \n;Calculates a free space -\c;\l;topo\u cbot\topo; \n;Returns the altitude of a point -\c;\l;flatground\u cbot\flatgrnd; \n;Returns radius of a flat area - -\t;Instructions specific to some bots: -\c;\l;grab\u cbot\grab; \n;Picks up an object -\c;\l;drop\u cbot\drop; \n;Puts down an object -\c;\l;sniff\u cbot\sniff; \n;Sounds the subsoil -\c;\l;thump\u cbot\thump; \n;Overturns alien insects -\c;\l;recycle\u cbot\recycle; \n;Recycles a derelict bot -\c;\l;shield\u cbot\shield; \n;Extends or withdraws the shield -\c;\l;fire\u cbot\fire; \n;Fires the cannon -\c;\l;aim\u cbot\aim; \n;Vertical angle of the cannon - -\t;Specific instructions for exchange posts: -\c;\l;receive\u cbot\receive; \n;Receives an information -\c;\l;send\u cbot\send; \n;Sends a new information -\c;\l;testinfo\u cbot\testinfo; \n;Tests if an information exists -\c;\l;deleteinfo\u cbot\delinfo; \n;Deletes an existing information - -\t;Specific instructions for classes: -\c;\l;class\u cbot\class; \n;Class declararion -\c;\l;public\u cbot\public; \n;Declares a public function -\c;\l;private\u cbot\private; \n;Declares a private class member -\c;\l;static\u cbot\static; \n;Declares a static class member -\c;\l;synchronized\u cbot\synchro; \n;Prevents simultaneous execution -\c;\l;new\u cbot\new; \n;Creates a new instance -\c;\l;this\u cbot\this; \n;Reference to the current instance - -\t;Specific instructions for strings: -\c;\l;strlen\u cbot\strlen; \n;Gets string length -\c;\l;strleft\u cbot\strleft; \n;Extracts left part -\c;\l;strright\u cbot\strright; \n;Extracts right part -\c;\l;strmid\u cbot\strmid; \n;Extracts center part -\c;\l;strfind\u cbot\strfind; \n;Finds a substring. -\c;\l;strval\u cbot\strval; \n;Converts string to number -\c;\l;strupper\u cbot\strupper; \n;Converts to upper case -\c;\l;strlower\u cbot\strlower; \n;Converts to lower case - -\t;Specific instructions for files: -\c;\l;open\u cbot\open; \n;Opens a file -\c;\l;close\u cbot\close; \n;Closes a file -\c;\l;writeln\u cbot\writeln; \n;Writes line to a file -\c;\l;readln\u cbot\readln; \n;Reads line from a file -\c;\l;eof\u cbot\eof; \n;Tests if end of file -\c;\l;deletefile\u cbot\deletef; \n;Deletes a file - -\t;See also -\l;Types\u cbot\type; and \l;categories\u cbot\category;. +\b;Programming - the CBOT language +The CBOT language is very close in structure and syntax to C++ and Java. It has been adapted for the specific purposes of COLOBOT, and for an efficient pedagogical approach. +This language is made up of instructions (see below), \l;blocks\u cbot\bloc;, \l;functions\u cbot\function;, \l;classes\u cbot\class;, \l;variables\u cbot\var;, \l;arrays\u cbot\array;, \l;expressions\u cbot\expr; and \l;conditions\u cbot\cond;. + +o \c;\token;Instructions\norm;\n; +In the program editor, an instruction in the CBOT language is always displayed on an orange background. If an instruction hasn't got an orange background, this means that it has been misspelled. Instruction names are always written in lower case. + +o \c;\type;Type\norm;\n; +The \l;type\u cbot\type; of a variable appears with a green background. + +o \c;\const;Constants\norm;\n; +Constants like \l;categories\u cbot\category; are displayed with a red background. + +\t;Instructions in the CBOT language: +\c;\l;extern\u cbot\extern; \n;Indicate the main function +\c;\l;if\u cbot\if; \n;Choice structure +\c;\l;else\u cbot\if; \n;Alternative choice structure +\c;\l;for\u cbot\for; \n;Loop structure +\c;\l;while\u cbot\while; \n;Control structure +\c;\l;do\u cbot\do; \n;Control structure +\c;\l;break\u cbot\break; \n;Exit from a loop +\c;\l;continue\u cbot\continue; \n;Continues the loop +\c;\l;return\u cbot\return; \n;Exit from a function +\c;\l;sizeof\u cbot\sizeof; \n;Size of an array + +\t;Specific instructions for bots: +\c;\l;radar\u cbot\radar; \n;Object detection +\c;\l;direction\u cbot\direct; \n;Calculates a rotation angle +\c;\l;distance\u cbot\dist; \n;Calculates a distance +\c;\l;distance2d\u cbot\dist2d; \n;Calculates a distance +\c;\l;wait\u cbot\wait; \n;Waits +\c;\l;move\u cbot\move; \n;Moves forward or backward +\c;\l;turn\u cbot\turn; \n;Turns +\c;\l;goto\u cbot\goto; \n;Goes to a given position +\c;\l;motor\u cbot\motor; \n;Direct motor control +\c;\l;jet\u cbot\jet; \n;Direct jet engine control +\c;\l;message\u cbot\message; \n;Displays a message +\c;\l;retobject\u cbot\retobj; \n;Returns an object from a function +\c;\l;errmode\u cbot\errmode; \n;Error treatement control +\c;\l;abstime\u cbot\abstime; \n;Returns the absolute time + +\t;Instructions about topology: +\c;\l;space\u cbot\space; \n;Calculates a free space +\c;\l;topo\u cbot\topo; \n;Returns the altitude of a point +\c;\l;flatground\u cbot\flatgrnd; \n;Returns radius of a flat area + +\t;Instructions specific to some bots: +\c;\l;grab\u cbot\grab; \n;Picks up an object +\c;\l;drop\u cbot\drop; \n;Puts down an object +\c;\l;sniff\u cbot\sniff; \n;Sounds the subsoil +\c;\l;thump\u cbot\thump; \n;Overturns alien insects +\c;\l;recycle\u cbot\recycle; \n;Recycles a derelict bot +\c;\l;shield\u cbot\shield; \n;Extends or withdraws the shield +\c;\l;fire\u cbot\fire; \n;Fires the cannon +\c;\l;aim\u cbot\aim; \n;Vertical angle of the cannon + +\t;Specific instructions for exchange posts: +\c;\l;receive\u cbot\receive; \n;Receives an information +\c;\l;send\u cbot\send; \n;Sends a new information +\c;\l;testinfo\u cbot\testinfo; \n;Tests if an information exists +\c;\l;deleteinfo\u cbot\delinfo; \n;Deletes an existing information + +\t;Specific instructions for classes: +\c;\l;class\u cbot\class; \n;Class declararion +\c;\l;public\u cbot\public; \n;Declares a public function +\c;\l;private\u cbot\private; \n;Declares a private class member +\c;\l;static\u cbot\static; \n;Declares a static class member +\c;\l;synchronized\u cbot\synchro; \n;Prevents simultaneous execution +\c;\l;new\u cbot\new; \n;Creates a new instance +\c;\l;this\u cbot\this; \n;Reference to the current instance + +\t;Specific instructions for strings: +\c;\l;strlen\u cbot\strlen; \n;Gets string length +\c;\l;strleft\u cbot\strleft; \n;Extracts left part +\c;\l;strright\u cbot\strright; \n;Extracts right part +\c;\l;strmid\u cbot\strmid; \n;Extracts center part +\c;\l;strfind\u cbot\strfind; \n;Finds a substring. +\c;\l;strval\u cbot\strval; \n;Converts string to number +\c;\l;strupper\u cbot\strupper; \n;Converts to upper case +\c;\l;strlower\u cbot\strlower; \n;Converts to lower case + +\t;Specific instructions for files: +\c;\l;open\u cbot\open; \n;Opens a file +\c;\l;close\u cbot\close; \n;Closes a file +\c;\l;writeln\u cbot\writeln; \n;Writes line to a file +\c;\l;readln\u cbot\readln; \n;Reads line from a file +\c;\l;eof\u cbot\eof; \n;Tests if end of file +\c;\l;deletefile\u cbot\deletef; \n;Deletes a file + +\t;See also +\l;Types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/abstime.txt b/help/cbot/abstime.txt index ada9e57c..bdfe4c90 100644 --- a/help/cbot/abstime.txt +++ b/help/cbot/abstime.txt @@ -1,11 +1,11 @@ -\b;Instruction \c;abstime\n; -Syntax¦: -\s;\c;abstime ( );\n; - -Return the time in seconds elapsed since the beginning of the mission. - -\t;Return: \c;\l;float\u cbot\float;\n; -Time in seconds. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;abstime\n; +Syntax¦: +\s;\c;abstime ( );\n; + +Return the time in seconds elapsed since the beginning of the mission. + +\t;Return: \c;\l;float\u cbot\float;\n; +Time in seconds. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/aim.txt b/help/cbot/aim.txt index 94c536d8..8d1e460f 100644 --- a/help/cbot/aim.txt +++ b/help/cbot/aim.txt @@ -1,21 +1,21 @@ -\b;Instruction \c;aim\n; -Syntax : -\s;\c;aim ( angle );\n; - -This instruction sets the vertical angle of the cannon. The following robots are equipped with a cannon: -o \l;Shooter\u object\botfr; -o \l;Orga shooter\u object\botor; -o \l;Phazer shooter\u object\botphaz; - -When controlling the robot through programming, the only way to turn the gun left or right is to turn the whole robot with the instruction \c;\l;turn\u cbot\turn;\n;. - -\t;angle: \c;\l;float\u cbot\float;\n; -Angle in degrees of the gun relative to the robot. A positive value orients the gun upward. For shooters and orga shooters, the angle must range from \c;-20\n; to \c;+20\n; degrees. For phazer shooters, the angle must range from \c;-20\n; to \c;45\n; degrees. - -\t;Return value: \c;\l;int\u cbot\int;\n; -Zero if everything is OK, a value different from zero if the rotation could not be performed: -\c;== 0 \n;The gun has now got the desired orientation -\c;!= 0 \n;rotation impossible - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;aim\n; +Syntax : +\s;\c;aim ( angle );\n; + +This instruction sets the vertical angle of the cannon. The following robots are equipped with a cannon: +o \l;Shooter\u object\botfr; +o \l;Orga shooter\u object\botor; +o \l;Phazer shooter\u object\botphaz; + +When controlling the robot through programming, the only way to turn the gun left or right is to turn the whole robot with the instruction \c;\l;turn\u cbot\turn;\n;. + +\t;angle: \c;\l;float\u cbot\float;\n; +Angle in degrees of the gun relative to the robot. A positive value orients the gun upward. For shooters and orga shooters, the angle must range from \c;-20\n; to \c;+20\n; degrees. For phazer shooters, the angle must range from \c;-20\n; to \c;45\n; degrees. + +\t;Return value: \c;\l;int\u cbot\int;\n; +Zero if everything is OK, a value different from zero if the rotation could not be performed: +\c;== 0 \n;The gun has now got the desired orientation +\c;!= 0 \n;rotation impossible + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/array.txt b/help/cbot/array.txt index 8d08bbd0..152bed55 100644 --- a/help/cbot/array.txt +++ b/help/cbot/array.txt @@ -1,31 +1,31 @@ -\b;Arrays -An array is basically a collection of variables of the same type or class. You can use N dimensionnal arrays in the CBOT language. Each dimension is limited to 9999 elements. You must use square brackets \c;[]\n; after the type name or the variable name to declare an array. -\c; -\s;int [ ] a; // an array of int -\s;int a [12]; // an array of int limited to 12 elements -\s;string s[3]; // an array of 3 strings -\s;float xy[][]; // an 2 dimensionnal array of floats -\n; -Actually when the CBOT interpreter encounters an array declaration, it just creates a \c;\l;null\u cbot\null;\n; \l;reference\u cbot\pointer;: -\c; -\s;int a[5]; // a is now a null reference -\n; -As soon as you put values into the array, the elements are created and the reference is initialized: -\c; -\s;a[2] = 213; // a points to -\s; // 3 élements [0], [1] et [2] -\n; -After this operation, \c;a\n; contains a reference to the elements of the array. Elements \c;[0]\n; and \c;[1]\n; are created but not initialized because an array cannot contain empty elements. The \c;\l;sizeof\u cbot\sizeof;\n; instruction allows you to obtain the number of elements contained in an array. - -When an array is declared with a maximum size, the program will stop as soon as there is an access beyond the maximum array size. No error is signalled during compilation even if the error is obvious: -\c; -\s;{ -\s; int a[5]; -\s; a[7] = 123; // no error at compile time -\s; // but error at run time -\s;} -\n; -If you pass an array as parameter to a \l;function\u cbot\function;, the function only receives a \l;reference\u cbot\pointer; to the array. That means if you modify an array element in the function, the element of the array that has been passed the function will be actuallay modified. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Arrays +An array is basically a collection of variables of the same type or class. You can use N dimensionnal arrays in the CBOT language. Each dimension is limited to 9999 elements. You must use square brackets \c;[]\n; after the type name or the variable name to declare an array. +\c; +\s;int [ ] a; // an array of int +\s;int a [12]; // an array of int limited to 12 elements +\s;string s[3]; // an array of 3 strings +\s;float xy[][]; // an 2 dimensionnal array of floats +\n; +Actually when the CBOT interpreter encounters an array declaration, it just creates a \c;\l;null\u cbot\null;\n; \l;reference\u cbot\pointer;: +\c; +\s;int a[5]; // a is now a null reference +\n; +As soon as you put values into the array, the elements are created and the reference is initialized: +\c; +\s;a[2] = 213; // a points to +\s; // 3 élements [0], [1] et [2] +\n; +After this operation, \c;a\n; contains a reference to the elements of the array. Elements \c;[0]\n; and \c;[1]\n; are created but not initialized because an array cannot contain empty elements. The \c;\l;sizeof\u cbot\sizeof;\n; instruction allows you to obtain the number of elements contained in an array. + +When an array is declared with a maximum size, the program will stop as soon as there is an access beyond the maximum array size. No error is signalled during compilation even if the error is obvious: +\c; +\s;{ +\s; int a[5]; +\s; a[7] = 123; // no error at compile time +\s; // but error at run time +\s;} +\n; +If you pass an array as parameter to a \l;function\u cbot\function;, the function only receives a \l;reference\u cbot\pointer; to the array. That means if you modify an array element in the function, the element of the array that has been passed the function will be actuallay modified. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/bloc.txt b/help/cbot/bloc.txt index 99e57e87..287536ea 100644 --- a/help/cbot/bloc.txt +++ b/help/cbot/bloc.txt @@ -1,49 +1,49 @@ -\b;Blocks -You can use braces \c;{ }\n; to group a number of instructions together in order to make one single block out of them, for example: -\c; -\s; { -\s; float t; -\s; t = a; -\s; a = b; -\s; b = t; // switches round a and b -\s; } -\n; -Every instruction in the block is followed by a \l;semicolon\u cbot\term;, but the block itself is not. -Let us take the following example with the instruction \c;\l;if\u cbot\if;\n; to illustrate the use of blocks in a program: -\c; -\s; if ( a < b ) -\s; \n;instruction 1\c;; -\s; \n;instruction 2\c;; -\s; \n;instruction 3\c;; -\n; -If the \l;condition\u cbot\cond; is true, instructions 1, 2 and 3 are performed. If the condition is false, only instruction 1 is ignored, instructions 2 and 3 are performed. The fact that instruction 2 is lined up with instruction 1 does not matter. -If you want to perform instructions 1 and 2 only if the condition is true, you have to bracket them together in a block: -\c; -\s; if ( a < b ) -\s; { -\s; \n;instruction 1\c;; -\s; \n;instruction 2\c;; -\s; } -\s; \n;instruction 3\c;; -\n; -Blocks may be needed with instructions \c;\l;if\u cbot\if;\n;, \c;\l;while\u cbot\while;\n; and \c;\l;for\u cbot\for;\n;, in order to group several instructions that should be performed only if a condition is true, or repeated several times. -You can fit blocks into other blocks, on as many levels as you need. Here is an example of imbrication on two levels : -\c; -\s; if ( a > b ) -\s; { -\s; int i = 0; -\s; while ( i < 18 ) -\s; { -\s; move(10); -\s; turn(5); -\s; i = i+1; -\s; } -\s; } -\n; -You had better line up the open brace \c;{\n; with the closing brace \c;}\n; in order to improve readability, but it is not compulsory. The following example takes less space, is equivalent to the previous example, but it is not advisable to write your programs in the following style : -\c; -\s; if(a>b) { int i=0; while(i<18) { -\s; move(10);turn(5);i=i+1; }} -\n; -\t;See also -\l;Instructions\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Blocks +You can use braces \c;{ }\n; to group a number of instructions together in order to make one single block out of them, for example: +\c; +\s; { +\s; float t; +\s; t = a; +\s; a = b; +\s; b = t; // switches round a and b +\s; } +\n; +Every instruction in the block is followed by a \l;semicolon\u cbot\term;, but the block itself is not. +Let us take the following example with the instruction \c;\l;if\u cbot\if;\n; to illustrate the use of blocks in a program: +\c; +\s; if ( a < b ) +\s; \n;instruction 1\c;; +\s; \n;instruction 2\c;; +\s; \n;instruction 3\c;; +\n; +If the \l;condition\u cbot\cond; is true, instructions 1, 2 and 3 are performed. If the condition is false, only instruction 1 is ignored, instructions 2 and 3 are performed. The fact that instruction 2 is lined up with instruction 1 does not matter. +If you want to perform instructions 1 and 2 only if the condition is true, you have to bracket them together in a block: +\c; +\s; if ( a < b ) +\s; { +\s; \n;instruction 1\c;; +\s; \n;instruction 2\c;; +\s; } +\s; \n;instruction 3\c;; +\n; +Blocks may be needed with instructions \c;\l;if\u cbot\if;\n;, \c;\l;while\u cbot\while;\n; and \c;\l;for\u cbot\for;\n;, in order to group several instructions that should be performed only if a condition is true, or repeated several times. +You can fit blocks into other blocks, on as many levels as you need. Here is an example of imbrication on two levels : +\c; +\s; if ( a > b ) +\s; { +\s; int i = 0; +\s; while ( i < 18 ) +\s; { +\s; move(10); +\s; turn(5); +\s; i = i+1; +\s; } +\s; } +\n; +You had better line up the open brace \c;{\n; with the closing brace \c;}\n; in order to improve readability, but it is not compulsory. The following example takes less space, is equivalent to the previous example, but it is not advisable to write your programs in the following style : +\c; +\s; if(a>b) { int i=0; while(i<18) { +\s; move(10);turn(5);i=i+1; }} +\n; +\t;See also +\l;Instructions\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/bool.txt b/help/cbot/bool.txt index 6837a8c4..b97ab9d4 100644 --- a/help/cbot/bool.txt +++ b/help/cbot/bool.txt @@ -1,5 +1,5 @@ -\b;Type \c;bool\n; -In a variable of this type you can put a boolean value, that is a value that can take only two states: true or false. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Type \c;bool\n; +In a variable of this type you can put a boolean value, that is a value that can take only two states: true or false. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/break.txt b/help/cbot/break.txt index 27bb7416..2833e6c2 100644 --- a/help/cbot/break.txt +++ b/help/cbot/break.txt @@ -1,25 +1,25 @@ -\b;Instruction \c;break\n; -Syntax : -\s;\c;while ( condition ) -\s;{ -\s; break; -\s;} -\n; -With this instruction, you can get out immediately of a \c;\l;while\u cbot\while;\n; or \c;\l;for\u cbot\for;\n; loop. - -Here is an example: -\s;\c;int i = 0; -\s;while ( true ) -\s;{ -\s; \n;Instructions ...\c; -\s; i = i+1; -\s; if ( i >= 10 ) -\s; { -\s; break; -\s; } -\s; \n;more instructions ...\c; -\s;} -\n; - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;break\n; +Syntax : +\s;\c;while ( condition ) +\s;{ +\s; break; +\s;} +\n; +With this instruction, you can get out immediately of a \c;\l;while\u cbot\while;\n; or \c;\l;for\u cbot\for;\n; loop. + +Here is an example: +\s;\c;int i = 0; +\s;while ( true ) +\s;{ +\s; \n;Instructions ...\c; +\s; i = i+1; +\s; if ( i >= 10 ) +\s; { +\s; break; +\s; } +\s; \n;more instructions ...\c; +\s;} +\n; + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/category.txt b/help/cbot/category.txt index 0260750a..6dd7f3c2 100644 --- a/help/cbot/category.txt +++ b/help/cbot/category.txt @@ -1,108 +1,108 @@ -\b;Value \c;Categories\n; -Categories represent the names of objects in the CBOT language. Everything in COLOBOT is an object: robots, buildings, raw materials, etc., even yourself. - -In a program, categories are always displayed on a \const;red background\norm;. If a category isn't highlighted in red, it is misspelled. Caps and lower cases should be kept as is. - -Below are the different categories available : - -\t;Buildings : - -\button 176; \c;\l;Houston\u object\Huston; \n;Mission Control -\button 171; \c;\l;SpaceShip\u object\base; \n;Spaceship -\button 160; \c;\l;BotFactory\u object\factory; \n;Robot Factory -\button 163; \c;\l;ResearchCenter\u object\research; \n;Research Center -\button 168; \c;\l;RadarStation\u object\radar; \n;Radar -\button 172; \c;\l;ExchangePost\u object\exchange; \n;Information Exchange Post -\button 169; \c;\l;RepairCenter\u object\repair; \n;Repair Center -\button 165; \c;\l;DefenseTower\u object\tower; \n;Defense Tower -\button 166; \c;\l;AutoLab\u object\labo; \n;Organic Matter Analyzer -\button 164; \c;\l;PowerStation\u object\station; \n;Power Station -\button 167; \c;\l;PowerPlant\u object\energy; \n;Power Cell Factory -\button 170; \c;\l;NuclearPlant\u object\nuclear; \n;Nuclear Plant -\button 162; \c;\l;Converter\u object\convert; \n;Titanium Converter -\button 161; \c;\l;Derrick\u object\derrick; \n;Derrick -\button 174; \c;\l;PowerCaptor\u object\captor; \n;Parabolic Lightning Conductor -\button 175; \c;\l;Vault\u object\safe; \n;Vault - \c;\l;StartArea\u object\start; \n;Starting Pad - \c;\l;GoalArea\u object\goal; \n;Finishing Pad - \c;\l;AlienNest\u object\nest; \n;Alien Nest - - -\t;Portable Objects : - - \c;\l;TitaniumOre\u object\titanore; \n;Titanium Ore - \c;\l;UraniumOre\u object\uranore; \n;Uranium Ore - \c;\l;Titanium\u object\titan; \n;Cube of converted Titanium - \c;\l;PowerCell\u object\power; \n;Regular Power Cell - \c;\l;NuclearCell\u object\atomic; \n;Nuclear Power Cell - \c;\l;OrgaMatter\u object\bullet; \n;Organic Matter - \c;\l;BlackBox\u object\bbox; \n;Black Box - \c;\l;TNT\u object\tnt; \n;Explosive device - \c;\l;KeyA..D\u object\key; \n;Keys A, B, C and D - - -\t;Robots : - -\button 158; \c;\l;PracticeBot\u object\bottr; \n;Practice Bot -\button 173; \c;\l;TargetBot\u object\bottarg; \n;Target Bot - -\button 137; \c;\l;WheeledGrabber\u object\botgr; \n;Wheeled Grabber -\button 138; \c;\l;TrackedGrabber\u object\botgc; \n;Tracked Grabber -\button 139; \c;\l;WingedGrabber\u object\botgj; \n;Winged Grabber -\button 150; \c;\l;LeggedGrabber\u object\botgs; \n;Legged Grabber - -\button 140; \c;\l;WheeledSniffer\u object\botsr; \n;Wheeled Sniffer -\button 141; \c;\l;TrackedSniffer\u object\botsc; \n;Tracked Sniffer -\button 142; \c;\l;WingedSniffer\u object\botsj; \n;Winged Sniffer -\button 152; \c;\l;LeggedSniffer\u object\botss; \n;Legged Sniffer - -\button 143; \c;\l;WheeledShooter\u object\botfr; \n;Wheeled Shooter -\button 144; \c;\l;TrackedShooter\u object\botfc; \n;Tracked Shooter -\button 145; \c;\l;WingedShooter\u object\botfj; \n;Winged Shooter -\button 151; \c;\l;LeggedShooter\u object\botfs; \n;Legged Shooter - -\button 153; \c;\l;WheeledOrgaShooter\u object\botor; \n;Wheeled Orga Shooter -\button 154; \c;\l;TrackedOrgaShooter\u object\botoc; \n;Tracked Orga Shooter -\button 155; \c;\l;WingedOrgaShooter\u object\botoj; \n;Winged Orga Shooter -\button 156; \c;\l;LeggedOrgaShooter\u object\botos; \n;Legged Orga Shooter - -\button 149; \c;\l;Subber\u object\botsub; \n;Subber -\button 148; \c;\l;Recycler\u object\botrecy; \n;Recycler -\button 157; \c;\l;Shielder\u object\botshld; \n;Shielder -\button 146; \c;\l;Thumper\u object\bottump; \n;Thumper -\button 147; \c;\l;PhazerShooter\u object\botphaz; \n;Phazer Shooter - - -\t;Enemies : - - \c;\l;AlienQueen\u object\mother; \n;Alien Queen - \c;\l;AlienEgg\u object\egg; \n;Alien Egg - \c;\l;AlienAnt\u object\ant; \n;Ant - \c;\l;AlienSpider\u object\spider; \n;Spider - \c;\l;AlienWasp\u object\wasp; \n;Wasp - \c;\l;AlienWorm\u object\worm; \n;Worm - - -\t;Miscellaneous : - -\button 136; \c;\l;Me\u object\human; \n;You! - \c;\l;Mine\u object\mine; \n;Mine - \c;\l;Barrier\u object\barrier; \n;Barrier - \c;\l;Wreck\u object\wreck; \n;Derelict bot - \c;\l;Ruin\u object\ruin; \n;Derelict building - - -\t;Flags and Other Indicators : - - \c;\l;BlueFlag\u object\flag; \n;Blue Flag - \c;\l;RedFlag\u object\flag; \n;Red Flag - \c;\l;GreenFlag\u object\flag; \n;Green Flag - \c;\l;YellowFlag\u object\flag; \n;Yellow Flag - \c;\l;VioletFlag\u object\flag; \n;Violet Flag - \c;\l;WayPoint\u object\waypoint; \n;Checkpoint - \c;\l;EnergySite\u object\enerspot; \n;Underground Energy Deposit - \c;\l;TitaniumSite\u object\stonspot; \n;Underground Titanium Deposit - \c;\l;UraniumSite\u object\uranspot; \n;Underground Uranium Deposit - -\t;See also -\l;CBOT Language\u cbot; and \l;Variables\u cbot\type;. +\b;Value \c;Categories\n; +Categories represent the names of objects in the CBOT language. Everything in COLOBOT is an object: robots, buildings, raw materials, etc., even yourself. + +In a program, categories are always displayed on a \const;red background\norm;. If a category isn't highlighted in red, it is misspelled. Caps and lower cases should be kept as is. + +Below are the different categories available : + +\t;Buildings : + +\button 176; \c;\l;Houston\u object\Huston; \n;Mission Control +\button 171; \c;\l;SpaceShip\u object\base; \n;Spaceship +\button 160; \c;\l;BotFactory\u object\factory; \n;Robot Factory +\button 163; \c;\l;ResearchCenter\u object\research; \n;Research Center +\button 168; \c;\l;RadarStation\u object\radar; \n;Radar +\button 172; \c;\l;ExchangePost\u object\exchange; \n;Information Exchange Post +\button 169; \c;\l;RepairCenter\u object\repair; \n;Repair Center +\button 165; \c;\l;DefenseTower\u object\tower; \n;Defense Tower +\button 166; \c;\l;AutoLab\u object\labo; \n;Organic Matter Analyzer +\button 164; \c;\l;PowerStation\u object\station; \n;Power Station +\button 167; \c;\l;PowerPlant\u object\energy; \n;Power Cell Factory +\button 170; \c;\l;NuclearPlant\u object\nuclear; \n;Nuclear Plant +\button 162; \c;\l;Converter\u object\convert; \n;Titanium Converter +\button 161; \c;\l;Derrick\u object\derrick; \n;Derrick +\button 174; \c;\l;PowerCaptor\u object\captor; \n;Parabolic Lightning Conductor +\button 175; \c;\l;Vault\u object\safe; \n;Vault + \c;\l;StartArea\u object\start; \n;Starting Pad + \c;\l;GoalArea\u object\goal; \n;Finishing Pad + \c;\l;AlienNest\u object\nest; \n;Alien Nest + + +\t;Portable Objects : + + \c;\l;TitaniumOre\u object\titanore; \n;Titanium Ore + \c;\l;UraniumOre\u object\uranore; \n;Uranium Ore + \c;\l;Titanium\u object\titan; \n;Cube of converted Titanium + \c;\l;PowerCell\u object\power; \n;Regular Power Cell + \c;\l;NuclearCell\u object\atomic; \n;Nuclear Power Cell + \c;\l;OrgaMatter\u object\bullet; \n;Organic Matter + \c;\l;BlackBox\u object\bbox; \n;Black Box + \c;\l;TNT\u object\tnt; \n;Explosive device + \c;\l;KeyA..D\u object\key; \n;Keys A, B, C and D + + +\t;Robots : + +\button 158; \c;\l;PracticeBot\u object\bottr; \n;Practice Bot +\button 173; \c;\l;TargetBot\u object\bottarg; \n;Target Bot + +\button 137; \c;\l;WheeledGrabber\u object\botgr; \n;Wheeled Grabber +\button 138; \c;\l;TrackedGrabber\u object\botgc; \n;Tracked Grabber +\button 139; \c;\l;WingedGrabber\u object\botgj; \n;Winged Grabber +\button 150; \c;\l;LeggedGrabber\u object\botgs; \n;Legged Grabber + +\button 140; \c;\l;WheeledSniffer\u object\botsr; \n;Wheeled Sniffer +\button 141; \c;\l;TrackedSniffer\u object\botsc; \n;Tracked Sniffer +\button 142; \c;\l;WingedSniffer\u object\botsj; \n;Winged Sniffer +\button 152; \c;\l;LeggedSniffer\u object\botss; \n;Legged Sniffer + +\button 143; \c;\l;WheeledShooter\u object\botfr; \n;Wheeled Shooter +\button 144; \c;\l;TrackedShooter\u object\botfc; \n;Tracked Shooter +\button 145; \c;\l;WingedShooter\u object\botfj; \n;Winged Shooter +\button 151; \c;\l;LeggedShooter\u object\botfs; \n;Legged Shooter + +\button 153; \c;\l;WheeledOrgaShooter\u object\botor; \n;Wheeled Orga Shooter +\button 154; \c;\l;TrackedOrgaShooter\u object\botoc; \n;Tracked Orga Shooter +\button 155; \c;\l;WingedOrgaShooter\u object\botoj; \n;Winged Orga Shooter +\button 156; \c;\l;LeggedOrgaShooter\u object\botos; \n;Legged Orga Shooter + +\button 149; \c;\l;Subber\u object\botsub; \n;Subber +\button 148; \c;\l;Recycler\u object\botrecy; \n;Recycler +\button 157; \c;\l;Shielder\u object\botshld; \n;Shielder +\button 146; \c;\l;Thumper\u object\bottump; \n;Thumper +\button 147; \c;\l;PhazerShooter\u object\botphaz; \n;Phazer Shooter + + +\t;Enemies : + + \c;\l;AlienQueen\u object\mother; \n;Alien Queen + \c;\l;AlienEgg\u object\egg; \n;Alien Egg + \c;\l;AlienAnt\u object\ant; \n;Ant + \c;\l;AlienSpider\u object\spider; \n;Spider + \c;\l;AlienWasp\u object\wasp; \n;Wasp + \c;\l;AlienWorm\u object\worm; \n;Worm + + +\t;Miscellaneous : + +\button 136; \c;\l;Me\u object\human; \n;You! + \c;\l;Mine\u object\mine; \n;Mine + \c;\l;Barrier\u object\barrier; \n;Barrier + \c;\l;Wreck\u object\wreck; \n;Derelict bot + \c;\l;Ruin\u object\ruin; \n;Derelict building + + +\t;Flags and Other Indicators : + + \c;\l;BlueFlag\u object\flag; \n;Blue Flag + \c;\l;RedFlag\u object\flag; \n;Red Flag + \c;\l;GreenFlag\u object\flag; \n;Green Flag + \c;\l;YellowFlag\u object\flag; \n;Yellow Flag + \c;\l;VioletFlag\u object\flag; \n;Violet Flag + \c;\l;WayPoint\u object\waypoint; \n;Checkpoint + \c;\l;EnergySite\u object\enerspot; \n;Underground Energy Deposit + \c;\l;TitaniumSite\u object\stonspot; \n;Underground Titanium Deposit + \c;\l;UraniumSite\u object\uranspot; \n;Underground Uranium Deposit + +\t;See also +\l;CBOT Language\u cbot; and \l;Variables\u cbot\type;. diff --git a/help/cbot/class.txt b/help/cbot/class.txt index 829dc5c5..942d7b0e 100644 --- a/help/cbot/class.txt +++ b/help/cbot/class.txt @@ -1,72 +1,72 @@ -\b;Instruction \c;class\n; -This allows you to declare a class definition using following syntax: -\c; -\s;public class ClassName -\s;{ -\s; declarations; -\s;} -\n; -Classes can only be \l;public\u cbot\public;, that is they can be used from all bots in a mission. Class members are also public, that is they are accessible from outside the class. Class members can be fields or functions (also called methods), for example the followin class \c;MyClass\n; contains 4 fields (a, b, x and s) and one method (MyFunction). -\c; -\s;public class MyClass -\s;{ -\s; int a, b; -\s; float x = 3.33; -\s; string s = "hello"; -\s; float MyFunction( float value ) -\s; { -\s; return (value*x)-1; -\s; } -\s;} -\n; -As shown in this exemple the class members can be initialized (\c;x=3.33\n;). You can also define a constructor which is a special method having the same name as the class name. This method will be called automatically at creation time of a class instance. You can also declare more than one method with the same name but different parameters. -\c; -\s;public class MyClass -\s;{ -\s; int a, b; -\s; void MyClass( ) -\s; { -\s; a = 2; b = 3; -\s; } -\s; void MyClass( int a, int b ) -\s; { -\s; this.a = a; this.b = b; -\s; } -\s;} -\n; -In this example two constructors are declared for \c;MyClass\n;, one without parameters and the other one with two parameters. As the names of the parameters of the second constructor are the same as the names of the two members \c;a\n; et \c;b\n; we must use the \c;\l;this\u cbot\this;.a\n; and \c;\l;this\u cbot\this;.b\n; to avoid confusion with the parameters. Another more simpler solution would be to give different names to the parameters. -\c; -\s;void Test( ) -\s;{ -\s; MyClass item1(); // constr. w/o parameters -\s; MyClass item2(4, 5); // constr. with 2 parameters -\s; MyClass item3; // no constructor called, -\s; // therefore item3 == null -\s;} -\n; -You can also define a destructor. This must be a \c;void\n; fonction without parameters that has the same name as the class name but prefixed by the ~ character. The destructor is called automatically as soon as the class instance is no more referenced by anyone. -\c; -\s;public class MyClass -\s;{ -\s; static private int counter = 0; // instance counter -\s; void MyClass( ) -\s; { -\s; counter ++; // one instance more -\s; } -\s; void ~MyClass( ) -\s; { -\s; counter --; // one instance less -\s; } -\s;} -\s;void Test() -\s;{ -\s; MyClass item1( ); // counter = 1 -\s; MyClass item2( ); // counter = 2 -\s; item1 = null; // counter = 1 -\s;} // counter = 0 -\n; -If you pass a class instance as parameter to a \l;function\u cbot\function;, the function only receives a \l;reference\u cbot\pointer; to the instance. That means if you modify the instance in the function, the instance that has been passed to the function will be actuallay modified. - -\t;See also -\c;\l;public\u cbot\public;\n;, \c;\l;private\u cbot\private;\n;, \c;\l;static\u cbot\static;\n;, \c;\l;synchronized\u cbot\synchro;\n;, \c;\l;new\u cbot\new;\n;, \c;\l;reference\u cbot\pointer;\n;, \c;\l;this\u cbot\this;\n; -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;class\n; +This allows you to declare a class definition using following syntax: +\c; +\s;public class ClassName +\s;{ +\s; declarations; +\s;} +\n; +Classes can only be \l;public\u cbot\public;, that is they can be used from all bots in a mission. Class members are also public, that is they are accessible from outside the class. Class members can be fields or functions (also called methods), for example the followin class \c;MyClass\n; contains 4 fields (a, b, x and s) and one method (MyFunction). +\c; +\s;public class MyClass +\s;{ +\s; int a, b; +\s; float x = 3.33; +\s; string s = "hello"; +\s; float MyFunction( float value ) +\s; { +\s; return (value*x)-1; +\s; } +\s;} +\n; +As shown in this exemple the class members can be initialized (\c;x=3.33\n;). You can also define a constructor which is a special method having the same name as the class name. This method will be called automatically at creation time of a class instance. You can also declare more than one method with the same name but different parameters. +\c; +\s;public class MyClass +\s;{ +\s; int a, b; +\s; void MyClass( ) +\s; { +\s; a = 2; b = 3; +\s; } +\s; void MyClass( int a, int b ) +\s; { +\s; this.a = a; this.b = b; +\s; } +\s;} +\n; +In this example two constructors are declared for \c;MyClass\n;, one without parameters and the other one with two parameters. As the names of the parameters of the second constructor are the same as the names of the two members \c;a\n; et \c;b\n; we must use the \c;\l;this\u cbot\this;.a\n; and \c;\l;this\u cbot\this;.b\n; to avoid confusion with the parameters. Another more simpler solution would be to give different names to the parameters. +\c; +\s;void Test( ) +\s;{ +\s; MyClass item1(); // constr. w/o parameters +\s; MyClass item2(4, 5); // constr. with 2 parameters +\s; MyClass item3; // no constructor called, +\s; // therefore item3 == null +\s;} +\n; +You can also define a destructor. This must be a \c;void\n; fonction without parameters that has the same name as the class name but prefixed by the ~ character. The destructor is called automatically as soon as the class instance is no more referenced by anyone. +\c; +\s;public class MyClass +\s;{ +\s; static private int counter = 0; // instance counter +\s; void MyClass( ) +\s; { +\s; counter ++; // one instance more +\s; } +\s; void ~MyClass( ) +\s; { +\s; counter --; // one instance less +\s; } +\s;} +\s;void Test() +\s;{ +\s; MyClass item1( ); // counter = 1 +\s; MyClass item2( ); // counter = 2 +\s; item1 = null; // counter = 1 +\s;} // counter = 0 +\n; +If you pass a class instance as parameter to a \l;function\u cbot\function;, the function only receives a \l;reference\u cbot\pointer; to the instance. That means if you modify the instance in the function, the instance that has been passed to the function will be actuallay modified. + +\t;See also +\c;\l;public\u cbot\public;\n;, \c;\l;private\u cbot\private;\n;, \c;\l;static\u cbot\static;\n;, \c;\l;synchronized\u cbot\synchro;\n;, \c;\l;new\u cbot\new;\n;, \c;\l;reference\u cbot\pointer;\n;, \c;\l;this\u cbot\this;\n; +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/close.txt b/help/cbot/close.txt index 701f16cc..bca89ae3 100644 --- a/help/cbot/close.txt +++ b/help/cbot/close.txt @@ -1,8 +1,8 @@ -\b;Instruction \c;close\n; -Close a file opened previously with \c;\l;open\u cbot\open;\n;. This is a method of the \c;\l;file\u cbot\file;\n; class; therefore you cannot write \c;close()\n; but only \c;handle.close()\n;¦: -\c; -\s; handle.close(); -\n; -\t;See also -\c;\l;file\u cbot\file;\n;, \c;\l;open\u cbot\open;\n;, \c;\l;readln\u cbot\readln;\n;, \c;\l;writeln\u cbot\writeln;\n; and \c;\l;eof\u cbot\eof;\n;. -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;close\n; +Close a file opened previously with \c;\l;open\u cbot\open;\n;. This is a method of the \c;\l;file\u cbot\file;\n; class; therefore you cannot write \c;close()\n; but only \c;handle.close()\n;¦: +\c; +\s; handle.close(); +\n; +\t;See also +\c;\l;file\u cbot\file;\n;, \c;\l;open\u cbot\open;\n;, \c;\l;readln\u cbot\readln;\n;, \c;\l;writeln\u cbot\writeln;\n; and \c;\l;eof\u cbot\eof;\n;. +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/cond.txt b/help/cbot/cond.txt index a7b6ae2a..f6f41794 100644 --- a/help/cbot/cond.txt +++ b/help/cbot/cond.txt @@ -1,29 +1,29 @@ -\b;Conditions -A condition is a special \l;expression\u cbot\expr; that returns a \l;boolean\u cbot\bool; value, that can only be either \c;\l;true\u cbot\true;\n; or \c;\l;false\u cbot\false;\n;. With a condition, you can choose f. ex. if the instructions in a \c;\l;while\u cbot\while;\n; loop must be repeated again, or if the instruction in a \c;\l;if\u cbot\if;\n; bloc must be executed. -Here are some operators that you can use in conditions to compare two values : - -\c;a == b \n;\c;a\n; equals \c;b\n; -\c;a != b \n;\c;a\n; is different from \c;b\n; -\c;a < b \n;\c;a\n; smaller than \c;b\n; -\c;a <= b \n;\c;a\n; smaller than or equal to \c;b\n; -\c;a > b \n;\c;a\n; greater than \c;b\n; -\c;a >= b \n;\c;a\n; greater than or equal to \c;b\n; - -For example : - -\c;12 == 12 \n;returns true -\c;45 != 47 \n;returns true -\c;99 == 98 \n;returns false -\c;12 < -1 \n;returns false -\c;12 >= 10 \n;returns true -\c;12 >= 12 \n;returns true - -\t;Remarque -Be careful not to confuse the equality comparison \c;==\n; with the assignment of a \l;variable\u cbot\var; \c;=\n;. - -\c;a == b\n; is an expression that compares \c;a\n; with \c;b\n;. -\c;a = b\n; is an expression that copies the value of \c;b\n; into \c;a\n;. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. - +\b;Conditions +A condition is a special \l;expression\u cbot\expr; that returns a \l;boolean\u cbot\bool; value, that can only be either \c;\l;true\u cbot\true;\n; or \c;\l;false\u cbot\false;\n;. With a condition, you can choose f. ex. if the instructions in a \c;\l;while\u cbot\while;\n; loop must be repeated again, or if the instruction in a \c;\l;if\u cbot\if;\n; bloc must be executed. +Here are some operators that you can use in conditions to compare two values : + +\c;a == b \n;\c;a\n; equals \c;b\n; +\c;a != b \n;\c;a\n; is different from \c;b\n; +\c;a < b \n;\c;a\n; smaller than \c;b\n; +\c;a <= b \n;\c;a\n; smaller than or equal to \c;b\n; +\c;a > b \n;\c;a\n; greater than \c;b\n; +\c;a >= b \n;\c;a\n; greater than or equal to \c;b\n; + +For example : + +\c;12 == 12 \n;returns true +\c;45 != 47 \n;returns true +\c;99 == 98 \n;returns false +\c;12 < -1 \n;returns false +\c;12 >= 10 \n;returns true +\c;12 >= 12 \n;returns true + +\t;Remarque +Be careful not to confuse the equality comparison \c;==\n; with the assignment of a \l;variable\u cbot\var; \c;=\n;. + +\c;a == b\n; is an expression that compares \c;a\n; with \c;b\n;. +\c;a = b\n; is an expression that copies the value of \c;b\n; into \c;a\n;. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. + diff --git a/help/cbot/continue.txt b/help/cbot/continue.txt index 9c3ba564..d516aa78 100644 --- a/help/cbot/continue.txt +++ b/help/cbot/continue.txt @@ -1,25 +1,25 @@ -\b;Instruction \c;continue\n; -Syntax : -\s;\c;while ( condition ) -\s;{ -\s; continue; -\s;} -\n; -With this instruction, you can jump over the rest of instructions in the \c;\l;bloc\u cbot\bloc;\n; of a \c;\l;while\u cbot\while;\n; or \c;\l;for\u cbot\for;\n; loop: The execution will resume at the beginning of the bloc, the next time the loop is repeated. - -Here is an example: -\s;\c;int i = 0; -\s;while ( i < 5 ) -\s;{ -\s; i = i+1; -\s; if ( i == 3 ) -\s; { -\s; continue; -\s; } -\s; \n;Instructions ...\c; -\s;} -\n; -The instructions will only be executed for the values of \c;i\n; 1, 2, 4 and 5. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;continue\n; +Syntax : +\s;\c;while ( condition ) +\s;{ +\s; continue; +\s;} +\n; +With this instruction, you can jump over the rest of instructions in the \c;\l;bloc\u cbot\bloc;\n; of a \c;\l;while\u cbot\while;\n; or \c;\l;for\u cbot\for;\n; loop: The execution will resume at the beginning of the bloc, the next time the loop is repeated. + +Here is an example: +\s;\c;int i = 0; +\s;while ( i < 5 ) +\s;{ +\s; i = i+1; +\s; if ( i == 3 ) +\s; { +\s; continue; +\s; } +\s; \n;Instructions ...\c; +\s;} +\n; +The instructions will only be executed for the values of \c;i\n; 1, 2, 4 and 5. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/deletef.txt b/help/cbot/deletef.txt index 407d5135..dc6e93f9 100644 --- a/help/cbot/deletef.txt +++ b/help/cbot/deletef.txt @@ -1,10 +1,10 @@ -\b;Instruction \c;deletefile\n; -The deletefile instruction deletes an existing file in the files/ folder. - -Files can only be deleted in the files/ folder which is located in the folder where Colobot has been installed. You cannot not delete files that are located elsewhere than in the files/ folder. - -Syntax¦: -\s;\c;deletefile ( filename );\n; - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;deletefile\n; +The deletefile instruction deletes an existing file in the files/ folder. + +Files can only be deleted in the files/ folder which is located in the folder where Colobot has been installed. You cannot not delete files that are located elsewhere than in the files/ folder. + +Syntax¦: +\s;\c;deletefile ( filename );\n; + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/delinfo.txt b/help/cbot/delinfo.txt index 6eb32c90..6d93b26b 100644 --- a/help/cbot/delinfo.txt +++ b/help/cbot/delinfo.txt @@ -1,15 +1,15 @@ -\b;Instruction \c;deleteinfo\n; -Syntax¦: -\s;\c;deleteinfo ( name, power );\n; - -Delete an existing information in the closest \l;information exchange post\u object\exchange;. - -\t;name: \c;string\n; -Name of the information to be deleted. This name is a string: it must be written in quotation marks "¦". - -\t;power: \c;float\n; -Power of the transmitter, which corresponds to the maximal distance between the sender and the exchange post. If the distance is longer, the information won't be deleted. Default value is 10 metres. - -\t;See also -\c;\l;receive\u cbot\receive;\n;, \c;\l;send\u cbot\send;\n; and \c;\l;testinfo\u cbot\testinfo;\n;. -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;deleteinfo\n; +Syntax¦: +\s;\c;deleteinfo ( name, power );\n; + +Delete an existing information in the closest \l;information exchange post\u object\exchange;. + +\t;name: \c;string\n; +Name of the information to be deleted. This name is a string: it must be written in quotation marks "¦". + +\t;power: \c;float\n; +Power of the transmitter, which corresponds to the maximal distance between the sender and the exchange post. If the distance is longer, the information won't be deleted. Default value is 10 metres. + +\t;See also +\c;\l;receive\u cbot\receive;\n;, \c;\l;send\u cbot\send;\n; and \c;\l;testinfo\u cbot\testinfo;\n;. +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/direct.txt b/help/cbot/direct.txt index ea92ba27..d400e805 100644 --- a/help/cbot/direct.txt +++ b/help/cbot/direct.txt @@ -1,15 +1,15 @@ -\b;Instruction \c;direction\n; -Syntax : -\s;\c;direction ( pos );\n; - -Calculates the rotation that a robot must perform in order to point towards a given position. - -\t;pos: \c;\l;point\u cbot\point;\n; -Position towards which the robot must point. - -\t;Return value: \c;\l;float\u cbot\float;\n; -Angle of the rotation that must be performed. -90 means f. ex. a rotation of 90 degrees to the right. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. - +\b;Instruction \c;direction\n; +Syntax : +\s;\c;direction ( pos );\n; + +Calculates the rotation that a robot must perform in order to point towards a given position. + +\t;pos: \c;\l;point\u cbot\point;\n; +Position towards which the robot must point. + +\t;Return value: \c;\l;float\u cbot\float;\n; +Angle of the rotation that must be performed. -90 means f. ex. a rotation of 90 degrees to the right. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. + diff --git a/help/cbot/dist.txt b/help/cbot/dist.txt index 6921fbf5..a4183d44 100644 --- a/help/cbot/dist.txt +++ b/help/cbot/dist.txt @@ -1,30 +1,30 @@ -\b;Instruction \c;distance\n; -With the instruction \c;distance( , )\n; you can calculate the distance between two positions. - -\b;Basic use -If you write \c;position\n; alone, this gives you the position of the bot that executes the program. If you write the name of a variable followed by \c;.position\n;, this gives you the position of the object described in the variable. - -Here is a program that moves forward, covering exactly the distance between the bot and the closest ant: -\c; -\s; item = \l;radar\u cbot\radar;(AlienAnt); -\s; \l;move\u cbot\move;(distance(position, item.position)); -\n; -This is of course pure suicide. Better to stop 40 meters before, in order to be at shooting range: -\c; -\s; item = radar(AlienAnt); -\s; move(distance(position, item.position) - 40); -\n; -\b;For specialists -Syntax: -\s;\c;distance ( pos1, pos2 );\n; - -Calculates the distance between two positions. - -\t;pos1, pos2: \c;\l;point\u cbot\point;\n; -Coordinates of the two positions. - -\t;Return value: \c;\l;float\u cbot\float;\n; -Distance between the two positions. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;distance\n; +With the instruction \c;distance( , )\n; you can calculate the distance between two positions. + +\b;Basic use +If you write \c;position\n; alone, this gives you the position of the bot that executes the program. If you write the name of a variable followed by \c;.position\n;, this gives you the position of the object described in the variable. + +Here is a program that moves forward, covering exactly the distance between the bot and the closest ant: +\c; +\s; item = \l;radar\u cbot\radar;(AlienAnt); +\s; \l;move\u cbot\move;(distance(position, item.position)); +\n; +This is of course pure suicide. Better to stop 40 meters before, in order to be at shooting range: +\c; +\s; item = radar(AlienAnt); +\s; move(distance(position, item.position) - 40); +\n; +\b;For specialists +Syntax: +\s;\c;distance ( pos1, pos2 );\n; + +Calculates the distance between two positions. + +\t;pos1, pos2: \c;\l;point\u cbot\point;\n; +Coordinates of the two positions. + +\t;Return value: \c;\l;float\u cbot\float;\n; +Distance between the two positions. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/dist2d.txt b/help/cbot/dist2d.txt index e1c96916..89ea1cb2 100644 --- a/help/cbot/dist2d.txt +++ b/help/cbot/dist2d.txt @@ -1,14 +1,14 @@ -\b;Instruction \c;distance2d\n; -Syntax: -\s;\c;distance2d ( pos1, pos2 );\n; - -Calculates the distance between two positions (ignores the z coordinate). - -\t;pos1, pos2: \c;\l;point\u cbot\point;\n; -Coordinates of the two positions. - -\t;Return value: \c;\l;float\u cbot\float;\n; -Distance between the two positions. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;distance2d\n; +Syntax: +\s;\c;distance2d ( pos1, pos2 );\n; + +Calculates the distance between two positions (ignores the z coordinate). + +\t;pos1, pos2: \c;\l;point\u cbot\point;\n; +Coordinates of the two positions. + +\t;Return value: \c;\l;float\u cbot\float;\n; +Distance between the two positions. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/do.txt b/help/cbot/do.txt index 1b411cfe..391745c6 100644 --- a/help/cbot/do.txt +++ b/help/cbot/do.txt @@ -1,28 +1,28 @@ -\b;Instruction \c;do - while\n; -Syntax: -\s;\c;do -\s;{ -\s; \n;Instructions ...\c; -\s;} -\s;while ( condition ); -\n; -This instruction allows you to perform several times the instructions inside the \l;block\u cbot\bloc;. The instructions are executed at least once, because the condition is tested only afterwards. -Be careful not to confuse the instruction \c;do { } while ( );\n; with the instruction \c;\l;while\u cbot\while; ( ) { }\n;; the latter tests the condition before the instructions in the block are executed. - -\t;\c;condition\n; -The instructions in the block are performed over and over again, as long as the \l;condition\u cbot\cond; is true. - -Here is an example : -\s;\c;do -\s;{ -\s; p = radar(TitaniumOre); -\s;} -\s;while ( p == null ); -\n; -\t;Attention -Always put a \l;semicolon\u cbot\term; at the end of the line \c;while ( )\n;. - -The instructions \c;\l;break\u cbot\break;\n; and \c;\l;continue\u cbot\continue;\n; can be useful inside a block following the instruction \c;do { }\n;. - -\t;See also -\l;Instructions\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;do - while\n; +Syntax: +\s;\c;do +\s;{ +\s; \n;Instructions ...\c; +\s;} +\s;while ( condition ); +\n; +This instruction allows you to perform several times the instructions inside the \l;block\u cbot\bloc;. The instructions are executed at least once, because the condition is tested only afterwards. +Be careful not to confuse the instruction \c;do { } while ( );\n; with the instruction \c;\l;while\u cbot\while; ( ) { }\n;; the latter tests the condition before the instructions in the block are executed. + +\t;\c;condition\n; +The instructions in the block are performed over and over again, as long as the \l;condition\u cbot\cond; is true. + +Here is an example : +\s;\c;do +\s;{ +\s; p = radar(TitaniumOre); +\s;} +\s;while ( p == null ); +\n; +\t;Attention +Always put a \l;semicolon\u cbot\term; at the end of the line \c;while ( )\n;. + +The instructions \c;\l;break\u cbot\break;\n; and \c;\l;continue\u cbot\continue;\n; can be useful inside a block following the instruction \c;do { }\n;. + +\t;See also +\l;Instructions\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/drop.txt b/help/cbot/drop.txt index 275173ed..9b383dd1 100644 --- a/help/cbot/drop.txt +++ b/help/cbot/drop.txt @@ -1,29 +1,29 @@ -\b;Instruction \c;drop\n; -The instruction \c;drop();\n; instructs the bot to drop whatever the operating arm is carrying on the ground, on the platform of a building or on the power cell location of a bot. - -\b;Basic use -The instruction \c;drop();\n; written in this form drops the object in front of the bot. Here is a short program that grabs an object in front of the bot and drops it 5 meters further: -\c; -\s; \l;grab\u cbot\grab;(); -\s; \l;move\u cbot\move;(5); -\s; drop(); -\n; -\b;For specialists -Syntax: -\s;\c;drop ( oper );\n; - -This instruction appeals to the operating arm of a \l;grabber bot\u object\botgr;, in order to drop what it is holding. - -\t;oper: \c;\l;int\u cbot\int;\n; (default value\c;InFront\n;) -Oper indicates where the robot should drop the object. If no indication is given, the object is dropped in front of the bot. -\c;InFront \n; Drops in front (default value). -\c;Behind \n; Drops behind. -\c;EnergyCell\n; Drops on the bot's own power cell location. - -\t;Return value: \c;\l;int\u cbot\int;\n; -Normally an error stops the program. You can prevent the program from stopping on errors by using the \c;\l;errmode\u cbot\errmode;(0)\n; instruction. A value different from zero if an error occurred is then returned by \c;drop();\n;. -\c;== 0 \n;object was dropped -\c;!= 0 \n;error, no object was dropped - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;drop\n; +The instruction \c;drop();\n; instructs the bot to drop whatever the operating arm is carrying on the ground, on the platform of a building or on the power cell location of a bot. + +\b;Basic use +The instruction \c;drop();\n; written in this form drops the object in front of the bot. Here is a short program that grabs an object in front of the bot and drops it 5 meters further: +\c; +\s; \l;grab\u cbot\grab;(); +\s; \l;move\u cbot\move;(5); +\s; drop(); +\n; +\b;For specialists +Syntax: +\s;\c;drop ( oper );\n; + +This instruction appeals to the operating arm of a \l;grabber bot\u object\botgr;, in order to drop what it is holding. + +\t;oper: \c;\l;int\u cbot\int;\n; (default value\c;InFront\n;) +Oper indicates where the robot should drop the object. If no indication is given, the object is dropped in front of the bot. +\c;InFront \n; Drops in front (default value). +\c;Behind \n; Drops behind. +\c;EnergyCell\n; Drops on the bot's own power cell location. + +\t;Return value: \c;\l;int\u cbot\int;\n; +Normally an error stops the program. You can prevent the program from stopping on errors by using the \c;\l;errmode\u cbot\errmode;(0)\n; instruction. A value different from zero if an error occurred is then returned by \c;drop();\n;. +\c;== 0 \n;object was dropped +\c;!= 0 \n;error, no object was dropped + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/eof.txt b/help/cbot/eof.txt index 24fa908a..30c2f4c3 100644 --- a/help/cbot/eof.txt +++ b/help/cbot/eof.txt @@ -1,15 +1,15 @@ -\b;Instruction \c;eof\n; -Test the end of file condition of an open file. This is a method of the \c;\l;file\u cbot\file;\n; class; therefore you cannot write \c;eof()\n; but only \c;handle.eof()\n;¦: -\c; -\s; if ( handle.eof() ) -\n; -Example¦: -\c; -\s; while ( not handle.eof() ) -\s; { -\s; s = handle.readln(); -\s; } -\n; -\t;See also -\c;\l;file\u cbot\file;\n;, \c;\l;open\u cbot\open;\n;, \c;\l;close\u cbot\close;\n;, \c;\l;readln\u cbot\readln;\n; and \c;\l;writeln\u cbot\writeln;\n;. -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;eof\n; +Test the end of file condition of an open file. This is a method of the \c;\l;file\u cbot\file;\n; class; therefore you cannot write \c;eof()\n; but only \c;handle.eof()\n;¦: +\c; +\s; if ( handle.eof() ) +\n; +Example¦: +\c; +\s; while ( not handle.eof() ) +\s; { +\s; s = handle.readln(); +\s; } +\n; +\t;See also +\c;\l;file\u cbot\file;\n;, \c;\l;open\u cbot\open;\n;, \c;\l;close\u cbot\close;\n;, \c;\l;readln\u cbot\readln;\n; and \c;\l;writeln\u cbot\writeln;\n;. +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/errmode.txt b/help/cbot/errmode.txt index dd1eea5e..8b4286ab 100644 --- a/help/cbot/errmode.txt +++ b/help/cbot/errmode.txt @@ -1,33 +1,33 @@ -\b;Instruction \c;errmode\n; -The \c;errmode();\n; instruction allows you to chose if the program should stop when an error occurs in one of the following instructions: \c;\l;goto\u cbot\goto;\n;, \c;\l;move\u cbot\move;\n;, \c;\l;grab\u cbot\grab;\n;, \c;\l;drop\u cbot\drop;\n;, etc. - -\b;For specialists -Syntax¦: -\s;\c;errmode ( mode );\n; - -Normally the program is stopped when an error occurs. If you use the instruction \c;errmode(0);\n; at the beginning of the program, the instructions listed above return a value different from zero if the instruction could not be performed. - -\t;mode: \c;\l;float\u cbot\float;\n; (\c;1\n; per default) -Error treatment mode. -\c;0\n; -> continues program execution and returns a non zero value -\c;1\n; -> stops the program (default behavior) - -Exemple 1¦: -\s;\c;errmode(0); -\s;while ( goto(pos) != 0 ) -\s;{ -\s; wait(2); -\s;} -\n; -Exemple 2¦: -\s;\c;errmode(0); -\s;int err; -\s;err = goto(pos); -\s;if ( err != 0 ) -\s;{ -\s; \n;goto did not perform correctly ...\c; -\s; \n;take some appropriate action ...\c; -\s;} -\n; -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;errmode\n; +The \c;errmode();\n; instruction allows you to chose if the program should stop when an error occurs in one of the following instructions: \c;\l;goto\u cbot\goto;\n;, \c;\l;move\u cbot\move;\n;, \c;\l;grab\u cbot\grab;\n;, \c;\l;drop\u cbot\drop;\n;, etc. + +\b;For specialists +Syntax¦: +\s;\c;errmode ( mode );\n; + +Normally the program is stopped when an error occurs. If you use the instruction \c;errmode(0);\n; at the beginning of the program, the instructions listed above return a value different from zero if the instruction could not be performed. + +\t;mode: \c;\l;float\u cbot\float;\n; (\c;1\n; per default) +Error treatment mode. +\c;0\n; -> continues program execution and returns a non zero value +\c;1\n; -> stops the program (default behavior) + +Exemple 1¦: +\s;\c;errmode(0); +\s;while ( goto(pos) != 0 ) +\s;{ +\s; wait(2); +\s;} +\n; +Exemple 2¦: +\s;\c;errmode(0); +\s;int err; +\s;err = goto(pos); +\s;if ( err != 0 ) +\s;{ +\s; \n;goto did not perform correctly ...\c; +\s; \n;take some appropriate action ...\c; +\s;} +\n; +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/expr.txt b/help/cbot/expr.txt index e42c17e2..1ff8bc73 100644 --- a/help/cbot/expr.txt +++ b/help/cbot/expr.txt @@ -1,88 +1,88 @@ -\b;Expressions -Expressions can include the following operators: - -\c;+\n; addition -\c;-\n; subtraction -\c;*\n; multiplication -\c;/\n; division -\c;%\n; remainder of the division (only for the type \c;\l;int\u cbot\int;\n;) - -With the addition operator \c;+\n;, you can not only add numbers, you can also append \l;strings\u cbot\string;. -\c; -\s; int i = 12+3; // returns 15 -\s; string s = "a"+"bc"; // returns "abc" -\s; int i = 2-5; // returns -3 -\s; float f = 3.01*10; // returns 30.1 -\s; int i = 5/3; // returns 1 -\s; float f = 5/3; // returns 1.67 -\s; float f = 5/0; // returns an error -\s; int i = 13%5; // returns 3 -\s; int i = -8%3; // returns -2 -\n; -An expression can include constants or \l;variables\u cbot\var;. For example: - -\s;\c; 12+dist\n; - -Multiplications and divisions are performed before additions and subtractions. In order to be sure that the operations are performed in the right order, use brackets: -\c; -\s; 12*a+b/c \n;is equivalent to\c; (12*a)+(b/c) -\s; 2.5*(dist+range) -\n; -In order to improve readability, you can put as many spaces as you want: -\c; -\s; 12*a + b/c -\s; 2.5 * (dist+range) -\n; -Here is a list of mathematical functions: - -\c;sin(angle) \n;sinus -\c;cos(angle) \n;cosinus -\c;tan(angle) \n;tangent -\c;asin(value) \n;arc-sinus -\c;acos(value) \n;arc-cosinus -\c;atan(value) \n;arc-tangente -\c;sqrt(value) \n;square root -\c;pow(x, y) \n;x power y -\c;rand() \n;random value ranging between 0 and 1 - -Angles are in degrees. - -\t;Compound assignment operators (for specialists) -Besides the \c;=\n; operators for variable assignment there are several compound-assignment operators. - -The compound-assignment operators combine the \c;=\n; assignment operator with another binary operator such as \c;+\n; or \c;-\n;. Compound-assignment operators perform the operation specified by the additional operator and then assign the result to the left operand. For example, a compound-assignment expression such as - -\c;\s;expression1 += expression2 - -is equivalent to - -\c;\s;expression1 = expression1 + expression2 - -\c;+=\n; addition -\c;-=\n; subtraction -\c;*=\n; multiplication -\c;/=\n; division -\c;%=\n; remainder of the division (only for the type \c;\l;int\u cbot\int;\n;) - -\t;Prefix and posfix increment- and decrement operators (for specialists) -The operators \c;++\n; and \c;--\n; allow you to increment (++) or to decrement (--) a variable in very compact and efficient manner. - -For example to increment the variable \c;a\n; you can write -\c;\s; a++ ; -\n;instead of -\c;\s; a = a + 1 ; -\n; -The value of the expression \c;a++\n; is the value of the variable \c;a\n; before the increment. If you use the prefix operator \c;++a\n; the value of the expression is the value of the variable \c;a\n; after the increment. The same holds for the \c;--\n; decrement operator. - -Exemples: -\c;\s; a = 2 ; -\s; b = a++ ; -\s; // now b contains 2 and a contains 3 - -\c;\s; a = 2 ; -\s; b = ++a ; -\s; // now b contains 3 and a contains 3 -\n; - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Expressions +Expressions can include the following operators: + +\c;+\n; addition +\c;-\n; subtraction +\c;*\n; multiplication +\c;/\n; division +\c;%\n; remainder of the division (only for the type \c;\l;int\u cbot\int;\n;) + +With the addition operator \c;+\n;, you can not only add numbers, you can also append \l;strings\u cbot\string;. +\c; +\s; int i = 12+3; // returns 15 +\s; string s = "a"+"bc"; // returns "abc" +\s; int i = 2-5; // returns -3 +\s; float f = 3.01*10; // returns 30.1 +\s; int i = 5/3; // returns 1 +\s; float f = 5/3; // returns 1.67 +\s; float f = 5/0; // returns an error +\s; int i = 13%5; // returns 3 +\s; int i = -8%3; // returns -2 +\n; +An expression can include constants or \l;variables\u cbot\var;. For example: + +\s;\c; 12+dist\n; + +Multiplications and divisions are performed before additions and subtractions. In order to be sure that the operations are performed in the right order, use brackets: +\c; +\s; 12*a+b/c \n;is equivalent to\c; (12*a)+(b/c) +\s; 2.5*(dist+range) +\n; +In order to improve readability, you can put as many spaces as you want: +\c; +\s; 12*a + b/c +\s; 2.5 * (dist+range) +\n; +Here is a list of mathematical functions: + +\c;sin(angle) \n;sinus +\c;cos(angle) \n;cosinus +\c;tan(angle) \n;tangent +\c;asin(value) \n;arc-sinus +\c;acos(value) \n;arc-cosinus +\c;atan(value) \n;arc-tangente +\c;sqrt(value) \n;square root +\c;pow(x, y) \n;x power y +\c;rand() \n;random value ranging between 0 and 1 + +Angles are in degrees. + +\t;Compound assignment operators (for specialists) +Besides the \c;=\n; operators for variable assignment there are several compound-assignment operators. + +The compound-assignment operators combine the \c;=\n; assignment operator with another binary operator such as \c;+\n; or \c;-\n;. Compound-assignment operators perform the operation specified by the additional operator and then assign the result to the left operand. For example, a compound-assignment expression such as + +\c;\s;expression1 += expression2 + +is equivalent to + +\c;\s;expression1 = expression1 + expression2 + +\c;+=\n; addition +\c;-=\n; subtraction +\c;*=\n; multiplication +\c;/=\n; division +\c;%=\n; remainder of the division (only for the type \c;\l;int\u cbot\int;\n;) + +\t;Prefix and posfix increment- and decrement operators (for specialists) +The operators \c;++\n; and \c;--\n; allow you to increment (++) or to decrement (--) a variable in very compact and efficient manner. + +For example to increment the variable \c;a\n; you can write +\c;\s; a++ ; +\n;instead of +\c;\s; a = a + 1 ; +\n; +The value of the expression \c;a++\n; is the value of the variable \c;a\n; before the increment. If you use the prefix operator \c;++a\n; the value of the expression is the value of the variable \c;a\n; after the increment. The same holds for the \c;--\n; decrement operator. + +Exemples: +\c;\s; a = 2 ; +\s; b = a++ ; +\s; // now b contains 2 and a contains 3 + +\c;\s; a = 2 ; +\s; b = ++a ; +\s; // now b contains 3 and a contains 3 +\n; + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/extern.txt b/help/cbot/extern.txt index 6f4a2d5e..08d2cba1 100644 --- a/help/cbot/extern.txt +++ b/help/cbot/extern.txt @@ -1,30 +1,30 @@ -\b;Instruction \c;extern\n; -The \c;extern\n; instruction determines the \l;function\u cbot\function; that acts as main program of a robot. The name of the function declared with \c;extern\n; will apear in the program list in the lower left corner of the screen. -\c; -\s;extern void object::MowDown( ) -\s;{ -\s; while ( true ) -\s; { -\s; fire(1); -\s; turn(10); -\s; } -\s;} -\n; -If the program contains other functions, only the main function must be preceded by \c;extern\n;. -\c; -\s;extern void object::Square( ) -\s;{ -\s; for ( int i=0 ; i<4 ; i++ ) -\s; { -\s; Line(10); -\s; } -\s;} -\s; -\s;void object::Line(float dist) -\s;{ -\s; move(dist); -\s; turn(90); -\s;} -\n; -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;extern\n; +The \c;extern\n; instruction determines the \l;function\u cbot\function; that acts as main program of a robot. The name of the function declared with \c;extern\n; will apear in the program list in the lower left corner of the screen. +\c; +\s;extern void object::MowDown( ) +\s;{ +\s; while ( true ) +\s; { +\s; fire(1); +\s; turn(10); +\s; } +\s;} +\n; +If the program contains other functions, only the main function must be preceded by \c;extern\n;. +\c; +\s;extern void object::Square( ) +\s;{ +\s; for ( int i=0 ; i<4 ; i++ ) +\s; { +\s; Line(10); +\s; } +\s;} +\s; +\s;void object::Line(float dist) +\s;{ +\s; move(dist); +\s; turn(90); +\s;} +\n; +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/false.txt b/help/cbot/false.txt index 2942c6b4..e5b1ffa9 100644 --- a/help/cbot/false.txt +++ b/help/cbot/false.txt @@ -1,6 +1,6 @@ -\b;Type \c;false\n; -This value means that a condition is not true; it is one of the two values that a \l;boolean\u cbot\bool; \l;variable\u cbot\var; can take. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. - +\b;Type \c;false\n; +This value means that a condition is not true; it is one of the two values that a \l;boolean\u cbot\bool; \l;variable\u cbot\var; can take. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. + diff --git a/help/cbot/file.txt b/help/cbot/file.txt index 2e491679..44bac38f 100644 --- a/help/cbot/file.txt +++ b/help/cbot/file.txt @@ -1,18 +1,18 @@ -\b;Type \c;file\n; -This type is used for accessing files in the files/ folder. -\c; -\s; file handle(); -\n; -Use the syntax above for declaring a file handle. You must use () to create an instance of the \c;file\n; class. Without the () the handle would have the value \c;\l;null\u cbot\null;\n;. - -Files can only be created and opened in the files/ folder which is located in the folder where Colobot has been installed. You cannot not create or open files elsewhere than in the files/ folder. - -\b;For specialists -\c;file\n; is actually not a simple type but a class. \c;open\n;, \c;close\n;, \c;writeln\n; etc. are methods of the \c;file\n; class. This is the reason why we always write \c;handle.method()\n;¦: -\c; -\s; handle.open("test.txt", "w"); -\s; handle.close(); -\n; -\t;See also -\c;\l;open\u cbot\open;\n;, \c;\l;close\u cbot\close;\n;, \c;\l;readln\u cbot\readln;\n;, \c;\l;writeln\u cbot\writeln;\n; and \c;\l;eof\u cbot\eof;\n;. -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Type \c;file\n; +This type is used for accessing files in the files/ folder. +\c; +\s; file handle(); +\n; +Use the syntax above for declaring a file handle. You must use () to create an instance of the \c;file\n; class. Without the () the handle would have the value \c;\l;null\u cbot\null;\n;. + +Files can only be created and opened in the files/ folder which is located in the folder where Colobot has been installed. You cannot not create or open files elsewhere than in the files/ folder. + +\b;For specialists +\c;file\n; is actually not a simple type but a class. \c;open\n;, \c;close\n;, \c;writeln\n; etc. are methods of the \c;file\n; class. This is the reason why we always write \c;handle.method()\n;¦: +\c; +\s; handle.open("test.txt", "w"); +\s; handle.close(); +\n; +\t;See also +\c;\l;open\u cbot\open;\n;, \c;\l;close\u cbot\close;\n;, \c;\l;readln\u cbot\readln;\n;, \c;\l;writeln\u cbot\writeln;\n; and \c;\l;eof\u cbot\eof;\n;. +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/fire.txt b/help/cbot/fire.txt index 0da624ca..fad947a6 100644 --- a/help/cbot/fire.txt +++ b/help/cbot/fire.txt @@ -1,31 +1,31 @@ -\b;Instruction \c;fire\n; -The instruction \c;fire();\n; fires the bot's onboard cannon. - -\b;Basic use -Generally this instruction is used to shoot one-second bursts: -\c; -\s; fire(1); -\n; -\b;For specialists -Syntax: -\s;\c;fire ( time );\n; - -Fires the gun, with a burst that lasts a certain time. The longer the burst, the more energy it needs. This instruction can be used with the following bot types: -o \l;Shooter\u object\botfr; -o \l;Orga shooter\u object\botor; -o \l;Phazer shooter\u object\botphaz; - -When controlling the robot through programming, the only way to turn the gun left or right is to turn the whole robot with the instruction \c;\l;turn\u cbot\turn;\n;. - -In order to move the gun upward or downward, use the instruction \c;\l;aim\u cbot\aim;\n;. - -\t;time: \c;\l;float\u cbot\float;\n; -Duration of the burst. Generally, the value given is 1. Shorter bursts can also be performed in order to spare time and energy. - -\t;Return value: \c;\l;int\u cbot\int;\n; -Zero if OK, or a value different from zero if an error occurred. -\c;== 0 \n;the cannon has been fired -\c;!= 0 \n;error, the cannon could not be fired - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;fire\n; +The instruction \c;fire();\n; fires the bot's onboard cannon. + +\b;Basic use +Generally this instruction is used to shoot one-second bursts: +\c; +\s; fire(1); +\n; +\b;For specialists +Syntax: +\s;\c;fire ( time );\n; + +Fires the gun, with a burst that lasts a certain time. The longer the burst, the more energy it needs. This instruction can be used with the following bot types: +o \l;Shooter\u object\botfr; +o \l;Orga shooter\u object\botor; +o \l;Phazer shooter\u object\botphaz; + +When controlling the robot through programming, the only way to turn the gun left or right is to turn the whole robot with the instruction \c;\l;turn\u cbot\turn;\n;. + +In order to move the gun upward or downward, use the instruction \c;\l;aim\u cbot\aim;\n;. + +\t;time: \c;\l;float\u cbot\float;\n; +Duration of the burst. Generally, the value given is 1. Shorter bursts can also be performed in order to spare time and energy. + +\t;Return value: \c;\l;int\u cbot\int;\n; +Zero if OK, or a value different from zero if an error occurred. +\c;== 0 \n;the cannon has been fired +\c;!= 0 \n;error, the cannon could not be fired + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/flatgrnd.txt b/help/cbot/flatgrnd.txt index 6f2bb82c..ae821eb4 100644 --- a/help/cbot/flatgrnd.txt +++ b/help/cbot/flatgrnd.txt @@ -1,17 +1,17 @@ -\b;Instruction \c;flatground\n; -Syntax¦: -\s;\c;flatground ( center, rmax );\n; - -Calculates the maximal radius of a flat zone on which a building ca be built. - -\t;center: \c;\l;point\u cbot\point;\n; -Center of the circlular zone. - -\t;rmax: \c;\l;float\u cbot\float;\n; -Maximal radius. - -\t;Return value: \c;\l;float\u cbot\float;\n; -Radius of the flat zone (always between 0 and rmax). - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;flatground\n; +Syntax¦: +\s;\c;flatground ( center, rmax );\n; + +Calculates the maximal radius of a flat zone on which a building ca be built. + +\t;center: \c;\l;point\u cbot\point;\n; +Center of the circlular zone. + +\t;rmax: \c;\l;float\u cbot\float;\n; +Maximal radius. + +\t;Return value: \c;\l;float\u cbot\float;\n; +Radius of the flat zone (always between 0 and rmax). + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/float.txt b/help/cbot/float.txt index 2cd23e83..77876058 100644 --- a/help/cbot/float.txt +++ b/help/cbot/float.txt @@ -1,25 +1,25 @@ -\b;Type \c;float\n; -Use this type for most variables that contains numbers. Variables of this type can contain positive and negative numbers, whole or real numbers, for example: -\c; -\s; 12.9 -\s; 1.125 -\s; 0.002 -\s; -4.1 -\n; -If you need only whole numbers (f. ex. 12 or -5000), you should rather use the type \c;\l;int\u cbot\int;\n;. - -\t;Attention -Do not insert space or colon characters into a number. To separate the whole part from the fractional part, use a dot. -\c; -\s; Write and not -\s; 12.56 12 . 56 -\s; -54.34 -54,34 -\s;12895.69 12,895.69 -\n; -\t;For specialists -Floating point numbers are represented in Colobot with 32 bits. -The highest value that can be represented is 3.4E+38. -The smallest value that can be represented is 3.4E-38. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Type \c;float\n; +Use this type for most variables that contains numbers. Variables of this type can contain positive and negative numbers, whole or real numbers, for example: +\c; +\s; 12.9 +\s; 1.125 +\s; 0.002 +\s; -4.1 +\n; +If you need only whole numbers (f. ex. 12 or -5000), you should rather use the type \c;\l;int\u cbot\int;\n;. + +\t;Attention +Do not insert space or colon characters into a number. To separate the whole part from the fractional part, use a dot. +\c; +\s; Write and not +\s; 12.56 12 . 56 +\s; -54.34 -54,34 +\s;12895.69 12,895.69 +\n; +\t;For specialists +Floating point numbers are represented in Colobot with 32 bits. +The highest value that can be represented is 3.4E+38. +The smallest value that can be represented is 3.4E-38. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/for.txt b/help/cbot/for.txt index 6c5c32fb..2465dd72 100644 --- a/help/cbot/for.txt +++ b/help/cbot/for.txt @@ -1,40 +1,40 @@ -\b;Instruction \c;for\n; -Syntax: -\s;\c;for ( before ; condition ; end ) -\s;{ -\s; \n;Instructions ...\c; -\s;} -\n; -This instruction allows you to execute a certain number of times the instructions contained in the \l;block\u cbot\bloc;. - -\t;\c;before\n; -This instruction is executed before the first loop instance. - -\t;\c;condition\n; -This \l;condition\u cbot\cond; determines if another instance of the loop must be executed. It is tested before every instance of the loop. - -\t;\c;end\n; -This instruction is executed at the end of every instance of the loop. - -Example: count from 1 to 4 -\c;\s;\c;for ( i = 0 ; i <= 4 ; i++ ) -\s;{ -\s; message(i) ; -\s;} -\n; -The following example is strictly equivalent to a \c;for\n;-loop, but it uses the instruction \c;\l;while\u cbot\while;\n;: -\s;\c;before; -\s;while ( condition ) -\s;{ -\s; \n;Instructions ...\c; -\s; end; -\s;} -\n; -\t;Attention -Do not put a \l;semicolon\u cbot\term; at the end of the line \c;for ( )\n;. - -The instructions \c;\l;break\u cbot\break;\n; and \c;\l;continue\u cbot\continue;\n; can be useful inside a block following the instruction \c;for \n;. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. - +\b;Instruction \c;for\n; +Syntax: +\s;\c;for ( before ; condition ; end ) +\s;{ +\s; \n;Instructions ...\c; +\s;} +\n; +This instruction allows you to execute a certain number of times the instructions contained in the \l;block\u cbot\bloc;. + +\t;\c;before\n; +This instruction is executed before the first loop instance. + +\t;\c;condition\n; +This \l;condition\u cbot\cond; determines if another instance of the loop must be executed. It is tested before every instance of the loop. + +\t;\c;end\n; +This instruction is executed at the end of every instance of the loop. + +Example: count from 1 to 4 +\c;\s;\c;for ( i = 0 ; i <= 4 ; i++ ) +\s;{ +\s; message(i) ; +\s;} +\n; +The following example is strictly equivalent to a \c;for\n;-loop, but it uses the instruction \c;\l;while\u cbot\while;\n;: +\s;\c;before; +\s;while ( condition ) +\s;{ +\s; \n;Instructions ...\c; +\s; end; +\s;} +\n; +\t;Attention +Do not put a \l;semicolon\u cbot\term; at the end of the line \c;for ( )\n;. + +The instructions \c;\l;break\u cbot\break;\n; and \c;\l;continue\u cbot\continue;\n; can be useful inside a block following the instruction \c;for \n;. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. + diff --git a/help/cbot/function.txt b/help/cbot/function.txt index ac941244..9b403896 100644 --- a/help/cbot/function.txt +++ b/help/cbot/function.txt @@ -1,85 +1,85 @@ -\b;Functions -With functions you can divide your program into several parts, each of them will execute a specific task. -Let's imagine following program¦: -\c; -\s;extern void object::Remote( ) -\s;{ -\s; send("order", 1, 100); -\s; wait(5); -\s; send("order", 3, 100); -\s; wait(5); -\s; send("order", 2, 100); -\s; wait(5); -\s; send("order", 4, 100); -\s; wait(5); -\s;} -\n; -\c;send\n; and \c;wait\n; are repeated several times. So it would be a good thing if we created a function that executes these two instructions: -\c; -\s;void object::SendToPost( float op ) -\s;{ -\s; send("order", op, 100); -\s; wait(5); -\s;} -\s;extern void object::Remote( ) -\s;{ -\s; SendToPost(1); -\s; SendToPost(3); -\s; SendToPost(2); -\s; SendToPost(4); -\s;} -\n; -A function can have paramteters¦: -\c; -\s;void Example( int a, float x, string s ) -\n; -The \c;Exemple\n; function will reveive un integer \c;a\n;, a floating point number \c;x\n; and a string \c;s\n;. Parameters are "passed by value", that is the values of parameter variables in a function are copies of the values the caller specified as variables. If you pass an \c;int\n; to a function, its parameter is a copy of whatever value was being passed as argument, and the function can change its parameter value without affecting values in the code that invoked the function. - -If you pass a \l;class\u cbot\class; instance or an \l;array\u cbot\array; as parameter to a function, the function only receives a \l;reference\u cbot\pointer; to the instance or the array. That means if you modify the instance or the array in the function, the instance or the array that has been specified by the caller will be actuallay modified. - -A function can also return a result with the \c;\l;return\u cbot\return;\n; instruction. Therefore the function must be declared no longer as void but as a type: -\c; -\s;float Mean( float a, float b ) -\s;{ -\s; return (a+b)/2; -\s;} -\s; -\s;extern void object::Test( ) -\s;{ -\s; float value; -\s; value = Mean(2, 6); -\s; message( value ); // will display 4 -\s;} -\n; -Some other examples¦: -\c; -\s;float Pi( ) -\s;{ -\s; return 3.1415; -\s;} -\s; -\s;string Sign( float a ) -\s;{ -\s; if ( a > 0 ) return "positive"; -\s; if ( a < 0 ) return "négative"; -\s; return "null"; -\s;} -\n; -You can declare several functions with the same name but different parameters¦: -\c; -\s;float Pythagoras( float a, float b ) -\s;{ -\s; return sqrt((a*a)+(b*b)); -\s;} -\s; -\s;float Pythagoras( float a, float b, float c ) -\s;{ -\s; return sqrt((a*a)+(b*b)+(c*c)); -\s;} -\n; -CBOT will call either the one or the other function depending on the paramteres passed. - -You can also declare a function \l;public\u cbot\public; so it can be used by other bots. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Functions +With functions you can divide your program into several parts, each of them will execute a specific task. +Let's imagine following program¦: +\c; +\s;extern void object::Remote( ) +\s;{ +\s; send("order", 1, 100); +\s; wait(5); +\s; send("order", 3, 100); +\s; wait(5); +\s; send("order", 2, 100); +\s; wait(5); +\s; send("order", 4, 100); +\s; wait(5); +\s;} +\n; +\c;send\n; and \c;wait\n; are repeated several times. So it would be a good thing if we created a function that executes these two instructions: +\c; +\s;void object::SendToPost( float op ) +\s;{ +\s; send("order", op, 100); +\s; wait(5); +\s;} +\s;extern void object::Remote( ) +\s;{ +\s; SendToPost(1); +\s; SendToPost(3); +\s; SendToPost(2); +\s; SendToPost(4); +\s;} +\n; +A function can have paramteters¦: +\c; +\s;void Example( int a, float x, string s ) +\n; +The \c;Exemple\n; function will reveive un integer \c;a\n;, a floating point number \c;x\n; and a string \c;s\n;. Parameters are "passed by value", that is the values of parameter variables in a function are copies of the values the caller specified as variables. If you pass an \c;int\n; to a function, its parameter is a copy of whatever value was being passed as argument, and the function can change its parameter value without affecting values in the code that invoked the function. + +If you pass a \l;class\u cbot\class; instance or an \l;array\u cbot\array; as parameter to a function, the function only receives a \l;reference\u cbot\pointer; to the instance or the array. That means if you modify the instance or the array in the function, the instance or the array that has been specified by the caller will be actuallay modified. + +A function can also return a result with the \c;\l;return\u cbot\return;\n; instruction. Therefore the function must be declared no longer as void but as a type: +\c; +\s;float Mean( float a, float b ) +\s;{ +\s; return (a+b)/2; +\s;} +\s; +\s;extern void object::Test( ) +\s;{ +\s; float value; +\s; value = Mean(2, 6); +\s; message( value ); // will display 4 +\s;} +\n; +Some other examples¦: +\c; +\s;float Pi( ) +\s;{ +\s; return 3.1415; +\s;} +\s; +\s;string Sign( float a ) +\s;{ +\s; if ( a > 0 ) return "positive"; +\s; if ( a < 0 ) return "négative"; +\s; return "null"; +\s;} +\n; +You can declare several functions with the same name but different parameters¦: +\c; +\s;float Pythagoras( float a, float b ) +\s;{ +\s; return sqrt((a*a)+(b*b)); +\s;} +\s; +\s;float Pythagoras( float a, float b, float c ) +\s;{ +\s; return sqrt((a*a)+(b*b)+(c*c)); +\s;} +\n; +CBOT will call either the one or the other function depending on the paramteres passed. + +You can also declare a function \l;public\u cbot\public; so it can be used by other bots. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/goto.txt b/help/cbot/goto.txt index 116b5ada..7657012c 100644 --- a/help/cbot/goto.txt +++ b/help/cbot/goto.txt @@ -1,35 +1,35 @@ -\b;Instruction \c;goto\n; -The instruction \c;goto();\n; instructs the bot to reach a given position. - -\b;Basic use -The most current use consists in moving the bot to an object located with the instruction \c;\l;radar\u cbot\radar;();\n;. If the information returned by the \c;\l;radar\u cbot\radar;();\n; has been stored in a certain variable, write the name of the variable followed by \c;.position\n; in order to get the position of the object. Here is an example of a program that looks for a \l;titanium cube\u object\titan;, goes to the position and grabs it: -\c; -\s; item = \l;radar\u cbot\radar;(Titanium); -\s; goto(item.position); -\s; \l;grab\u cbot\grab;(); -\n; -\b;For specialists -Syntax: -\s;\c;goto ( position, altitude, goal, crash );\n; - -Tells the robot to go to the given position, avoiding all the obstacles if this is possible. - -\t;pos: \c;\l;point\u cbot\point;\n; -Coordinates of the goal position. - -\t;altitude: \c;\l;float\u cbot\float;\n; -Flight altitude for \l;winged bots\u object\botgj;. The altitude is useful only for \l;winged bots\u object\botgj;. From the initial altitude, the bot climbs higher until it reaches the specified hight. When arriving close to destination, it goes down to touch the ground at the given position. If no value is given, an altitude of 10 meters is the default value. On very short moves, even winged bot stay on the ground. For all bot except winged bots, this parameter is ignored. - -\t;goal: \c;\l;int\u cbot\int;\n; (default value \c;0\n;) -This parameter tells the bot how it must reach the goal: -\c;0\n; stops exactly at the goal position -\c;1\n; goes close to the goal position, without stopping. -If no value is given, \c;1\n; (precision) is the default value. - -\t;Return value: \c;\l;int\u cbot\int;\n; -Normally an error stops the program. You can prevent the program from stopping on errors by using the \c;\l;errmode\u cbot\errmode;(0)\n; instruction. A value different from zero if an error occurred is then returned by \c;goto()\n;. -\c;== 0 \n;Goal position reached -\c;!= 0 \n;Goal position impossible to reach - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;goto\n; +The instruction \c;goto();\n; instructs the bot to reach a given position. + +\b;Basic use +The most current use consists in moving the bot to an object located with the instruction \c;\l;radar\u cbot\radar;();\n;. If the information returned by the \c;\l;radar\u cbot\radar;();\n; has been stored in a certain variable, write the name of the variable followed by \c;.position\n; in order to get the position of the object. Here is an example of a program that looks for a \l;titanium cube\u object\titan;, goes to the position and grabs it: +\c; +\s; item = \l;radar\u cbot\radar;(Titanium); +\s; goto(item.position); +\s; \l;grab\u cbot\grab;(); +\n; +\b;For specialists +Syntax: +\s;\c;goto ( position, altitude, goal, crash );\n; + +Tells the robot to go to the given position, avoiding all the obstacles if this is possible. + +\t;pos: \c;\l;point\u cbot\point;\n; +Coordinates of the goal position. + +\t;altitude: \c;\l;float\u cbot\float;\n; +Flight altitude for \l;winged bots\u object\botgj;. The altitude is useful only for \l;winged bots\u object\botgj;. From the initial altitude, the bot climbs higher until it reaches the specified hight. When arriving close to destination, it goes down to touch the ground at the given position. If no value is given, an altitude of 10 meters is the default value. On very short moves, even winged bot stay on the ground. For all bot except winged bots, this parameter is ignored. + +\t;goal: \c;\l;int\u cbot\int;\n; (default value \c;0\n;) +This parameter tells the bot how it must reach the goal: +\c;0\n; stops exactly at the goal position +\c;1\n; goes close to the goal position, without stopping. +If no value is given, \c;1\n; (precision) is the default value. + +\t;Return value: \c;\l;int\u cbot\int;\n; +Normally an error stops the program. You can prevent the program from stopping on errors by using the \c;\l;errmode\u cbot\errmode;(0)\n; instruction. A value different from zero if an error occurred is then returned by \c;goto()\n;. +\c;== 0 \n;Goal position reached +\c;!= 0 \n;Goal position impossible to reach + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/grab.txt b/help/cbot/grab.txt index d3b9c444..5cc81374 100644 --- a/help/cbot/grab.txt +++ b/help/cbot/grab.txt @@ -1,29 +1,29 @@ -\b;Instruction \c;grab\n; -The instruction \c;grab();\n; instructs the bot to use the operating arm to grab an object located on the ground, on the platform of a building or on the power cell location of a bot. - -\b;Basic use -The instruction \c;grab();\n; written in this form grabs the object located in front of the bot. Here is a short program that grabs an object in front of the bot and drops it 5 meters further: -\c; -\s; grab(); -\s; \l;move\u cbot\move;(5); -\s; \l;drop\u cbot\drop;(); -\n; -\b;For specialists -Syntax: -\s;\c;grab ( oper );\n; - -This instruction appeals to the operating arm of a \l;grabber bot\u object\botgr;, in order to grab the closest object. - -\t;oper: \c;\l;int\u cbot\int;\n; (default value\c;InFront\n;) -Oper indicates where the bot should look for an object to grab. If no indication is given, the object is picked up in front of the bot. -\c;InFront \n; Grabs in front (default value). -\c;Behind \n; Grabs behind. -\c;EnergyCell\n; Grabs the bot's own power cell. - -\t;Return value: \c;\l;int\u cbot\int;\n; -Normally an error stops the program. You can prevent the program from stopping on errors by using the \c;\l;errmode\u cbot\errmode;(0)\n; instruction. A value different from zero if an error occurred is then returned by \c;grab();\n;. -\c;== 0 \n;an object was grabbed -\c;!= 0 \n;error, no object was grabbed - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;grab\n; +The instruction \c;grab();\n; instructs the bot to use the operating arm to grab an object located on the ground, on the platform of a building or on the power cell location of a bot. + +\b;Basic use +The instruction \c;grab();\n; written in this form grabs the object located in front of the bot. Here is a short program that grabs an object in front of the bot and drops it 5 meters further: +\c; +\s; grab(); +\s; \l;move\u cbot\move;(5); +\s; \l;drop\u cbot\drop;(); +\n; +\b;For specialists +Syntax: +\s;\c;grab ( oper );\n; + +This instruction appeals to the operating arm of a \l;grabber bot\u object\botgr;, in order to grab the closest object. + +\t;oper: \c;\l;int\u cbot\int;\n; (default value\c;InFront\n;) +Oper indicates where the bot should look for an object to grab. If no indication is given, the object is picked up in front of the bot. +\c;InFront \n; Grabs in front (default value). +\c;Behind \n; Grabs behind. +\c;EnergyCell\n; Grabs the bot's own power cell. + +\t;Return value: \c;\l;int\u cbot\int;\n; +Normally an error stops the program. You can prevent the program from stopping on errors by using the \c;\l;errmode\u cbot\errmode;(0)\n; instruction. A value different from zero if an error occurred is then returned by \c;grab();\n;. +\c;== 0 \n;an object was grabbed +\c;!= 0 \n;error, no object was grabbed + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/if.txt b/help/cbot/if.txt index c5ab281d..ad2ed990 100644 --- a/help/cbot/if.txt +++ b/help/cbot/if.txt @@ -1,40 +1,40 @@ -\b;Instructions \c;if\n; and \c;else\n; -With the instruction \c;if() {}\n; you can execute a set of instructions only if a certain condition is true. Write the condition in brackets \c;()\n;, and the instructions in braces \c;{}\n;. - -\b;Basic use -Here is a concrete example: The bot will shoot only if the target is closer than 40 meters: -\c; -\s; item = \l;radar\u cbot\radar;(AlienAnt); -\s; if (\l;distance\u cbot\dist;(position, item.position) < 40) -\s; { -\s; fire(1); -\s; } -\n; -You can also test if an object exists at all. If the instruction \c;\l;radar\u cbot\radar;();\n; does not find the requested object, it returns the value \c;null\n;. So you can test if an object does not exists with the condition \c;(item == null)\n;, or test if it exists with \c;(item != null)\n;. Two equal signs \c;==\n; test equality, an exclamation mark followed by an equal sign \c;!=\n; test inequality. Here is a test that will go to rechage the \l;power cell\u object\power; only if there is a \l;power station\u object\station;: -\c; -\s; item = \l;radar\u cbot\radar;(PowerStation); -\s; if (item != null) -\s; { -\s; \l;goto\u cbot\goto;(item.position); -\s; \l;wait\u cbot\wait;(5); -\s; } -\n; -\b;For specialists -Syntax: -\s;\c;if ( condition ) -\s;{ -\s; \n;Instructions A ...\c; -\s;} -\s;else -\s;{ -\s; \n;Instructions B ...\c; -\s;} -\n; -With this conditional structure you can execute a \l;bloc\u cbot\bloc; A or a \l;bloc\u cbot\bloc; B depending on a \l;condition\u cbot\cond;. If the condition is true, bloc A is executed. If the condition is false, bloc B is executed. -Part \c;else { }\n; is not compulsory. - -\t;Attention -Do not put a \l;semicolon\u cbot\term; at the end of the line \c;if ( )\n;. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instructions \c;if\n; and \c;else\n; +With the instruction \c;if() {}\n; you can execute a set of instructions only if a certain condition is true. Write the condition in brackets \c;()\n;, and the instructions in braces \c;{}\n;. + +\b;Basic use +Here is a concrete example: The bot will shoot only if the target is closer than 40 meters: +\c; +\s; item = \l;radar\u cbot\radar;(AlienAnt); +\s; if (\l;distance\u cbot\dist;(position, item.position) < 40) +\s; { +\s; fire(1); +\s; } +\n; +You can also test if an object exists at all. If the instruction \c;\l;radar\u cbot\radar;();\n; does not find the requested object, it returns the value \c;null\n;. So you can test if an object does not exists with the condition \c;(item == null)\n;, or test if it exists with \c;(item != null)\n;. Two equal signs \c;==\n; test equality, an exclamation mark followed by an equal sign \c;!=\n; test inequality. Here is a test that will go to rechage the \l;power cell\u object\power; only if there is a \l;power station\u object\station;: +\c; +\s; item = \l;radar\u cbot\radar;(PowerStation); +\s; if (item != null) +\s; { +\s; \l;goto\u cbot\goto;(item.position); +\s; \l;wait\u cbot\wait;(5); +\s; } +\n; +\b;For specialists +Syntax: +\s;\c;if ( condition ) +\s;{ +\s; \n;Instructions A ...\c; +\s;} +\s;else +\s;{ +\s; \n;Instructions B ...\c; +\s;} +\n; +With this conditional structure you can execute a \l;bloc\u cbot\bloc; A or a \l;bloc\u cbot\bloc; B depending on a \l;condition\u cbot\cond;. If the condition is true, bloc A is executed. If the condition is false, bloc B is executed. +Part \c;else { }\n; is not compulsory. + +\t;Attention +Do not put a \l;semicolon\u cbot\term; at the end of the line \c;if ( )\n;. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/int.txt b/help/cbot/int.txt index edf666bd..deb86d9e 100644 --- a/help/cbot/int.txt +++ b/help/cbot/int.txt @@ -1,20 +1,20 @@ -\b;Type \c;int\n; -Use this type for variables that contain only whole numbers, negative or positive. For example: -\c; -\s; 12 -\s; 1000 -\s; -4 -\n; -To represent real numbers like 12.05 or -0.005, use the type \c;\l;float\u cbot\float;\n;. - -\t;Attention -Do not put space or colon signs inside a number. - -\t;For specialists -Numbers of the type \c;int\n; are represented with 32 bits. -The highest number that can be represented is (2^31)-1, that is 2'147'483'647. -The smallest number that can be represented is -(2^31), that is -2'147'483'648. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. - +\b;Type \c;int\n; +Use this type for variables that contain only whole numbers, negative or positive. For example: +\c; +\s; 12 +\s; 1000 +\s; -4 +\n; +To represent real numbers like 12.05 or -0.005, use the type \c;\l;float\u cbot\float;\n;. + +\t;Attention +Do not put space or colon signs inside a number. + +\t;For specialists +Numbers of the type \c;int\n; are represented with 32 bits. +The highest number that can be represented is (2^31)-1, that is 2'147'483'647. +The smallest number that can be represented is -(2^31), that is -2'147'483'648. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. + diff --git a/help/cbot/jet.txt b/help/cbot/jet.txt index f0beae6e..71e8da2d 100644 --- a/help/cbot/jet.txt +++ b/help/cbot/jet.txt @@ -1,16 +1,16 @@ -\b;Instruction \c;jet\n; -Syntax: -\s;\c;jet ( power );\n; - -Direct control of the jet of a \l;winged bot\u object\botgj;. The jet is what makes the bot fly. Use this instruction in order to take off, climb, descend or land. - -\t;power: \c;\l;float\u cbot\float;\n; -Power of the jet, ranges between \c;-1\n; and \c;+1\n;. \c;jet(1);\n; instructs the bot to climb as fast as possible, \c;jet(-1);\n; descends as fast as possible, \c;jet(0);\n; stabilizes the altitude. In order to get slower altitude changes, use intermediate values, for example \c;jet(0.3);\n;. - - -\t;Return value: \c;\l;void\u cbot\void;\n; -None. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. - +\b;Instruction \c;jet\n; +Syntax: +\s;\c;jet ( power );\n; + +Direct control of the jet of a \l;winged bot\u object\botgj;. The jet is what makes the bot fly. Use this instruction in order to take off, climb, descend or land. + +\t;power: \c;\l;float\u cbot\float;\n; +Power of the jet, ranges between \c;-1\n; and \c;+1\n;. \c;jet(1);\n; instructs the bot to climb as fast as possible, \c;jet(-1);\n; descends as fast as possible, \c;jet(0);\n; stabilizes the altitude. In order to get slower altitude changes, use intermediate values, for example \c;jet(0.3);\n;. + + +\t;Return value: \c;\l;void\u cbot\void;\n; +None. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. + diff --git a/help/cbot/message.txt b/help/cbot/message.txt index 1f361b84..01d0f706 100644 --- a/help/cbot/message.txt +++ b/help/cbot/message.txt @@ -1,25 +1,25 @@ -\b;Instruction \c;message\n; -Syntax: -\s;\c;message ( text, type );\n; - -Prints a message on top of the screen. After a few seconds, the message disappears automatically. - -\t;text: \c;\l;string\u cbot\string;\n; -Text that is to be displayed. It is possible to append several texts and/or values with the operator \c;+\n;: -\c;message("Not found");\n; -\c;message(angle);\n; -\c;message(n + " object(s) found");\n; -\c;message("Distance = " + dist + " meters");\n; - -\t;type: \c;\l;int\u cbot\int;\n; (default value \c;DisplayMessage\n;) -Type of the message, that determines the background color. -o \c;DisplayMessage\n; Standard message on yellow background. -o \c;DisplayInfo \n; Information on green background. -o \c;DisplayWarning\n; Warning on blue background. -o \c;DisplayError \n; Error on red background. - -\t;Return value: \c;\l;void\u cbot\void;\n; -None. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;message\n; +Syntax: +\s;\c;message ( text, type );\n; + +Prints a message on top of the screen. After a few seconds, the message disappears automatically. + +\t;text: \c;\l;string\u cbot\string;\n; +Text that is to be displayed. It is possible to append several texts and/or values with the operator \c;+\n;: +\c;message("Not found");\n; +\c;message(angle);\n; +\c;message(n + " object(s) found");\n; +\c;message("Distance = " + dist + " meters");\n; + +\t;type: \c;\l;int\u cbot\int;\n; (default value \c;DisplayMessage\n;) +Type of the message, that determines the background color. +o \c;DisplayMessage\n; Standard message on yellow background. +o \c;DisplayInfo \n; Information on green background. +o \c;DisplayWarning\n; Warning on blue background. +o \c;DisplayError \n; Error on red background. + +\t;Return value: \c;\l;void\u cbot\void;\n; +None. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/motor.txt b/help/cbot/motor.txt index 202b7af6..712a1ff3 100644 --- a/help/cbot/motor.txt +++ b/help/cbot/motor.txt @@ -1,39 +1,39 @@ -\b;Instruction \c;motor\n; -The instruction \c;motor( , );\n; sets the speed for the left-hand and the right-hand motor of the bot. - -\b;Basic use -The speed given to the motors will remain constant during the execution of the following instructions. Thanks to this characteristic it is possible to perform a rotation during the instruction \c;\l;fire\u cbot\fire;();\n;. This will sweep a whole zone with only one burst. Here is an example that will sweep the zone in front of the bot: -\c; -\s; \l;turn\u cbot\turn;(45); // turns 45 degrees left -\s; motor(0.5, -0.5); // slow rotation to the right -\s; \l;fire\u cbot\fire;(2); // fire -\s; motor(0,0); // stops the rotation -\n; -With the left-hand motor turning half-speed forward and the right-hand motor turning half-speed backward, the bot will turn slowly on itself during the 2-second-burst. - -\b;For specialists -Syntax : -\s;\c;motor ( left, right );\n; - -Gives speed instructions to the right and left motors of the robot. The motors will keep this speed until a new motor instruction is performed, or until a \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n; or \c;\l;goto\u cbot\goto;\n; instruction is performed. - -\t;left: \c;\l;float\u cbot\float;\n; -Speed instruction for the left motor; the value must range between -1 and 1. - -\t;right: \c;\l;float\u cbot\float;\n; -Speed instruction for the right motor; the value must range between -1 and 1. - -Examples : -\c;motor(1, 1);\n; moves forward with highest possible speed. -\c;motor(-0.5, -0.5);\n; moves backward with half speed. -\c;motor(1, -1);\n; turns right as fast as possible. - -Note : -\c;motor(2, 2);\n; will not move forward any faster than \c;motor(1, 1)\n; -\c;motor(-2, -2);\n; will not move backward any faster than \c;motor(-1, -1)\n; - -\t;Return value: \c;\l;void\u cbot\void;\n; -None. - -\t;See also -\l;Instructions\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;motor\n; +The instruction \c;motor( , );\n; sets the speed for the left-hand and the right-hand motor of the bot. + +\b;Basic use +The speed given to the motors will remain constant during the execution of the following instructions. Thanks to this characteristic it is possible to perform a rotation during the instruction \c;\l;fire\u cbot\fire;();\n;. This will sweep a whole zone with only one burst. Here is an example that will sweep the zone in front of the bot: +\c; +\s; \l;turn\u cbot\turn;(45); // turns 45 degrees left +\s; motor(0.5, -0.5); // slow rotation to the right +\s; \l;fire\u cbot\fire;(2); // fire +\s; motor(0,0); // stops the rotation +\n; +With the left-hand motor turning half-speed forward and the right-hand motor turning half-speed backward, the bot will turn slowly on itself during the 2-second-burst. + +\b;For specialists +Syntax : +\s;\c;motor ( left, right );\n; + +Gives speed instructions to the right and left motors of the robot. The motors will keep this speed until a new motor instruction is performed, or until a \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n; or \c;\l;goto\u cbot\goto;\n; instruction is performed. + +\t;left: \c;\l;float\u cbot\float;\n; +Speed instruction for the left motor; the value must range between -1 and 1. + +\t;right: \c;\l;float\u cbot\float;\n; +Speed instruction for the right motor; the value must range between -1 and 1. + +Examples : +\c;motor(1, 1);\n; moves forward with highest possible speed. +\c;motor(-0.5, -0.5);\n; moves backward with half speed. +\c;motor(1, -1);\n; turns right as fast as possible. + +Note : +\c;motor(2, 2);\n; will not move forward any faster than \c;motor(1, 1)\n; +\c;motor(-2, -2);\n; will not move backward any faster than \c;motor(-1, -1)\n; + +\t;Return value: \c;\l;void\u cbot\void;\n; +None. + +\t;See also +\l;Instructions\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/move.txt b/help/cbot/move.txt index 6b9129fb..74177b22 100644 --- a/help/cbot/move.txt +++ b/help/cbot/move.txt @@ -1,22 +1,22 @@ -\b;Instruction \c;move\n; -The instruction \c;move();\n; instructs the bot to move forward or backward while keeping the same orientation. In brackets you must specify the length of the move in meters. - -\b;Basic use -If you want the bot to move forward 30 meters, write \c;move(30);\n;. In order to move the bot backward after it dropped a chunk of \l;titanium ore\u object\titanore; on the \l;converter\u object\convert;, write \c;move(-2.5);\n;. - -\b;For specialists -Syntax: -\s;\c;move ( length );\n; - -Moves forward or backward of a given distance, always keeping the current orientation of the bot. - -\t;length: \c;\l;float\u cbot\float;\n; -Length of the move, in meters. A negative value makes the bot move backward. - -\t;Return value: \c;\l;int\u cbot\int;\n; -Normally an error stops the program. You can prevent the program from stopping on errors by using the \c;\l;errmode\u cbot\errmode;(0)\n; instruction. A value different from zero if an error occurred is then returned by \c;move()\n;. -\c;== 0 \n;Move executed -\c;!= 0 \n;error, the instruction was not performed correctly - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;move\n; +The instruction \c;move();\n; instructs the bot to move forward or backward while keeping the same orientation. In brackets you must specify the length of the move in meters. + +\b;Basic use +If you want the bot to move forward 30 meters, write \c;move(30);\n;. In order to move the bot backward after it dropped a chunk of \l;titanium ore\u object\titanore; on the \l;converter\u object\convert;, write \c;move(-2.5);\n;. + +\b;For specialists +Syntax: +\s;\c;move ( length );\n; + +Moves forward or backward of a given distance, always keeping the current orientation of the bot. + +\t;length: \c;\l;float\u cbot\float;\n; +Length of the move, in meters. A negative value makes the bot move backward. + +\t;Return value: \c;\l;int\u cbot\int;\n; +Normally an error stops the program. You can prevent the program from stopping on errors by using the \c;\l;errmode\u cbot\errmode;(0)\n; instruction. A value different from zero if an error occurred is then returned by \c;move()\n;. +\c;== 0 \n;Move executed +\c;!= 0 \n;error, the instruction was not performed correctly + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/nan.txt b/help/cbot/nan.txt index a2db962b..f4732189 100644 --- a/help/cbot/nan.txt +++ b/help/cbot/nan.txt @@ -1,16 +1,16 @@ -\b;Type \c;nan\n; -This special value indicates that a \l;variable\u cbot\var; of type \c;\l;int\u cbot\int;\n; or \c;\l;float\u cbot\float;\n; contains no number, but "nothing". -For example, if the instruction \c;\l;receive\u cbot\receive;\n; can not get the requested information, it returns \c;nan\n; : -\c; -\s; value = receive("Length"); -\s; if ( value == nan ) // not found ? -\s; { -\s; -\s; } -\n; -\t;Dictionnary -\c;nan\n; = Not A Number - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. - +\b;Type \c;nan\n; +This special value indicates that a \l;variable\u cbot\var; of type \c;\l;int\u cbot\int;\n; or \c;\l;float\u cbot\float;\n; contains no number, but "nothing". +For example, if the instruction \c;\l;receive\u cbot\receive;\n; can not get the requested information, it returns \c;nan\n; : +\c; +\s; value = receive("Length"); +\s; if ( value == nan ) // not found ? +\s; { +\s; +\s; } +\n; +\t;Dictionnary +\c;nan\n; = Not A Number + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. + diff --git a/help/cbot/new.txt b/help/cbot/new.txt index 2bacfee1..97261784 100644 --- a/help/cbot/new.txt +++ b/help/cbot/new.txt @@ -1,21 +1,21 @@ -\b;Instruction \c;new\n; (for specialists) -The \c;new\n; operator creates a \l;class\u cbot\class; instance: -\c;\s; MyClass item; // now item is a null reference -\s; item = new MyClass(); // now item is a reference -\s; // to a new class instance -\n; -If you want to create a new instance at declaration time you can ommit the new \c;new\n; operator by putting () after the declaration: - -Instead of: -\c;\s; MyClass item = new MyClass(); -\n;you can write: -\c;\s; MyClass item(); -\n; -If your class has a constructor with parameters you can write: -\c;\s; MyClass item = new MyClass(2, 3); -\n;or: -\c;\s; MyClass item(2, 3); -\n; -\t;See also -\c;\l;class\u cbot\class;\n;, \c;\l;reference\u cbot\pointer;\n; -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;new\n; (for specialists) +The \c;new\n; operator creates a \l;class\u cbot\class; instance: +\c;\s; MyClass item; // now item is a null reference +\s; item = new MyClass(); // now item is a reference +\s; // to a new class instance +\n; +If you want to create a new instance at declaration time you can ommit the new \c;new\n; operator by putting () after the declaration: + +Instead of: +\c;\s; MyClass item = new MyClass(); +\n;you can write: +\c;\s; MyClass item(); +\n; +If your class has a constructor with parameters you can write: +\c;\s; MyClass item = new MyClass(2, 3); +\n;or: +\c;\s; MyClass item(2, 3); +\n; +\t;See also +\c;\l;class\u cbot\class;\n;, \c;\l;reference\u cbot\pointer;\n; +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/null.txt b/help/cbot/null.txt index 1e8c76cb..6e5219da 100644 --- a/help/cbot/null.txt +++ b/help/cbot/null.txt @@ -1,7 +1,7 @@ -\b;Type \c;null\n; -This special value indicates that the variable containing it does not reference an instance. - -\t;See also -\l;References\u cbot\pointer; -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. - +\b;Type \c;null\n; +This special value indicates that the variable containing it does not reference an instance. + +\t;See also +\l;References\u cbot\pointer; +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. + diff --git a/help/cbot/object.txt b/help/cbot/object.txt index 47d0ff34..242de885 100644 --- a/help/cbot/object.txt +++ b/help/cbot/object.txt @@ -1,70 +1,70 @@ -\b;Type \c;object\n; -Use this type for variables that contain the characteristics of an object, be it a bot, a building, some raw material, an enemy, etc. - -\c;\l;int\u cbot\int; object.category \n;\l;Category\u cbot\category; of the object -\c;\l;point\u cbot\point; object.position \n;Position of the object (x,y,z) -\c;\l;float\u cbot\float; object.orientation \n;Orientation of the object (0..360) -\c;\l;float\u cbot\float; object.pitch \n;Forward/backward angle of the object -\c;\l;float\u cbot\float; object.roll \n;Right/left angle of the object -\c;\l;float\u cbot\float; object.energyLevel \n;Energy level (0..1) -\c;\l;float\u cbot\float; object.shieldLevel \n;Shield level (0..1) -\c;\l;float\u cbot\float; object.temperature \n;Jet temperature (0..1) -\c;\l;float\u cbot\float; object.altitude \n;Altitude above ground -\c;\l;float\u cbot\float; object.lifeTime \n;Lifetime of the object -\c;object object.energyCell \n;Power cell on the bot -\c;object object.load \n;Object carried by the bot - -\s;\c;category\n; -The \n;\l;category\u cbot\category; of an object allows you to know what it is, f. ex. what kind of bot, building, enemy, etc. - -\s;\c;position\n; -Position of the object on the planet, in meters. The coordinates \c;x\n; and \c;y\n; correspond to the location on a map, the \c;z\n; coordinate corresponds to the altitude above (respectively below) sea level. - -\s;\c;orientation\n; -Orientation of the object, in degrees. The orientation tells you what direction the object is facing. An orientation of \c;0\n; corresponds to an object facing eastwards, thus following the positive \c;x\n; axis. The orientation is measured counterclockwise. - -\s;\c;pitch\n; -Forward/backward angle of the robot. A pitch of \c;0\n; means that the bot is standing on flat ground. A positive inclination means that it is facing upwards, a negative inclination means that it is facing downwards. - -\s;\c;roll\n; -Left/right angle of the bot, in degrees. A positive value means that the bot is leaning to the left side, a negative value means that it is leaning to the right side. - -\s;\c;energyLevel\n; -Energy level, between 0 and 1. A normal \l;power cell\u object\power; that is fully charged returns the value \c;1\n;. A \l;nuclear power cell\u object\atomic; never returns a value higher than 1, it just lasts longer. Attention: The energy level of a bot is always zero, because the energy is not contained in the bot, but in the power cell. To know the energy level of the power cell of a bot, you must write \c;energyCell.energyLevel\n;. - -\s;\c;shieldLevel\n; -Shield level of a robot or building. A level \c;1\n; indicates that the shield is still perfect. Every time that the bot or building gets a bullet or collides with another object, the shield level decreases. When the level reaches \c;0\n;, the next bullet or collision will destroy the bot or building. -Bots can re-energize their shield on a \l;repair center\u object\repair;. The shield of a building is repaired if it lays inside the protection sphere of a \l;shielder\u object\botshld;. - -\s;\c;temperature\n; -Temperature of the jet of \l;winged bots\u object\botgj;. \c;0\n; corresponds to a cold jet. When used, the temperature increases progressively. When it reaches the value \c;1\n;, the jet is overheated and stops working, until it cooled down a little. - -\s;\c;altitude\n; -The \c;z\n; coordinate of the position indicates the altitude above sea level, whereas the \c;altitude\n; indicates the height above ground. This value is meaningful only for \l;winged bots\u object\botgj; and for \l;wasps\u object\wasp;. For all other objects, this value is zero. - -\s;\c;lifeTime\n; -The age of the object in seconds since it's creation. - -\s;\c;energyCell\n; -This information is special, because it returns the information about another object, in this case the power pack. This means that energyCell contains all the characteristics of a normal object, for example \c;category\n; (PowerCell or NuclearCell), \c;position\n; (the position of the cell), etc. -If you want to know the energy level of a robot, you must not check \c;energyLevel\n;, but \c;energyCell.energyLevel\n;. -If the bot has bot no power cell, \c;energyCell\n; returns \c;null\n;. - -\s;\c;load\n; -This information also returns the description of a whole object: the description of the object carried by a \l;grabber\u object\botgr;. If it carries nothing, \c;load\n; returns \c;null\n;. - -\b;Examples -The type \c;object\n; returns the special value \c;\l;null\u cbot\null;\n; when the object does not exist. For example: -\c; -\s; object a; -\s; a = radar(BotGrabberRoller); -\s; if ( a == null ) // object does not exist ? -\s; { -\s; } -\s; if ( a.position.z > 50 ) // is it on a mountain ? -\s; { -\s; } -\n; -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. - +\b;Type \c;object\n; +Use this type for variables that contain the characteristics of an object, be it a bot, a building, some raw material, an enemy, etc. + +\c;\l;int\u cbot\int; object.category \n;\l;Category\u cbot\category; of the object +\c;\l;point\u cbot\point; object.position \n;Position of the object (x,y,z) +\c;\l;float\u cbot\float; object.orientation \n;Orientation of the object (0..360) +\c;\l;float\u cbot\float; object.pitch \n;Forward/backward angle of the object +\c;\l;float\u cbot\float; object.roll \n;Right/left angle of the object +\c;\l;float\u cbot\float; object.energyLevel \n;Energy level (0..1) +\c;\l;float\u cbot\float; object.shieldLevel \n;Shield level (0..1) +\c;\l;float\u cbot\float; object.temperature \n;Jet temperature (0..1) +\c;\l;float\u cbot\float; object.altitude \n;Altitude above ground +\c;\l;float\u cbot\float; object.lifeTime \n;Lifetime of the object +\c;object object.energyCell \n;Power cell on the bot +\c;object object.load \n;Object carried by the bot + +\s;\c;category\n; +The \n;\l;category\u cbot\category; of an object allows you to know what it is, f. ex. what kind of bot, building, enemy, etc. + +\s;\c;position\n; +Position of the object on the planet, in meters. The coordinates \c;x\n; and \c;y\n; correspond to the location on a map, the \c;z\n; coordinate corresponds to the altitude above (respectively below) sea level. + +\s;\c;orientation\n; +Orientation of the object, in degrees. The orientation tells you what direction the object is facing. An orientation of \c;0\n; corresponds to an object facing eastwards, thus following the positive \c;x\n; axis. The orientation is measured counterclockwise. + +\s;\c;pitch\n; +Forward/backward angle of the robot. A pitch of \c;0\n; means that the bot is standing on flat ground. A positive inclination means that it is facing upwards, a negative inclination means that it is facing downwards. + +\s;\c;roll\n; +Left/right angle of the bot, in degrees. A positive value means that the bot is leaning to the left side, a negative value means that it is leaning to the right side. + +\s;\c;energyLevel\n; +Energy level, between 0 and 1. A normal \l;power cell\u object\power; that is fully charged returns the value \c;1\n;. A \l;nuclear power cell\u object\atomic; never returns a value higher than 1, it just lasts longer. Attention: The energy level of a bot is always zero, because the energy is not contained in the bot, but in the power cell. To know the energy level of the power cell of a bot, you must write \c;energyCell.energyLevel\n;. + +\s;\c;shieldLevel\n; +Shield level of a robot or building. A level \c;1\n; indicates that the shield is still perfect. Every time that the bot or building gets a bullet or collides with another object, the shield level decreases. When the level reaches \c;0\n;, the next bullet or collision will destroy the bot or building. +Bots can re-energize their shield on a \l;repair center\u object\repair;. The shield of a building is repaired if it lays inside the protection sphere of a \l;shielder\u object\botshld;. + +\s;\c;temperature\n; +Temperature of the jet of \l;winged bots\u object\botgj;. \c;0\n; corresponds to a cold jet. When used, the temperature increases progressively. When it reaches the value \c;1\n;, the jet is overheated and stops working, until it cooled down a little. + +\s;\c;altitude\n; +The \c;z\n; coordinate of the position indicates the altitude above sea level, whereas the \c;altitude\n; indicates the height above ground. This value is meaningful only for \l;winged bots\u object\botgj; and for \l;wasps\u object\wasp;. For all other objects, this value is zero. + +\s;\c;lifeTime\n; +The age of the object in seconds since it's creation. + +\s;\c;energyCell\n; +This information is special, because it returns the information about another object, in this case the power pack. This means that energyCell contains all the characteristics of a normal object, for example \c;category\n; (PowerCell or NuclearCell), \c;position\n; (the position of the cell), etc. +If you want to know the energy level of a robot, you must not check \c;energyLevel\n;, but \c;energyCell.energyLevel\n;. +If the bot has bot no power cell, \c;energyCell\n; returns \c;null\n;. + +\s;\c;load\n; +This information also returns the description of a whole object: the description of the object carried by a \l;grabber\u object\botgr;. If it carries nothing, \c;load\n; returns \c;null\n;. + +\b;Examples +The type \c;object\n; returns the special value \c;\l;null\u cbot\null;\n; when the object does not exist. For example: +\c; +\s; object a; +\s; a = radar(BotGrabberRoller); +\s; if ( a == null ) // object does not exist ? +\s; { +\s; } +\s; if ( a.position.z > 50 ) // is it on a mountain ? +\s; { +\s; } +\n; +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. + diff --git a/help/cbot/open.txt b/help/cbot/open.txt index d2afb309..8af2abd4 100644 --- a/help/cbot/open.txt +++ b/help/cbot/open.txt @@ -1,20 +1,20 @@ -\b;Instruction \c;open\n; -Open a text file in the files/ folder. This is a method of the \c;\l;file\u cbot\file;\n; class. This is the reason why we always write \c;handle.open()\n;¦: -\c; -\s; handle.open("test.txt", "w"); -\n; -To open a file, proceed as follows¦: -\c; -\s; file handle(); -\s; handle.open("filename", "w"); -\s; handle.writeln("abc"); -\s; handle.close(); -\n; -\c;"r"\n; mode: open for reading. -\c;"w"\n; mode: open for writing. - -Files can only be created and opened in the files/ folder which is located in the folder where Colobot has been installed. You cannot not create or open files that are located elsewhere than in the files/ folder. - -\t;See also -\c;\l;file\u cbot\file;\n;, \c;\l;close\u cbot\close;\n;, \c;\l;readln\u cbot\readln;\n;, \c;\l;writeln\u cbot\writeln;\n; and \c;\l;eof\u cbot\eof;\n;. -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;open\n; +Open a text file in the files/ folder. This is a method of the \c;\l;file\u cbot\file;\n; class. This is the reason why we always write \c;handle.open()\n;¦: +\c; +\s; handle.open("test.txt", "w"); +\n; +To open a file, proceed as follows¦: +\c; +\s; file handle(); +\s; handle.open("filename", "w"); +\s; handle.writeln("abc"); +\s; handle.close(); +\n; +\c;"r"\n; mode: open for reading. +\c;"w"\n; mode: open for writing. + +Files can only be created and opened in the files/ folder which is located in the folder where Colobot has been installed. You cannot not create or open files that are located elsewhere than in the files/ folder. + +\t;See also +\c;\l;file\u cbot\file;\n;, \c;\l;close\u cbot\close;\n;, \c;\l;readln\u cbot\readln;\n;, \c;\l;writeln\u cbot\writeln;\n; and \c;\l;eof\u cbot\eof;\n;. +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/openfile.txt b/help/cbot/openfile.txt index 13ea97a4..6e8d59e1 100644 --- a/help/cbot/openfile.txt +++ b/help/cbot/openfile.txt @@ -1,11 +1,11 @@ -\b;Instruction \c;openfile\n; -\c;openfile();\n; opens an text file in the files/ folder. This is not a method of the \c;\l;file\u cbot\file;\n; class but openfile returne a \l;reference\u cbot\pointer; to a new instance of the file class. You must supply two parameters, the filename and the opening mode. -\c; -\s;file handle = openfile("filename", "r"); -\n; -\c;"r"\n; mode: open for reading. -\c;"w"\n; mode: open for writing. - - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;openfile\n; +\c;openfile();\n; opens an text file in the files/ folder. This is not a method of the \c;\l;file\u cbot\file;\n; class but openfile returne a \l;reference\u cbot\pointer; to a new instance of the file class. You must supply two parameters, the filename and the opening mode. +\c; +\s;file handle = openfile("filename", "r"); +\n; +\c;"r"\n; mode: open for reading. +\c;"w"\n; mode: open for writing. + + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/point.txt b/help/cbot/point.txt index bf4dfad7..916be40f 100644 --- a/help/cbot/point.txt +++ b/help/cbot/point.txt @@ -1,36 +1,36 @@ -\b;Type \c;point\n; -Variables of this type contain the coordinates of a point in space. This type is made of three values that represent the \c;x\n;, \c;y\n; and \c;z\n; coordinates. -\c;x\n; and \c;y\n; correspond to the place on the ground. The positive \c;x\n; axis faces towards east, the positive \c;y\n; axis faces towards north. -The \c;z\n; value corresponds to the altitude above sea level. - -If you want to declare a variable of type point, you can write: -\c; -\s; point a (10, 20, 30); -\n; -You can also set the variable taking one value after another: -\c; -\s; point b; -\s; b.x = 10; -\s; b.y = 20; -\s; b.z = 30; -\n; -With these examples, the following \l;condition\u cbot\cond; is true: -\c; -\s; if ( a == b ) -\s; { -\s; } -\n; -The following declaration : -\c; -\s; point c (4, 7); -\n; -Is equivalent to : -\c; -\s; point c; -\s; c.x = 4; -\s; c.y = 7; -\s; c.z = 0; -\n; - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Type \c;point\n; +Variables of this type contain the coordinates of a point in space. This type is made of three values that represent the \c;x\n;, \c;y\n; and \c;z\n; coordinates. +\c;x\n; and \c;y\n; correspond to the place on the ground. The positive \c;x\n; axis faces towards east, the positive \c;y\n; axis faces towards north. +The \c;z\n; value corresponds to the altitude above sea level. + +If you want to declare a variable of type point, you can write: +\c; +\s; point a (10, 20, 30); +\n; +You can also set the variable taking one value after another: +\c; +\s; point b; +\s; b.x = 10; +\s; b.y = 20; +\s; b.z = 30; +\n; +With these examples, the following \l;condition\u cbot\cond; is true: +\c; +\s; if ( a == b ) +\s; { +\s; } +\n; +The following declaration : +\c; +\s; point c (4, 7); +\n; +Is equivalent to : +\c; +\s; point c; +\s; c.x = 4; +\s; c.y = 7; +\s; c.z = 0; +\n; + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/pointer.txt b/help/cbot/pointer.txt index 85f52e9d..3d7b348c 100644 --- a/help/cbot/pointer.txt +++ b/help/cbot/pointer.txt @@ -1,53 +1,53 @@ -\b;References (for specialists) -CBOT uses references for \l;classes\u cbot\class; and \l;arrays\u cbot\array;. Any class variable actually contains a reference to the instance. The instance actually contains the class fields. Several references can reference the same instance. A \c;\l;null\u cbot\null;\n; reference references nothing. You can compare an instance to a suitcase and a reference to a carrier. Each time we need a new suitcase we create a new instance with a carrier. But a suitcase can be carried by more than one carrier. A carrier who carries no suitcase is a \c;\l;null\u cbot\null;\n; reference. - -Example: -\c;\s;{ -\s; MyClass item1(); // create a new instance -\s; // referenced by item1 -\s; MyClass item2; // create a null reference -\s; item2 = item1; // copy the reference, -\s; // item2 and item1 now reference -\s; // the same instance -\s; item1.a = 12; // modifies the instance -\s; // referenced by item1 (and item2) -\s; message(item2.a);// displays 12 -\s;} -\n; -If you pass a \l;class\u cbot\class; instance as parameter to a function, the function only receives a reference to the instance. That means if you modify the instance in the function, the instance that has been specified by the caller will be actuallay modified. - -\c;\s;void Test( MyClass item ) -\s;{ -\s; item.a = 12; // modify the original instance -\s; item = new MyClass(); // new local instance -\s; item.a = 33; // modifie the local instance -\s;} -\n; -Calling the fucntion \c;Test()\n;¦: -\c;\s;{ -\s; MyClass toto(); -\s; Test(toto); -\s; message(toto.a); // displays 12 -\s;} -\n; -The instance containing the field \c;a = 33\n; is referenced only by the newly created instance \c;item\n; inside the fucntion \c;Test\n;. At the end of \c;Test\n; this newly created instance referenced by \c;item\n; is automatically deleted. - -A function can return an instance¦: -\c;\s;MyClass Test2( ) -\s;{ -\s; MyClass item = new MyClass(); -\s; item.x = 33; -\s; return item; -\s;} -\n; -Call the function like this: -\c;\s;{ -\s; MyClass toto; -\s; toto = Test2(); // toto will contain a reference to -\s; // the instance created by Test2() -\s; message(toto.a); // displays 33 -\s;} -\n; -\t;See also -\c;\l;class\u cbot\class;\n;, \c;\l;new\u cbot\new;\n; -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;References (for specialists) +CBOT uses references for \l;classes\u cbot\class; and \l;arrays\u cbot\array;. Any class variable actually contains a reference to the instance. The instance actually contains the class fields. Several references can reference the same instance. A \c;\l;null\u cbot\null;\n; reference references nothing. You can compare an instance to a suitcase and a reference to a carrier. Each time we need a new suitcase we create a new instance with a carrier. But a suitcase can be carried by more than one carrier. A carrier who carries no suitcase is a \c;\l;null\u cbot\null;\n; reference. + +Example: +\c;\s;{ +\s; MyClass item1(); // create a new instance +\s; // referenced by item1 +\s; MyClass item2; // create a null reference +\s; item2 = item1; // copy the reference, +\s; // item2 and item1 now reference +\s; // the same instance +\s; item1.a = 12; // modifies the instance +\s; // referenced by item1 (and item2) +\s; message(item2.a);// displays 12 +\s;} +\n; +If you pass a \l;class\u cbot\class; instance as parameter to a function, the function only receives a reference to the instance. That means if you modify the instance in the function, the instance that has been specified by the caller will be actuallay modified. + +\c;\s;void Test( MyClass item ) +\s;{ +\s; item.a = 12; // modify the original instance +\s; item = new MyClass(); // new local instance +\s; item.a = 33; // modifie the local instance +\s;} +\n; +Calling the fucntion \c;Test()\n;¦: +\c;\s;{ +\s; MyClass toto(); +\s; Test(toto); +\s; message(toto.a); // displays 12 +\s;} +\n; +The instance containing the field \c;a = 33\n; is referenced only by the newly created instance \c;item\n; inside the fucntion \c;Test\n;. At the end of \c;Test\n; this newly created instance referenced by \c;item\n; is automatically deleted. + +A function can return an instance¦: +\c;\s;MyClass Test2( ) +\s;{ +\s; MyClass item = new MyClass(); +\s; item.x = 33; +\s; return item; +\s;} +\n; +Call the function like this: +\c;\s;{ +\s; MyClass toto; +\s; toto = Test2(); // toto will contain a reference to +\s; // the instance created by Test2() +\s; message(toto.a); // displays 33 +\s;} +\n; +\t;See also +\c;\l;class\u cbot\class;\n;, \c;\l;new\u cbot\new;\n; +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/private.txt b/help/cbot/private.txt index f52f69d9..5a2921a2 100644 --- a/help/cbot/private.txt +++ b/help/cbot/private.txt @@ -1,19 +1,19 @@ -\b;Instruction \c;private\n; (for specialists) -\l;Class\u cbot\class; members can be \l;public\u cbot\public; (by default) or private. A member can be declared privat by putting \c;private\n; before the type declaration of the member. Private members are not accessible from outside the class definition. -\c; -\s;public class MyClass -\s;{ -\s; int b; // public by défault -\s; public int a; // als public -\s; private point position; // privat -\s;} -\s;void Test() -\s;{ -\s; MyClass item; -\s; item.a = item.b = 12; // ok -\s; message( item.position ); // this is an error -\s;} -\n; -\t;See also -\c;\l;class\u cbot\class;\n;, \c;\l;public\u cbot\public;\n; -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;private\n; (for specialists) +\l;Class\u cbot\class; members can be \l;public\u cbot\public; (by default) or private. A member can be declared privat by putting \c;private\n; before the type declaration of the member. Private members are not accessible from outside the class definition. +\c; +\s;public class MyClass +\s;{ +\s; int b; // public by défault +\s; public int a; // als public +\s; private point position; // privat +\s;} +\s;void Test() +\s;{ +\s; MyClass item; +\s; item.a = item.b = 12; // ok +\s; message( item.position ); // this is an error +\s;} +\n; +\t;See also +\c;\l;class\u cbot\class;\n;, \c;\l;public\u cbot\public;\n; +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/public.txt b/help/cbot/public.txt index c26e9bb6..d7e8d920 100644 --- a/help/cbot/public.txt +++ b/help/cbot/public.txt @@ -1,51 +1,51 @@ -\b;Instruction \c;public\n; (for specialists) -This instruction has two distinct purposes¦: - -1) Make a function available to other bots. -2) Make a class member accessible from outside the class definition. - -\b;Instruction \c;public\n; for functions -If you put \c;public\n; before a \l;function\u cbot\function; definition, you can make the function available to programs in other bots in the same mission. - -For example in the first bot we would have¦: -\c; -\s;public void object::Segment(float dist, float angle) -\s;{ -\s; move(dist); -\s; turn(angle); -\s;} -\n; -And in another bot we would have¦: -\c; -\s;extern void object::Square( ) -\s;{ -\s; for ( int i=0 ; i<4 ; i++ ) -\s; { -\s; Segment(10, 90); -\s; fire(1); -\s; } -\s;} -\n; -If you have declared a function \c;public\n;, you cannot define a function with the same name and arguments in another bot of the same mission. - -If a bot containing a \c;public\n; function is destroyed, the other bots that make use of this function will be stopped with an error. - -\b;Instruction \c;public\n; for classes -\l;Class\u cbot\class; members can be public (by default) or \l;privat\u cbot\private;. A member can be declared private by putting \c;private\n; before the member type. Private members are not accessible from outside the class definition. -\c; -\s;public class MyClass -\s;{ -\s; int b; // public by default -\s; public int a; // also public -\s; private point position; // privat -\s;} -\s;void Test() -\s;{ -\s; MyClass item; -\s; item.a = item.b = 12; // ok -\s; message( item.position ); // this is an error -\s;} -\n; -\t;See also -\c;\l;class\u cbot\class;\n;, \c;\l;private\u cbot\private;\n;, \c;\l;functions\u cbot\function;\n; -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;public\n; (for specialists) +This instruction has two distinct purposes¦: + +1) Make a function available to other bots. +2) Make a class member accessible from outside the class definition. + +\b;Instruction \c;public\n; for functions +If you put \c;public\n; before a \l;function\u cbot\function; definition, you can make the function available to programs in other bots in the same mission. + +For example in the first bot we would have¦: +\c; +\s;public void object::Segment(float dist, float angle) +\s;{ +\s; move(dist); +\s; turn(angle); +\s;} +\n; +And in another bot we would have¦: +\c; +\s;extern void object::Square( ) +\s;{ +\s; for ( int i=0 ; i<4 ; i++ ) +\s; { +\s; Segment(10, 90); +\s; fire(1); +\s; } +\s;} +\n; +If you have declared a function \c;public\n;, you cannot define a function with the same name and arguments in another bot of the same mission. + +If a bot containing a \c;public\n; function is destroyed, the other bots that make use of this function will be stopped with an error. + +\b;Instruction \c;public\n; for classes +\l;Class\u cbot\class; members can be public (by default) or \l;privat\u cbot\private;. A member can be declared private by putting \c;private\n; before the member type. Private members are not accessible from outside the class definition. +\c; +\s;public class MyClass +\s;{ +\s; int b; // public by default +\s; public int a; // also public +\s; private point position; // privat +\s;} +\s;void Test() +\s;{ +\s; MyClass item; +\s; item.a = item.b = 12; // ok +\s; message( item.position ); // this is an error +\s;} +\n; +\t;See also +\c;\l;class\u cbot\class;\n;, \c;\l;private\u cbot\private;\n;, \c;\l;functions\u cbot\function;\n; +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/radar.txt b/help/cbot/radar.txt index 13841933..d16fa639 100644 --- a/help/cbot/radar.txt +++ b/help/cbot/radar.txt @@ -1,60 +1,60 @@ -\b;Instruction \c;radar\n; -With the instruction \c;radar()\n;, you can look for objects like \l;enemies\u object\mother;, bots, buildings or raw materials. - -\b;Basic use -Write in brackets the \l;name of the object\u cbot\category; that you look for. Put the result in a variable of the \l;type\u cbot\type; \c;object\n;. Here is an example that looks for the closest ant: -\c; -\s;// At the beginning of the program: -\s;object item; // variable declaration -\s; -\s;// Look for the closest ant -\s;item = radar(AlienAnt); -\n; -\b;For specialists -Syntax: -\s;\c;radar ( category, angle, focus, min, max, way );\n; - -Detects an object according to several parameters. - -\image radar1 8 8; -Seen from above, the purple zone corresponds to the zone where objects will be detected. - -\t;category: \c;\l;int\u cbot\int;\n; -\l;Category\u cbot\category; of the objects that should be detected. For example, when you are looking for an ant, write \c;radar (AlienAnt)\n;. - -\t;angle: \c;\l;float\u cbot\float;\n; (default value\c;0\n;) -Direction that the radar is facing, in degrees. -\c; 0\n; -> radar is facing straight ahead -\c;-90\n; -> radar is facing a quarter turn right -\c; 90\n; -> radar is facing a quarter turn left - -\t;focus: \c;\l;float\u cbot\float;\n; (default value\c;360\n;) -Opening angle of the radar, in degrees. - -\t;min: \c;\l;float\u cbot\float;\n; (default value \c;0\n;) -Minimum detection distance, in meters. Objects that are closer than the minimum distance will not be detected. - -\t;max: \c;\l;float\u cbot\float;\n; (Default value\c;1000\n;) -Maximum detection distance, in meters. Objects that are farther away than the maximum distance will not be detected. - -\t;way: \c;\l;float\u cbot\float;\n; (default value\c;1\n;) -Determines which way the objects are detected. With value \c;1\n;, returns the closest object found in the specified zone. With value \c;-1\n;, the farthest object in the zone will be returned. - -\t;Return value: \c;\l;object\u cbot\object;\n; -Returns the first object found that corresponds to the specified category in the specified zone. If no object was found, returns the value \c;\l;null\u cbot\null;\n;. - -\t;Remark -You do not have to give all the parameters. Here are two examples of instructions that are equivalent: -\c; -\s; radar(Titanium, 0, 360, 0, 1000); -\s; radar(Titanium); // equivalent - -\s; radar(Titanium, 0, 90, 0, 1000); -\s; radar(Titanium, 0, 90); // equivalent -\n; -When one or more parameters are not specified, the default values indicated above are used instead; only the first parameter is compulsory. -Generally, only the first parameter is specified: f. ex. \c;radar (AlienAnt)\n; detects the closest ant, wherever it may be. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. - +\b;Instruction \c;radar\n; +With the instruction \c;radar()\n;, you can look for objects like \l;enemies\u object\mother;, bots, buildings or raw materials. + +\b;Basic use +Write in brackets the \l;name of the object\u cbot\category; that you look for. Put the result in a variable of the \l;type\u cbot\type; \c;object\n;. Here is an example that looks for the closest ant: +\c; +\s;// At the beginning of the program: +\s;object item; // variable declaration +\s; +\s;// Look for the closest ant +\s;item = radar(AlienAnt); +\n; +\b;For specialists +Syntax: +\s;\c;radar ( category, angle, focus, min, max, way );\n; + +Detects an object according to several parameters. + +\image radar1 8 8; +Seen from above, the purple zone corresponds to the zone where objects will be detected. + +\t;category: \c;\l;int\u cbot\int;\n; +\l;Category\u cbot\category; of the objects that should be detected. For example, when you are looking for an ant, write \c;radar (AlienAnt)\n;. + +\t;angle: \c;\l;float\u cbot\float;\n; (default value\c;0\n;) +Direction that the radar is facing, in degrees. +\c; 0\n; -> radar is facing straight ahead +\c;-90\n; -> radar is facing a quarter turn right +\c; 90\n; -> radar is facing a quarter turn left + +\t;focus: \c;\l;float\u cbot\float;\n; (default value\c;360\n;) +Opening angle of the radar, in degrees. + +\t;min: \c;\l;float\u cbot\float;\n; (default value \c;0\n;) +Minimum detection distance, in meters. Objects that are closer than the minimum distance will not be detected. + +\t;max: \c;\l;float\u cbot\float;\n; (Default value\c;1000\n;) +Maximum detection distance, in meters. Objects that are farther away than the maximum distance will not be detected. + +\t;way: \c;\l;float\u cbot\float;\n; (default value\c;1\n;) +Determines which way the objects are detected. With value \c;1\n;, returns the closest object found in the specified zone. With value \c;-1\n;, the farthest object in the zone will be returned. + +\t;Return value: \c;\l;object\u cbot\object;\n; +Returns the first object found that corresponds to the specified category in the specified zone. If no object was found, returns the value \c;\l;null\u cbot\null;\n;. + +\t;Remark +You do not have to give all the parameters. Here are two examples of instructions that are equivalent: +\c; +\s; radar(Titanium, 0, 360, 0, 1000); +\s; radar(Titanium); // equivalent + +\s; radar(Titanium, 0, 90, 0, 1000); +\s; radar(Titanium, 0, 90); // equivalent +\n; +When one or more parameters are not specified, the default values indicated above are used instead; only the first parameter is compulsory. +Generally, only the first parameter is specified: f. ex. \c;radar (AlienAnt)\n; detects the closest ant, wherever it may be. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. + diff --git a/help/cbot/readln.txt b/help/cbot/readln.txt index bad251a1..4889c0c5 100644 --- a/help/cbot/readln.txt +++ b/help/cbot/readln.txt @@ -1,20 +1,20 @@ -\b;Instruction \c;readln\n; -Read one line from an open file in the files/ folder. This is a method of the \c;\l;file\u cbot\file;\n; class. This is the reason why we always write \c;handle.readln()\n;¦: -\c; -\s; s = handle.readln(); -\n; -The file must have been opened for reading (\c;"r"\n;) with the \c;\l;open\u cbot\open;\n; instruction. \c;readln\n; returns the string containing the whole line but without the end of line characters 0x0D (CR) and 0x0A (LF). - -Syntax¦: -\s;\c;string = handle.readln ( );\n; - -Example¦: -\c; -\s; string s; -\s; s = handle.readln(); -\s; if ( s == "abc" ) -\s; ... -\n; -\t;See also -\c;\l;file\u cbot\file;\n;, \c;\l;open\u cbot\open;\n;, \c;\l;close\u cbot\close;\n;, \c;\l;writeln\u cbot\writeln;\n; and \c;\l;eof\u cbot\eof;\n;. -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;readln\n; +Read one line from an open file in the files/ folder. This is a method of the \c;\l;file\u cbot\file;\n; class. This is the reason why we always write \c;handle.readln()\n;¦: +\c; +\s; s = handle.readln(); +\n; +The file must have been opened for reading (\c;"r"\n;) with the \c;\l;open\u cbot\open;\n; instruction. \c;readln\n; returns the string containing the whole line but without the end of line characters 0x0D (CR) and 0x0A (LF). + +Syntax¦: +\s;\c;string = handle.readln ( );\n; + +Example¦: +\c; +\s; string s; +\s; s = handle.readln(); +\s; if ( s == "abc" ) +\s; ... +\n; +\t;See also +\c;\l;file\u cbot\file;\n;, \c;\l;open\u cbot\open;\n;, \c;\l;close\u cbot\close;\n;, \c;\l;writeln\u cbot\writeln;\n; and \c;\l;eof\u cbot\eof;\n;. +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/receive.txt b/help/cbot/receive.txt index cc8f57b6..68b140f5 100644 --- a/help/cbot/receive.txt +++ b/help/cbot/receive.txt @@ -1,18 +1,18 @@ -\b;Instruction \c;receive\n; -Syntax: -\s;\c;receive ( name, power );\n; - -Retrieves an information from the closest \l;information exchange post\u object\exchange;. - -\t;name: \c;string\n; -Name of the information required from the exchange post. This name is a string: it must be written in quotation marks "¦". - -\t;power: \c;float\n; -Power of the receiver, which corresponds to maximal distance between the receiver and the exchange post. If the distance is longer, no information is received. Default value is 10 metres. - -\t;Return value: \c;\l;float\u cbot\float;\n; -Value of the retrieved information. If no exchange post is close enough, or if the name of the requested information does not exist in the exchange post, the value \c;nan\n; is returned. - -\t;See also -\c;\l;send\u cbot\send;\n;, \c;\l;testinfo\u cbot\testinfo;\n; and \c;\l;deleteinfo\u cbot\delinfo;\n;. -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;receive\n; +Syntax: +\s;\c;receive ( name, power );\n; + +Retrieves an information from the closest \l;information exchange post\u object\exchange;. + +\t;name: \c;string\n; +Name of the information required from the exchange post. This name is a string: it must be written in quotation marks "¦". + +\t;power: \c;float\n; +Power of the receiver, which corresponds to maximal distance between the receiver and the exchange post. If the distance is longer, no information is received. Default value is 10 metres. + +\t;Return value: \c;\l;float\u cbot\float;\n; +Value of the retrieved information. If no exchange post is close enough, or if the name of the requested information does not exist in the exchange post, the value \c;nan\n; is returned. + +\t;See also +\c;\l;send\u cbot\send;\n;, \c;\l;testinfo\u cbot\testinfo;\n; and \c;\l;deleteinfo\u cbot\delinfo;\n;. +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/recycle.txt b/help/cbot/recycle.txt index bb209877..10d9979d 100644 --- a/help/cbot/recycle.txt +++ b/help/cbot/recycle.txt @@ -1,14 +1,14 @@ -\b;Instruction \c;recycle\n; -Syntax: -\s;\c;recycle ( );\n; - -Recycles the derelict bot in front of the \l;recycler\u object\botrecy; into a \l;titanium cube\u object\titan;. - -\t;Return value: \c;\l;int\u cbot\int;\n; -Zero if OK, or a value different from zero if an error occurred. -\c;== 0 \n;the derelict bot has been recycled -\c;!= 0 \n;error, no derelict bot could be recycled - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. - +\b;Instruction \c;recycle\n; +Syntax: +\s;\c;recycle ( );\n; + +Recycles the derelict bot in front of the \l;recycler\u object\botrecy; into a \l;titanium cube\u object\titan;. + +\t;Return value: \c;\l;int\u cbot\int;\n; +Zero if OK, or a value different from zero if an error occurred. +\c;== 0 \n;the derelict bot has been recycled +\c;!= 0 \n;error, no derelict bot could be recycled + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. + diff --git a/help/cbot/retobj.txt b/help/cbot/retobj.txt index 69b47df7..3cfd3ca7 100644 --- a/help/cbot/retobj.txt +++ b/help/cbot/retobj.txt @@ -1,15 +1,15 @@ -\b;Instruction \c;retobject\n; -Syntax: -\s;\c;retobject ( number );\n; - -Returns the object corresponding to the given number. - -\t;number: \c;\l;int\u cbot\int;\n; -Number of the object, between 0 and n. "n" represents the total number of objects in the scene. - -\t;Return value: \c;\l;object\u cbot\object;\n; -Object corresponding to the number. The return value \c;\l;null\u cbot\null;\n; means that no object corresponds to this number, because the number was too high, and there are not so many objects in the scene. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. - +\b;Instruction \c;retobject\n; +Syntax: +\s;\c;retobject ( number );\n; + +Returns the object corresponding to the given number. + +\t;number: \c;\l;int\u cbot\int;\n; +Number of the object, between 0 and n. "n" represents the total number of objects in the scene. + +\t;Return value: \c;\l;object\u cbot\object;\n; +Object corresponding to the number. The return value \c;\l;null\u cbot\null;\n; means that no object corresponds to this number, because the number was too high, and there are not so many objects in the scene. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. + diff --git a/help/cbot/return.txt b/help/cbot/return.txt index 30ab9ab0..5c74e3e1 100644 --- a/help/cbot/return.txt +++ b/help/cbot/return.txt @@ -1,31 +1,31 @@ -\b;Instruction \c;return\n; -Returns from a function. Syntax: -\c; -\s;void function ( ) -\s;{ -\s; return; -\s;} -\n; -\b;For specialists -If the \l;function\u cbot\function; has a return type, the \c;return\n; instruction must be followed by the value to be returned: -\c; -\s;float Pi ( ) -\s;{ -\s; return 3.1415; -\s;} - -\s;float Mean (float a, float b) -\s;{ -\s; return (a+b)/2; -\s;} - -\s;string Sign (float a) -\s;{ -\s; if ( a > 0 ) return "positive"; -\s; if ( a < 0 ) return "négative"; -\s; return "null"; -\s;} -\n; -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. - +\b;Instruction \c;return\n; +Returns from a function. Syntax: +\c; +\s;void function ( ) +\s;{ +\s; return; +\s;} +\n; +\b;For specialists +If the \l;function\u cbot\function; has a return type, the \c;return\n; instruction must be followed by the value to be returned: +\c; +\s;float Pi ( ) +\s;{ +\s; return 3.1415; +\s;} + +\s;float Mean (float a, float b) +\s;{ +\s; return (a+b)/2; +\s;} + +\s;string Sign (float a) +\s;{ +\s; if ( a > 0 ) return "positive"; +\s; if ( a < 0 ) return "négative"; +\s; return "null"; +\s;} +\n; +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. + diff --git a/help/cbot/search.txt b/help/cbot/search.txt index fa6c96bf..e63e6c4b 100644 --- a/help/cbot/search.txt +++ b/help/cbot/search.txt @@ -1,18 +1,18 @@ -\b;Instruction \c;search\n; -Syntax: -\s;\c;search ( category, position );\n; - -Detects the object of the given category that is closest to the given position. - -\t;category: \c;\l;int\u cbot\int;\n; -\l;Category\u cbot\category; of the requested object. - -\t;position: \c;\l;point\u cbot\point;\n; -\c;search\n; returns the object of the given category that is closest to the position indicated here. - -\t;Return value: \c;\l;object\u cbot\object;\n; -Characteristics of the object that has been found. The value \c;\l;null\u cbot\null;\n; means that no object of this category has been found. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. - +\b;Instruction \c;search\n; +Syntax: +\s;\c;search ( category, position );\n; + +Detects the object of the given category that is closest to the given position. + +\t;category: \c;\l;int\u cbot\int;\n; +\l;Category\u cbot\category; of the requested object. + +\t;position: \c;\l;point\u cbot\point;\n; +\c;search\n; returns the object of the given category that is closest to the position indicated here. + +\t;Return value: \c;\l;object\u cbot\object;\n; +Characteristics of the object that has been found. The value \c;\l;null\u cbot\null;\n; means that no object of this category has been found. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. + diff --git a/help/cbot/send.txt b/help/cbot/send.txt index 3dc129f9..10aa0606 100644 --- a/help/cbot/send.txt +++ b/help/cbot/send.txt @@ -1,19 +1,19 @@ -\b;Instruction \c;send\n; -Syntax¦: -\s;\c;send ( name, value, power );\n; - -Sends an information to the closest \l;information exchange post\u object\exchange;. - -\t;name: \c;string\n; -Name of the information to be sent to the exchange post. This name is a string: it must be written in quotation marks "¦". -If there is any information having this name, a new entry is created, as far as the total number of entries does not exceed 10. If there is already an information having this name, value is simply replaced by the new. - -\t;value: \c;float\n; -Value of the information to be sent. - -\t;power: \c;float\n; -Power of the transmitter, which corresponds to the maximal distance to where information can be the sent. Default value is 10 metres. - -\t;See also -\c;\l;receive\u cbot\receive;\n;, \c;\l;testinfo\u cbot\testinfo;\n; and \c;\l;deleteinfo\u cbot\delinfo;\n;. -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;send\n; +Syntax¦: +\s;\c;send ( name, value, power );\n; + +Sends an information to the closest \l;information exchange post\u object\exchange;. + +\t;name: \c;string\n; +Name of the information to be sent to the exchange post. This name is a string: it must be written in quotation marks "¦". +If there is any information having this name, a new entry is created, as far as the total number of entries does not exceed 10. If there is already an information having this name, value is simply replaced by the new. + +\t;value: \c;float\n; +Value of the information to be sent. + +\t;power: \c;float\n; +Power of the transmitter, which corresponds to the maximal distance to where information can be the sent. Default value is 10 metres. + +\t;See also +\c;\l;receive\u cbot\receive;\n;, \c;\l;testinfo\u cbot\testinfo;\n; and \c;\l;deleteinfo\u cbot\delinfo;\n;. +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/shield.txt b/help/cbot/shield.txt index b67c3942..d9aff476 100644 --- a/help/cbot/shield.txt +++ b/help/cbot/shield.txt @@ -1,19 +1,19 @@ -\b;Instruction \c;shield\n; -Syntax: -\s;\c;shield ( oper );\n; - -Activates or deactivates the shield of the \l;ahielder\u object\botshld;. You can of course move the shielder when the shield is active. It protects all objects that are inside the shielded sphere from enemy fire. The radius of the sphere can range between 10 and 25 meters. - -\t;oper: \c;\l;float\u cbot\float;\n; -\c;1\n; activates the shield. -\c;0\n; deactivates the shield -A normal \l;power cell\u object\power; fully charged can maintain the shield active during 20 seconds. When the cell is empty, the shield deactivates. - -\t;radius: \c;\l;float\u cbot\float;\n; -Radius of the shield, ranging between 10 and 25 meters. - -\t;Return value: \c;\l;void\u cbot\void;\n; -None. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;shield\n; +Syntax: +\s;\c;shield ( oper );\n; + +Activates or deactivates the shield of the \l;ahielder\u object\botshld;. You can of course move the shielder when the shield is active. It protects all objects that are inside the shielded sphere from enemy fire. The radius of the sphere can range between 10 and 25 meters. + +\t;oper: \c;\l;float\u cbot\float;\n; +\c;1\n; activates the shield. +\c;0\n; deactivates the shield +A normal \l;power cell\u object\power; fully charged can maintain the shield active during 20 seconds. When the cell is empty, the shield deactivates. + +\t;radius: \c;\l;float\u cbot\float;\n; +Radius of the shield, ranging between 10 and 25 meters. + +\t;Return value: \c;\l;void\u cbot\void;\n; +None. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/sizeof.txt b/help/cbot/sizeof.txt index 11958314..c0722c15 100644 --- a/help/cbot/sizeof.txt +++ b/help/cbot/sizeof.txt @@ -1,22 +1,22 @@ -\b;Instruction \c;sizeof\n; -The sizeof function lets you know the number of elements contained in an \l;array\u cbot\array;. -That is the index of the last element plus one ("empty" elements are counted). -\c; -\s;{ -\s; int a[12]; -\s; a[5] = 345; -\s; message( sizeof(a) ); // will display 6 -\s;} -\n; -In this example we have 6 elements in the array after \c;a[5]=345\n;. The non initialized elements \c;[0]\n;, \c;[1]\n;, \c;[2]\n;, \c;[3]\n; and \c;[4]\n; will be counted. - -With multidimensionnal arrays you can get the size of a sub array: -\c; -\s;float xy[][]; // 2 dimensionnal array -\s;xy[5][10] = 67; -\s;message( sizeof(xy) ); // will display 6 -\s;message( sizeof(xy[5]) ); // will display 11 -\s; -\n; -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;sizeof\n; +The sizeof function lets you know the number of elements contained in an \l;array\u cbot\array;. +That is the index of the last element plus one ("empty" elements are counted). +\c; +\s;{ +\s; int a[12]; +\s; a[5] = 345; +\s; message( sizeof(a) ); // will display 6 +\s;} +\n; +In this example we have 6 elements in the array after \c;a[5]=345\n;. The non initialized elements \c;[0]\n;, \c;[1]\n;, \c;[2]\n;, \c;[3]\n; and \c;[4]\n; will be counted. + +With multidimensionnal arrays you can get the size of a sub array: +\c; +\s;float xy[][]; // 2 dimensionnal array +\s;xy[5][10] = 67; +\s;message( sizeof(xy) ); // will display 6 +\s;message( sizeof(xy[5]) ); // will display 11 +\s; +\n; +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/sniff.txt b/help/cbot/sniff.txt index 9de55246..27872224 100644 --- a/help/cbot/sniff.txt +++ b/help/cbot/sniff.txt @@ -1,17 +1,17 @@ -\b;Instruction \c;sniff\n; -Syntax: -\s;\c;sniff ( );\n; - -Sounds the underground in front of the \l;sniffer\u object\botsr;. According to what raw materials were detected, the following objects will be created: - -\c;TitaniumSpot\n; -> \l;Red cross\u object\stonspot; -\c;UraniumSpot \n; -> \l;Yellow circle\u object\uranspot; -\c;PowerSpot \n; -> \l;Green cross\u object\enerspot; - -\t;Return value: \c;\l;int\u cbot\int;\n; -Zero if everything is OK, or a value different from zero if an error occurred. -\c;== 0 \n;sounding performed -\c;!= 0 \n;sounding impossible - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;sniff\n; +Syntax: +\s;\c;sniff ( );\n; + +Sounds the underground in front of the \l;sniffer\u object\botsr;. According to what raw materials were detected, the following objects will be created: + +\c;TitaniumSpot\n; -> \l;Red cross\u object\stonspot; +\c;UraniumSpot \n; -> \l;Yellow circle\u object\uranspot; +\c;PowerSpot \n; -> \l;Green cross\u object\enerspot; + +\t;Return value: \c;\l;int\u cbot\int;\n; +Zero if everything is OK, or a value different from zero if an error occurred. +\c;== 0 \n;sounding performed +\c;!= 0 \n;sounding impossible + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/space.txt b/help/cbot/space.txt index 2154f378..baa660a9 100644 --- a/help/cbot/space.txt +++ b/help/cbot/space.txt @@ -1,23 +1,23 @@ -\b;Instruction \c;space\n; -Syntax : -\s;\c;space ( center, rmin, rmax, dist );\n; - -Determines the position of the nearest free space around a given position. - -\t;center: \c;\l;point\u cbot\point;\n; (default: bot position) -Desired position of the free space. - -\t;rmin: \c;\l;float\u cbot\float;\n; (default value: \c;8\n;) -Minimum distance from the desired position. - -\t;rmax: \c;\l;float\u cbot\float;\n; (default value: \c;50\n;) -Maximum distance from the desired position. - -\t;dist: \c;\l;float\u cbot\float;\n; (default value: \c;4\n;) -Required distance between two free spaces. - -\t;Return: \c;\l;point\u cbot\point;\n; -Position of the free space. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;space\n; +Syntax : +\s;\c;space ( center, rmin, rmax, dist );\n; + +Determines the position of the nearest free space around a given position. + +\t;center: \c;\l;point\u cbot\point;\n; (default: bot position) +Desired position of the free space. + +\t;rmin: \c;\l;float\u cbot\float;\n; (default value: \c;8\n;) +Minimum distance from the desired position. + +\t;rmax: \c;\l;float\u cbot\float;\n; (default value: \c;50\n;) +Maximum distance from the desired position. + +\t;dist: \c;\l;float\u cbot\float;\n; (default value: \c;4\n;) +Required distance between two free spaces. + +\t;Return: \c;\l;point\u cbot\point;\n; +Position of the free space. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/static.txt b/help/cbot/static.txt index f815c39c..7d5e6032 100644 --- a/help/cbot/static.txt +++ b/help/cbot/static.txt @@ -1,22 +1,22 @@ -\b;Instruction \c;static\n; (for specialists) -\l;Class\u cbot\class; members declared with \c;static\n; are shared between all instances of the class. -\c; -\s;public class MyClass -\s;{ -\s; static int nb = 1; -\s; static string [ ] list = null; -\s;} -\s;void Test () -\s;{ -\s; MyClasse item1(); -\s; MyClasse item2(); -\s; item1.nb = 3; -\s; item1.list[item1.nb] = "Hello"; -\s; message( item2.list[item2.nb] ); // display "Hello" -\s;} -\n; -\c;Static\n; members can be declared \c;\l;private\u cbot\private;\n; so they will be only acessible from within class members (including constructors and destructors). - -\t;See also -\c;\l;class\u cbot\class;\n;, \c;\l;synchronized\u cbot\synchro;\n; -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;static\n; (for specialists) +\l;Class\u cbot\class; members declared with \c;static\n; are shared between all instances of the class. +\c; +\s;public class MyClass +\s;{ +\s; static int nb = 1; +\s; static string [ ] list = null; +\s;} +\s;void Test () +\s;{ +\s; MyClasse item1(); +\s; MyClasse item2(); +\s; item1.nb = 3; +\s; item1.list[item1.nb] = "Hello"; +\s; message( item2.list[item2.nb] ); // display "Hello" +\s;} +\n; +\c;Static\n; members can be declared \c;\l;private\u cbot\private;\n; so they will be only acessible from within class members (including constructors and destructors). + +\t;See also +\c;\l;class\u cbot\class;\n;, \c;\l;synchronized\u cbot\synchro;\n; +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/strfind.txt b/help/cbot/strfind.txt index a7eac4bd..3d42b0d5 100644 --- a/help/cbot/strfind.txt +++ b/help/cbot/strfind.txt @@ -1,20 +1,20 @@ -\b;Instruction \c;strfind\n; -Find a substring in a string and returns the position of the first substring found or \l;nan\u cbot\nan; if the substring has not been found. - -Syntax¦: -\s;\c;strfind ( string, sub );\n; - -\t;string: \c;\l;string\u cbot\string;\n; -String we are searching in. - -\t;sub: \c;\l;string\u cbot\string;\n; -Substring we are searching for. - -Examples¦: -\s;\c; int pos = strfind("abcdef", "ab"); // pos will be 0 -\s; int pos = strfind("abcdef", "de"); // pos will be 3 -\s; int pos = strfind("abcdef", "xy"); // pos will be \l;nan\u cbot\nan; -\n; -\t;See also -\c;\l;strlen\u cbot\strlen;\n;, \c;\l;strleft\u cbot\strleft;\n;, \c;\l;strright\u cbot\strright;\n;, \c;\l;strmid\u cbot\strmid;\n;, \c;\l;strval\u cbot\strval;\n;, \c;\l;strupper\u cbot\strupper;\n;, \c;\l;strlower\u cbot\strlower;\n; -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;strfind\n; +Find a substring in a string and returns the position of the first substring found or \l;nan\u cbot\nan; if the substring has not been found. + +Syntax¦: +\s;\c;strfind ( string, sub );\n; + +\t;string: \c;\l;string\u cbot\string;\n; +String we are searching in. + +\t;sub: \c;\l;string\u cbot\string;\n; +Substring we are searching for. + +Examples¦: +\s;\c; int pos = strfind("abcdef", "ab"); // pos will be 0 +\s; int pos = strfind("abcdef", "de"); // pos will be 3 +\s; int pos = strfind("abcdef", "xy"); // pos will be \l;nan\u cbot\nan; +\n; +\t;See also +\c;\l;strlen\u cbot\strlen;\n;, \c;\l;strleft\u cbot\strleft;\n;, \c;\l;strright\u cbot\strright;\n;, \c;\l;strmid\u cbot\strmid;\n;, \c;\l;strval\u cbot\strval;\n;, \c;\l;strupper\u cbot\strupper;\n;, \c;\l;strlower\u cbot\strlower;\n; +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/string.txt b/help/cbot/string.txt index 04eccad2..cc7b1a17 100644 --- a/help/cbot/string.txt +++ b/help/cbot/string.txt @@ -1,33 +1,33 @@ -\b;Type \c;string\n; -Use a variable of this type for storing characters or strings. - -For example: -\s;\c; "Hello!" -\s; "This is a string" -\s; "x" -\s; "" // empty string -\n; -You can append two strings with the \c;+\n; operator : -\s;\c; "Good morning," + " " + "Sir" -\n; -Returns the string: -\s;\c; "Good morning, Sir" -\n; -If you want to put a quotation mark (") or a backslash (\) in a string you must write¦: -\s;\c;"This is \"very\" important" -\n;which will result in the string \c; This is "very" important. -\s;\c;"%user%\\ant.txt" -\n;will result in \c;%user%\ant.txt -\n; -Following instructions can be used with strings¦: -\c;\l;strlen\u cbot\strlen; \n;Get string length -\c;\l;strleft\u cbot\strleft; \n;Extract left part -\c;\l;strright\u cbot\strright; \n;Extract right part -\c;\l;strmid\u cbot\strmid; \n;Extract center part -\c;\l;strfind\u cbot\strfind; \n;Find a substring. -\c;\l;strval\u cbot\strval; \n;Convert string to number -\c;\l;strupper\u cbot\strupper; \n;Convert to upper case -\c;\l;strlower\u cbot\strlower; \n;Convert to lower case - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Type \c;string\n; +Use a variable of this type for storing characters or strings. + +For example: +\s;\c; "Hello!" +\s; "This is a string" +\s; "x" +\s; "" // empty string +\n; +You can append two strings with the \c;+\n; operator : +\s;\c; "Good morning," + " " + "Sir" +\n; +Returns the string: +\s;\c; "Good morning, Sir" +\n; +If you want to put a quotation mark (") or a backslash (\) in a string you must write¦: +\s;\c;"This is \"very\" important" +\n;which will result in the string \c; This is "very" important. +\s;\c;"%user%\\ant.txt" +\n;will result in \c;%user%\ant.txt +\n; +Following instructions can be used with strings¦: +\c;\l;strlen\u cbot\strlen; \n;Get string length +\c;\l;strleft\u cbot\strleft; \n;Extract left part +\c;\l;strright\u cbot\strright; \n;Extract right part +\c;\l;strmid\u cbot\strmid; \n;Extract center part +\c;\l;strfind\u cbot\strfind; \n;Find a substring. +\c;\l;strval\u cbot\strval; \n;Convert string to number +\c;\l;strupper\u cbot\strupper; \n;Convert to upper case +\c;\l;strlower\u cbot\strlower; \n;Convert to lower case + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/strleft.txt b/help/cbot/strleft.txt index cc54ee86..fa80fdeb 100644 --- a/help/cbot/strleft.txt +++ b/help/cbot/strleft.txt @@ -1,16 +1,16 @@ -\b;Instruction \c;strleft\n; -Extracts the first (that is, leftmost) characters from a string. - -Syntax¦: -\s;\c;strleft ( string, len );\n; - -\t;len: \c;\l;int\u cbot\int;\n; -Number of characters to be extracted. - -Examples¦: -\s;\c; string s = strleft("abcdef", 2); // s is "ab" -\s; string s = strleft("abc", 10); // s is "abc" -\n; -\t;See also -\c;\l;strlen\u cbot\strlen;\n;, \c;\l;strright\u cbot\strright;\n;, \c;\l;strmid\u cbot\strmid;\n;, \c;\l;strfind\u cbot\strfind;\n;, \c;\l;strval\u cbot\strval;\n;, \c;\l;strupper\u cbot\strupper;\n;, \c;\l;strlower\u cbot\strlower;\n; -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;strleft\n; +Extracts the first (that is, leftmost) characters from a string. + +Syntax¦: +\s;\c;strleft ( string, len );\n; + +\t;len: \c;\l;int\u cbot\int;\n; +Number of characters to be extracted. + +Examples¦: +\s;\c; string s = strleft("abcdef", 2); // s is "ab" +\s; string s = strleft("abc", 10); // s is "abc" +\n; +\t;See also +\c;\l;strlen\u cbot\strlen;\n;, \c;\l;strright\u cbot\strright;\n;, \c;\l;strmid\u cbot\strmid;\n;, \c;\l;strfind\u cbot\strfind;\n;, \c;\l;strval\u cbot\strval;\n;, \c;\l;strupper\u cbot\strupper;\n;, \c;\l;strlower\u cbot\strlower;\n; +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/strlen.txt b/help/cbot/strlen.txt index 3963c230..1cc384a7 100644 --- a/help/cbot/strlen.txt +++ b/help/cbot/strlen.txt @@ -1,14 +1,14 @@ -\b;Instruction \c;strlen\n; -Get the length of a string. - -Syntax¦: -\s;\c;strlen ( string );\n; - -Examples¦: -\s;\c; int len = strlen("abc"); // len is 3 -\s; int len = strlen(""); // len is 0 -\s; if ( strlen(s) == 0 ) // is string empty ? -\n; -\t;See also -\c;\l;strleft\u cbot\strleft;\n;, \c;\l;strright\u cbot\strright;\n;, \c;\l;strmid\u cbot\strmid;\n;, \c;\l;strfind\u cbot\strfind;\n;, \c;\l;strval\u cbot\strval;\n;, \c;\l;strupper\u cbot\strupper;\n;, \c;\l;strlower\u cbot\strlower;\n; -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;strlen\n; +Get the length of a string. + +Syntax¦: +\s;\c;strlen ( string );\n; + +Examples¦: +\s;\c; int len = strlen("abc"); // len is 3 +\s; int len = strlen(""); // len is 0 +\s; if ( strlen(s) == 0 ) // is string empty ? +\n; +\t;See also +\c;\l;strleft\u cbot\strleft;\n;, \c;\l;strright\u cbot\strright;\n;, \c;\l;strmid\u cbot\strmid;\n;, \c;\l;strfind\u cbot\strfind;\n;, \c;\l;strval\u cbot\strval;\n;, \c;\l;strupper\u cbot\strupper;\n;, \c;\l;strlower\u cbot\strlower;\n; +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/strlower.txt b/help/cbot/strlower.txt index 13f14739..b4b7e50b 100644 --- a/help/cbot/strlower.txt +++ b/help/cbot/strlower.txt @@ -1,12 +1,12 @@ -\b;Instruction \c;strlower\n; -Convert all characters in a string to lowercase. - -Syntax¦: -\s;\c;strlower ( string );\n; - -Examples¦: -\s;\c; string s = strlower("Abc"); // s is "abc" -\n; -\t;See also -\c;\l;strlen\u cbot\strlen;\n;, \c;\l;strleft\u cbot\strleft;\n;, \c;\l;strright\u cbot\strright;\n;, \c;\l;strmid\u cbot\strmid;\n;, \c;\l;strfind\u cbot\strfind;\n;, \c;\l;strval\u cbot\strval;\n;, \c;\l;strupper\u cbot\strupper;\n; -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;strlower\n; +Convert all characters in a string to lowercase. + +Syntax¦: +\s;\c;strlower ( string );\n; + +Examples¦: +\s;\c; string s = strlower("Abc"); // s is "abc" +\n; +\t;See also +\c;\l;strlen\u cbot\strlen;\n;, \c;\l;strleft\u cbot\strleft;\n;, \c;\l;strright\u cbot\strright;\n;, \c;\l;strmid\u cbot\strmid;\n;, \c;\l;strfind\u cbot\strfind;\n;, \c;\l;strval\u cbot\strval;\n;, \c;\l;strupper\u cbot\strupper;\n; +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/strmid.txt b/help/cbot/strmid.txt index d2dfcdf4..cf90bd3b 100644 --- a/help/cbot/strmid.txt +++ b/help/cbot/strmid.txt @@ -1,20 +1,20 @@ -\b;Instruction \c;strmid\n; -Extracts a substring of a given length starting at a given position from a string. - -Syntax¦: -\s;\c;strmid ( string, pos, len );\n; - -\t;pos: \c;\l;int\u cbot\int;\n; -The index of the first character that is to be included in the extracted substring. - -\t;len: \c;\l;int\u cbot\int;\n; -Number of characters to be extracted. - -Examples¦: -\s;\c; string s = strmid("abcdef", 1, 2); // s is "bc" -\s; string s = strmid("abcdef", 4, 5); // s is "ef" -\s; string s = strmid("abcdef", 9, 2); // s is "" -\n; -\t;See also -\c;\l;strlen\u cbot\strlen;\n;, \c;\l;strleft\u cbot\strleft;\n;, \c;\l;strright\u cbot\strright;\n;, \c;\l;strfind\u cbot\strfind;\n;, \c;\l;strval\u cbot\strval;\n;, \c;\l;strupper\u cbot\strupper;\n;, \c;\l;strlower\u cbot\strlower;\n; -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;strmid\n; +Extracts a substring of a given length starting at a given position from a string. + +Syntax¦: +\s;\c;strmid ( string, pos, len );\n; + +\t;pos: \c;\l;int\u cbot\int;\n; +The index of the first character that is to be included in the extracted substring. + +\t;len: \c;\l;int\u cbot\int;\n; +Number of characters to be extracted. + +Examples¦: +\s;\c; string s = strmid("abcdef", 1, 2); // s is "bc" +\s; string s = strmid("abcdef", 4, 5); // s is "ef" +\s; string s = strmid("abcdef", 9, 2); // s is "" +\n; +\t;See also +\c;\l;strlen\u cbot\strlen;\n;, \c;\l;strleft\u cbot\strleft;\n;, \c;\l;strright\u cbot\strright;\n;, \c;\l;strfind\u cbot\strfind;\n;, \c;\l;strval\u cbot\strval;\n;, \c;\l;strupper\u cbot\strupper;\n;, \c;\l;strlower\u cbot\strlower;\n; +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/strright.txt b/help/cbot/strright.txt index bca65ad1..18824e65 100644 --- a/help/cbot/strright.txt +++ b/help/cbot/strright.txt @@ -1,16 +1,16 @@ -\b;Instruction \c;strright\n; -Extracts the last (that is, rightmost) characters from a string. - -Syntax¦: -\s;\c;strright ( string, len );\n; - -\t;len: \c;\l;int\u cbot\int;\n; -Number of characters to be extracted. - -Examples¦: -\s;\c; string s = strright("abcdef", 2); // s is "ef" -\s; string s = strright("abc", 10); // s is "abc" -\n; -\t;See also -\c;\l;strlen\u cbot\strlen;\n;, \c;\l;strleft\u cbot\strleft;\n;, \c;\l;strmid\u cbot\strmid;\n;, \c;\l;strfind\u cbot\strfind;\n;, \c;\l;strval\u cbot\strval;\n;, \c;\l;strupper\u cbot\strupper;\n;, \c;\l;strlower\u cbot\strlower;\n; -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;strright\n; +Extracts the last (that is, rightmost) characters from a string. + +Syntax¦: +\s;\c;strright ( string, len );\n; + +\t;len: \c;\l;int\u cbot\int;\n; +Number of characters to be extracted. + +Examples¦: +\s;\c; string s = strright("abcdef", 2); // s is "ef" +\s; string s = strright("abc", 10); // s is "abc" +\n; +\t;See also +\c;\l;strlen\u cbot\strlen;\n;, \c;\l;strleft\u cbot\strleft;\n;, \c;\l;strmid\u cbot\strmid;\n;, \c;\l;strfind\u cbot\strfind;\n;, \c;\l;strval\u cbot\strval;\n;, \c;\l;strupper\u cbot\strupper;\n;, \c;\l;strlower\u cbot\strlower;\n; +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/strupper.txt b/help/cbot/strupper.txt index eb8e7a98..7091f0ce 100644 --- a/help/cbot/strupper.txt +++ b/help/cbot/strupper.txt @@ -1,12 +1,12 @@ -\b;Instruction \c;strupper\n; -Convert all characters in a string to uppercase. - -Syntax¦: -\s;\c;strupper ( string );\n; - -Examples¦: -\s;\c; string s = strupper("Abc"); // s is "ABC" -\n; -\t;See also -\c;\l;strlen\u cbot\strlen;\n;, \c;\l;strleft\u cbot\strleft;\n;, \c;\l;strright\u cbot\strright;\n;, \c;\l;strmid\u cbot\strmid;\n;, \c;\l;strfind\u cbot\strfind;\n;, \c;\l;strval\u cbot\strval;\n;, \c;\l;strlower\u cbot\strlower;\n; -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;strupper\n; +Convert all characters in a string to uppercase. + +Syntax¦: +\s;\c;strupper ( string );\n; + +Examples¦: +\s;\c; string s = strupper("Abc"); // s is "ABC" +\n; +\t;See also +\c;\l;strlen\u cbot\strlen;\n;, \c;\l;strleft\u cbot\strleft;\n;, \c;\l;strright\u cbot\strright;\n;, \c;\l;strmid\u cbot\strmid;\n;, \c;\l;strfind\u cbot\strfind;\n;, \c;\l;strval\u cbot\strval;\n;, \c;\l;strlower\u cbot\strlower;\n; +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/strval.txt b/help/cbot/strval.txt index 4d388cf9..491fc185 100644 --- a/help/cbot/strval.txt +++ b/help/cbot/strval.txt @@ -1,19 +1,19 @@ -\b;Instruction \c;strval\n; -Convert a string to a number. Don't confuse the string \c;"45"\n; that contains actually the two characters \c;4\n; and \c;5\n; and the number \c;45\n;. - -Examples¦: -\s;\c; string s = "45"+"12"; // s contains "4512" -\s; float n = 45 + 12; // n contains 67 -\n; -Syntax¦: -\s;\c;strval ( string );\n; -\n; -Examples¦: -\s;\c; float n = strval("1.23"); // n is 1.23 -\s; float n = strval("12abc45"); // n is 12 -\s; float n = strval("abc"); // n is 0 -\s; float n = strval("100")+2; // n is 102 -\n; -\t;See also -\c;\l;strlen\u cbot\strlen;\n;, \c;\l;strleft\u cbot\strleft;\n;, \c;\l;strright\u cbot\strright;\n;, \c;\l;strmid\u cbot\strmid;\n;, \c;\l;strfind\u cbot\strfind;\n;, \c;\l;strupper\u cbot\strupper;\n;, \c;\l;strlower\u cbot\strlower;\n; -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;strval\n; +Convert a string to a number. Don't confuse the string \c;"45"\n; that contains actually the two characters \c;4\n; and \c;5\n; and the number \c;45\n;. + +Examples¦: +\s;\c; string s = "45"+"12"; // s contains "4512" +\s; float n = 45 + 12; // n contains 67 +\n; +Syntax¦: +\s;\c;strval ( string );\n; +\n; +Examples¦: +\s;\c; float n = strval("1.23"); // n is 1.23 +\s; float n = strval("12abc45"); // n is 12 +\s; float n = strval("abc"); // n is 0 +\s; float n = strval("100")+2; // n is 102 +\n; +\t;See also +\c;\l;strlen\u cbot\strlen;\n;, \c;\l;strleft\u cbot\strleft;\n;, \c;\l;strright\u cbot\strright;\n;, \c;\l;strmid\u cbot\strmid;\n;, \c;\l;strfind\u cbot\strfind;\n;, \c;\l;strupper\u cbot\strupper;\n;, \c;\l;strlower\u cbot\strlower;\n; +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/synchro.txt b/help/cbot/synchro.txt index aba5e89a..8817c38a 100644 --- a/help/cbot/synchro.txt +++ b/help/cbot/synchro.txt @@ -1,25 +1,25 @@ -\b;Instruction \c;synchronized\n; (for specialists) -A \l;class\u cbot\class; method can be declared \c;synchronized\n;. This is to make sure that the method is never being executed by more than one bot at the same time. - -The following example illustrates the problem: -\c; -\s;class blocking -\s;{ -\s; static int nb = 33; -\s; synchronized int inc( ) -\s; { -\s; int val = nb; -\s; wait ( 2 ); // wait 2 sec. -\s; nb = nb + 1; -\s; return val; -\s; } -\s;} -\n; -What happens if two bots execute the \c;inc\n; method at the same time¦? -Both of them will execute \c;val=nb\n; and wait 2 seconds so both of them will have \c;val=33\n;. With \c;synchronized\n; the first bot starts execution with \c;val=33\n; and then waits 2 seconds and returns. Only once the first bot has returned from the \c;inc\n; method, the second bot will be allowed to enter the \c;inc\n; method and therefore the second bot will always have \c;val=34\n;. - -You can have more than one synchronized method in your \l;class\u cbot\class; in order to prevent simultaneous execution across more than one method. In other words: as long as a bot's program is inside a synchronized method, no other bot can enter any synchronized method of the same class. - -\t;See also -\c;\l;class\u cbot\class;\n;, \c;\l;static\u cbot\static;\n; -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;synchronized\n; (for specialists) +A \l;class\u cbot\class; method can be declared \c;synchronized\n;. This is to make sure that the method is never being executed by more than one bot at the same time. + +The following example illustrates the problem: +\c; +\s;class blocking +\s;{ +\s; static int nb = 33; +\s; synchronized int inc( ) +\s; { +\s; int val = nb; +\s; wait ( 2 ); // wait 2 sec. +\s; nb = nb + 1; +\s; return val; +\s; } +\s;} +\n; +What happens if two bots execute the \c;inc\n; method at the same time¦? +Both of them will execute \c;val=nb\n; and wait 2 seconds so both of them will have \c;val=33\n;. With \c;synchronized\n; the first bot starts execution with \c;val=33\n; and then waits 2 seconds and returns. Only once the first bot has returned from the \c;inc\n; method, the second bot will be allowed to enter the \c;inc\n; method and therefore the second bot will always have \c;val=34\n;. + +You can have more than one synchronized method in your \l;class\u cbot\class; in order to prevent simultaneous execution across more than one method. In other words: as long as a bot's program is inside a synchronized method, no other bot can enter any synchronized method of the same class. + +\t;See also +\c;\l;class\u cbot\class;\n;, \c;\l;static\u cbot\static;\n; +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/term.txt b/help/cbot/term.txt index 8e5cf19b..c53d552d 100644 --- a/help/cbot/term.txt +++ b/help/cbot/term.txt @@ -1,31 +1,31 @@ -\b;Semicolon -Always use a semicolon \c;;\n; after a simple expression. For example: -\c; -\s; int counter = 0; -\n; -However, after a \l;bloc\u cbot\bloc;, never put a semicolon: -\c; -\s; { -\s; float dist; -\s; dist = distance(p1, p2); -\s; } \n;// no semicolon here!\c; -\n; -Do not use a semicolon either immediately after the instructions \c;\l;while\u cbot\while;\n;, \c;\l;if\u cbot\if;\n; or \c;\l;for\u cbot\for;\n;: -\c; -\s; if ( a < b ) \n;// no semicolon here!\c; -\s; { -\s; b = 100-a; -\s; } -\n; -An instruction is always ended by a semicolon, and not by the end of the line. So you can very well put several instructions on the same line: -\c; -\s; int d=20; -\s; move(d); -\s; turn(90); -\n; -Is equivalent to: -\c; -\s; int d=20; move(d); turn(90); -\n; -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Semicolon +Always use a semicolon \c;;\n; after a simple expression. For example: +\c; +\s; int counter = 0; +\n; +However, after a \l;bloc\u cbot\bloc;, never put a semicolon: +\c; +\s; { +\s; float dist; +\s; dist = distance(p1, p2); +\s; } \n;// no semicolon here!\c; +\n; +Do not use a semicolon either immediately after the instructions \c;\l;while\u cbot\while;\n;, \c;\l;if\u cbot\if;\n; or \c;\l;for\u cbot\for;\n;: +\c; +\s; if ( a < b ) \n;// no semicolon here!\c; +\s; { +\s; b = 100-a; +\s; } +\n; +An instruction is always ended by a semicolon, and not by the end of the line. So you can very well put several instructions on the same line: +\c; +\s; int d=20; +\s; move(d); +\s; turn(90); +\n; +Is equivalent to: +\c; +\s; int d=20; move(d); turn(90); +\n; +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/testinfo.txt b/help/cbot/testinfo.txt index 133cac15..634063af 100644 --- a/help/cbot/testinfo.txt +++ b/help/cbot/testinfo.txt @@ -1,18 +1,18 @@ -\b;Instruction \c;testinfo\n; -Syntax¦: -\s;\c;testinfo ( name, power );\n; - -Tests if an information exists in the closest \l;information exchange post\u object\exchange;. - -\t;name: \c;string\n; -Name of the information to be tested in the exchange post. This name is a string: it must be written in quotation marks "¦". - -\t;power: \c;float\n; -Power of the transmitter, which corresponds to the maximal distance between the transmitter and the exchange post. If the distance is longer, the function returns \c;false\n;. Default value is 10 metres. - -\t;Return: \c;\l;bool\u cbot\bool;\n; -Return \c;true\n; if the information exists. Return and \c;false\n; if the information does not exist or if the receiver is too far away from the exchange post. - -\t;See also -\c;\l;receive\u cbot\receive;\n;, \c;\l;send\u cbot\send;\n; and \c;\l;deleteinfo\u cbot\delinfo;\n;. -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;testinfo\n; +Syntax¦: +\s;\c;testinfo ( name, power );\n; + +Tests if an information exists in the closest \l;information exchange post\u object\exchange;. + +\t;name: \c;string\n; +Name of the information to be tested in the exchange post. This name is a string: it must be written in quotation marks "¦". + +\t;power: \c;float\n; +Power of the transmitter, which corresponds to the maximal distance between the transmitter and the exchange post. If the distance is longer, the function returns \c;false\n;. Default value is 10 metres. + +\t;Return: \c;\l;bool\u cbot\bool;\n; +Return \c;true\n; if the information exists. Return and \c;false\n; if the information does not exist or if the receiver is too far away from the exchange post. + +\t;See also +\c;\l;receive\u cbot\receive;\n;, \c;\l;send\u cbot\send;\n; and \c;\l;deleteinfo\u cbot\delinfo;\n;. +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/this.txt b/help/cbot/this.txt index 25a809bb..81516bc3 100644 --- a/help/cbot/this.txt +++ b/help/cbot/this.txt @@ -1,54 +1,54 @@ -\b;Instruction \c;this\n; -Occasionally, a \l;class\u cbot\class; method needs to know the reference to the instance it is acting upon. For example the instance might want to pass it's own reference to another function. An implicit reference name \c;this\n; is available to methods and \c;this\n; is a reference to the current instance. -\c; -\s;public class MyClass -\s;{ -\s; int m_int; -\s; string m_str; -\s; void MyFunction() -\s; { -\s; OtherFunction(this); -\s; m_int = 2; -\s; } -\s;} -\s; -\s;void OtherFunction(MyClass obj) -\s;{ -\s; message(obj.m_str); -\s;} -\s; -\s;extern void object::Test() -\s;{ -\s; MyClass item(); -\s; item.m_str = "Hello"; -\s; item.MyFunction(); // display "Hello" -\s;} -\n; -You can also put \c;this\n; before a field name in a method but this is not necessary. In the example above in the method \c;MyFunction()\n; following two lines have strictly the same meaning: -\c; -\s; m_int = 2; -\s; this.m_int = 2; // identical -\n; -In a method of the \c;\l;object\u cbot\object;\n; class, you can also use \c;this.\n; before a fieldname. -\c; -\s;extern void object::Display() -\s;{ -\s; message(orientation); -\s; message(this.orientation); // same thing but -\s; // more explicit -\s;} -\n; -However if a field name is hidden by a parameter declaration or a variable declaration you must use \c;this\n;. In the following example the name \c;value\n; of the parameter is the same as the name of the field \c;value\n; of the \l;class\u cbot\class; \c;MyClass\n;, we must therefore write \c;this.value\n; in order to distinguish the field from the parameter. -\c; -\s;public class MyClass -\s;{ -\s; int value; -\s; void Put( int value ) -\s; { -\s; this.value = value; -\s; } -\s;} -\n; -\t;See also -\c;\l;class\u cbot\class;\n; -\l;Programming\u cbot;, \l;types\u cbot\type; et \l;catégories\u cbot\category;. +\b;Instruction \c;this\n; +Occasionally, a \l;class\u cbot\class; method needs to know the reference to the instance it is acting upon. For example the instance might want to pass it's own reference to another function. An implicit reference name \c;this\n; is available to methods and \c;this\n; is a reference to the current instance. +\c; +\s;public class MyClass +\s;{ +\s; int m_int; +\s; string m_str; +\s; void MyFunction() +\s; { +\s; OtherFunction(this); +\s; m_int = 2; +\s; } +\s;} +\s; +\s;void OtherFunction(MyClass obj) +\s;{ +\s; message(obj.m_str); +\s;} +\s; +\s;extern void object::Test() +\s;{ +\s; MyClass item(); +\s; item.m_str = "Hello"; +\s; item.MyFunction(); // display "Hello" +\s;} +\n; +You can also put \c;this\n; before a field name in a method but this is not necessary. In the example above in the method \c;MyFunction()\n; following two lines have strictly the same meaning: +\c; +\s; m_int = 2; +\s; this.m_int = 2; // identical +\n; +In a method of the \c;\l;object\u cbot\object;\n; class, you can also use \c;this.\n; before a fieldname. +\c; +\s;extern void object::Display() +\s;{ +\s; message(orientation); +\s; message(this.orientation); // same thing but +\s; // more explicit +\s;} +\n; +However if a field name is hidden by a parameter declaration or a variable declaration you must use \c;this\n;. In the following example the name \c;value\n; of the parameter is the same as the name of the field \c;value\n; of the \l;class\u cbot\class; \c;MyClass\n;, we must therefore write \c;this.value\n; in order to distinguish the field from the parameter. +\c; +\s;public class MyClass +\s;{ +\s; int value; +\s; void Put( int value ) +\s; { +\s; this.value = value; +\s; } +\s;} +\n; +\t;See also +\c;\l;class\u cbot\class;\n; +\l;Programming\u cbot;, \l;types\u cbot\type; et \l;catégories\u cbot\category;. diff --git a/help/cbot/thump.txt b/help/cbot/thump.txt index 49962713..8ce7f161 100644 --- a/help/cbot/thump.txt +++ b/help/cbot/thump.txt @@ -1,13 +1,13 @@ -\b;Instruction \c;thump\n; -Syntax: -\s;\c;thump ( );\n; - -Activates the weapon system of the \l;thumper\u object\bottump;, that turns ants and spiders belly up and makes them completely harmless for a while. - -\t;Return value: \c;\l;int\u cbot\int;\n; -Zero if everything is OK, a value different from zero if an error occurred. -\c;== 0 \n;Thumping performed -\c;!= 0 \n;Operation impossible - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;thump\n; +Syntax: +\s;\c;thump ( );\n; + +Activates the weapon system of the \l;thumper\u object\bottump;, that turns ants and spiders belly up and makes them completely harmless for a while. + +\t;Return value: \c;\l;int\u cbot\int;\n; +Zero if everything is OK, a value different from zero if an error occurred. +\c;== 0 \n;Thumping performed +\c;!= 0 \n;Operation impossible + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/topo.txt b/help/cbot/topo.txt index c24ababd..e8fef09a 100644 --- a/help/cbot/topo.txt +++ b/help/cbot/topo.txt @@ -1,14 +1,14 @@ -\b;Instruction \c;topo\n; -Syntax: -\s;\c;topo ( position );\n; - -Returns the altitude of the ground at a give position. The altitude zero corresponds to sea level. A negative value indicates that at this position ground is covered with water. - -\t;position: \c;\l;point\u cbot\point;\n; -Coordinates of the position whose altitude you want to know. - -\t;Return value: \c;\l;float\u cbot\float;\n; -Altitude of the ground at the given position. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;topo\n; +Syntax: +\s;\c;topo ( position );\n; + +Returns the altitude of the ground at a give position. The altitude zero corresponds to sea level. A negative value indicates that at this position ground is covered with water. + +\t;position: \c;\l;point\u cbot\point;\n; +Coordinates of the position whose altitude you want to know. + +\t;Return value: \c;\l;float\u cbot\float;\n; +Altitude of the ground at the given position. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/true.txt b/help/cbot/true.txt index 3de4f24e..2d29fa1d 100644 --- a/help/cbot/true.txt +++ b/help/cbot/true.txt @@ -1,5 +1,5 @@ -\b;Type \c;true\n; -This value means that a condition is true; it is one of the two values that a \l;boolean\u cbot\bool; \l;variable\u cbot\var; can take. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Type \c;true\n; +This value means that a condition is true; it is one of the two values that a \l;boolean\u cbot\bool; \l;variable\u cbot\var; can take. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/turn.txt b/help/cbot/turn.txt index 0bd7e960..a163dcb5 100644 --- a/help/cbot/turn.txt +++ b/help/cbot/turn.txt @@ -1,33 +1,33 @@ -\b;Instruction \c;turn\n; -Use the instruction \c;turn();\n; to instruct the bot to perform a rotation on itself of a certain number of degrees. - -\b;Basic use -90 degreed means a quarter turn, 180 degrees means a half turn. A positive angle will perform a counterclockwise rotation, a negative angle means a clockwise rotation. Here are some examples with \c;turn();\n;: - -\c;turn(90);\n; quarter turn to the left -\c;turn(-90);\n; quarter turn to the right (negative angle) -\c;turn(180);\n; half turn - -In order to turn the bot towards an object found with the instruction \c;\l;radar\u cbot\radar;();\n;, you must calculate the rotation angle with the instruction \c;\l;direction\u cbot\direct;()\n;: -\c; -\s; item = \l;radar\u cbot\radar;(AlienSpider); -\s; turn(\l;direction\u cbot\direct;(item.position)); -\n; -After these lines, just fire the cannon, and there is one hostile element less. - -\b;For specialists -Syntax: -\s;\c;turn ( angle );\n; - -Turns the bot with a given angle, right or left, without moving either forward or backward. - -\t;angle: \c;\l;float\u cbot\float;\n; -Angle of the required rotation, in degrees. A positive value turns left, a negative value turns right. \c;turn(180)\n; turns round completely. - -\t;Return value: \c;\l;int\u cbot\int;\n; -Zero if everything is OK, or a value different from zero if an error occurred. -\c;== 0 \n;rotation performed -\c;!= 0 \n;rotation impossible - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;turn\n; +Use the instruction \c;turn();\n; to instruct the bot to perform a rotation on itself of a certain number of degrees. + +\b;Basic use +90 degreed means a quarter turn, 180 degrees means a half turn. A positive angle will perform a counterclockwise rotation, a negative angle means a clockwise rotation. Here are some examples with \c;turn();\n;: + +\c;turn(90);\n; quarter turn to the left +\c;turn(-90);\n; quarter turn to the right (negative angle) +\c;turn(180);\n; half turn + +In order to turn the bot towards an object found with the instruction \c;\l;radar\u cbot\radar;();\n;, you must calculate the rotation angle with the instruction \c;\l;direction\u cbot\direct;()\n;: +\c; +\s; item = \l;radar\u cbot\radar;(AlienSpider); +\s; turn(\l;direction\u cbot\direct;(item.position)); +\n; +After these lines, just fire the cannon, and there is one hostile element less. + +\b;For specialists +Syntax: +\s;\c;turn ( angle );\n; + +Turns the bot with a given angle, right or left, without moving either forward or backward. + +\t;angle: \c;\l;float\u cbot\float;\n; +Angle of the required rotation, in degrees. A positive value turns left, a negative value turns right. \c;turn(180)\n; turns round completely. + +\t;Return value: \c;\l;int\u cbot\int;\n; +Zero if everything is OK, or a value different from zero if an error occurred. +\c;== 0 \n;rotation performed +\c;!= 0 \n;rotation impossible + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/type.txt b/help/cbot/type.txt index 509aa33a..16662081 100644 --- a/help/cbot/type.txt +++ b/help/cbot/type.txt @@ -1,33 +1,33 @@ -\b;Variable types -When you define a \l;variable\u cbot\var;, you must give two elements: - -1) a name -2) a type - -Once you defined a variable, you can use it to put information in it. However, the information that a variable can contain must always be of the correct type: a variable of type \l;float\u cbot\float; can not contain a string, etc. - -In a program, the name of a type is always written on \type;green background\norm;. If the name of a type is not colored, this means that the name is misspelled. Type names are always written with lower case characters. Here is a list of the different types: - -\s;\c;\l;int\u cbot\int;\n; -For a whole number (12, -500, etc.). - -\s;\c;\l;float\u cbot\float;\n; -For a real number (12, 3.14, 0.2, -99.98, etc.). - -\s;\c;\l;bool\u cbot\bool;\n; -For a boolean variable, that can only take the values \c;true\n; or \c;false\n;. - -\s;\c;\l;string\u cbot\string;\n; -For texts ("Hello!", "No object found", etc.) - -\s;\c;\l;point\u cbot\point;\n; -For the coordinates of a point in space; a variable of this type consists of three parts named x, y and z. - -\s;\c;\l;object\u cbot\object;\n; -A variable of this type contains the information about an object (bot, building, enemy, etc.). - -\s;\c;\l;void\u cbot\void;\n; -This type is an "empty type", that you use when you do not want to specify a type. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Variable types +When you define a \l;variable\u cbot\var;, you must give two elements: + +1) a name +2) a type + +Once you defined a variable, you can use it to put information in it. However, the information that a variable can contain must always be of the correct type: a variable of type \l;float\u cbot\float; can not contain a string, etc. + +In a program, the name of a type is always written on \type;green background\norm;. If the name of a type is not colored, this means that the name is misspelled. Type names are always written with lower case characters. Here is a list of the different types: + +\s;\c;\l;int\u cbot\int;\n; +For a whole number (12, -500, etc.). + +\s;\c;\l;float\u cbot\float;\n; +For a real number (12, 3.14, 0.2, -99.98, etc.). + +\s;\c;\l;bool\u cbot\bool;\n; +For a boolean variable, that can only take the values \c;true\n; or \c;false\n;. + +\s;\c;\l;string\u cbot\string;\n; +For texts ("Hello!", "No object found", etc.) + +\s;\c;\l;point\u cbot\point;\n; +For the coordinates of a point in space; a variable of this type consists of three parts named x, y and z. + +\s;\c;\l;object\u cbot\object;\n; +A variable of this type contains the information about an object (bot, building, enemy, etc.). + +\s;\c;\l;void\u cbot\void;\n; +This type is an "empty type", that you use when you do not want to specify a type. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/var.txt b/help/cbot/var.txt index 5b6a47a8..8c8f95be 100644 --- a/help/cbot/var.txt +++ b/help/cbot/var.txt @@ -1,67 +1,67 @@ -\b;Variables -A variable is like a box, where you can put some information. The content of the variable can change during the execution of the program. - -For example, you can use a variable to count the number of titanium ore units that the grabber has collected and carried to the converter. First, you must find a name for it: the name should not be too long, but explain by itself what the variable is used for. Let's call it \c;countTit\n;. This variable must contain only whole numbers, so choose the type \c;int\n;. At the beginning of the program, you must declare the variable. Then you put the value \c;0\n; into the variable, and every time you grab a titanium ore, you increase the variable by \c;1\n;. At every moment, the variable contains the number of titanium ore units that the grabber collected. - -For the declaration of the variable, write the following line: -\c;\s; int countTit;\n; - -To put \c;0\n; into the variable, write: -\c;\s; countTit = 0;\n; - -At every titanium ore grabbed, write: -\c;\s; countTit = countTit + 1\n; - -You have much freedom in the choice of the name for a variable, you can call them by any name, f. ex.: \c;dist\n;, \c;direct\n;, \c;p2\n;, \c;a\n;, \c;x\n;, \c;nothing_2_shoot_at\n;, etc. -A variable name must always begin with a letter. It can be followed by any combination of letters, digits or the underscore character \c;_\n;. You can of course not use the keywords of the CBOT language like \c;\l;for\u cbot\for;\n;, \c;\l;while\u cbot\while;\n;, \c;\l;break\u cbot\break;\n;, \c;\l;continue\u cbot\continue;\n;, \c;do\n;, etc. -You should be careful about the choice of the names that you give to variables; writing a program can become very difficult if you forget the names of variables or if you do not remember what they are used for. Elaborate your own system to find variable names, and do not use names like \c;Bmo45\n;, \c;a\n; or \c;tgBinX\n;. - -In the example above, the keyword \c;int\n; indicates that this variable can contain only whole numbers, which is adequate to counting objects. If you want to measure a distance, better use a variable that can contain also real numbers, with a fractional part (like 3.45 or 0.034): in this case, use the type \c;float\n;. - -In fact, a variable is made up of three parts: -1) the name -2) the type of the information stored inside -3) the content, i.e. the information itself - -\t;the name -You need the name to be able to distinguish the different variables from each other. - -\t;the type -The \l;type\u cbot\type; determines what kind of information the variable can contain. According to the type, a variable can contain a whole number, a real number, a string, the coordinates of a point, information about an object, etc. -Here is a list of the most common variable types: - o \c;\l;int\u cbot\int;\n; for a whole number (12, -500, etc.) - o \c;\l;float\u cbot\float;\n; for a real number (3.14, 0.2, -99.98, etc.) - o \c;\l;string\u cbot\string;\n; for a character string ("Hello!", "No object found", etc.) - o \c;\l;point\u cbot\point;\n; for a x,y,z-coordinate in space - o \c;\l;object\u cbot\object;\n; for information about an object (bot, building, etc.) - -\t;The content -The content of a variable is an information of the kind specified in the type. It can change during the execution of the program. - -Once you declared a variable, it still does not contain any value. Before you can use it, you must put a value inside: -\c;\s; int i, j; -\s; j = 25; // j takes the value 25 -\s; j = i; // can not write this, because i has got no content yet. -\n; -You can also declare a variable and put a value inside in the same line, writing: -\c;\s; int countTit = 0; -\n; -When you assign a value to a variable with the equals sign \c;=\n;, the value on the right side is copied into the value on the left side. Consider the following example: -\c;\s; int i, j; -\s; i = 5+2; // i takes the value 7 -\s; j = i+6; // j takes the value of i plus 6, this is 13 -\s; i = j; // i takes the value of j, this is 13 -\n; -At the end of this example, both variables \c;i\n; and \c;j\n; contain the value \c;13\n;. - -The following assignment is not correct, because on the left side of the equals sign \c;=\n;, there can be only a variable name: -\c;\s; i+2 = j; // impossible -\n; -If you want to exchange the values of two variables, you must use a third variable. Here is an example to exchange the content of two variables \c;a\n; and \c;b\n; : -\c;\s; int temp; -\s; temp = a; // temp takes the value of a -\s; a = b; // the content of b is copied into a -\s; b = temp; // the content of temp is copied into b -\n; -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Variables +A variable is like a box, where you can put some information. The content of the variable can change during the execution of the program. + +For example, you can use a variable to count the number of titanium ore units that the grabber has collected and carried to the converter. First, you must find a name for it: the name should not be too long, but explain by itself what the variable is used for. Let's call it \c;countTit\n;. This variable must contain only whole numbers, so choose the type \c;int\n;. At the beginning of the program, you must declare the variable. Then you put the value \c;0\n; into the variable, and every time you grab a titanium ore, you increase the variable by \c;1\n;. At every moment, the variable contains the number of titanium ore units that the grabber collected. + +For the declaration of the variable, write the following line: +\c;\s; int countTit;\n; + +To put \c;0\n; into the variable, write: +\c;\s; countTit = 0;\n; + +At every titanium ore grabbed, write: +\c;\s; countTit = countTit + 1\n; + +You have much freedom in the choice of the name for a variable, you can call them by any name, f. ex.: \c;dist\n;, \c;direct\n;, \c;p2\n;, \c;a\n;, \c;x\n;, \c;nothing_2_shoot_at\n;, etc. +A variable name must always begin with a letter. It can be followed by any combination of letters, digits or the underscore character \c;_\n;. You can of course not use the keywords of the CBOT language like \c;\l;for\u cbot\for;\n;, \c;\l;while\u cbot\while;\n;, \c;\l;break\u cbot\break;\n;, \c;\l;continue\u cbot\continue;\n;, \c;do\n;, etc. +You should be careful about the choice of the names that you give to variables; writing a program can become very difficult if you forget the names of variables or if you do not remember what they are used for. Elaborate your own system to find variable names, and do not use names like \c;Bmo45\n;, \c;a\n; or \c;tgBinX\n;. + +In the example above, the keyword \c;int\n; indicates that this variable can contain only whole numbers, which is adequate to counting objects. If you want to measure a distance, better use a variable that can contain also real numbers, with a fractional part (like 3.45 or 0.034): in this case, use the type \c;float\n;. + +In fact, a variable is made up of three parts: +1) the name +2) the type of the information stored inside +3) the content, i.e. the information itself + +\t;the name +You need the name to be able to distinguish the different variables from each other. + +\t;the type +The \l;type\u cbot\type; determines what kind of information the variable can contain. According to the type, a variable can contain a whole number, a real number, a string, the coordinates of a point, information about an object, etc. +Here is a list of the most common variable types: + o \c;\l;int\u cbot\int;\n; for a whole number (12, -500, etc.) + o \c;\l;float\u cbot\float;\n; for a real number (3.14, 0.2, -99.98, etc.) + o \c;\l;string\u cbot\string;\n; for a character string ("Hello!", "No object found", etc.) + o \c;\l;point\u cbot\point;\n; for a x,y,z-coordinate in space + o \c;\l;object\u cbot\object;\n; for information about an object (bot, building, etc.) + +\t;The content +The content of a variable is an information of the kind specified in the type. It can change during the execution of the program. + +Once you declared a variable, it still does not contain any value. Before you can use it, you must put a value inside: +\c;\s; int i, j; +\s; j = 25; // j takes the value 25 +\s; j = i; // can not write this, because i has got no content yet. +\n; +You can also declare a variable and put a value inside in the same line, writing: +\c;\s; int countTit = 0; +\n; +When you assign a value to a variable with the equals sign \c;=\n;, the value on the right side is copied into the value on the left side. Consider the following example: +\c;\s; int i, j; +\s; i = 5+2; // i takes the value 7 +\s; j = i+6; // j takes the value of i plus 6, this is 13 +\s; i = j; // i takes the value of j, this is 13 +\n; +At the end of this example, both variables \c;i\n; and \c;j\n; contain the value \c;13\n;. + +The following assignment is not correct, because on the left side of the equals sign \c;=\n;, there can be only a variable name: +\c;\s; i+2 = j; // impossible +\n; +If you want to exchange the values of two variables, you must use a third variable. Here is an example to exchange the content of two variables \c;a\n; and \c;b\n; : +\c;\s; int temp; +\s; temp = a; // temp takes the value of a +\s; a = b; // the content of b is copied into a +\s; b = temp; // the content of temp is copied into b +\n; +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/void.txt b/help/cbot/void.txt index 9b6c5ff8..11509d2b 100644 --- a/help/cbot/void.txt +++ b/help/cbot/void.txt @@ -1,11 +1,11 @@ -\b;Type \c;void\n; -Use this type when you want to declare a function that returns nothing. - -Example: -\c;\s;void MyFunction(int a) -\s;{ -\s; ... -\s;} -\n; -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Type \c;void\n; +Use this type when you want to declare a function that returns nothing. + +Example: +\c;\s;void MyFunction(int a) +\s;{ +\s; ... +\s;} +\n; +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/wait.txt b/help/cbot/wait.txt index c518bfd7..88e6ed64 100644 --- a/help/cbot/wait.txt +++ b/help/cbot/wait.txt @@ -1,22 +1,22 @@ -\b;Instruction \c;wait\n; -The instruction \c;wait();\n; instructs the bot to wait for some seconds, according to the value written in brackets. - -\b;Basic use -In order to wait until the \l;power cell\u object\power; is recharged on a power station, wait 5 seconds with \c;wait(5);\n;. - -In order to wait until the \l;converter\u object\convert; finished transforming some \l;titanium ore\u object\titanore; in a \l;titanium cube\u object\titan;, wait 15 seconds with \c;wait(15);\n;. - -\b;For specialists -Syntax: -\s;\c;wait ( time );\n; - -Waits for a moment. - -\t;time: \c;\l;float\u cbot\float;\n; -Specifies the time that the bot must wait. - -\t;Return value: \c;\l;void\u cbot\void;\n; -None. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;wait\n; +The instruction \c;wait();\n; instructs the bot to wait for some seconds, according to the value written in brackets. + +\b;Basic use +In order to wait until the \l;power cell\u object\power; is recharged on a power station, wait 5 seconds with \c;wait(5);\n;. + +In order to wait until the \l;converter\u object\convert; finished transforming some \l;titanium ore\u object\titanore; in a \l;titanium cube\u object\titan;, wait 15 seconds with \c;wait(15);\n;. + +\b;For specialists +Syntax: +\s;\c;wait ( time );\n; + +Waits for a moment. + +\t;time: \c;\l;float\u cbot\float;\n; +Specifies the time that the bot must wait. + +\t;Return value: \c;\l;void\u cbot\void;\n; +None. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/while.txt b/help/cbot/while.txt index cd0cd59c..5e793c88 100644 --- a/help/cbot/while.txt +++ b/help/cbot/while.txt @@ -1,47 +1,47 @@ -\b;Instruction \c;while\n; -The instruction \c;while () {}\n; is used to repeat a set of instructions several times. - -\b;Basic use -The most frequent use of \c;while\n; consists in repeating a set of instructions again and again. In order to achieve this, write \c;while (true) {}\n; and put the instructions to be repeated in braces \c;{}\n;. As an example, here is a program that repeats again and again the following actions: -o look for a spider, -o turn towards it, -o shoot. -\c; -\s; while (true) -\s; { -\s; item = \l;radar\u cbot\radar;(AlienSpider); -\s; \l;turn\u cbot\turn;(direction(item.position)); -\s; \l;fire\u cbot\fire;(1); -\s; } -\n; -Just execute this program once, and it will kill all spiders around it. - -\b;For specialists -Syntax : -\s;\c;while ( condition ) -\s;{ -\s; \n;Instructions ...\c; -\s;} -\n; -This instruction allows you to perform the instructions inside the \l;block\u cbot\bloc; several times. - -Be careful not to confuse the instruction \c;while( ) { }\n; with the instruction \c;\l;do\u cbot\do; { } while( );\n;; the latter tests the condition only after the instructions in the block have been performed a first time. - -\t;\c;condition\n; -The instructions in the block are performed over and over again, as long as the \l;condition\u cbot\cond; is true. - -Here is an example : -\s;\c;int i = 0; -\s;while ( i < 10 ) -\s;{ -\s; \n;Instructions ...\c; -\s; i = i+1; -\s;} -\n; -\t;Attention -Do not put a \l;semicolon\u cbot\term; at the end of the line \c;while ( )\n;. - -The instructions \c;\l;break\u cbot\break;\n; and \c;\l;continue\u cbot\continue;\n; can be useful inside a block following the instruction \c;while { }\n;. - -\t;See also -\l;Instructions\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;while\n; +The instruction \c;while () {}\n; is used to repeat a set of instructions several times. + +\b;Basic use +The most frequent use of \c;while\n; consists in repeating a set of instructions again and again. In order to achieve this, write \c;while (true) {}\n; and put the instructions to be repeated in braces \c;{}\n;. As an example, here is a program that repeats again and again the following actions: +o look for a spider, +o turn towards it, +o shoot. +\c; +\s; while (true) +\s; { +\s; item = \l;radar\u cbot\radar;(AlienSpider); +\s; \l;turn\u cbot\turn;(direction(item.position)); +\s; \l;fire\u cbot\fire;(1); +\s; } +\n; +Just execute this program once, and it will kill all spiders around it. + +\b;For specialists +Syntax : +\s;\c;while ( condition ) +\s;{ +\s; \n;Instructions ...\c; +\s;} +\n; +This instruction allows you to perform the instructions inside the \l;block\u cbot\bloc; several times. + +Be careful not to confuse the instruction \c;while( ) { }\n; with the instruction \c;\l;do\u cbot\do; { } while( );\n;; the latter tests the condition only after the instructions in the block have been performed a first time. + +\t;\c;condition\n; +The instructions in the block are performed over and over again, as long as the \l;condition\u cbot\cond; is true. + +Here is an example : +\s;\c;int i = 0; +\s;while ( i < 10 ) +\s;{ +\s; \n;Instructions ...\c; +\s; i = i+1; +\s;} +\n; +\t;Attention +Do not put a \l;semicolon\u cbot\term; at the end of the line \c;while ( )\n;. + +The instructions \c;\l;break\u cbot\break;\n; and \c;\l;continue\u cbot\continue;\n; can be useful inside a block following the instruction \c;while { }\n;. + +\t;See also +\l;Instructions\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/writeln.txt b/help/cbot/writeln.txt index e20ba03a..260f4507 100644 --- a/help/cbot/writeln.txt +++ b/help/cbot/writeln.txt @@ -1,21 +1,21 @@ -\b;Instruction \c;writeln\n; -Write one line of text to an open file in the files/ folder. This is a method of the \c;\l;file\u cbot\file;\n; class. This is the reason why we always write \c;handle.writeln()\n;¦: -\c; -\s; handle.writeln("abc"); -\n; -The file must have been opened for writing (\c;"w"\n;) with the \c;\l;open\u cbot\open;\n; instruction. The line will automatically be terminated by the end of line characters 0x0D (CR) and 0x0A (LF). - -Syntax¦: -\s;\c;handle.writeln ( string );\n; - -Examples¦: -\c; -\s; writeln("Line of text"); - -\s; string s1 = "abc"; -\s; string s2 = "def"; -\s; writeln(s1 + " " + s2); -\n; -\t;See also -\c;\l;file\u cbot\file;\n;, \c;\l;open\u cbot\open;\n;, \c;\l;close\u cbot\close;\n;, \c;\l;readln\u cbot\readln;\n; and \c;\l;eof\u cbot\eof;\n;. -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Instruction \c;writeln\n; +Write one line of text to an open file in the files/ folder. This is a method of the \c;\l;file\u cbot\file;\n; class. This is the reason why we always write \c;handle.writeln()\n;¦: +\c; +\s; handle.writeln("abc"); +\n; +The file must have been opened for writing (\c;"w"\n;) with the \c;\l;open\u cbot\open;\n; instruction. The line will automatically be terminated by the end of line characters 0x0D (CR) and 0x0A (LF). + +Syntax¦: +\s;\c;handle.writeln ( string );\n; + +Examples¦: +\c; +\s; writeln("Line of text"); + +\s; string s1 = "abc"; +\s; string s2 = "def"; +\s; writeln(s1 + " " + s2); +\n; +\t;See also +\c;\l;file\u cbot\file;\n;, \c;\l;open\u cbot\open;\n;, \c;\l;close\u cbot\close;\n;, \c;\l;readln\u cbot\readln;\n; and \c;\l;eof\u cbot\eof;\n;. +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/command.txt b/help/command.txt index bc5354ec..43126082 100644 --- a/help/command.txt +++ b/help/command.txt @@ -1,45 +1,45 @@ -\b;Controls -You are advised to play with one hand on the arrow keys and the other hand on the mouse. - -\t;Bots -\key;\key left;\norm; = turn left -\key;\key right;\norm; = turn right -\key;\key up;\norm; = move forward -\key;\key down;\norm; = move back -These controls are unavailable when working with the \l;practice bots\u object\bottr;. - -\key;\key gup;\norm; = take off and climb \button 28; -\key;\key gdown;\norm; = descend and land \button 29; -These controls are of course restricted to the \l;astronaut\u object\human; as well as the various \l;winged bots\u object\botgj; and in selected missions only. - -mouse forward = higher aim -mouse backward = lower aim -mouse right = aim right -mouse left = aim left -These controls are only available to the \l;shooters\u object\botfr;, the \l;orga shooters\u object\botor; and the \l;phazer shooter\u object\botphaz;. - -\key;\key action;\norm; = main action for a given selection (human or bot) -This control will for example operate the arm of a \l;grabber\u object\botgr; or fire a \l;shooter\u object\botfr; \button 42;. - -\t;Selections -\key;\key next;\norm; = selects next object -\key;\key human;\norm; = selects astronaut -\key;\key desel;\norm; = previous selection \button 10; - -\t;Camera -\key;\key camera;\norm; = shifts between onboard and following cameras \button 13; -\key;\key near;\norm; = zoom in -\key;\key away;\norm; = zoom out -\key;\key visit;\norm; = pauses the game and shows where the latest message originated. Press again to show origin of previous message. - -\t;Help -\key;\key help;\norm; = mission instructions -\key;\key prog;\norm; = programming help - -\t;Game -\key;\key speed10;\norm; = normal speed x1 -\key;\key speed15;\norm; = medium speed x1.5 -\key;\key speed20;\norm; = faster speed x2 -\key;\key quit;\norm; = exits mission \button 11; - -All these commands can be redefined in the options/controls menu. +\b;Controls +You are advised to play with one hand on the arrow keys and the other hand on the mouse. + +\t;Bots +\key;\key left;\norm; = turn left +\key;\key right;\norm; = turn right +\key;\key up;\norm; = move forward +\key;\key down;\norm; = move back +These controls are unavailable when working with the \l;practice bots\u object\bottr;. + +\key;\key gup;\norm; = take off and climb \button 28; +\key;\key gdown;\norm; = descend and land \button 29; +These controls are of course restricted to the \l;astronaut\u object\human; as well as the various \l;winged bots\u object\botgj; and in selected missions only. + +mouse forward = higher aim +mouse backward = lower aim +mouse right = aim right +mouse left = aim left +These controls are only available to the \l;shooters\u object\botfr;, the \l;orga shooters\u object\botor; and the \l;phazer shooter\u object\botphaz;. + +\key;\key action;\norm; = main action for a given selection (human or bot) +This control will for example operate the arm of a \l;grabber\u object\botgr; or fire a \l;shooter\u object\botfr; \button 42;. + +\t;Selections +\key;\key next;\norm; = selects next object +\key;\key human;\norm; = selects astronaut +\key;\key desel;\norm; = previous selection \button 10; + +\t;Camera +\key;\key camera;\norm; = shifts between onboard and following cameras \button 13; +\key;\key near;\norm; = zoom in +\key;\key away;\norm; = zoom out +\key;\key visit;\norm; = pauses the game and shows where the latest message originated. Press again to show origin of previous message. + +\t;Help +\key;\key help;\norm; = mission instructions +\key;\key prog;\norm; = programming help + +\t;Game +\key;\key speed10;\norm; = normal speed x1 +\key;\key speed15;\norm; = medium speed x1.5 +\key;\key speed20;\norm; = faster speed x2 +\key;\key quit;\norm; = exits mission \button 11; + +All these commands can be redefined in the options/controls menu. diff --git a/help/dexch1.txt b/help/dexch1.txt index 2894b82a..cf330c6a 100644 --- a/help/dexch1.txt +++ b/help/dexch1.txt @@ -1,19 +1,19 @@ -\b;Exercice -Several \l;information exchange posts\u object\exchange; are standing along the way. When the bot is close enough to a post, it can read the instructions it contains. The \l;information exchange posts\u object\exchange; along the way contain the direction of the next post and the distance. And you do not know how many exchange posts you must get in touch with before arriving at your goal. - -\b;General principle - Always repeat: - o Retrieve the direction from the \l;exchange post\u object\exchange;. - o Retrieve the distance from the \l;exchange post\u object\exchange;. - o If no information could be retrieved, stop the program. - o Execute the rotation. - o Move forward to the next post. - -\b;Useful instructions -\c;\l;while\u cbot\while;\n; to repeat the instructions -\c;\l;receive\u cbot\receive;\n; to get the information from a post -\c;\l;move\u cbot\move;\n; to move the bot -\c;\l;turn\u cbot\turn;\n; to turn the bot - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercice +Several \l;information exchange posts\u object\exchange; are standing along the way. When the bot is close enough to a post, it can read the instructions it contains. The \l;information exchange posts\u object\exchange; along the way contain the direction of the next post and the distance. And you do not know how many exchange posts you must get in touch with before arriving at your goal. + +\b;General principle + Always repeat: + o Retrieve the direction from the \l;exchange post\u object\exchange;. + o Retrieve the distance from the \l;exchange post\u object\exchange;. + o If no information could be retrieved, stop the program. + o Execute the rotation. + o Move forward to the next post. + +\b;Useful instructions +\c;\l;while\u cbot\while;\n; to repeat the instructions +\c;\l;receive\u cbot\receive;\n; to get the information from a post +\c;\l;move\u cbot\move;\n; to move the bot +\c;\l;turn\u cbot\turn;\n; to turn the bot + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/dfollow1.txt b/help/dfollow1.txt index debaf10b..2be46365 100644 --- a/help/dfollow1.txt +++ b/help/dfollow1.txt @@ -1,20 +1,20 @@ -\b;Exercise -You must follow the \l;target bot\u object\bottr; with the explosive device, but without touching it, otherwise it will blow up. Every time the target bot stops, you must be close to it (less than 10m). After you managed to stay close to the target bot at 10 successive stops, it will lead you to the finishing pad, and the exercise is over. At every stop, the target bot checks that you are there. If you are not there, you must start over again. - -\b;General principle -Repeat forever: -o Look for the target bot. -o Calculate the distance to the bot. -o if the distance to the target bot is less than 5m, move backward. -o Otherwise, calculate the direction of the target bot, and move towards it. - -\b;Useful instructions -\c;\l;radar\u cbot\radar;\n; to look for the bot (category \c;\l;TargetBot\u object\bottarg;\n;) -\c;\l;radar\u cbot\radar;\n; to detect obstacles -\c;\l;distance\u cbot\dist;\n; to calculate a distance -\c;\l;direction\u cbot\direct;\n; to calculate a direction -\c;\l;if\u cbot\if;\n; to test a condition -\c;\l;motor\u cbot\motor;\n; to set the motor speeds - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +You must follow the \l;target bot\u object\bottr; with the explosive device, but without touching it, otherwise it will blow up. Every time the target bot stops, you must be close to it (less than 10m). After you managed to stay close to the target bot at 10 successive stops, it will lead you to the finishing pad, and the exercise is over. At every stop, the target bot checks that you are there. If you are not there, you must start over again. + +\b;General principle +Repeat forever: +o Look for the target bot. +o Calculate the distance to the bot. +o if the distance to the target bot is less than 5m, move backward. +o Otherwise, calculate the direction of the target bot, and move towards it. + +\b;Useful instructions +\c;\l;radar\u cbot\radar;\n; to look for the bot (category \c;\l;TargetBot\u object\bottarg;\n;) +\c;\l;radar\u cbot\radar;\n; to detect obstacles +\c;\l;distance\u cbot\dist;\n; to calculate a distance +\c;\l;direction\u cbot\direct;\n; to calculate a direction +\c;\l;if\u cbot\if;\n; to test a condition +\c;\l;motor\u cbot\motor;\n; to set the motor speeds + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/dfor.txt b/help/dfor.txt index 483cd075..116be043 100644 --- a/help/dfor.txt +++ b/help/dfor.txt @@ -1,11 +1,11 @@ -\b;Exercise -Destroy all four \l;targets\u object\bottarg; with a program using a \c;for\n; loop. You must move 10m to get from one target to another. - -\b;Useful instructions -\c;\l;for\u cbot\for;\n; loop to repeat the instructions -\c;\l;move\u cbot\move;\n; to move the bot -\c;\l;turn\u cbot\turn;\n; to turn the bot -\c;\l;fire\u cbot\fire;\n; to fire the cannon - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +Destroy all four \l;targets\u object\bottarg; with a program using a \c;for\n; loop. You must move 10m to get from one target to another. + +\b;Useful instructions +\c;\l;for\u cbot\for;\n; loop to repeat the instructions +\c;\l;move\u cbot\move;\n; to move the bot +\c;\l;turn\u cbot\turn;\n; to turn the bot +\c;\l;fire\u cbot\fire;\n; to fire the cannon + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/dhelp1.txt b/help/dhelp1.txt index 8fed8a3e..718907d0 100644 --- a/help/dhelp1.txt +++ b/help/dhelp1.txt @@ -1,15 +1,15 @@ -\b;Exercise -Defend against all enemy attacks - -\b;General idea -The range of your cannon is about 40m. The category of the enemies is \c;AlienAnt\n;. Turn towards the closest ant, even if it is still more than 40m away. But shoot only when it is closer than 40m, in order not to waste your energy. - -\b;Useful instructions -\c;\l;radar\u cbot\radar;\n; to detect your enemies (category \c;\l;AlienAnt\u object\ant;\n;) -\c;\l;direction\u cbot\direct;\n; to calculate a direction -\c;\l;distance\u cbot\dist;\n; to calculate a distance -\c;\l;fire\u cbot\fire;\n; to fire your cannon -\c;\l;wait\u cbot\wait;\n; to wait - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +Defend against all enemy attacks + +\b;General idea +The range of your cannon is about 40m. The category of the enemies is \c;AlienAnt\n;. Turn towards the closest ant, even if it is still more than 40m away. But shoot only when it is closer than 40m, in order not to waste your energy. + +\b;Useful instructions +\c;\l;radar\u cbot\radar;\n; to detect your enemies (category \c;\l;AlienAnt\u object\ant;\n;) +\c;\l;direction\u cbot\direct;\n; to calculate a direction +\c;\l;distance\u cbot\dist;\n; to calculate a distance +\c;\l;fire\u cbot\fire;\n; to fire your cannon +\c;\l;wait\u cbot\wait;\n; to wait + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/dlaby1.txt b/help/dlaby1.txt index 48a98849..75e3e368 100644 --- a/help/dlaby1.txt +++ b/help/dlaby1.txt @@ -1,11 +1,11 @@ -\b;Exercise -Program the bot so that it will find its way without hitting the walls of the labyrinth. We suppose that you do not know the configuration of the labyrinth, but there are no bifurcations, and no dead-ends. The labyrinth is made of squares measuring 5m each. - -\b;Useful instructions -\c;\l;radar\u cbot\radar;\n; to detect obstacles -\c;\l;if\u cbot\if;\n; to test a condition -\c;\l;move\u cbot\move;\n; to move the bot -\c;\l;turn\u cbot\turn;\n; to turn the bot - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +Program the bot so that it will find its way without hitting the walls of the labyrinth. We suppose that you do not know the configuration of the labyrinth, but there are no bifurcations, and no dead-ends. The labyrinth is made of squares measuring 5m each. + +\b;Useful instructions +\c;\l;radar\u cbot\radar;\n; to detect obstacles +\c;\l;if\u cbot\if;\n; to test a condition +\c;\l;move\u cbot\move;\n; to move the bot +\c;\l;turn\u cbot\turn;\n; to turn the bot + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/dmove1.txt b/help/dmove1.txt index c9a0823c..1f207bd0 100644 --- a/help/dmove1.txt +++ b/help/dmove1.txt @@ -1,10 +1,10 @@ -\b;Exercise -Program the robot in such a way that it arrives on the finishing pad, after having passed by the three blue crosses. -The platforms and the crosses are all distant of 20m from each other. - -\b;Useful instructions -\c;\l;move\u cbot\move;\n; to move the bot -\c;\l;turn\u cbot\turn;\n; to turn the bot - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +Program the robot in such a way that it arrives on the finishing pad, after having passed by the three blue crosses. +The platforms and the crosses are all distant of 20m from each other. + +\b;Useful instructions +\c;\l;move\u cbot\move;\n; to move the bot +\c;\l;turn\u cbot\turn;\n; to turn the bot + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/dproc1.txt b/help/dproc1.txt index a5c15c7f..e1cda96b 100644 --- a/help/dproc1.txt +++ b/help/dproc1.txt @@ -1,21 +1,21 @@ -\b;Exercice -\b;Exercise -The \l;bot\u object\bottr; must pass over all the \l;blue crosses\u object\waypoint; on the ground. The way that must be covered is made of two squares. The first one measures 15 meters, the second 25 meters. - -\image tproc1a 8 8; -\b;General principle -In order to solve this problem, the most efficient solution consists in creating a \l;function\u cbot\function; that instructs the bot to move on a square shape of a certain size. The main program becomes then very simple:\c; -\c; -\s; extern void object::Function3( ) -\s; { -\s; Square(15); -\s; Square(25); -\s; } -\n; -\b;Useful instructions -\c;\l;for\u cbot\for;\n; loop to repeat some instructions -\c;\l;move\u cbot\move;\n; to move the bot -\c;\l;turn\u cbot\turn;\n; to turn the bot - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercice +\b;Exercise +The \l;bot\u object\bottr; must pass over all the \l;blue crosses\u object\waypoint; on the ground. The way that must be covered is made of two squares. The first one measures 15 meters, the second 25 meters. + +\image tproc1a 8 8; +\b;General principle +In order to solve this problem, the most efficient solution consists in creating a \l;function\u cbot\function; that instructs the bot to move on a square shape of a certain size. The main program becomes then very simple:\c; +\c; +\s; extern void object::Function3( ) +\s; { +\s; Square(15); +\s; Square(25); +\s; } +\n; +\b;Useful instructions +\c;\l;for\u cbot\for;\n; loop to repeat some instructions +\c;\l;move\u cbot\move;\n; to move the bot +\c;\l;turn\u cbot\turn;\n; to turn the bot + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/dproc2.txt b/help/dproc2.txt index f56c4413..6424eb36 100644 --- a/help/dproc2.txt +++ b/help/dproc2.txt @@ -1,14 +1,14 @@ -\b;Exercise -Follow the way in form of a spiral. The bot must move 2 times 25m forward and turn, then move 2 times 20m forward and turn, and so on. -\image tproc2 8 8; - -\b;Function -You will have noticed that the way is made of "L"-shaped parts that are fit one into another. The first one (dark blue) measures two times 25 meters. The second one (light blue) measures 5 meters less. Let us start with writing the \l;function\u cbot\function; that will move the bot on a "L"-shaped part whose length will be given as a parameter. - -\b;Useful instructions -\c;\l;for\u cbot\for;\n; loop to repeat some instructions -\c;\l;move\u cbot\move;\n; to move the bot -\c;\l;turn\u cbot\turn;\n; to turn the bot - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +Follow the way in form of a spiral. The bot must move 2 times 25m forward and turn, then move 2 times 20m forward and turn, and so on. +\image tproc2 8 8; + +\b;Function +You will have noticed that the way is made of "L"-shaped parts that are fit one into another. The first one (dark blue) measures two times 25 meters. The second one (light blue) measures 5 meters less. Let us start with writing the \l;function\u cbot\function; that will move the bot on a "L"-shaped part whose length will be given as a parameter. + +\b;Useful instructions +\c;\l;for\u cbot\for;\n; loop to repeat some instructions +\c;\l;move\u cbot\move;\n; to move the bot +\c;\l;turn\u cbot\turn;\n; to turn the bot + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/dradar1.txt b/help/dradar1.txt index b4a02448..2b97def6 100644 --- a/help/dradar1.txt +++ b/help/dradar1.txt @@ -1,14 +1,14 @@ -\b;Exercise -In this exercise, a "crazy bot" places many \l;blue crosses\u object\waypoint; on the ground. Just try to find them all. - -\b;Useful instructions -\c;\l;radar\u cbot\radar;\n; to detect the blue crosses (category \c;\l;WayPoint\u object\waypoint;\n;) -\c;\l;direction\u cbot\direct;\n; to calculate a direction -\c;\l;if\u cbot\if;\n; to test a condition -\c;\l;motor\u cbot\motor;\n; to set the motor speeds - -\t;Remark -Do not wait too long, because the crazy bot gets down to work immediately. Fortunately, as long as you are in the program editor, the game will pause. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +In this exercise, a "crazy bot" places many \l;blue crosses\u object\waypoint; on the ground. Just try to find them all. + +\b;Useful instructions +\c;\l;radar\u cbot\radar;\n; to detect the blue crosses (category \c;\l;WayPoint\u object\waypoint;\n;) +\c;\l;direction\u cbot\direct;\n; to calculate a direction +\c;\l;if\u cbot\if;\n; to test a condition +\c;\l;motor\u cbot\motor;\n; to set the motor speeds + +\t;Remark +Do not wait too long, because the crazy bot gets down to work immediately. Fortunately, as long as you are in the program editor, the game will pause. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/dremova1.txt b/help/dremova1.txt index 4f6f8896..d3175a1d 100644 --- a/help/dremova1.txt +++ b/help/dremova1.txt @@ -1,35 +1,35 @@ -\b;Exercise -Convert some \l;titanium ore\u object\titanore; to \l;titanium cubes\u object\titan;, then drop 2 titanium cubes on the pads whose coordinates are: -\c; - x=10, y=-60 - x=10, y=-65 -\n; -\image derrick 8 8; -The \l;derrick\u object\derrick; extracts titanium ore from the subsoil; you just have to pick it up. - -\image convert 8 8; -The \l;converter\u object\convert; converts titanium ore to titanium cubes. Just drop the titanium ore on the platform, move backward, and wait until it has been converted. - -\b;General principle -Repeat two times : -o Wait until there is some titanium ore. -o Go to the titanium ore. -o Pick it up. -o Go to the converter. -o Drop the titanium ore. -o Move back 2.5 meters. -o Wait until there is a titanium cube. -o Pick up the titanium cube. -o Go to the platform. -o Drop the titanium cube. - -\b;Useful instructions -\c;\l;for\u cbot\for;\n; to repeat some instructions -\c;\l;do - while\u cbot\do;\n; to repeat some instructions -\c;\l;radar\u cbot\radar;\n; to look for different objects -\c;\l;goto\u cbot\goto;\n; to move the bot -\c;\l;grab\u cbot\grab;\n; to grab an object -\c;\l;drop\u cbot\drop;\n; to drop an object - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +Convert some \l;titanium ore\u object\titanore; to \l;titanium cubes\u object\titan;, then drop 2 titanium cubes on the pads whose coordinates are: +\c; + x=10, y=-60 + x=10, y=-65 +\n; +\image derrick 8 8; +The \l;derrick\u object\derrick; extracts titanium ore from the subsoil; you just have to pick it up. + +\image convert 8 8; +The \l;converter\u object\convert; converts titanium ore to titanium cubes. Just drop the titanium ore on the platform, move backward, and wait until it has been converted. + +\b;General principle +Repeat two times : +o Wait until there is some titanium ore. +o Go to the titanium ore. +o Pick it up. +o Go to the converter. +o Drop the titanium ore. +o Move back 2.5 meters. +o Wait until there is a titanium cube. +o Pick up the titanium cube. +o Go to the platform. +o Drop the titanium cube. + +\b;Useful instructions +\c;\l;for\u cbot\for;\n; to repeat some instructions +\c;\l;do - while\u cbot\do;\n; to repeat some instructions +\c;\l;radar\u cbot\radar;\n; to look for different objects +\c;\l;goto\u cbot\goto;\n; to move the bot +\c;\l;grab\u cbot\grab;\n; to grab an object +\c;\l;drop\u cbot\drop;\n; to drop an object + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/dremova2.txt b/help/dremova2.txt index 29de659c..ec6549c7 100644 --- a/help/dremova2.txt +++ b/help/dremova2.txt @@ -1,11 +1,11 @@ -\b;Exercise -Move the \l;titanium cube\u object\titan; on the finishing pad. You do not know the position of the titanium, but we can tell you the position of the finishing pad x=10 and y=-60. - -\b;Useful instructions -\c;\l;radar\u cbot\radar;\n; to find the titanium cube (category \c;\l;Titanium\u object\titan;\n;) -\c;\l;goto\u cbot\goto;\n; to move the bot -\c;\l;grab\u cbot\grab;\n; to grab an object -\c;\l;drop\u cbot\drop;\n; to drop an object - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +Move the \l;titanium cube\u object\titan; on the finishing pad. You do not know the position of the titanium, but we can tell you the position of the finishing pad x=10 and y=-60. + +\b;Useful instructions +\c;\l;radar\u cbot\radar;\n; to find the titanium cube (category \c;\l;Titanium\u object\titan;\n;) +\c;\l;goto\u cbot\goto;\n; to move the bot +\c;\l;grab\u cbot\grab;\n; to grab an object +\c;\l;drop\u cbot\drop;\n; to drop an object + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/dtrap1.txt b/help/dtrap1.txt index 15edc8d0..8cf7bd08 100644 --- a/help/dtrap1.txt +++ b/help/dtrap1.txt @@ -1,26 +1,26 @@ -\b;Exercise -Instruct the bot to find all the \l;blue crosses\u object\waypoint; on the ground, but do not get too close to the \l;mines\u object\mine;. When the bot passes over a cross, it disappears. Here is the general principle: - - Repeat forever: - o Look for a mine - o If a mine has been found, calculate the opposite direction - o Look for a cross - o If nothing has been found, stop the program - o Calculate the direction of the cross - o Calculate the mean value of the two directions - o Set the motor speeds in order to head towards the mean direction - -\b;The instruction \c;radar\n; -In order to detect a mine with the \c;\l;radar\u cbot\radar;\n;, we recommend the following parameters: -\c;\s; radar(Mine, 0, 180, 0, 5);\n; -With the opening angle of 180 degrees, mines that are behind the bot will not be found. Mines that are at more than 5 meters are also ignored. - -In order to find a blue cross, simply write: -\c;\s; radar(WayPoint);\n; -Blue crosses will be found everywhere. - -In order to calculate a direction, use \c;\l;direction\u cbot\direct;\n;. -In order to set the motor speeds, use \c;\l;motor\u cbot\motor;\n;. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +Instruct the bot to find all the \l;blue crosses\u object\waypoint; on the ground, but do not get too close to the \l;mines\u object\mine;. When the bot passes over a cross, it disappears. Here is the general principle: + + Repeat forever: + o Look for a mine + o If a mine has been found, calculate the opposite direction + o Look for a cross + o If nothing has been found, stop the program + o Calculate the direction of the cross + o Calculate the mean value of the two directions + o Set the motor speeds in order to head towards the mean direction + +\b;The instruction \c;radar\n; +In order to detect a mine with the \c;\l;radar\u cbot\radar;\n;, we recommend the following parameters: +\c;\s; radar(Mine, 0, 180, 0, 5);\n; +With the opening angle of 180 degrees, mines that are behind the bot will not be found. Mines that are at more than 5 meters are also ignored. + +In order to find a blue cross, simply write: +\c;\s; radar(WayPoint);\n; +Blue crosses will be found everywhere. + +In order to calculate a direction, use \c;\l;direction\u cbot\direct;\n;. +In order to set the motor speeds, use \c;\l;motor\u cbot\motor;\n;. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/dtrap2.txt b/help/dtrap2.txt index d8b8fa0c..85acba71 100644 --- a/help/dtrap2.txt +++ b/help/dtrap2.txt @@ -1,7 +1,7 @@ -\b;Exercise -Instruct your \l;bot\u object\bottr; to find all the \l;blue crosses\u object\waypoint; on the ground, but do not get too close to the \l;mines\u object\mine;. - -If a bot gets within less than 2m of the center of a mine (which is the position returned by the radar instruction), il will blow up. However, you must take into account the inertia of the bot. Probably a safety distance of 3 to 3.5m would be more appropriate. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +Instruct your \l;bot\u object\bottr; to find all the \l;blue crosses\u object\waypoint; on the ground, but do not get too close to the \l;mines\u object\mine;. + +If a bot gets within less than 2m of the center of a mine (which is the position returned by the radar instruction), il will blow up. However, you must take into account the inertia of the bot. Probably a safety distance of 3 to 3.5m would be more appropriate. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/fglobal.txt b/help/fglobal.txt index 5065a250..f7c4caf2 100644 --- a/help/fglobal.txt +++ b/help/fglobal.txt @@ -1,5 +1,5 @@ -\b;Objective -Here you can play around without any definite objective. You can do whatever you want, explore the region, build a base camp and several bots, run various research programs, kill the insects if you find some, etc. - -\t;See also -\l;Controls\u command;. +\b;Objective +Here you can play around without any definite objective. You can do whatever you want, explore the region, build a base camp and several bots, run various research programs, kill the insects if you find some, etc. + +\t;See also +\l;Controls\u command;. diff --git a/help/licences.txt b/help/licences.txt index 884e1732..f892ed07 100644 --- a/help/licences.txt +++ b/help/licences.txt @@ -1,3 +1,3 @@ -The photograph of the nebula NGC3606 illuminating the sky on Orpheon and the installation program was taken with the Hubble space telescope. It is used with the permission of the authors Wolfgang Brandner (JPL/IPAC), Eva K. Grebel (Washington University), You-Hua Chu (Illinois Urbana-Champaign University) and NASA. - -The thunder sound on Orpheon is used by limited permission from CREATIVE. +The photograph of the nebula NGC3606 illuminating the sky on Orpheon and the installation program was taken with the Hubble space telescope. It is used with the permission of the authors Wolfgang Brandner (JPL/IPAC), Eva K. Grebel (Washington University), You-Hua Chu (Illinois Urbana-Champaign University) and NASA. + +The thunder sound on Orpheon is used by limited permission from CREATIVE. diff --git a/help/mhcent1.txt b/help/mhcent1.txt index 02664cba..0bdecf07 100644 --- a/help/mhcent1.txt +++ b/help/mhcent1.txt @@ -1,11 +1,11 @@ -\b;From Mission Control -Find some more \l;organic matter\u object\bullet; and, given an appropriate research program performed by your \l;autolab\u object\labo;, \l;you\u object\human; should be able to manufacture orga shooters yourself. - -Produce a \l;legged orga shooter\u object\botos; and bring it back aboard your \l;spaceship\u object\base;. - -Please keep in mind that low energy resources are a major concern on this planet. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +Find some more \l;organic matter\u object\bullet; and, given an appropriate research program performed by your \l;autolab\u object\labo;, \l;you\u object\human; should be able to manufacture orga shooters yourself. + +Produce a \l;legged orga shooter\u object\botos; and bring it back aboard your \l;spaceship\u object\base;. + +Please keep in mind that low energy resources are a major concern on this planet. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhcent2.txt b/help/mhcent2.txt index fbf988bb..99de1d4f 100644 --- a/help/mhcent2.txt +++ b/help/mhcent2.txt @@ -1,7 +1,7 @@ -\b;From Mission Control -It is time for \l;you\u object\human; to improve your shooting skills again. In the following drill, hit all the \l;explosive devices\u object\tnt; but watch out: your \l;orga shooter\u object\botoj; has very little power left in it, barely enough to complete the drill. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +It is time for \l;you\u object\human; to improve your shooting skills again. In the following drill, hit all the \l;explosive devices\u object\tnt; but watch out: your \l;orga shooter\u object\botoj; has very little power left in it, barely enough to complete the drill. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhcent3.txt b/help/mhcent3.txt index dab80410..48067c8f 100644 --- a/help/mhcent3.txt +++ b/help/mhcent3.txt @@ -1,9 +1,9 @@ -\b;From Mission Control -Build a \l;radar\u object\radar; on one of the highest accessible spots and make sure that no organism can destroy it after \l;you\u object\human;'re gone. - -The destruction of a previous radar set up by the first expedition was probably the cause of a communication breakdown, which led to complete loss of contact. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +Build a \l;radar\u object\radar; on one of the highest accessible spots and make sure that no organism can destroy it after \l;you\u object\human;'re gone. + +The destruction of a previous radar set up by the first expedition was probably the cause of a communication breakdown, which led to complete loss of contact. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhcent4.txt b/help/mhcent4.txt index 351fb946..72284c2a 100644 --- a/help/mhcent4.txt +++ b/help/mhcent4.txt @@ -1,19 +1,19 @@ -\b;A Word on New Policies -We are sorry to have to bring this to your attention but this seems like a good a time to let you in on a little concern we're having at the moment. There has been a strong reaction in the public opinion and in Congress concerning your systematic termination of the "indigenous inhabitants" of the planets you've been visiting. Congress has chosen to demonstrate its sensitivity to the concerns of the general population. - -We hereby relay their new directives and these directives intimate for you to limit the casualties as much as humanly possible. In other words, do your very best to spare the life-forms you encounter from now on. Your mission should of course in no way find itself jeopardized by this new course of action. - -\b;From Mission Control -Your energy resources appear dangerously limited at this time and so is your arsenal but you need to locate and retrieve the previous expedition's \l;black box\u object\bbox; so you can proceed to the next planet. - -We received a piece of information from your predecessors, via the observation satellite, regarding a new type of weaponry they have developed precisely for a predicament such as this one. - -This weapon will offer you an opportunity to demonstrate your newfound compassion towards \l;indigenous species\u object\ant; for it is not a weapon of mass destruction. What it offers instead, to the best of our knowledge, is an option to incapacitate them, rendering them, if only temporarily, harmless. If this is indeed the case, you'll need to act quickly before they are given a chance to become hostile to you again. - -\b;Procedure -Perform the \l;research program\u object\research; and experiment for yourself but don't forget to bring this new weapon back on board. We are very curious to study its workings. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;A Word on New Policies +We are sorry to have to bring this to your attention but this seems like a good a time to let you in on a little concern we're having at the moment. There has been a strong reaction in the public opinion and in Congress concerning your systematic termination of the "indigenous inhabitants" of the planets you've been visiting. Congress has chosen to demonstrate its sensitivity to the concerns of the general population. + +We hereby relay their new directives and these directives intimate for you to limit the casualties as much as humanly possible. In other words, do your very best to spare the life-forms you encounter from now on. Your mission should of course in no way find itself jeopardized by this new course of action. + +\b;From Mission Control +Your energy resources appear dangerously limited at this time and so is your arsenal but you need to locate and retrieve the previous expedition's \l;black box\u object\bbox; so you can proceed to the next planet. + +We received a piece of information from your predecessors, via the observation satellite, regarding a new type of weaponry they have developed precisely for a predicament such as this one. + +This weapon will offer you an opportunity to demonstrate your newfound compassion towards \l;indigenous species\u object\ant; for it is not a weapon of mass destruction. What it offers instead, to the best of our knowledge, is an option to incapacitate them, rendering them, if only temporarily, harmless. If this is indeed the case, you'll need to act quickly before they are given a chance to become hostile to you again. + +\b;Procedure +Perform the \l;research program\u object\research; and experiment for yourself but don't forget to bring this new weapon back on board. We are very curious to study its workings. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhcent5.txt b/help/mhcent5.txt index aa3def54..c4c0e0a1 100644 --- a/help/mhcent5.txt +++ b/help/mhcent5.txt @@ -1,9 +1,9 @@ -\b;From Mission Control -You're under attack and this is no time for compassion... - -Your new \l;thumper\u object\bottump; might come in very handy. However, we emphasize that you should not risk a takeoff if there are any ants still alive in the vicinity of the spaceship. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +You're under attack and this is no time for compassion... + +Your new \l;thumper\u object\bottump; might come in very handy. However, we emphasize that you should not risk a takeoff if there are any ants still alive in the vicinity of the spaceship. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhcrys1.txt b/help/mhcrys1.txt index ba9f2afa..6b4c840b 100644 --- a/help/mhcrys1.txt +++ b/help/mhcrys1.txt @@ -1,13 +1,13 @@ -\b;From Mission Control -Build a \l;radar\u object\radar; on the highest point in the area. Make sure that the radar will work safely even after your departure to other planets. Your \l;research center\u object\research; should be able to provide a solution. - -It is possible that the organisms detected are in fact the \l;worms\u object\worm; alluded to by the first expedition. If this is indeed the case, don't be excessively alarmed: they seem fairly harmless to living organisms but could cause the programs of bots and buildings to malfunction through the emission of viruses. - -Radars not only give you precious information about objects and organisms present in the region, they also relay information to and from the Earth once you have taken off to other planets. It is highly probable that problems with the radar stations built by the first expedition caused the transmission problems that we are aware of. - -In order to help you with the boring task of gathering the necessary raw material, we have developed a program that instructs the \l;wheeled grabber\u object\botgr; to look for \l;titanium ore\u object\titanore; on its own (see the programming page \button 53;). - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +Build a \l;radar\u object\radar; on the highest point in the area. Make sure that the radar will work safely even after your departure to other planets. Your \l;research center\u object\research; should be able to provide a solution. + +It is possible that the organisms detected are in fact the \l;worms\u object\worm; alluded to by the first expedition. If this is indeed the case, don't be excessively alarmed: they seem fairly harmless to living organisms but could cause the programs of bots and buildings to malfunction through the emission of viruses. + +Radars not only give you precious information about objects and organisms present in the region, they also relay information to and from the Earth once you have taken off to other planets. It is highly probable that problems with the radar stations built by the first expedition caused the transmission problems that we are aware of. + +In order to help you with the boring task of gathering the necessary raw material, we have developed a program that instructs the \l;wheeled grabber\u object\botgr; to look for \l;titanium ore\u object\titanore; on its own (see the programming page \button 53;). + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhcrys2.txt b/help/mhcrys2.txt index 37fac584..b0ceb067 100644 --- a/help/mhcrys2.txt +++ b/help/mhcrys2.txt @@ -1,11 +1,11 @@ -\b;From Mission Control -Cleanse the area of all hostile organisms. The way you accomplish this (\l;defense tower\u object\tower; or \l;winged shooter\u object\botfj;) is up to you. - -The radar seems to be perfectly suited to the detection of worms. Keep in mind though that they only appear when they are on the surface. - -We relayed a transmission to your \l;bot factory\u object\factory;. It concerns a bot designed to detect raw materials in the subsoil: energy sources, ore. We call it a \l;sniffer\u object\botsr; for short. Preliminary analysis leads us to believe that the presence of titanium ore on Crystalium is closely linked to the growth of large blue crystals. If this is indeed the case, this information should allow you to save some precious time. A \l;derrick\u object\derrick; is of course required for the extraction. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +Cleanse the area of all hostile organisms. The way you accomplish this (\l;defense tower\u object\tower; or \l;winged shooter\u object\botfj;) is up to you. + +The radar seems to be perfectly suited to the detection of worms. Keep in mind though that they only appear when they are on the surface. + +We relayed a transmission to your \l;bot factory\u object\factory;. It concerns a bot designed to detect raw materials in the subsoil: energy sources, ore. We call it a \l;sniffer\u object\botsr; for short. Preliminary analysis leads us to believe that the presence of titanium ore on Crystalium is closely linked to the growth of large blue crystals. If this is indeed the case, this information should allow you to save some precious time. A \l;derrick\u object\derrick; is of course required for the extraction. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhcrys3.txt b/help/mhcrys3.txt index cdf9b07a..029ced15 100644 --- a/help/mhcrys3.txt +++ b/help/mhcrys3.txt @@ -1,9 +1,9 @@ -\b;From Mission Control -We have just received this warning from the observation satellite: a rogue bot from the previous expedition has seized the black box from your spaceship. - -We are going to investigate this incident further but it is of vital importance that you retrieve your black box at once. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +We have just received this warning from the observation satellite: a rogue bot from the previous expedition has seized the black box from your spaceship. + +We are going to investigate this incident further but it is of vital importance that you retrieve your black box at once. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhcrys4.txt b/help/mhcrys4.txt index 10ef464c..a1db90ef 100644 --- a/help/mhcrys4.txt +++ b/help/mhcrys4.txt @@ -1,11 +1,11 @@ -\b;From Mission Control -This planet has turned out to be a very unlikely candidate for colonization. Better to leave it for good. Retrieve the \l;black box\u object\bbox; from the previous expedition and head towards the next planet. - -The observation satellite has indicated that its present location is at the bottom of a valley. However the pervasive stratum of electromagnetic smog could make all satellite information rather undependable. - -Stay alert. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +This planet has turned out to be a very unlikely candidate for colonization. Better to leave it for good. Retrieve the \l;black box\u object\bbox; from the previous expedition and head towards the next planet. + +The observation satellite has indicated that its present location is at the bottom of a valley. However the pervasive stratum of electromagnetic smog could make all satellite information rather undependable. + +Stay alert. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhlune1.txt b/help/mhlune1.txt index aec7b004..8bc9c193 100644 --- a/help/mhlune1.txt +++ b/help/mhlune1.txt @@ -1,22 +1,22 @@ -\b;From Mission Control -Collect 4 chunks of \l;titanium ore\u object\titanore; and bring them back aboard your \l;spaceship\u object\base;. Build the equipment necessary for this task (\l;flying bots\u object\botgj;). - -Before you venture any further, you should always take a look at the satellite report \button 186;. - -We have transmitted to your \l;spaceship\u object\base; a program that might help you in this task; please refer to the corresponding page of your SatCom with the button \button 53;. - -\b;Procedure -1) A new \l;research program\u object\research; is required for winged bots to be added to the list of bots that can be produced by the factory. This research program will also make the propulsion reactor in your personal survival kit operational. - -2) Produce a \l;winged grabber\u object\botgj; and collect the 4 chunks of \l;titanium ore\u object\titanore;. - -3) Take the \l;winged grabber\u object\botgj; and the \l;wheeled grabber\u object\botgr; along with you and take off. - -Be careful that your winged bot does not run out of power when you are far from base. If necessary, replace the \l;power cell\u object\power; before leaving the spaceship. You can either do this manually or you can execute the enclosed program provided by Houston \button 53;. - -In order not to lose your way among the numerous craters on the Moon's surface, use the mini map on the lower right-hand corner of your screen. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom. - -\t;See also -\l;Controls\u command; +\b;From Mission Control +Collect 4 chunks of \l;titanium ore\u object\titanore; and bring them back aboard your \l;spaceship\u object\base;. Build the equipment necessary for this task (\l;flying bots\u object\botgj;). + +Before you venture any further, you should always take a look at the satellite report \button 186;. + +We have transmitted to your \l;spaceship\u object\base; a program that might help you in this task; please refer to the corresponding page of your SatCom with the button \button 53;. + +\b;Procedure +1) A new \l;research program\u object\research; is required for winged bots to be added to the list of bots that can be produced by the factory. This research program will also make the propulsion reactor in your personal survival kit operational. + +2) Produce a \l;winged grabber\u object\botgj; and collect the 4 chunks of \l;titanium ore\u object\titanore;. + +3) Take the \l;winged grabber\u object\botgj; and the \l;wheeled grabber\u object\botgr; along with you and take off. + +Be careful that your winged bot does not run out of power when you are far from base. If necessary, replace the \l;power cell\u object\power; before leaving the spaceship. You can either do this manually or you can execute the enclosed program provided by Houston \button 53;. + +In order not to lose your way among the numerous craters on the Moon's surface, use the mini map on the lower right-hand corner of your screen. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom. + +\t;See also +\l;Controls\u command; diff --git a/help/mhlune2.txt b/help/mhlune2.txt index c82d9e49..5d6cfbd9 100644 --- a/help/mhlune2.txt +++ b/help/mhlune2.txt @@ -1,17 +1,17 @@ -\b;From Mission Control -This apparatus was set up by the previous expedition to test and train the flying capacity of winged bots. - -\b;Objective -Use these drills to your advantage. Your ability to survive future critical situations may depend upon the dexterity they will have helped you develop. - -\b;Procedure -Fly as quickly as possible through each target. Try to accomplish this without causing the engine to overheat. If this appears too difficult, just touch down and let the engine cool off. - -You should use the arrow keys on the keyboard to pilot the bot, but keep one hand on the mouse. The mouse is useless in this exercise, but will be essential in later missions. - -It may be useful to come back to these drills once in a while if you wish to improve your reflexes further. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +This apparatus was set up by the previous expedition to test and train the flying capacity of winged bots. + +\b;Objective +Use these drills to your advantage. Your ability to survive future critical situations may depend upon the dexterity they will have helped you develop. + +\b;Procedure +Fly as quickly as possible through each target. Try to accomplish this without causing the engine to overheat. If this appears too difficult, just touch down and let the engine cool off. + +You should use the arrow keys on the keyboard to pilot the bot, but keep one hand on the mouse. The mouse is useless in this exercise, but will be essential in later missions. + +It may be useful to come back to these drills once in a while if you wish to improve your reflexes further. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhlune3.txt b/help/mhlune3.txt index 38f77227..a11586b5 100644 --- a/help/mhlune3.txt +++ b/help/mhlune3.txt @@ -1,7 +1,7 @@ -\b;From Mission Control -Similar drill as before, only this time viewed through the camera placed on board. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +Similar drill as before, only this time viewed through the camera placed on board. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhlune4.txt b/help/mhlune4.txt index f901585d..cc87d088 100644 --- a/help/mhlune4.txt +++ b/help/mhlune4.txt @@ -1,20 +1,20 @@ -\b;From Mission Control -We have no way of being sure where the previous expedition was headed when it left the Moon surface nor why it chose to go wherever it was going. - -Locate the \l;black box\u object\bbox; they must have left behind and bring it back aboard your ship. The black box should contain the coordinates of the next planet the expedition was planning to visit. - -Your bot's \l;power cells\u object\power; are almost entirely empty. Recharging them should be your priority. The observation satellite in orbit indicates that the subsoil in this particular area is loaded with energy. You should therefore be able to build a functional \l;power station\u object\station; on any flat surface. - -We have developed a program that will recharge the \l;power cell\u object\power; of a bot. Refer to the program page of your SatCom \button 53;. - -\b;Procedure -1) You first need to build a \l;converter\u object\convert; that converts the chunks of titanium ore already in your possession into usable \l;titanium cubes\u object\titan;. - -2) You should then build both a \l;power station\u object\station; and a \l;radar\u object\radar; which will indicate the location of the black box on your mini map. - -3) With your power cells fully charged, retrieve the black box. It needs to be placed on the \l;spaceship\u object\base; platform for you to be able to take off. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +We have no way of being sure where the previous expedition was headed when it left the Moon surface nor why it chose to go wherever it was going. + +Locate the \l;black box\u object\bbox; they must have left behind and bring it back aboard your ship. The black box should contain the coordinates of the next planet the expedition was planning to visit. + +Your bot's \l;power cells\u object\power; are almost entirely empty. Recharging them should be your priority. The observation satellite in orbit indicates that the subsoil in this particular area is loaded with energy. You should therefore be able to build a functional \l;power station\u object\station; on any flat surface. + +We have developed a program that will recharge the \l;power cell\u object\power; of a bot. Refer to the program page of your SatCom \button 53;. + +\b;Procedure +1) You first need to build a \l;converter\u object\convert; that converts the chunks of titanium ore already in your possession into usable \l;titanium cubes\u object\titan;. + +2) You should then build both a \l;power station\u object\station; and a \l;radar\u object\radar; which will indicate the location of the black box on your mini map. + +3) With your power cells fully charged, retrieve the black box. It needs to be placed on the \l;spaceship\u object\base; platform for you to be able to take off. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhorph1.txt b/help/mhorph1.txt index 30ee987c..7154f14a 100644 --- a/help/mhorph1.txt +++ b/help/mhorph1.txt @@ -1,13 +1,13 @@ -\b;From Mission Control -It seems obvious enough that this planet will be no haven for humanity. - -Build a radar to relay future transmissions. - -Also... we're very sorry to inform you that you may need to exterminate all hostile organisms. - -The first expedition located \l;titanium ore\u object\titanore; under the surface of Orpheon. The spot is marked with a blue \l;flag\u object\flag;. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +It seems obvious enough that this planet will be no haven for humanity. + +Build a radar to relay future transmissions. + +Also... we're very sorry to inform you that you may need to exterminate all hostile organisms. + +The first expedition located \l;titanium ore\u object\titanore; under the surface of Orpheon. The spot is marked with a blue \l;flag\u object\flag;. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhorph2.txt b/help/mhorph2.txt index 00535b0e..7391a1fc 100644 --- a/help/mhorph2.txt +++ b/help/mhorph2.txt @@ -1,11 +1,11 @@ -\b;From Mission Control -Retrieve the black box. - -Electromagnetic lightning bolts appear to strike even more frequently now than they did previously. You need to protect your equipment. - -Please note that your spaceship also naturally acts as a lightning conductor, and our engineers assure us that your space suit does not attract lightning. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +Retrieve the black box. + +Electromagnetic lightning bolts appear to strike even more frequently now than they did previously. You need to protect your equipment. + +Please note that your spaceship also naturally acts as a lightning conductor, and our engineers assure us that your space suit does not attract lightning. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhsaari1.txt b/help/mhsaari1.txt index ce6848ec..065eb931 100644 --- a/help/mhsaari1.txt +++ b/help/mhsaari1.txt @@ -1,7 +1,7 @@ -\b;From Mission Control -The observation satellite has detected a chunk of \l;uranium ore\u object\uranore; on the summit of the main mountain. You need to bring it back to your spaceship. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +The observation satellite has detected a chunk of \l;uranium ore\u object\uranore; on the summit of the main mountain. You need to bring it back to your spaceship. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhsaari2.txt b/help/mhsaari2.txt index 95547c0e..ae22711a 100644 --- a/help/mhsaari2.txt +++ b/help/mhsaari2.txt @@ -1,11 +1,11 @@ -\b;From Mission Control -Eliminate all hostile presence from the region. - -Your current situation is of utmost concern to us. The satellite has detected an extremely strong enemy presence approaching your spaceship from all directions. Use your best judgment and the quickest, most efficient defense: either \l;towers\u object\tower; or \l;shooters\u object\botfr;. - -In order to increase your survival chances, we have developed a program that will protect your west flank if you execute it on your \l;wheeled shooter\u object\botfr;; see the program page \button 53;. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +Eliminate all hostile presence from the region. + +Your current situation is of utmost concern to us. The satellite has detected an extremely strong enemy presence approaching your spaceship from all directions. Use your best judgment and the quickest, most efficient defense: either \l;towers\u object\tower; or \l;shooters\u object\botfr;. + +In order to increase your survival chances, we have developed a program that will protect your west flank if you execute it on your \l;wheeled shooter\u object\botfr;; see the program page \button 53;. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhsaari3.txt b/help/mhsaari3.txt index ca9202a4..2a6b8587 100644 --- a/help/mhsaari3.txt +++ b/help/mhsaari3.txt @@ -1,9 +1,9 @@ -\b;From Mission Control -Your satellite has located the remains of the previous expedition. You should come across a \l;black box\u object\bbox; not too far from there. It will give you the coordinates of your next destination. - -Exterminate the few remaining ants. We've been notified that your neutron gun is currently out of order so you will not be able to build new bots. We're convinced that you're resourceful enough at this point to come up with a solution. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +Your satellite has located the remains of the previous expedition. You should come across a \l;black box\u object\bbox; not too far from there. It will give you the coordinates of your next destination. + +Exterminate the few remaining ants. We've been notified that your neutron gun is currently out of order so you will not be able to build new bots. We're convinced that you're resourceful enough at this point to come up with a solution. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhterra1.txt b/help/mhterra1.txt index 9046f437..0b1fb5f9 100644 --- a/help/mhterra1.txt +++ b/help/mhterra1.txt @@ -1,15 +1,15 @@ -\b;From Mission Control -We've just received information that the first expedition designed a brand new weapon to be used on Terranova. It was safely stored away from possible enemy reach, inside a \l;vault\u object\safe; which can be accessed only by using four \l;keys\u object\key;. The keys are scattered on or under the planet surface. - -The observation satellite has located one of these keys (A) north of your present position. - -In compliance with Congress directives, our engineers have developed yet another strictly "defensive" bot : it is called a \l;shielder\u object\botshld; and it will offer adequate protection within a given perimeter. The data have been transmitted to your \l;research center\u object\research; along with a couple of relevant programs. - -As you may know, uranium ore in the subsoil is a powerful fertilizer, furthering the growth of a variety of mushrooms. Please also note that \l;titanium ore\u object\titanore; is often located at the bottom of lakes on this planet. - -When your mission is completed and before taking off, bring both a \l;shielder\u object\botshld; and a \l;subber\u object\botsub; aboard your spaceship. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +We've just received information that the first expedition designed a brand new weapon to be used on Terranova. It was safely stored away from possible enemy reach, inside a \l;vault\u object\safe; which can be accessed only by using four \l;keys\u object\key;. The keys are scattered on or under the planet surface. + +The observation satellite has located one of these keys (A) north of your present position. + +In compliance with Congress directives, our engineers have developed yet another strictly "defensive" bot : it is called a \l;shielder\u object\botshld; and it will offer adequate protection within a given perimeter. The data have been transmitted to your \l;research center\u object\research; along with a couple of relevant programs. + +As you may know, uranium ore in the subsoil is a powerful fertilizer, furthering the growth of a variety of mushrooms. Please also note that \l;titanium ore\u object\titanore; is often located at the bottom of lakes on this planet. + +When your mission is completed and before taking off, bring both a \l;shielder\u object\botshld; and a \l;subber\u object\botsub; aboard your spaceship. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhterra2.txt b/help/mhterra2.txt index 96b7ee47..530285a9 100644 --- a/help/mhterra2.txt +++ b/help/mhterra2.txt @@ -1,9 +1,9 @@ -\b;From Mission Control -Retrieve the second \l;key\u object\key; (B). It should be located near your current position. - -When your mission is completed and before taking off, bring both \l;shielder\u object\botshld; and \l;subber\u object\botsub; aboard your spaceship. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +Retrieve the second \l;key\u object\key; (B). It should be located near your current position. + +When your mission is completed and before taking off, bring both \l;shielder\u object\botshld; and \l;subber\u object\botsub; aboard your spaceship. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhterra3.txt b/help/mhterra3.txt index a99bbfc1..f3ca9465 100644 --- a/help/mhterra3.txt +++ b/help/mhterra3.txt @@ -1,9 +1,9 @@ -\b;From Mission Control -The third \l;key\u object\key; (C) is buried in a mushroom-infested area. A \l;sniffer\u object\botss; should be able to locate it and a \l;derrick\u object\derrick; should be able to extract it. - -When your mission is completed and before taking off, bring both \l;shielder\u object\botshld; and \l;subber\u object\botsub; aboard your spaceship. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +The third \l;key\u object\key; (C) is buried in a mushroom-infested area. A \l;sniffer\u object\botss; should be able to locate it and a \l;derrick\u object\derrick; should be able to extract it. + +When your mission is completed and before taking off, bring both \l;shielder\u object\botshld; and \l;subber\u object\botsub; aboard your spaceship. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhterra4.txt b/help/mhterra4.txt index 1a9e9d19..cf29413f 100644 --- a/help/mhterra4.txt +++ b/help/mhterra4.txt @@ -1,13 +1,13 @@ -\b;From Mission Control -With the help of the fourth \l;key\u object\key; (D) located nearby, you will finally gain access to the \l;vault\u object\safe;. The groundbreaking bot you'll find inside was named a "\l;phazer\u object\botphaz;". - -A program allowing for a collaboration between a \l;phazer\u object\botphaz; and a \l;shielder\u object\botshld; has been attached. - -You should soon find yourself in a position to test your new weapon. Your last mission is to dispose of the \l;Alien Queen\u object\mother;, the egglayer responsible for the growing number of insects on Terranova. The phazer might very well be the only bot capable of getting the job done. - -There will then be no further obstacle to the human colonization of this magnificent planet and you'll soon be able to notify Earth of the success of your mission. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +With the help of the fourth \l;key\u object\key; (D) located nearby, you will finally gain access to the \l;vault\u object\safe;. The groundbreaking bot you'll find inside was named a "\l;phazer\u object\botphaz;". + +A program allowing for a collaboration between a \l;phazer\u object\botphaz; and a \l;shielder\u object\botshld; has been attached. + +You should soon find yourself in a position to test your new weapon. Your last mission is to dispose of the \l;Alien Queen\u object\mother;, the egglayer responsible for the growing number of insects on Terranova. The phazer might very well be the only bot capable of getting the job done. + +There will then be no further obstacle to the human colonization of this magnificent planet and you'll soon be able to notify Earth of the success of your mission. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhterre1.txt b/help/mhterre1.txt index 6a9ccb62..7c758945 100644 --- a/help/mhterre1.txt +++ b/help/mhterre1.txt @@ -1,27 +1,27 @@ -\b;From the NASA Training Center -We are pleased to inform you that you have been selected for the space exploration mission Colobot. - -Your psychological profile has been established as more than 98.84% favorable, and your aptitude during the extensive testing period was undeniable. The detailed results are at your disposal in the central computer under the registration number that was assigned to you. - -Please report to the \l;Houston Mission Control\u object\Huston; for further directives about your forthcoming mission. - -\b;From Houston Mission Control -As you know, Earth is heading towards imminent disaster, due to increasing atmospheric pollution. - -\l;Your\u object\human; mission consists of exploring neighboring galaxies with the hopes of finding a planet that will be suitable to human needs and possibly serve as a shelter for mankind. You will be on your own for the entire mission but your spaceship will be carrying a few bots along. - -Eight months ago an expedition composed entirely of robots was sent across the cosmos with the same objective. It encountered a fair share of obstacles along the way, apparently landing on planets that were unsuitable for colonization, even possibly outright hostile. Very recently all communications were terminated. - -The reasons for the mission's failure are unclear at this date, mainly because of recurrent transmission problems. It is our hope that you will be able to use some of the data it gathered to your advantage. - -\b;Immediate Objective -The Nevada desert is already bustling with activity. Bots are setting up a space station catered to your specific needs. - -In order to let you familiarize with your spacesuit and equipment, we have set up a few training drills. - -In the first drill, you need to find your survival kit that contains all the tools necessary to brave the cold of outer space. It is easy to spot since it contains both an orange and a blue tank. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; +\b;From the NASA Training Center +We are pleased to inform you that you have been selected for the space exploration mission Colobot. + +Your psychological profile has been established as more than 98.84% favorable, and your aptitude during the extensive testing period was undeniable. The detailed results are at your disposal in the central computer under the registration number that was assigned to you. + +Please report to the \l;Houston Mission Control\u object\Huston; for further directives about your forthcoming mission. + +\b;From Houston Mission Control +As you know, Earth is heading towards imminent disaster, due to increasing atmospheric pollution. + +\l;Your\u object\human; mission consists of exploring neighboring galaxies with the hopes of finding a planet that will be suitable to human needs and possibly serve as a shelter for mankind. You will be on your own for the entire mission but your spaceship will be carrying a few bots along. + +Eight months ago an expedition composed entirely of robots was sent across the cosmos with the same objective. It encountered a fair share of obstacles along the way, apparently landing on planets that were unsuitable for colonization, even possibly outright hostile. Very recently all communications were terminated. + +The reasons for the mission's failure are unclear at this date, mainly because of recurrent transmission problems. It is our hope that you will be able to use some of the data it gathered to your advantage. + +\b;Immediate Objective +The Nevada desert is already bustling with activity. Bots are setting up a space station catered to your specific needs. + +In order to let you familiarize with your spacesuit and equipment, we have set up a few training drills. + +In the first drill, you need to find your survival kit that contains all the tools necessary to brave the cold of outer space. It is easy to spot since it contains both an orange and a blue tank. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; diff --git a/help/mhterre2.txt b/help/mhterre2.txt index 8a37f2b4..14de04fe 100644 --- a/help/mhterre2.txt +++ b/help/mhterre2.txt @@ -1,14 +1,14 @@ -\b;From Mission Control -This is your second drill. \l;You\u object\human; should now familiarize yourself with the handling of basic equipment. This could turn out to be your best ally during the course of this expedition. - -The construction of buildings and the manufacturing of bots all require the use of \l;titanium\u object\titan;. Titanium is a mineral found in most solar systems in the universe. - -\b;Procedure -1) Position yourself close to the first \l;titanium cube\u object\titan;. -2) Build a \l;research center\u object\research; \button 163;. Note that only \l;you\u object\human; can accomplish the task of building; no bot can be substituted. -3) With a second \l;titanium cube\u object\titan;, build a \l;bot factory\u object\factory; \button 160;. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; +\b;From Mission Control +This is your second drill. \l;You\u object\human; should now familiarize yourself with the handling of basic equipment. This could turn out to be your best ally during the course of this expedition. + +The construction of buildings and the manufacturing of bots all require the use of \l;titanium\u object\titan;. Titanium is a mineral found in most solar systems in the universe. + +\b;Procedure +1) Position yourself close to the first \l;titanium cube\u object\titan;. +2) Build a \l;research center\u object\research; \button 163;. Note that only \l;you\u object\human; can accomplish the task of building; no bot can be substituted. +3) With a second \l;titanium cube\u object\titan;, build a \l;bot factory\u object\factory; \button 160;. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; diff --git a/help/mhterre3.txt b/help/mhterre3.txt index a47feb02..ca679582 100644 --- a/help/mhterre3.txt +++ b/help/mhterre3.txt @@ -1,24 +1,24 @@ -\b;From Mission Control -Your \l;spaceship\u object\base; is now standing on the launching pad, ready for takeoff. - -The last drill left for \l;you\u object\human; to perform before embarking on your journey is to equip your spaceship with its \l;black box\u object\bbox;. The only way to reach the \l;black box\u object\bbox; is by a steep path that can only be climbed by a \l;tracked grabber\u object\botgc; which you need to build. - -Unfortunately your \l;bot factory\u object\factory; hasn't yet got the capacity to assemble this type of bot. You need to request your \l;research center\u object\research; to come up with a blueprint for this particular propeller. - -\b;Procedure -1) Power the research center with one of the green \l;power cells\u object\power;. -2) Click on the button \button 64;. -3) Drop a \l;titanium cube\u object\titan; in the center of the \l;bot factory\u object\factory; and build a \l;tracked grabber\u object\botgc;. -4) Power and radio-control the \l;tracked grabber\u object\botgc; to the top of the southwest-oriented mountain. -5) Bring the black box back aboard your spaceship. -6) Don't forget to take the \l;wheeled grabber\u object\botgr; along. These bots may prove very useful in the future. -7) Climb aboard the \l;spaceship\u object\base;. -11) Select the \l;spaceship\u object\base; and take off \button 28;. - - -Please note: To work more efficiently, you can use the \l;wheeled grabber\u object\botgr;. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; +\b;From Mission Control +Your \l;spaceship\u object\base; is now standing on the launching pad, ready for takeoff. + +The last drill left for \l;you\u object\human; to perform before embarking on your journey is to equip your spaceship with its \l;black box\u object\bbox;. The only way to reach the \l;black box\u object\bbox; is by a steep path that can only be climbed by a \l;tracked grabber\u object\botgc; which you need to build. + +Unfortunately your \l;bot factory\u object\factory; hasn't yet got the capacity to assemble this type of bot. You need to request your \l;research center\u object\research; to come up with a blueprint for this particular propeller. + +\b;Procedure +1) Power the research center with one of the green \l;power cells\u object\power;. +2) Click on the button \button 64;. +3) Drop a \l;titanium cube\u object\titan; in the center of the \l;bot factory\u object\factory; and build a \l;tracked grabber\u object\botgc;. +4) Power and radio-control the \l;tracked grabber\u object\botgc; to the top of the southwest-oriented mountain. +5) Bring the black box back aboard your spaceship. +6) Don't forget to take the \l;wheeled grabber\u object\botgr; along. These bots may prove very useful in the future. +7) Climb aboard the \l;spaceship\u object\base;. +11) Select the \l;spaceship\u object\base; and take off \button 28;. + + +Please note: To work more efficiently, you can use the \l;wheeled grabber\u object\botgr;. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; diff --git a/help/mhtropi1.txt b/help/mhtropi1.txt index 6a618684..8b4e5110 100644 --- a/help/mhtropi1.txt +++ b/help/mhtropi1.txt @@ -1,10 +1,10 @@ -\b;From Mission Control -The observation satellite has detected a new kind of explosive apparently designed by the previous expedition. You must locate it and bring it back to your \l;spaceship\u object\base;. - -\b;Procedure -The location of the explosive is marked by a red cross on your mini map. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; +\b;From Mission Control +The observation satellite has detected a new kind of explosive apparently designed by the previous expedition. You must locate it and bring it back to your \l;spaceship\u object\base;. + +\b;Procedure +The location of the explosive is marked by a red cross on your mini map. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; diff --git a/help/mhtropi2.txt b/help/mhtropi2.txt index f0718102..a6f8603a 100644 --- a/help/mhtropi2.txt +++ b/help/mhtropi2.txt @@ -1,18 +1,18 @@ -\b;From Mission Control -It is our hope that this message will reach you. - -A transmission from the observation satellite a few hours ago informed us that you seemed to be wandering in a frighteningly uncoordinated manner. Your SatCom has ceased broadcasting. Your reactor seems to have suffered some sort of damage and your helmet was spotted at the bottom of a lake. If this is indeed the case, do not try to retrieve it, do not go into the water! Water on Tropica is highly toxic. You would not survive it. - -Get back to your ship as quickly as possible and try to transmit information about the possible causes of this disaster. The satellite's information remains undecipherable. We have been speculating about an X-factor ever since the first expedition got lost. It appears you have just encountered it. - -There is nothing we can really do to guide you but don't forget that you're following in the footsteps of a previous expedition. If what happened to you is what happened to them, chances are they may have left some clues along the way back to their own spaceship which landed in roughly the same area as yours. Use those clues. - -You may also want to consider planting flags. They indicate the direction of the wind so you can use them to orient yourself. - -This is all we can say for now... -Good Luck... - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; +\b;From Mission Control +It is our hope that this message will reach you. + +A transmission from the observation satellite a few hours ago informed us that you seemed to be wandering in a frighteningly uncoordinated manner. Your SatCom has ceased broadcasting. Your reactor seems to have suffered some sort of damage and your helmet was spotted at the bottom of a lake. If this is indeed the case, do not try to retrieve it, do not go into the water! Water on Tropica is highly toxic. You would not survive it. + +Get back to your ship as quickly as possible and try to transmit information about the possible causes of this disaster. The satellite's information remains undecipherable. We have been speculating about an X-factor ever since the first expedition got lost. It appears you have just encountered it. + +There is nothing we can really do to guide you but don't forget that you're following in the footsteps of a previous expedition. If what happened to you is what happened to them, chances are they may have left some clues along the way back to their own spaceship which landed in roughly the same area as yours. Use those clues. + +You may also want to consider planting flags. They indicate the direction of the wind so you can use them to orient yourself. + +This is all we can say for now... +Good Luck... + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; diff --git a/help/mhtropi3.txt b/help/mhtropi3.txt index ef13f79e..02ae2348 100644 --- a/help/mhtropi3.txt +++ b/help/mhtropi3.txt @@ -1,16 +1,16 @@ -\b;From Mission Control -Terminate all hostile life-form. -Perform the necessary \l;research program\u object\research; in order to develop an offensive weapon system. - -The satellite has detected an energy source, on a spot marked by the previous expedition with a blue flag (blue cross on the mini-map). - -Do not forget to take a look at the satellite report \button 186; before you venture any further in a mission; we suspect that you have not always done this. - -We have improved the recharge program. Please refer to the page \button 53;. - -A note of warning: bots cannot be submerged. If in doubt, test the water yourself if you plan to radio-control a non-winged bot across - water shouldn't be deeper than knee-level. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +Terminate all hostile life-form. +Perform the necessary \l;research program\u object\research; in order to develop an offensive weapon system. + +The satellite has detected an energy source, on a spot marked by the previous expedition with a blue flag (blue cross on the mini-map). + +Do not forget to take a look at the satellite report \button 186; before you venture any further in a mission; we suspect that you have not always done this. + +We have improved the recharge program. Please refer to the page \button 53;. + +A note of warning: bots cannot be submerged. If in doubt, test the water yourself if you plan to radio-control a non-winged bot across - water shouldn't be deeper than knee-level. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhtropi4.txt b/help/mhtropi4.txt index 947d4d2f..657e0da1 100644 --- a/help/mhtropi4.txt +++ b/help/mhtropi4.txt @@ -1,13 +1,13 @@ -\b;From Mission Control -This is another training course set up by your predecessors and intended this time to test and train the firing capacity of \l;winged bots\u object\botfj;. Use it to familiarize yourself with the two simultaneous actions of shooting while flying. - -Fly quickly through all targets and shoot all 10 explosive devices scattered along the way. Try to complete the drill without touching down. Watch your reactor though: if it overheats, just settle the bot and let it cool off. - -Use one hand on the keyboard to pilot the bot, and the other hand on the mouse to aim and to shoot (left button). - -It may be useful to come back to these drills once in a while if you wish to improve your reflexes further. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +This is another training course set up by your predecessors and intended this time to test and train the firing capacity of \l;winged bots\u object\botfj;. Use it to familiarize yourself with the two simultaneous actions of shooting while flying. + +Fly quickly through all targets and shoot all 10 explosive devices scattered along the way. Try to complete the drill without touching down. Watch your reactor though: if it overheats, just settle the bot and let it cool off. + +Use one hand on the keyboard to pilot the bot, and the other hand on the mouse to aim and to shoot (left button). + +It may be useful to come back to these drills once in a while if you wish to improve your reflexes further. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhtropi5.txt b/help/mhtropi5.txt index 568b1891..d8f30ee6 100644 --- a/help/mhtropi5.txt +++ b/help/mhtropi5.txt @@ -1,9 +1,9 @@ -\b;From Mission Control -Locate and retrieve another \l;black box\u object\bbox; from the previous expedition. - -The observation satellite seems to have spotted it underwater. Water is harmless to you as long as you wear your helmet but keep in mind that you can't carry objects underwater. A \l;subber\u object\botsub; may come in handy. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +Locate and retrieve another \l;black box\u object\bbox; from the previous expedition. + +The observation satellite seems to have spotted it underwater. Water is harmless to you as long as you wear your helmet but keep in mind that you can't carry objects underwater. A \l;subber\u object\botsub; may come in handy. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhvolca1.txt b/help/mhvolca1.txt index 1ead30b5..0344a8ab 100644 --- a/help/mhvolca1.txt +++ b/help/mhvolca1.txt @@ -1,13 +1,13 @@ -\b;From Mission Control -You need to retrieve an \l;explosive device\u object\tnt; that has been spotted in a deep valley next to a lake of boiling lava. - -Because of the high temperatures, reactors no longer function, i.e. flying is impossible. It is a long way there and you should equip your bots with \l;nuclear power cells\u object\atomic;. Nuclear power cells are manufactured from \l;uranium ore\u object\uranore;. - -A more efficient program for the gathering of raw materials is attached to this message. - -A note of warning: the explosive device is extremely volatile. Use extreme caution. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +You need to retrieve an \l;explosive device\u object\tnt; that has been spotted in a deep valley next to a lake of boiling lava. + +Because of the high temperatures, reactors no longer function, i.e. flying is impossible. It is a long way there and you should equip your bots with \l;nuclear power cells\u object\atomic;. Nuclear power cells are manufactured from \l;uranium ore\u object\uranore;. + +A more efficient program for the gathering of raw materials is attached to this message. + +A note of warning: the explosive device is extremely volatile. Use extreme caution. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhvolca2.txt b/help/mhvolca2.txt index fd2091b7..41dccc38 100644 --- a/help/mhvolca2.txt +++ b/help/mhvolca2.txt @@ -1,17 +1,17 @@ -\b;From Mission Control -The previous expedition provided us with a piece of information about some \l;organic matter\u object\bullet;, which seems to be produced by the \l;ants\u object\ant;, and which opened startling new possibilities. It apparently allows the creation of a new type of mutant bot with enhanced performance through the use of insect parts. - -Your mission is to experiment with the first practical application of this "green gold". Build a \l;legged grabber bot\u object\botgs;, load it on the spaceship and take off. - -\b;Procedure -Take a sample of organic matter from a nest of giant ants. The analysis of it will be performed by an \l;autolab\u object\labo;, which will also perform the necessary research to allow a practical application. - -In order to improve your defense capacity, we have transmitted a program to your \l;grabber bots\u object\botgr; that takes care of recharging the power cell of a \l;defense tower\u object\tower; (see \button 53; ). - -\b;Note -The temperature has dropped significantly, it should therefore be possible to fly. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +The previous expedition provided us with a piece of information about some \l;organic matter\u object\bullet;, which seems to be produced by the \l;ants\u object\ant;, and which opened startling new possibilities. It apparently allows the creation of a new type of mutant bot with enhanced performance through the use of insect parts. + +Your mission is to experiment with the first practical application of this "green gold". Build a \l;legged grabber bot\u object\botgs;, load it on the spaceship and take off. + +\b;Procedure +Take a sample of organic matter from a nest of giant ants. The analysis of it will be performed by an \l;autolab\u object\labo;, which will also perform the necessary research to allow a practical application. + +In order to improve your defense capacity, we have transmitted a program to your \l;grabber bots\u object\botgr; that takes care of recharging the power cell of a \l;defense tower\u object\tower; (see \button 53; ). + +\b;Note +The temperature has dropped significantly, it should therefore be possible to fly. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhvolca3.txt b/help/mhvolca3.txt index a615f018..ba33482c 100644 --- a/help/mhvolca3.txt +++ b/help/mhvolca3.txt @@ -1,7 +1,7 @@ -\b;From Mission Control -This planet is obviously unsuited to a long-lasting colonization. Retrieve the \l;black box\u object\bbox; from the previous expedition then take off. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +This planet is obviously unsuited to a long-lasting colonization. Retrieve the \l;black box\u object\bbox; from the previous expedition then take off. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhvolca4.txt b/help/mhvolca4.txt index 9c6341c2..2a3876a0 100644 --- a/help/mhvolca4.txt +++ b/help/mhvolca4.txt @@ -1,9 +1,9 @@ -\b;An urgent notification from Mission Control -As you were about to take off, we received from the satellite the following piece of information: a bot of a type yet unknown has been spotted on Volcano. Try to bring it back onto your spaceship for further study. - -Our engineers on Earth have very recently come up with a formula that should allow reactors to function properly, at least for a short while, despite the high temperatures. The data have been transmitted to you. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;An urgent notification from Mission Control +As you were about to take off, we received from the satellite the following piece of information: a bot of a type yet unknown has been spotted on Volcano. Try to bring it back onto your spaceship for further study. + +Our engineers on Earth have very recently come up with a formula that should allow reactors to function properly, at least for a short while, despite the high temperatures. The data have been transmitted to you. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhvolca5.txt b/help/mhvolca5.txt index 3f39260c..a83bb143 100644 --- a/help/mhvolca5.txt +++ b/help/mhvolca5.txt @@ -1,11 +1,11 @@ -\b;From Mission Control -Congratulations on a fine job as usual. - -This new weapon appears to be yet another practical application of what we've come to refer to as "green gold", the \l;organic matter\u object\bullet; produced by the insects. We've named this bot the \l;orga shooter\u object\botoj; or bot equipped with an orgaball cannon. - -It will most certainly come in handy as you make your way back to your \l;spaceship\u object\base;. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +Congratulations on a fine job as usual. + +This new weapon appears to be yet another practical application of what we've come to refer to as "green gold", the \l;organic matter\u object\bullet; produced by the insects. We've named this bot the \l;orga shooter\u object\botoj; or bot equipped with an orgaball cannon. + +It will most certainly come in handy as you make your way back to your \l;spaceship\u object\base;. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/mhvolca6.txt b/help/mhvolca6.txt index edd74ab5..35225cc4 100644 --- a/help/mhvolca6.txt +++ b/help/mhvolca6.txt @@ -1,7 +1,7 @@ -\b;From Mission Control -You need to repel a last minute ant attack before taking off. - -\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. - -\t;See also -\l;Controls\u command; and \l;CBOT Language\u cbot; +\b;From Mission Control +You need to repel a last minute ant attack before taking off. + +\key;\key help;\norm; allows you to review these instructions at all times on your personal SatCom \button 63;. + +\t;See also +\l;Controls\u command; and \l;CBOT Language\u cbot; diff --git a/help/micent1.txt b/help/micent1.txt index 8a7d4d0b..57f72f1d 100644 --- a/help/micent1.txt +++ b/help/micent1.txt @@ -1,20 +1,20 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Centaury. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 23.4C -\tab;Atmosphere: oxygen, nitrogen, ammonia -\tab;Wind: 1.2 mps -\tab;Titanium ore: some -\tab;Uranium ore: some - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: giant ants -\tab; - Danger: not immediate -\tab;Detected: reusable derelicts -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Centaury. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 23.4C +\tab;Atmosphere: oxygen, nitrogen, ammonia +\tab;Wind: 1.2 mps +\tab;Titanium ore: some +\tab;Uranium ore: some + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: giant ants +\tab; - Danger: not immediate +\tab;Detected: reusable derelicts +\n; diff --git a/help/micent2.txt b/help/micent2.txt index 3a3b0918..46c3e658 100644 --- a/help/micent2.txt +++ b/help/micent2.txt @@ -1,15 +1,15 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Centaury. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 25.4C -\tab;Atmosphere: oxygen, nitrogen, ammonia -\tab;Wind: 1.2 mps -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: none -\tab;Uranium ore: none -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Centaury. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 25.4C +\tab;Atmosphere: oxygen, nitrogen, ammonia +\tab;Wind: 1.2 mps +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: none +\tab;Uranium ore: none +\n; diff --git a/help/micent3.txt b/help/micent3.txt index cd4ae270..cff00288 100644 --- a/help/micent3.txt +++ b/help/micent3.txt @@ -1,22 +1,22 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Centaury. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 25.4C -\tab;Atmosphere: oxygen, nitrogen, ammonia -\tab;Wind: 0.7 mps -\tab;Titanium ore: some -\tab;Uranium ore: some - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: giant ants -\tab; - Danger: not immediate -\tab;Detected: spiders -\tab; - Danger: not immediate -\tab;Detected: reusable derelicts -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Centaury. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 25.4C +\tab;Atmosphere: oxygen, nitrogen, ammonia +\tab;Wind: 0.7 mps +\tab;Titanium ore: some +\tab;Uranium ore: some + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: giant ants +\tab; - Danger: not immediate +\tab;Detected: spiders +\tab; - Danger: not immediate +\tab;Detected: reusable derelicts +\n; diff --git a/help/micent4.txt b/help/micent4.txt index 71ab47f5..d76f7316 100644 --- a/help/micent4.txt +++ b/help/micent4.txt @@ -1,20 +1,20 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Centaury. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 21.3C -\tab;Atmosphere: oxygen, nitrogen, ammonia -\tab;Wind: 1.9 mps -\tab;Titanium ore: some -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: giant ants -\tab; - Danger: not immediate -\tab;Detected: derelicts of no particular use -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Centaury. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 21.3C +\tab;Atmosphere: oxygen, nitrogen, ammonia +\tab;Wind: 1.9 mps +\tab;Titanium ore: some +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: giant ants +\tab; - Danger: not immediate +\tab;Detected: derelicts of no particular use +\n; diff --git a/help/micent5.txt b/help/micent5.txt index 530a3ef9..c979dbb9 100644 --- a/help/micent5.txt +++ b/help/micent5.txt @@ -1,19 +1,19 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Centaury. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 21.3C -\tab;Atmosphere: oxygen, nitrogen, ammonia -\tab;Wind: 1.9 mps -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: giant ants -\tab; - Danger: immediate -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Centaury. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 21.3C +\tab;Atmosphere: oxygen, nitrogen, ammonia +\tab;Wind: 1.9 mps +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: giant ants +\tab; - Danger: immediate +\n; diff --git a/help/micrys1.txt b/help/micrys1.txt index dc6137e2..9458bf1d 100644 --- a/help/micrys1.txt +++ b/help/micrys1.txt @@ -1,19 +1,19 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Crystalium. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 5.4C -\tab;Atmosphere: nitrogen -\tab;Wind: 0.0 mps -\tab;Titanium ore: some -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: data not available -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: unidentified organisms -\tab; - Danger: ? -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Crystalium. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 5.4C +\tab;Atmosphere: nitrogen +\tab;Wind: 0.0 mps +\tab;Titanium ore: some +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: data not available +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: unidentified organisms +\tab; - Danger: ? +\n; diff --git a/help/micrys2.txt b/help/micrys2.txt index 07ac951a..2a4c1d8a 100644 --- a/help/micrys2.txt +++ b/help/micrys2.txt @@ -1,19 +1,19 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Crystalium. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 3.2C -\tab;Atmosphere: nitrogen -\tab;Wind: 0.0 mps -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: isolated (close to the spaceship) -\tab;Titanium ore: scattered -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: worms -\tab; - Danger: no -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Crystalium. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 3.2C +\tab;Atmosphere: nitrogen +\tab;Wind: 0.0 mps +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: isolated (close to the spaceship) +\tab;Titanium ore: scattered +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: worms +\tab; - Danger: no +\n; diff --git a/help/micrys3.txt b/help/micrys3.txt index e2e7fd74..6e76e8a8 100644 --- a/help/micrys3.txt +++ b/help/micrys3.txt @@ -1,21 +1,21 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Crystalium. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 4.3C -\tab;Atmosphere: nitrogen -\tab;Wind: 0.0 mps -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: giant ants -\tab; - Danger: not immediate -\tab;Detected: unknown organisms -\tab; - Danger: ? -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Crystalium. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 4.3C +\tab;Atmosphere: nitrogen +\tab;Wind: 0.0 mps +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: giant ants +\tab; - Danger: not immediate +\tab;Detected: unknown organisms +\tab; - Danger: ? +\n; diff --git a/help/micrys4.txt b/help/micrys4.txt index 3baf096f..2873cb70 100644 --- a/help/micrys4.txt +++ b/help/micrys4.txt @@ -1,19 +1,19 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Crystalium. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 1.2C -\tab;Atmosphere: nitrogen -\tab;Wind: 0.0 mps -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: electromagnetic smog -\tab;Detected: reusable derelicts -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Crystalium. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 1.2C +\tab;Atmosphere: nitrogen +\tab;Wind: 0.0 mps +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: electromagnetic smog +\tab;Detected: reusable derelicts +\n; diff --git a/help/milune1.txt b/help/milune1.txt index 320391c1..775c0506 100644 --- a/help/milune1.txt +++ b/help/milune1.txt @@ -1,18 +1,18 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of the Moon. -\c; -\s;-> SURFACE\c; -\tab;Temperature: -53.1C -\tab;Atmosphere: none -\tab;Wind: 0.0 mps -\tab;Titanium ore: some -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Terrain in places too uneven for wheeled bots. -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of the Moon. +\c; +\s;-> SURFACE\c; +\tab;Temperature: -53.1C +\tab;Atmosphere: none +\tab;Wind: 0.0 mps +\tab;Titanium ore: some +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Terrain in places too uneven for wheeled bots. +\n; diff --git a/help/milune2.txt b/help/milune2.txt index 224cb3a7..dd7ea770 100644 --- a/help/milune2.txt +++ b/help/milune2.txt @@ -1,15 +1,15 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of the Moon. -\c; -\s;-> SURFACE\c; -\tab;Temperature: -51.0C -\tab;Atmosphere: none -\tab;Wind: 0.0 mps -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: none -\tab;Uranium ore: none -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of the Moon. +\c; +\s;-> SURFACE\c; +\tab;Temperature: -51.0C +\tab;Atmosphere: none +\tab;Wind: 0.0 mps +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: none +\tab;Uranium ore: none +\n; diff --git a/help/milune3.txt b/help/milune3.txt index 18ff4a6a..d50b3109 100644 --- a/help/milune3.txt +++ b/help/milune3.txt @@ -1,15 +1,15 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of the Moon. -\c; -\s;-> SURFACE\c; -\tab;Temperature: -58.9C -\tab;Atmosphere: none -\tab;Wind: 0.0 mps -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: none -\tab;Uranium ore: none -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of the Moon. +\c; +\s;-> SURFACE\c; +\tab;Temperature: -58.9C +\tab;Atmosphere: none +\tab;Wind: 0.0 mps +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: none +\tab;Uranium ore: none +\n; diff --git a/help/milune4.txt b/help/milune4.txt index 67965bd1..a57ce4b3 100644 --- a/help/milune4.txt +++ b/help/milune4.txt @@ -1,15 +1,15 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of the Moon. -\c; -\s;-> SURFACE\c; -\tab;Temperature: -38.2C -\tab;Atmosphere: none -\tab;Wind: 0.0 mps -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: everywhere -\tab;Titanium ore: none -\tab;Uranium ore: none -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of the Moon. +\c; +\s;-> SURFACE\c; +\tab;Temperature: -38.2C +\tab;Atmosphere: none +\tab;Wind: 0.0 mps +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: everywhere +\tab;Titanium ore: none +\tab;Uranium ore: none +\n; diff --git a/help/miorph1.txt b/help/miorph1.txt index fe516e4c..6414f2d0 100644 --- a/help/miorph1.txt +++ b/help/miorph1.txt @@ -1,20 +1,20 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Orpheon. -\c; -\s;-> SURFACE\c; -\tab;Temperature: -72.8C -\tab;Atmosphere: none -\tab;Wind: 0.0 mps -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: some (blue flag) -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: giant ants -\tab; - Danger: not immediate -\tab;Detected: fierce electromagnetic storms -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Orpheon. +\c; +\s;-> SURFACE\c; +\tab;Temperature: -72.8C +\tab;Atmosphere: none +\tab;Wind: 0.0 mps +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: some (blue flag) +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: giant ants +\tab; - Danger: not immediate +\tab;Detected: fierce electromagnetic storms +\n; diff --git a/help/miorph2.txt b/help/miorph2.txt index e6c6ed95..5db18a70 100644 --- a/help/miorph2.txt +++ b/help/miorph2.txt @@ -1,20 +1,20 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Orpheon. -\c; -\s;-> SURFACE\c; -\tab;Temperature: -64.7C -\tab;Atmosphere: none -\tab;Wind: 0.0 mps -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: giant ants -\tab; - Danger: not immediate -\tab;Detected: fierce electromagnetic storms -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Orpheon. +\c; +\s;-> SURFACE\c; +\tab;Temperature: -64.7C +\tab;Atmosphere: none +\tab;Wind: 0.0 mps +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: giant ants +\tab; - Danger: not immediate +\tab;Detected: fierce electromagnetic storms +\n; diff --git a/help/misaari1.txt b/help/misaari1.txt index bd657999..957227a7 100644 --- a/help/misaari1.txt +++ b/help/misaari1.txt @@ -1,20 +1,20 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Saari. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 41.3C -\tab;Atmosphere: CO2, oxygen, nitrogen -\tab;Wind: 2.3 mps -\tab;Titanium ore: none -\tab;Uranium ore: some (mountain summit) - -\s;-> SUBSOIL\c; -\tab;Energy source: everywhere -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: reusable derelicts -\tab;Detected: giant ants -\tab; - Danger: not immediate -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Saari. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 41.3C +\tab;Atmosphere: CO2, oxygen, nitrogen +\tab;Wind: 2.3 mps +\tab;Titanium ore: none +\tab;Uranium ore: some (mountain summit) + +\s;-> SUBSOIL\c; +\tab;Energy source: everywhere +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: reusable derelicts +\tab;Detected: giant ants +\tab; - Danger: not immediate +\n; diff --git a/help/misaari2.txt b/help/misaari2.txt index a849d412..6eddf002 100644 --- a/help/misaari2.txt +++ b/help/misaari2.txt @@ -1,19 +1,19 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Saari. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 38.4C -\tab;Atmosphere: CO2, oxygen, nitrogen -\tab;Wind: 1.4 mps -\tab;Titanium ore: some -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: everywhere -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: giant ants approaching -\tab; - Danger: yes, immediate -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Saari. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 38.4C +\tab;Atmosphere: CO2, oxygen, nitrogen +\tab;Wind: 1.4 mps +\tab;Titanium ore: some +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: everywhere +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: giant ants approaching +\tab; - Danger: yes, immediate +\n; diff --git a/help/misaari3.txt b/help/misaari3.txt index cfe8cf15..8822ca92 100644 --- a/help/misaari3.txt +++ b/help/misaari3.txt @@ -1,20 +1,20 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Saari. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 44.3C -\tab;Atmosphere: CO2, oxygen, nitrogen -\tab;Wind: 2.3 mps -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: reusable derelicts -\tab;Detected: giant ants -\tab; - Danger: ? -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Saari. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 44.3C +\tab;Atmosphere: CO2, oxygen, nitrogen +\tab;Wind: 2.3 mps +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: reusable derelicts +\tab;Detected: giant ants +\tab; - Danger: ? +\n; diff --git a/help/miterra1.txt b/help/miterra1.txt index be4c90c4..683cffe2 100644 --- a/help/miterra1.txt +++ b/help/miterra1.txt @@ -1,22 +1,22 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Terranova. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 24.8C -\tab;Atmosphere: oxygen -\tab;Wind: 0.7 mps -\tab;Titanium ore: underwater -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: at some places -\tab;Titanium ore: none -\tab;Uranium ore: some - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: giant ants -\tab; - Danger: immediate -\tab;Detected: giant wasps -\tab; - Danger: not immediate -\tab;Detected: reusable derelicts -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Terranova. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 24.8C +\tab;Atmosphere: oxygen +\tab;Wind: 0.7 mps +\tab;Titanium ore: underwater +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: at some places +\tab;Titanium ore: none +\tab;Uranium ore: some + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: giant ants +\tab; - Danger: immediate +\tab;Detected: giant wasps +\tab; - Danger: not immediate +\tab;Detected: reusable derelicts +\n; diff --git a/help/miterra2.txt b/help/miterra2.txt index b6805c70..ae7e7705 100644 --- a/help/miterra2.txt +++ b/help/miterra2.txt @@ -1,19 +1,19 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Terranova. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 24.3C -\tab;Atmosphere: oxygen -\tab;Wind: 0.8 mps -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: giant ants -\tab; - Danger: immediate -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Terranova. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 24.3C +\tab;Atmosphere: oxygen +\tab;Wind: 0.8 mps +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: giant ants +\tab; - Danger: immediate +\n; diff --git a/help/miterra3.txt b/help/miterra3.txt index 450a924f..73697df5 100644 --- a/help/miterra3.txt +++ b/help/miterra3.txt @@ -1,21 +1,21 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Terranova. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 26.1C -\tab;Atmosphere: oxygen -\tab;Wind: 0.4 mps -\tab;Titanium ore: some -\tab;Uranium ore: some - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: giant ants -\tab; - Danger: immediate -\tab;Detected: giant wasps -\tab; - Danger: immediate -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Terranova. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 26.1C +\tab;Atmosphere: oxygen +\tab;Wind: 0.4 mps +\tab;Titanium ore: some +\tab;Uranium ore: some + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: giant ants +\tab; - Danger: immediate +\tab;Detected: giant wasps +\tab; - Danger: immediate +\n; diff --git a/help/miterra4.txt b/help/miterra4.txt index 35676a4a..779d59c0 100644 --- a/help/miterra4.txt +++ b/help/miterra4.txt @@ -1,21 +1,21 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Terranova. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 23.7C -\tab;Atmosphere: oxygen -\tab;Wind: 0.5 mps -\tab;Titanium ore: some -\tab;Uranium ore: some - -\s;-> SUBSOIL\c; -\tab;Energy source: in some places (spaceship) -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: giant ants -\tab; - Danger: immediate -\tab;Detected: giant egglayer -\tab; - Danger: ? -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Terranova. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 23.7C +\tab;Atmosphere: oxygen +\tab;Wind: 0.5 mps +\tab;Titanium ore: some +\tab;Uranium ore: some + +\s;-> SUBSOIL\c; +\tab;Energy source: in some places (spaceship) +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: giant ants +\tab; - Danger: immediate +\tab;Detected: giant egglayer +\tab; - Danger: ? +\n; diff --git a/help/mitropi1.txt b/help/mitropi1.txt index 5e61ed08..abb2258b 100644 --- a/help/mitropi1.txt +++ b/help/mitropi1.txt @@ -1,21 +1,21 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Tropica. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 32.4C -\tab;Atmosphere: helium, oxygen -\tab;Wind: 1.2 mps -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: explosive -\tab; - Type: unknown -\tab;Detected: unidentified organisms -\tab; - Danger: ? -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Tropica. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 32.4C +\tab;Atmosphere: helium, oxygen +\tab;Wind: 1.2 mps +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: explosive +\tab; - Type: unknown +\tab;Detected: unidentified organisms +\tab; - Danger: ? +\n; diff --git a/help/mitropi3.txt b/help/mitropi3.txt index 6e842730..eed21844 100644 --- a/help/mitropi3.txt +++ b/help/mitropi3.txt @@ -1,20 +1,20 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Tropica. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 29.6C -\tab;Atmosphere: helium, oxygen -\tab;Wind: 1.5 mps -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: isolated (blue flag) -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: giant ants -\tab; - Danger: not immediate -\tab;Detected: reusable derelicts -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Tropica. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 29.6C +\tab;Atmosphere: helium, oxygen +\tab;Wind: 1.5 mps +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: isolated (blue flag) +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: giant ants +\tab; - Danger: not immediate +\tab;Detected: reusable derelicts +\n; diff --git a/help/mitropi4.txt b/help/mitropi4.txt index 7b5a7c8d..8717928b 100644 --- a/help/mitropi4.txt +++ b/help/mitropi4.txt @@ -1,15 +1,15 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Tropica. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 32.2C -\tab;Atmosphere: helium, oxygen -\tab;Wind: 0.7 mps -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: none -\tab;Uranium ore: none -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Tropica. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 32.2C +\tab;Atmosphere: helium, oxygen +\tab;Wind: 0.7 mps +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: none +\tab;Uranium ore: none +\n; diff --git a/help/mitropi5.txt b/help/mitropi5.txt index afd143db..0f9cce87 100644 --- a/help/mitropi5.txt +++ b/help/mitropi5.txt @@ -1,21 +1,21 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Tropica. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 29.4C -\tab;Atmosphere: helium, oxygen -\tab;Wind: 0.3 mps -\tab;Titanium ore: some -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: titanium ore -\tab; - Requires: converter -\tab;Detected: scattered derelicts -\tab;Detected: black box (underwater) -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Tropica. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 29.4C +\tab;Atmosphere: helium, oxygen +\tab;Wind: 0.3 mps +\tab;Titanium ore: some +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: titanium ore +\tab; - Requires: converter +\tab;Detected: scattered derelicts +\tab;Detected: black box (underwater) +\n; diff --git a/help/mivolca1.txt b/help/mivolca1.txt index 47538393..8c071e9b 100644 --- a/help/mivolca1.txt +++ b/help/mivolca1.txt @@ -1,20 +1,20 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Volcano. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 84.6C -\tab;Atmosphere: CO2, SO2, HCN, HS, CH4, NH3 -\tab;Wind: 2.2 mps -\tab;Titanium ore: everywhere -\tab;Uranium ore: some - -\s;-> SUBSOIL\c; -\tab;Energy source: everywhere -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: reusable derelicts -\tab;Detected: unknown organisms -\tab; - Danger: ? -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Volcano. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 84.6C +\tab;Atmosphere: CO2, SO2, HCN, HS, CH4, NH3 +\tab;Wind: 2.2 mps +\tab;Titanium ore: everywhere +\tab;Uranium ore: some + +\s;-> SUBSOIL\c; +\tab;Energy source: everywhere +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: reusable derelicts +\tab;Detected: unknown organisms +\tab; - Danger: ? +\n; diff --git a/help/mivolca2.txt b/help/mivolca2.txt index a74dc682..eae66bbb 100644 --- a/help/mivolca2.txt +++ b/help/mivolca2.txt @@ -1,21 +1,21 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Volcano. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 53.1C -\tab;Atmosphere: CO2, SO2, HCN, HS, CH4, NH3 -\tab;Wind: 0.3 mps -\tab;Titanium ore: some -\tab;Uranium ore: little - -\s;-> SUBSOIL\c; -\tab;Energy source: everywhere -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: giant ants -\tab; - Danger: yes, not immediate -\tab;Detected: unknown flying organisms -\tab; - Danger: yes, immediate -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Volcano. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 53.1C +\tab;Atmosphere: CO2, SO2, HCN, HS, CH4, NH3 +\tab;Wind: 0.3 mps +\tab;Titanium ore: some +\tab;Uranium ore: little + +\s;-> SUBSOIL\c; +\tab;Energy source: everywhere +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: giant ants +\tab; - Danger: yes, not immediate +\tab;Detected: unknown flying organisms +\tab; - Danger: yes, immediate +\n; diff --git a/help/mivolca3.txt b/help/mivolca3.txt index 7d2a3727..0d314f33 100644 --- a/help/mivolca3.txt +++ b/help/mivolca3.txt @@ -1,19 +1,19 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Volcano. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 83.5C -\tab;Atmosphere: CO2, SO2, HCN, HS, CH4, NH3 -\tab;Wind: 3.4 mps -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: everywhere -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: giant ants -\tab; - Danger: not immediate -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Volcano. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 83.5C +\tab;Atmosphere: CO2, SO2, HCN, HS, CH4, NH3 +\tab;Wind: 3.4 mps +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: everywhere +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: giant ants +\tab; - Danger: not immediate +\n; diff --git a/help/mivolca4.txt b/help/mivolca4.txt index 29d55f0b..46046659 100644 --- a/help/mivolca4.txt +++ b/help/mivolca4.txt @@ -1,21 +1,21 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Volcano. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 96.7C -\tab;Atmosphere: CO2, SO2, HCN, HS, CH4, NH3 -\tab;Wind: 2.8 mps -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: bot -\tab; - Type: unknown -\tab;Detected: giant ants -\tab; - Danger: not immediate -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Volcano. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 96.7C +\tab;Atmosphere: CO2, SO2, HCN, HS, CH4, NH3 +\tab;Wind: 2.8 mps +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: bot +\tab; - Type: unknown +\tab;Detected: giant ants +\tab; - Danger: not immediate +\n; diff --git a/help/mivolca5.txt b/help/mivolca5.txt index 48740fe9..1a8aceeb 100644 --- a/help/mivolca5.txt +++ b/help/mivolca5.txt @@ -1,21 +1,21 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Volcano. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 96.6C -\tab;Atmosphere: CO2, SO2, HCN, HS, CH4, NH3 -\tab;Wind: 2.7 mps -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: giant ants -\tab; - Danger: immediate -\tab;Detected: giant spiders -\tab; - Danger: not immediate -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Volcano. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 96.6C +\tab;Atmosphere: CO2, SO2, HCN, HS, CH4, NH3 +\tab;Wind: 2.7 mps +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: giant ants +\tab; - Danger: immediate +\tab;Detected: giant spiders +\tab; - Danger: not immediate +\n; diff --git a/help/mivolca6.txt b/help/mivolca6.txt index bb090a2b..19e3556b 100644 --- a/help/mivolca6.txt +++ b/help/mivolca6.txt @@ -1,19 +1,19 @@ -\b;Satellite Report -Currently in a geo-stationary orbit of Volcano. -\c; -\s;-> SURFACE\c; -\tab;Temperature: 96.6C -\tab;Atmosphere: CO2, SO2, HCN, HS, CH4, NH3 -\tab;Wind: 2.7 mps -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> SUBSOIL\c; -\tab;Energy source: none -\tab;Titanium ore: none -\tab;Uranium ore: none - -\s;-> ADDITIONAL INFORMATION\c; -\tab;Detected: giant ants -\tab; - Danger: immediate -\n; +\b;Satellite Report +Currently in a geo-stationary orbit of Volcano. +\c; +\s;-> SURFACE\c; +\tab;Temperature: 96.6C +\tab;Atmosphere: CO2, SO2, HCN, HS, CH4, NH3 +\tab;Wind: 2.7 mps +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> SUBSOIL\c; +\tab;Energy source: none +\tab;Titanium ore: none +\tab;Uranium ore: none + +\s;-> ADDITIONAL INFORMATION\c; +\tab;Detected: giant ants +\tab; - Danger: immediate +\n; diff --git a/help/mlcent1.txt b/help/mlcent1.txt index 46c8d9e6..01b6c330 100644 --- a/help/mlcent1.txt +++ b/help/mlcent1.txt @@ -1,15 +1,15 @@ -\b;Programs dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;ServiceTower1\u mlvolca2;\n; -o \c;\l;CollectTitanium3\u mlvolca1;\n; -o \c;\l;KillAnt1\u mlsaari2;\n; -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; - +\b;Programs dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;ServiceTower1\u mlvolca2;\n; +o \c;\l;CollectTitanium3\u mlvolca1;\n; +o \c;\l;KillAnt1\u mlsaari2;\n; +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; + diff --git a/help/mlcent2.txt b/help/mlcent2.txt index 46c8d9e6..01b6c330 100644 --- a/help/mlcent2.txt +++ b/help/mlcent2.txt @@ -1,15 +1,15 @@ -\b;Programs dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;ServiceTower1\u mlvolca2;\n; -o \c;\l;CollectTitanium3\u mlvolca1;\n; -o \c;\l;KillAnt1\u mlsaari2;\n; -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; - +\b;Programs dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;ServiceTower1\u mlvolca2;\n; +o \c;\l;CollectTitanium3\u mlvolca1;\n; +o \c;\l;KillAnt1\u mlsaari2;\n; +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; + diff --git a/help/mlcent3.txt b/help/mlcent3.txt index 46c8d9e6..01b6c330 100644 --- a/help/mlcent3.txt +++ b/help/mlcent3.txt @@ -1,15 +1,15 @@ -\b;Programs dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;ServiceTower1\u mlvolca2;\n; -o \c;\l;CollectTitanium3\u mlvolca1;\n; -o \c;\l;KillAnt1\u mlsaari2;\n; -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; - +\b;Programs dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;ServiceTower1\u mlvolca2;\n; +o \c;\l;CollectTitanium3\u mlvolca1;\n; +o \c;\l;KillAnt1\u mlsaari2;\n; +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; + diff --git a/help/mlcent4.txt b/help/mlcent4.txt index 46c8d9e6..01b6c330 100644 --- a/help/mlcent4.txt +++ b/help/mlcent4.txt @@ -1,15 +1,15 @@ -\b;Programs dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;ServiceTower1\u mlvolca2;\n; -o \c;\l;CollectTitanium3\u mlvolca1;\n; -o \c;\l;KillAnt1\u mlsaari2;\n; -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; - +\b;Programs dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;ServiceTower1\u mlvolca2;\n; +o \c;\l;CollectTitanium3\u mlvolca1;\n; +o \c;\l;KillAnt1\u mlsaari2;\n; +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; + diff --git a/help/mlcent5.txt b/help/mlcent5.txt index 46c8d9e6..01b6c330 100644 --- a/help/mlcent5.txt +++ b/help/mlcent5.txt @@ -1,15 +1,15 @@ -\b;Programs dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;ServiceTower1\u mlvolca2;\n; -o \c;\l;CollectTitanium3\u mlvolca1;\n; -o \c;\l;KillAnt1\u mlsaari2;\n; -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; - +\b;Programs dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;ServiceTower1\u mlvolca2;\n; +o \c;\l;CollectTitanium3\u mlvolca1;\n; +o \c;\l;KillAnt1\u mlsaari2;\n; +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; + diff --git a/help/mlcrys1.txt b/help/mlcrys1.txt index 598db67d..99fa7fde 100644 --- a/help/mlcrys1.txt +++ b/help/mlcrys1.txt @@ -1,29 +1,29 @@ -\b;Programs dispatched by Houston -Below is one of the programs that has been developed by our engineers. -It instructs a \l;grabber\u object\botgr; to retrieve the nearest chunk of \l;titanium ore\u object\titanore; and place it on the \l;converter\u object\convert;. - -In order to execute this program, select the program \c;CollectTitanium1\n; in the list of the programs available on the bot (on the lower left-hand corner of your screen), and click on the arrow symbol \button 21;. At any moment you can stop the program and take over at the controls with the stop button \button 8;. -\c; -\s;extern void object::CollectTitanium1() -\s;{ -\s; // 1) Variable definition. -\s; \l;object\u cbot\type; item; // info. about objects -\s; -\s; // 2) Go to the titanium ore and grab it. -\s; item = \l;radar\u cbot\radar;(\l;TitaniumOre\u cbot\category;);// look for titanium ore -\s; \l;goto\u cbot\goto;(item.position); // go to the position -\s; \l;grab\u cbot\grab;(); // grab the titanium -\s; -\s; // 3) Go to the converter and drop it. -\s; item = \l;radar\u cbot\radar;(\l;Converter\u cbot\category;); // look for converter -\s; \l;goto\u cbot\goto;(item.position); // go to the position -\s; \l;drop\u cbot\drop;(); // drop the titanium -\s; \l;move\u cbot\move;(-2.5); // step back 2.5 m -\s;} -\n; -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; +\b;Programs dispatched by Houston +Below is one of the programs that has been developed by our engineers. +It instructs a \l;grabber\u object\botgr; to retrieve the nearest chunk of \l;titanium ore\u object\titanore; and place it on the \l;converter\u object\convert;. + +In order to execute this program, select the program \c;CollectTitanium1\n; in the list of the programs available on the bot (on the lower left-hand corner of your screen), and click on the arrow symbol \button 21;. At any moment you can stop the program and take over at the controls with the stop button \button 8;. +\c; +\s;extern void object::CollectTitanium1() +\s;{ +\s; // 1) Variable definition. +\s; \l;object\u cbot\type; item; // info. about objects +\s; +\s; // 2) Go to the titanium ore and grab it. +\s; item = \l;radar\u cbot\radar;(\l;TitaniumOre\u cbot\category;);// look for titanium ore +\s; \l;goto\u cbot\goto;(item.position); // go to the position +\s; \l;grab\u cbot\grab;(); // grab the titanium +\s; +\s; // 3) Go to the converter and drop it. +\s; item = \l;radar\u cbot\radar;(\l;Converter\u cbot\category;); // look for converter +\s; \l;goto\u cbot\goto;(item.position); // go to the position +\s; \l;drop\u cbot\drop;(); // drop the titanium +\s; \l;move\u cbot\move;(-2.5); // step back 2.5 m +\s;} +\n; +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; diff --git a/help/mlcrys2.txt b/help/mlcrys2.txt index 08d5a5e7..5e1a7ec3 100644 --- a/help/mlcrys2.txt +++ b/help/mlcrys2.txt @@ -1,38 +1,38 @@ -\b;Programs dispatched by Houston -Below is one of the programs that has been developed by our engineers. -An upgrade on the previous program: the \l;grabber\u object\botgr;, on its way back from the converter, makes a stop, if necessary, at the \l;power station\u object\station; to recharge its power cell. - -This program also works on \l;winged grabbers\u object\botgj;, if the \l;derrick\u object\derrick; is on another island than the \l;converter\u object\convert;. -\c; -\s;extern void object::CollectTitanium2() -\s;{ -\s; // 1) Variable definition. -\s; \l;object\u cbot\type; item; // info. about objects -\s; -\s; // 2) Go to the titanium ore and grab it. -\s; item = \l;radar\u cbot\radar;(\l;TitaniumOre\u cbot\category;);// look for titanium ore -\s; \l;goto\u cbot\goto;(item.position); // go to the position -\s; \l;grab\u cbot\grab;(); // grab the titanium -\s; -\s; // 3) Go to the converter and drop it. -\s; item = \l;radar\u cbot\radar;(\l;Converter\u cbot\category;); // look for converter -\s; \l;goto\u cbot\goto;(item.position); // go to the position -\s; \l;drop\u cbot\drop;(); // drop the titanium -\s; \l;move\u cbot\move;(-2.5); // step back 2.5 m -\s; -\s; // 4) If power cell half empty, recharges. -\s; if ( energyCell.energyLevel < 0.5 ) -\s; { // if so: -\s; item = \l;radar\u cbot\radar;(\l;PowerStation\u cbot\category;); // look for station -\s; \l;goto\u cbot\goto;(item.position); // go there -\s; \l;wait\u cbot\wait;(5); // wait -\s; } -\s;} -\n; -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; +\b;Programs dispatched by Houston +Below is one of the programs that has been developed by our engineers. +An upgrade on the previous program: the \l;grabber\u object\botgr;, on its way back from the converter, makes a stop, if necessary, at the \l;power station\u object\station; to recharge its power cell. + +This program also works on \l;winged grabbers\u object\botgj;, if the \l;derrick\u object\derrick; is on another island than the \l;converter\u object\convert;. +\c; +\s;extern void object::CollectTitanium2() +\s;{ +\s; // 1) Variable definition. +\s; \l;object\u cbot\type; item; // info. about objects +\s; +\s; // 2) Go to the titanium ore and grab it. +\s; item = \l;radar\u cbot\radar;(\l;TitaniumOre\u cbot\category;);// look for titanium ore +\s; \l;goto\u cbot\goto;(item.position); // go to the position +\s; \l;grab\u cbot\grab;(); // grab the titanium +\s; +\s; // 3) Go to the converter and drop it. +\s; item = \l;radar\u cbot\radar;(\l;Converter\u cbot\category;); // look for converter +\s; \l;goto\u cbot\goto;(item.position); // go to the position +\s; \l;drop\u cbot\drop;(); // drop the titanium +\s; \l;move\u cbot\move;(-2.5); // step back 2.5 m +\s; +\s; // 4) If power cell half empty, recharges. +\s; if ( energyCell.energyLevel < 0.5 ) +\s; { // if so: +\s; item = \l;radar\u cbot\radar;(\l;PowerStation\u cbot\category;); // look for station +\s; \l;goto\u cbot\goto;(item.position); // go there +\s; \l;wait\u cbot\wait;(5); // wait +\s; } +\s;} +\n; +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; diff --git a/help/mlcrys3.txt b/help/mlcrys3.txt index 466ec639..1357500d 100644 --- a/help/mlcrys3.txt +++ b/help/mlcrys3.txt @@ -1,11 +1,11 @@ -\b;Programs dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; +\b;Programs dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; diff --git a/help/mlcrys4.txt b/help/mlcrys4.txt index 466ec639..1357500d 100644 --- a/help/mlcrys4.txt +++ b/help/mlcrys4.txt @@ -1,11 +1,11 @@ -\b;Programs dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; +\b;Programs dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; diff --git a/help/mllune1.txt b/help/mllune1.txt index bef3bfa0..1850e907 100644 --- a/help/mllune1.txt +++ b/help/mllune1.txt @@ -1,17 +1,17 @@ -\b;Programs dispatched by Houston -Following is a program that has been developed by our engineers. It allows you to switch \l;power cells\u object\power;. A charged cell needs to be placed on the ground in front of the bot. - -In order to execute this program, select the program \c;SwitchCell1\n; in the list of the programs available on the bot (on the lower left-hand corner of your screen), and click on the arrow symbol \button 21;. -\c; -\s;extern void object::SwitchCell1() -\s;{ -\s; \l;grab\u cbot\grab;(InFront); // take the new cell in front -\s; \l;drop\u cbot\drop;(Behind); // and drop it behind -\s; -\s; \l;grab\u cbot\grab;(EnergyCell); // take the cell from the bot -\s; \l;drop\u cbot\drop;(InFront); // and drop it in front -\s; -\s; \l;grab\u cbot\grab;(Behind); // take the new cell -\s; \l;drop\u cbot\drop;(EnergyCell); // and drop it on the bot -\s;} -\n; +\b;Programs dispatched by Houston +Following is a program that has been developed by our engineers. It allows you to switch \l;power cells\u object\power;. A charged cell needs to be placed on the ground in front of the bot. + +In order to execute this program, select the program \c;SwitchCell1\n; in the list of the programs available on the bot (on the lower left-hand corner of your screen), and click on the arrow symbol \button 21;. +\c; +\s;extern void object::SwitchCell1() +\s;{ +\s; \l;grab\u cbot\grab;(InFront); // take the new cell in front +\s; \l;drop\u cbot\drop;(Behind); // and drop it behind +\s; +\s; \l;grab\u cbot\grab;(EnergyCell); // take the cell from the bot +\s; \l;drop\u cbot\drop;(InFront); // and drop it in front +\s; +\s; \l;grab\u cbot\grab;(Behind); // take the new cell +\s; \l;drop\u cbot\drop;(EnergyCell); // and drop it on the bot +\s;} +\n; diff --git a/help/mllune2.txt b/help/mllune2.txt index 50609ae1..15fe0f0f 100644 --- a/help/mllune2.txt +++ b/help/mllune2.txt @@ -1,7 +1,7 @@ -\b;Programs dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;SwitchCell1\u mllune1;\n; +\b;Programs dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;SwitchCell1\u mllune1;\n; diff --git a/help/mllune3.txt b/help/mllune3.txt index 9092b42f..5e7e6787 100644 --- a/help/mllune3.txt +++ b/help/mllune3.txt @@ -1,7 +1,7 @@ -\b;Program(s) dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;SwitchCell1\u mllune1;\n; +\b;Program(s) dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;SwitchCell1\u mllune1;\n; diff --git a/help/mllune4.txt b/help/mllune4.txt index 969d644f..fbc672cd 100644 --- a/help/mllune4.txt +++ b/help/mllune4.txt @@ -1,23 +1,23 @@ -\b;Programs dispatched by Houston -Below is a program that has been developed by our engineers. It allows you to recharge the \l;power cell\u object\power; of a bot: it goes to the closest \l;power station\u object\station;, waits 5 seconds, and comes back to the initial position. - -Remark: If you click on an element of the program underlined in blue, your SatCom will display a text that explains this element. The texts that follow a double slash \c;//\n; are not part of the program, but are comments that help you to understand the program. -\c; -\s;extern void object::Recharge1() -\s;{ -\s; \l;point\u cbot\type; start; // variable for initial pos. -\s; \l;object\u cbot\type; item; // info. about power station -\s; -\s; start = position; // store initial position -\s; -\s; item = \l;radar\u cbot\radar;(\l;PowerStation\u cbot\category;); // look for station -\s; \l;goto\u cbot\goto;(item.position); // go to the power station -\s; \l;wait\u cbot\wait;(5); // wait 5 seconds -\s; -\s; \l;goto\u cbot\goto;(start); // go back to initial pos. -\s;} -\n; -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;SwitchCell1\u mllune1;\n; +\b;Programs dispatched by Houston +Below is a program that has been developed by our engineers. It allows you to recharge the \l;power cell\u object\power; of a bot: it goes to the closest \l;power station\u object\station;, waits 5 seconds, and comes back to the initial position. + +Remark: If you click on an element of the program underlined in blue, your SatCom will display a text that explains this element. The texts that follow a double slash \c;//\n; are not part of the program, but are comments that help you to understand the program. +\c; +\s;extern void object::Recharge1() +\s;{ +\s; \l;point\u cbot\type; start; // variable for initial pos. +\s; \l;object\u cbot\type; item; // info. about power station +\s; +\s; start = position; // store initial position +\s; +\s; item = \l;radar\u cbot\radar;(\l;PowerStation\u cbot\category;); // look for station +\s; \l;goto\u cbot\goto;(item.position); // go to the power station +\s; \l;wait\u cbot\wait;(5); // wait 5 seconds +\s; +\s; \l;goto\u cbot\goto;(start); // go back to initial pos. +\s;} +\n; +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;SwitchCell1\u mllune1;\n; diff --git a/help/mlnull.txt b/help/mlnull.txt index 02d20b56..9fe96daa 100644 --- a/help/mlnull.txt +++ b/help/mlnull.txt @@ -1,3 +1,3 @@ -\b;Program(s) dispatched by Houston -No program was transmitted. -If you feel like developing one that can be of use to the completion of this mission, be our guest but you are on your own. +\b;Program(s) dispatched by Houston +No program was transmitted. +If you feel like developing one that can be of use to the completion of this mission, be our guest but you are on your own. diff --git a/help/mlorph1.txt b/help/mlorph1.txt index 46c8d9e6..01b6c330 100644 --- a/help/mlorph1.txt +++ b/help/mlorph1.txt @@ -1,15 +1,15 @@ -\b;Programs dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;ServiceTower1\u mlvolca2;\n; -o \c;\l;CollectTitanium3\u mlvolca1;\n; -o \c;\l;KillAnt1\u mlsaari2;\n; -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; - +\b;Programs dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;ServiceTower1\u mlvolca2;\n; +o \c;\l;CollectTitanium3\u mlvolca1;\n; +o \c;\l;KillAnt1\u mlsaari2;\n; +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; + diff --git a/help/mlorph2.txt b/help/mlorph2.txt index 216dcf0b..f856d805 100644 --- a/help/mlorph2.txt +++ b/help/mlorph2.txt @@ -1,14 +1,14 @@ -\b;Programs dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;ServiceTower1\u mlvolca2;\n; -o \c;\l;CollectTitanium3\u mlvolca1;\n; -o \c;\l;KillAnt1\u mlsaari2;\n; -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; +\b;Programs dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;ServiceTower1\u mlvolca2;\n; +o \c;\l;CollectTitanium3\u mlvolca1;\n; +o \c;\l;KillAnt1\u mlsaari2;\n; +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; diff --git a/help/mlsaari1.txt b/help/mlsaari1.txt index 466ec639..1357500d 100644 --- a/help/mlsaari1.txt +++ b/help/mlsaari1.txt @@ -1,11 +1,11 @@ -\b;Programs dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; +\b;Programs dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; diff --git a/help/mlsaari2.txt b/help/mlsaari2.txt index 01fd8132..805dca34 100644 --- a/help/mlsaari2.txt +++ b/help/mlsaari2.txt @@ -1,31 +1,31 @@ -\b;Programs dispatched by Houston -Execute the program \c;KillAnt1\n; immediately on your \l;wheeled shooter\u object\botfr;, it will protect your west flank. Meantime you can elaborate your defense strategy. -\c; -\s;extern void object::KillAnt1() -\s;{ -\s; \l;object\u cbot\type; item; // info. about object -\s; -\s; \l;goto\u cbot\goto;(-30, 0); // go west -\s; \l;aim\u cbot\aim;(0); // aim straight -\s; -\s; \l;while\u cbot\while; ( true ) // repeat forever: -\s; { -\s; item = \l;radar\u cbot\radar;(\l;AlienAnt\u cbot\category;, 0, 360, 0, 40); -\s; \l;if\u cbot\if; ( item != null ) // ant detected ? -\s; { -\s; \l;turn\u cbot\turn;(\l;direction\u cbot\direct;(item.position)); -\s; \l;fire\u cbot\fire;(0.5); // shoot 0.5 s -\s; } -\s; \l;wait\u cbot\wait;(1); // wait 1 second -\s; } -\s;} -\n; -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; - +\b;Programs dispatched by Houston +Execute the program \c;KillAnt1\n; immediately on your \l;wheeled shooter\u object\botfr;, it will protect your west flank. Meantime you can elaborate your defense strategy. +\c; +\s;extern void object::KillAnt1() +\s;{ +\s; \l;object\u cbot\type; item; // info. about object +\s; +\s; \l;goto\u cbot\goto;(-30, 0); // go west +\s; \l;aim\u cbot\aim;(0); // aim straight +\s; +\s; \l;while\u cbot\while; ( true ) // repeat forever: +\s; { +\s; item = \l;radar\u cbot\radar;(\l;AlienAnt\u cbot\category;, 0, 360, 0, 40); +\s; \l;if\u cbot\if; ( item != null ) // ant detected ? +\s; { +\s; \l;turn\u cbot\turn;(\l;direction\u cbot\direct;(item.position)); +\s; \l;fire\u cbot\fire;(0.5); // shoot 0.5 s +\s; } +\s; \l;wait\u cbot\wait;(1); // wait 1 second +\s; } +\s;} +\n; +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; + diff --git a/help/mlsaari3.txt b/help/mlsaari3.txt index 8f97b4b6..13f3cec8 100644 --- a/help/mlsaari3.txt +++ b/help/mlsaari3.txt @@ -1,12 +1,12 @@ -\b;Programs dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;KillAnt1\u mlsaari2;\n; -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; +\b;Programs dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;KillAnt1\u mlsaari2;\n; +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; diff --git a/help/mlterra1.txt b/help/mlterra1.txt index d86281e8..5ac691d0 100644 --- a/help/mlterra1.txt +++ b/help/mlterra1.txt @@ -1,30 +1,30 @@ -\b;Programs dispatched by Houston -According to the data transmitted by the satellite, our engineers have developed two programs. The first one guides the \l;shielder bot\u object\botshld; through the narrow valley north close to the place where the key has been located. You can follow it without fearing any attack: -\c; -\s;extern void object::Outward() -\s;{ -\s; \l;shield\u cbot\shield;(1,15); // activate the shield -\s; \l;goto\u cbot\goto;(6,160); // go close to the key -\s; \l;shield\u cbot\shield;(0,15); // deactivate the shield -\s;} -\n; -The second program guides the \l;shielder bot\u object\botshld; back to the \l;spaceship\u object\base;: -\c; -\s;extern void object::Return() -\s;{ -\s; \l;shield\u cbot\shield;(1,15); // activate the shield -\s; \l;goto\u cbot\goto;(8,60); // go to the spaceship -\s; \l;shield\u cbot\shield;(0,15); // deactivate the shield -\s;} -\n; -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;ServiceTower1\u mlvolca2;\n; -o \c;\l;CollectTitanium3\u mlvolca1;\n; -o \c;\l;KillAnt1\u mlsaari2;\n; -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; +\b;Programs dispatched by Houston +According to the data transmitted by the satellite, our engineers have developed two programs. The first one guides the \l;shielder bot\u object\botshld; through the narrow valley north close to the place where the key has been located. You can follow it without fearing any attack: +\c; +\s;extern void object::Outward() +\s;{ +\s; \l;shield\u cbot\shield;(1,15); // activate the shield +\s; \l;goto\u cbot\goto;(6,160); // go close to the key +\s; \l;shield\u cbot\shield;(0,15); // deactivate the shield +\s;} +\n; +The second program guides the \l;shielder bot\u object\botshld; back to the \l;spaceship\u object\base;: +\c; +\s;extern void object::Return() +\s;{ +\s; \l;shield\u cbot\shield;(1,15); // activate the shield +\s; \l;goto\u cbot\goto;(8,60); // go to the spaceship +\s; \l;shield\u cbot\shield;(0,15); // deactivate the shield +\s;} +\n; +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;ServiceTower1\u mlvolca2;\n; +o \c;\l;CollectTitanium3\u mlvolca1;\n; +o \c;\l;KillAnt1\u mlsaari2;\n; +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; diff --git a/help/mlterra2.txt b/help/mlterra2.txt index 216dcf0b..f856d805 100644 --- a/help/mlterra2.txt +++ b/help/mlterra2.txt @@ -1,14 +1,14 @@ -\b;Programs dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;ServiceTower1\u mlvolca2;\n; -o \c;\l;CollectTitanium3\u mlvolca1;\n; -o \c;\l;KillAnt1\u mlsaari2;\n; -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; +\b;Programs dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;ServiceTower1\u mlvolca2;\n; +o \c;\l;CollectTitanium3\u mlvolca1;\n; +o \c;\l;KillAnt1\u mlsaari2;\n; +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; diff --git a/help/mlterra3.txt b/help/mlterra3.txt index 216dcf0b..f856d805 100644 --- a/help/mlterra3.txt +++ b/help/mlterra3.txt @@ -1,14 +1,14 @@ -\b;Programs dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;ServiceTower1\u mlvolca2;\n; -o \c;\l;CollectTitanium3\u mlvolca1;\n; -o \c;\l;KillAnt1\u mlsaari2;\n; -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; +\b;Programs dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;ServiceTower1\u mlvolca2;\n; +o \c;\l;CollectTitanium3\u mlvolca1;\n; +o \c;\l;KillAnt1\u mlsaari2;\n; +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; diff --git a/help/mlterra4.txt b/help/mlterra4.txt index 3df16594..73e1d1ab 100644 --- a/help/mlterra4.txt +++ b/help/mlterra4.txt @@ -1,50 +1,50 @@ -\b;Programs dispatched by Houston -Below is a program that has been developed by our engineers. - -It instructs the \l;shielder\u object\botshld; to follow and protect the \l;phazer\u object\botphaz;. -\c; -\s;extern void object::FollowPhazer() -\s;{ -\s; \l;object\u cbot\type; item; // info. about phazer -\s; \l;point\u cbot\type; dest; // position where to go -\s; \l;float\u cbot\type; dist; // distance to phazer -\s; -\s; item = \l;radar\u cbot\radar;(\l;PhazerShooter\u cbot\category;); -\s; \l;if\u cbot\if; ( item == null ) -\s; { -\s; \l;message\u cbot\message;("No phazer found"); -\s; \l;return\u cbot\return;; // stop the program -\s; } -\s; \l;shield\u cbot\shield;(1, 25); // activate the shield -\s; -\s; \l;while\u cbot\while; ( true ) // repeat forever -\s; { -\s; item = \l;radar\u cbot\radar;(PhazerShooter);// look for phazer -\s; \l;if\u cbot\if; ( item == null ) break; -\s; -\s; dist = \l;distance\u cbot\dist;(item.position, position); -\s; \l;if\u cbot\if; ( dist < 5 ) -\s; { // if closer than 5 m: -\s; \l;wait\u cbot\wait;(1); // wait -\s; } -\s; \l;else\u cbot\if; // otherwise: -\s; { // Calculate a position 5 m before the phazer -\s; dest.x = (item.position.x-position.x)*((dist-5)/dist)+position.x; -\s; dest.y = (item.position.y-position.y)*((dist-5)/dist)+position.y; -\s; dest.z = (item.position.z-position.z)*((dist-5)/dist)+position.z; -\s; \l;goto\u cbot\goto;(dest, 0, 1, 1); // and go there -\s; } -\s; } -\s;} -\n; -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;ServiceTower1\u mlvolca2;\n; -o \c;\l;CollectTitanium3\u mlvolca1;\n; -o \c;\l;KillAnt1\u mlsaari2;\n; -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; +\b;Programs dispatched by Houston +Below is a program that has been developed by our engineers. + +It instructs the \l;shielder\u object\botshld; to follow and protect the \l;phazer\u object\botphaz;. +\c; +\s;extern void object::FollowPhazer() +\s;{ +\s; \l;object\u cbot\type; item; // info. about phazer +\s; \l;point\u cbot\type; dest; // position where to go +\s; \l;float\u cbot\type; dist; // distance to phazer +\s; +\s; item = \l;radar\u cbot\radar;(\l;PhazerShooter\u cbot\category;); +\s; \l;if\u cbot\if; ( item == null ) +\s; { +\s; \l;message\u cbot\message;("No phazer found"); +\s; \l;return\u cbot\return;; // stop the program +\s; } +\s; \l;shield\u cbot\shield;(1, 25); // activate the shield +\s; +\s; \l;while\u cbot\while; ( true ) // repeat forever +\s; { +\s; item = \l;radar\u cbot\radar;(PhazerShooter);// look for phazer +\s; \l;if\u cbot\if; ( item == null ) break; +\s; +\s; dist = \l;distance\u cbot\dist;(item.position, position); +\s; \l;if\u cbot\if; ( dist < 5 ) +\s; { // if closer than 5 m: +\s; \l;wait\u cbot\wait;(1); // wait +\s; } +\s; \l;else\u cbot\if; // otherwise: +\s; { // Calculate a position 5 m before the phazer +\s; dest.x = (item.position.x-position.x)*((dist-5)/dist)+position.x; +\s; dest.y = (item.position.y-position.y)*((dist-5)/dist)+position.y; +\s; dest.z = (item.position.z-position.z)*((dist-5)/dist)+position.z; +\s; \l;goto\u cbot\goto;(dest, 0, 1, 1); // and go there +\s; } +\s; } +\s;} +\n; +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;ServiceTower1\u mlvolca2;\n; +o \c;\l;CollectTitanium3\u mlvolca1;\n; +o \c;\l;KillAnt1\u mlsaari2;\n; +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; diff --git a/help/mltropi1.txt b/help/mltropi1.txt index a8cb7d18..6d775e52 100644 --- a/help/mltropi1.txt +++ b/help/mltropi1.txt @@ -1,8 +1,8 @@ -\b;Programs dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; +\b;Programs dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; diff --git a/help/mltropi3.txt b/help/mltropi3.txt index 0893d2b8..40d4b187 100644 --- a/help/mltropi3.txt +++ b/help/mltropi3.txt @@ -1,27 +1,27 @@ -\b;Programs dispatched by Houston -We have improved the recharge program. When it arrives at the \l;power station\u object\station;, the bot does not wait exactly 5 seconds, but only until the \l;power cell\u object\power; is fully charged. After the bot is back at the initial position, it displays a message on the screen. -\c; -\s;extern void object::Recharge2() -\s;{ -\s; \l;point\u cbot\type; start; // variable for initial pos. -\s; \l;object\u cbot\type; item; // info. about power station -\s; -\s; start = position; // store initial position -\s; -\s; item = \l;radar\u cbot\radar;(\l;PowerStation\u cbot\category;); // look for station -\s; \l;goto\u cbot\goto;(item.position); // go to the power station -\s; -\s; \l;while\u cbot\while; ( \l;energyCell.energyLevel\u cbot\object; < 1 ) -\s; { -\s; \l;wait\u cbot\wait;(1); // wait until recharged -\s; } -\s; -\s; \l;goto\u cbot\goto;(start); // go back to initial pos. -\s; \l;message\u cbot\message;("Recharge completed"); -\s;} -\n; -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;SwitchCell1\u mllune1;\n; -o \c;\l;Recharge1\u mllune4;\n; +\b;Programs dispatched by Houston +We have improved the recharge program. When it arrives at the \l;power station\u object\station;, the bot does not wait exactly 5 seconds, but only until the \l;power cell\u object\power; is fully charged. After the bot is back at the initial position, it displays a message on the screen. +\c; +\s;extern void object::Recharge2() +\s;{ +\s; \l;point\u cbot\type; start; // variable for initial pos. +\s; \l;object\u cbot\type; item; // info. about power station +\s; +\s; start = position; // store initial position +\s; +\s; item = \l;radar\u cbot\radar;(\l;PowerStation\u cbot\category;); // look for station +\s; \l;goto\u cbot\goto;(item.position); // go to the power station +\s; +\s; \l;while\u cbot\while; ( \l;energyCell.energyLevel\u cbot\object; < 1 ) +\s; { +\s; \l;wait\u cbot\wait;(1); // wait until recharged +\s; } +\s; +\s; \l;goto\u cbot\goto;(start); // go back to initial pos. +\s; \l;message\u cbot\message;("Recharge completed"); +\s;} +\n; +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;SwitchCell1\u mllune1;\n; +o \c;\l;Recharge1\u mllune4;\n; diff --git a/help/mltropi4.txt b/help/mltropi4.txt index 9ba9bf02..3b138af2 100644 --- a/help/mltropi4.txt +++ b/help/mltropi4.txt @@ -1,9 +1,9 @@ -\b;Programs dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; +\b;Programs dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; diff --git a/help/mltropi5.txt b/help/mltropi5.txt index 9ba9bf02..3b138af2 100644 --- a/help/mltropi5.txt +++ b/help/mltropi5.txt @@ -1,9 +1,9 @@ -\b;Programs dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; +\b;Programs dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; diff --git a/help/mlvolca1.txt b/help/mlvolca1.txt index 953fe7c3..f1e12cea 100644 --- a/help/mlvolca1.txt +++ b/help/mlvolca1.txt @@ -1,61 +1,61 @@ -\b;Programs dispatched by Houston -As you will need lots of titanium for this mission, we have made the program \c;CollectTitanium\n; still more efficient. It gathers a whole series of titanium cubes on a free surface, so you can let it work on its own. It also recharges itself at the \l;power station\u object\station; if necessary. -\c; -\s;extern void object::CollectTitanium3() -\s;{ -\s; // 1) Variable definition. -\s; \l;object\u cbot\type; item; // info. about objects -\s; -\s; \l;while\u cbot\while; (true) // repeat forever -\s; { -\s; -\s; // 2) Go to the titanium ore and grab it. -\s; item = \l;radar\u cbot\radar;(\l;TitaniumOre\u cbot\category;);// look for titanium -\s; \l;goto\u cbot\goto;(item.position); // go to the position -\s; \l;grab\u cbot\grab;(); // grab the titanium -\s; -\s; // 3) Go to the converter and drop it. -\s; item = \l;radar\u cbot\radar;(\l;Converter\u cbot\category;); // look for converter -\s; \l;goto\u cbot\goto;(item.position); // go to the position -\s; \l;drop\u cbot\drop;(); // drop the titanium -\s; \l;move\u cbot\move;(-2.5); // step back 2.5 m -\s; -\s; // 4) Wait until titanium converted and grab it -\s; \l;do\u cbot\do; -\s; { -\s; \l;wait\u cbot\wait;(1); // wait for cube -\s; item = \l;radar\u cbot\radar;(\l;Titanium\u cbot\category;, 0, 45, 0, 5); -\s; } -\s; \l;while\u cbot\while; ( item == null ); -\s; \l;goto\u cbot\goto;(item.position); -\s; \l;grab\u cbot\grab;(); // grab it -\s; -\s; // 5) Drop on a free space -\s; \l;goto\u cbot\goto;(\l;space\u cbot\space;(position)); // go to free space -\s; \l;drop\u cbot\drop;(); // drop titanium -\s; -\s; // 6) If power cell half empty, recharges. -\s; \l;if\u cbot\if; ( energyCell.energyLevel < 0.5 ) -\s; { // if so: -\s; item = \l;radar\u cbot\radar;(\l;PowerStation\u cbot\category;); -\s; \l;if\u cbot\if; ( item != null ) // station found ? -\s; { -\s; \l;goto\u cbot\goto;(item.position); // go there -\s; \l;while\u cbot\while; ( energyCell.energyLevel < 1 ) -\s; { // until recharged: -\s; \l;wait\u cbot\wait;(1); // wait -\s; } -\s; } -\s; } -\s; } -\s;} -\n; -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;KillAnt1\u mlsaari2;\n; -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; +\b;Programs dispatched by Houston +As you will need lots of titanium for this mission, we have made the program \c;CollectTitanium\n; still more efficient. It gathers a whole series of titanium cubes on a free surface, so you can let it work on its own. It also recharges itself at the \l;power station\u object\station; if necessary. +\c; +\s;extern void object::CollectTitanium3() +\s;{ +\s; // 1) Variable definition. +\s; \l;object\u cbot\type; item; // info. about objects +\s; +\s; \l;while\u cbot\while; (true) // repeat forever +\s; { +\s; +\s; // 2) Go to the titanium ore and grab it. +\s; item = \l;radar\u cbot\radar;(\l;TitaniumOre\u cbot\category;);// look for titanium +\s; \l;goto\u cbot\goto;(item.position); // go to the position +\s; \l;grab\u cbot\grab;(); // grab the titanium +\s; +\s; // 3) Go to the converter and drop it. +\s; item = \l;radar\u cbot\radar;(\l;Converter\u cbot\category;); // look for converter +\s; \l;goto\u cbot\goto;(item.position); // go to the position +\s; \l;drop\u cbot\drop;(); // drop the titanium +\s; \l;move\u cbot\move;(-2.5); // step back 2.5 m +\s; +\s; // 4) Wait until titanium converted and grab it +\s; \l;do\u cbot\do; +\s; { +\s; \l;wait\u cbot\wait;(1); // wait for cube +\s; item = \l;radar\u cbot\radar;(\l;Titanium\u cbot\category;, 0, 45, 0, 5); +\s; } +\s; \l;while\u cbot\while; ( item == null ); +\s; \l;goto\u cbot\goto;(item.position); +\s; \l;grab\u cbot\grab;(); // grab it +\s; +\s; // 5) Drop on a free space +\s; \l;goto\u cbot\goto;(\l;space\u cbot\space;(position)); // go to free space +\s; \l;drop\u cbot\drop;(); // drop titanium +\s; +\s; // 6) If power cell half empty, recharges. +\s; \l;if\u cbot\if; ( energyCell.energyLevel < 0.5 ) +\s; { // if so: +\s; item = \l;radar\u cbot\radar;(\l;PowerStation\u cbot\category;); +\s; \l;if\u cbot\if; ( item != null ) // station found ? +\s; { +\s; \l;goto\u cbot\goto;(item.position); // go there +\s; \l;while\u cbot\while; ( energyCell.energyLevel < 1 ) +\s; { // until recharged: +\s; \l;wait\u cbot\wait;(1); // wait +\s; } +\s; } +\s; } +\s; } +\s;} +\n; +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;KillAnt1\u mlsaari2;\n; +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; diff --git a/help/mlvolca2.txt b/help/mlvolca2.txt index 89e2125f..ad0537da 100644 --- a/help/mlvolca2.txt +++ b/help/mlvolca2.txt @@ -1,53 +1,53 @@ -\b;Programs dispatched by Houston -We have developed a program that takes care of recharging the power cell of a \l;defense tower\u object\tower;: - -1) Go to a \l;defense tower\u object\tower;. -2) Wait until the \l;power cell\u object\power; is 80% empty. -3) Grab the \l;power cell\u object\power; and recharge it on a \l;power station\u object\station;. -4) Put it back on the \l;defense tower\u object\tower;. - -Build the \l;power station\u object\station; as close as possible to the tower in order to reduce the time when the tower has got no power cell. A good trick is to place a power cell on the ground in front of the tower. The wasp will attack the power cell, and if the first shoot misses or a wasp arrives when the defense tower has got no energy, only the power cell is destroyed and not the defense tower. -\c; -\s;extern void object::ServiceTower1() -\s;{ -\s; \l;object\u cbot\object; tower; // info. about tower -\s; \l;object\u cbot\object; station; // info. about station -\s; -\s; // 1) go to the defense tower -\s; tower = \l;radar\u cbot\radar;(DefenseTower); // look for tower -\s; \l;goto\u cbot\goto;(tower.position); // go there -\s; -\s; \l;while\u cbot\while; ( true ) // repeat forever -\s; { -\s; // 2) wait until power cell is empty -\s; \l;while\u cbot\while; ( tower.energyCell.energyLevel > 0.2 ) -\s; { -\s; \l;wait\u cbot\wait;(2); -\s; } -\s; \l;grab\u cbot\grab;(); // grab the power cell -\s; -\s; // 3) go to the power station to recharge -\s; station = \l;radar\u cbot\radar;(PowerStation); -\s; \l;goto\u cbot\goto;(station.position); // go there -\s; \l;while\u cbot\while; ( load.energyLevel < 1 ) -\s; { -\s; \l;wait\u cbot\wait;(1); // wait until recharged -\s; } -\s; -\s; // 4) go back to defense tower -\s; \l;goto\u cbot\goto;(tower.position); // go to tower -\s; \l;drop\u cbot\drop;(); // drop the power cell -\s; } -\s;} -\n; -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;CollectTitanium3\u mlvolca1;\n; -o \c;\l;KillAnt1\u mlsaari2;\n; -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; - +\b;Programs dispatched by Houston +We have developed a program that takes care of recharging the power cell of a \l;defense tower\u object\tower;: + +1) Go to a \l;defense tower\u object\tower;. +2) Wait until the \l;power cell\u object\power; is 80% empty. +3) Grab the \l;power cell\u object\power; and recharge it on a \l;power station\u object\station;. +4) Put it back on the \l;defense tower\u object\tower;. + +Build the \l;power station\u object\station; as close as possible to the tower in order to reduce the time when the tower has got no power cell. A good trick is to place a power cell on the ground in front of the tower. The wasp will attack the power cell, and if the first shoot misses or a wasp arrives when the defense tower has got no energy, only the power cell is destroyed and not the defense tower. +\c; +\s;extern void object::ServiceTower1() +\s;{ +\s; \l;object\u cbot\object; tower; // info. about tower +\s; \l;object\u cbot\object; station; // info. about station +\s; +\s; // 1) go to the defense tower +\s; tower = \l;radar\u cbot\radar;(DefenseTower); // look for tower +\s; \l;goto\u cbot\goto;(tower.position); // go there +\s; +\s; \l;while\u cbot\while; ( true ) // repeat forever +\s; { +\s; // 2) wait until power cell is empty +\s; \l;while\u cbot\while; ( tower.energyCell.energyLevel > 0.2 ) +\s; { +\s; \l;wait\u cbot\wait;(2); +\s; } +\s; \l;grab\u cbot\grab;(); // grab the power cell +\s; +\s; // 3) go to the power station to recharge +\s; station = \l;radar\u cbot\radar;(PowerStation); +\s; \l;goto\u cbot\goto;(station.position); // go there +\s; \l;while\u cbot\while; ( load.energyLevel < 1 ) +\s; { +\s; \l;wait\u cbot\wait;(1); // wait until recharged +\s; } +\s; +\s; // 4) go back to defense tower +\s; \l;goto\u cbot\goto;(tower.position); // go to tower +\s; \l;drop\u cbot\drop;(); // drop the power cell +\s; } +\s;} +\n; +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;CollectTitanium3\u mlvolca1;\n; +o \c;\l;KillAnt1\u mlsaari2;\n; +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; + diff --git a/help/mlvolca3.txt b/help/mlvolca3.txt index 46c8d9e6..01b6c330 100644 --- a/help/mlvolca3.txt +++ b/help/mlvolca3.txt @@ -1,15 +1,15 @@ -\b;Programs dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;ServiceTower1\u mlvolca2;\n; -o \c;\l;CollectTitanium3\u mlvolca1;\n; -o \c;\l;KillAnt1\u mlsaari2;\n; -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; - +\b;Programs dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;ServiceTower1\u mlvolca2;\n; +o \c;\l;CollectTitanium3\u mlvolca1;\n; +o \c;\l;KillAnt1\u mlsaari2;\n; +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; + diff --git a/help/mlvolca4.txt b/help/mlvolca4.txt index 46c8d9e6..01b6c330 100644 --- a/help/mlvolca4.txt +++ b/help/mlvolca4.txt @@ -1,15 +1,15 @@ -\b;Programs dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;ServiceTower1\u mlvolca2;\n; -o \c;\l;CollectTitanium3\u mlvolca1;\n; -o \c;\l;KillAnt1\u mlsaari2;\n; -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; - +\b;Programs dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;ServiceTower1\u mlvolca2;\n; +o \c;\l;CollectTitanium3\u mlvolca1;\n; +o \c;\l;KillAnt1\u mlsaari2;\n; +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; + diff --git a/help/mlvolca5.txt b/help/mlvolca5.txt index 46c8d9e6..01b6c330 100644 --- a/help/mlvolca5.txt +++ b/help/mlvolca5.txt @@ -1,15 +1,15 @@ -\b;Programs dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;ServiceTower1\u mlvolca2;\n; -o \c;\l;CollectTitanium3\u mlvolca1;\n; -o \c;\l;KillAnt1\u mlsaari2;\n; -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; - +\b;Programs dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;ServiceTower1\u mlvolca2;\n; +o \c;\l;CollectTitanium3\u mlvolca1;\n; +o \c;\l;KillAnt1\u mlsaari2;\n; +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; + diff --git a/help/mlvolca6.txt b/help/mlvolca6.txt index 46c8d9e6..01b6c330 100644 --- a/help/mlvolca6.txt +++ b/help/mlvolca6.txt @@ -1,15 +1,15 @@ -\b;Programs dispatched by Houston -We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. - -\b;Archives -Index of the programs dispatched in former missions: - -o \c;\l;ServiceTower1\u mlvolca2;\n; -o \c;\l;CollectTitanium3\u mlvolca1;\n; -o \c;\l;KillAnt1\u mlsaari2;\n; -o \c;\l;CollectTitanium2\u mlcrys2;\n; -o \c;\l;CollectTitanium1\u mlcrys1;\n; -o \c;\l;Recharge2\u mltropi3;\n; -o \c;\l;Recharge1\u mllune4;\n; -o \c;\l;SwitchCell1\u mllune1;\n; - +\b;Programs dispatched by Houston +We did not develop a specific program for this mission. However, you can develop your own programs if you think it would be useful. + +\b;Archives +Index of the programs dispatched in former missions: + +o \c;\l;ServiceTower1\u mlvolca2;\n; +o \c;\l;CollectTitanium3\u mlvolca1;\n; +o \c;\l;KillAnt1\u mlsaari2;\n; +o \c;\l;CollectTitanium2\u mlcrys2;\n; +o \c;\l;CollectTitanium1\u mlcrys1;\n; +o \c;\l;Recharge2\u mltropi3;\n; +o \c;\l;Recharge1\u mllune4;\n; +o \c;\l;SwitchCell1\u mllune1;\n; + diff --git a/help/mscent1.txt b/help/mscent1.txt index 5e3f11c5..befd97f5 100644 --- a/help/mscent1.txt +++ b/help/mscent1.txt @@ -1,20 +1,20 @@ -\b;Walkthrough -You'll find some useful items in a small valley northeast. -o A \l;recycler\u object\botrecy; that will allow you to make your first \l;titanium cube\u object\titan;. -o A \l;legged grabber\u object\botgs; that is very good at climbing steep slopes. -o A nearly charged \l;nuclear power cell\u object\atomic;. - -1) Power the \l;legged grabber\u object\botgs; with the \l;nuclear power cell\u object\atomic;, and use it to carry a \l;titanium cube\u object\titan; to the \l;spaceship\u object\base;. Choose the direct way over the mountains. - -2) Use the titanium to build a \l;converter\u object\convert;. Execute the program \c;CollectTitanium3\n; on the \l;legged grabber\u object\botgs; and you will have plenty of titanium. - -3) Stop the program, and use the grabber to collect some \l;uranium ore\u object\uranore; in a second small valley to the east. Again, do not take the way of the valley which is crawling with ants, but take the direct way over the mountains. - -4) Build a \l;winged shooter\u object\botfj; and power it with a \l;nuclear power cell\u object\atomic;. If you take the pass south-east, you will arrive immediately at the ant nest. Kill all the ants, and bring back a ball of \l;organic matter\u object\bullet; to the \l;spaceship\u object\base;. - -5) Build an \l;auto-lab\u object\labo;, drop the \l;organic matter\u object\bullet; on the platform and click the \button 110; button in order to develop the blueprints for the orgaShooter cannon. - -6) Build a \l;legged orga shooter\u object\botos;, bring it aboard and take off. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +You'll find some useful items in a small valley northeast. +o A \l;recycler\u object\botrecy; that will allow you to make your first \l;titanium cube\u object\titan;. +o A \l;legged grabber\u object\botgs; that is very good at climbing steep slopes. +o A nearly charged \l;nuclear power cell\u object\atomic;. + +1) Power the \l;legged grabber\u object\botgs; with the \l;nuclear power cell\u object\atomic;, and use it to carry a \l;titanium cube\u object\titan; to the \l;spaceship\u object\base;. Choose the direct way over the mountains. + +2) Use the titanium to build a \l;converter\u object\convert;. Execute the program \c;CollectTitanium3\n; on the \l;legged grabber\u object\botgs; and you will have plenty of titanium. + +3) Stop the program, and use the grabber to collect some \l;uranium ore\u object\uranore; in a second small valley to the east. Again, do not take the way of the valley which is crawling with ants, but take the direct way over the mountains. + +4) Build a \l;winged shooter\u object\botfj; and power it with a \l;nuclear power cell\u object\atomic;. If you take the pass south-east, you will arrive immediately at the ant nest. Kill all the ants, and bring back a ball of \l;organic matter\u object\bullet; to the \l;spaceship\u object\base;. + +5) Build an \l;auto-lab\u object\labo;, drop the \l;organic matter\u object\bullet; on the platform and click the \button 110; button in order to develop the blueprints for the orgaShooter cannon. + +6) Build a \l;legged orga shooter\u object\botos;, bring it aboard and take off. + +\t;See also +\l;Controls\u command; diff --git a/help/mscent2.txt b/help/mscent2.txt index 1b930ee2..417c8f0b 100644 --- a/help/mscent2.txt +++ b/help/mscent2.txt @@ -1,5 +1,5 @@ -\b;Walkthrough -Drive the \l;legged orga shooter\u object\botos; to each of the pads in front of the targets, and hit all targets that you see with only one burst, moving the mouse during the burst. With 4 bursts, you must be able to hit all the targets. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +Drive the \l;legged orga shooter\u object\botos; to each of the pads in front of the targets, and hit all targets that you see with only one burst, moving the mouse during the burst. With 4 bursts, you must be able to hit all the targets. + +\t;See also +\l;Controls\u command; diff --git a/help/mscent3.txt b/help/mscent3.txt index 859ce009..d14266fa 100644 --- a/help/mscent3.txt +++ b/help/mscent3.txt @@ -1,11 +1,11 @@ -\b;Walkthrough -In order to kill all ants and spiders in this large and mountainous region, you will need a \l;winged orga shooter\u object\botfj; powered with \l;nuclear power cells\u object\atomic;. In a small valley to the southeast you will find everything you need: \l;titanium cubes\u object\titanium;, \l;power cells\u object\power; and even a \l;winged grabber\u object\botgj; in working condition. - -1) Build a \l;radar\u object\radar; and a \l;winged shooter\u object\botfj; and power it. Kill the ant that is watching over the \l;uranium ore\u object\uranore; further north. - -2) Use the abandoned \l;nuclear plant\u object\nuclear; on the hill above and the \l;winged grabber\u object\botgj; to produce several \l;nuclear power cells\u object\atomic;, and use one to power the \l;winged shooter\u object\botfj;. - -3) Wipe out all insects from the region. There is one isolated ant in the northwest hidden in a hole: an approach from the west thorough the deep valley will make it easier to hit. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +In order to kill all ants and spiders in this large and mountainous region, you will need a \l;winged orga shooter\u object\botfj; powered with \l;nuclear power cells\u object\atomic;. In a small valley to the southeast you will find everything you need: \l;titanium cubes\u object\titanium;, \l;power cells\u object\power; and even a \l;winged grabber\u object\botgj; in working condition. + +1) Build a \l;radar\u object\radar; and a \l;winged shooter\u object\botfj; and power it. Kill the ant that is watching over the \l;uranium ore\u object\uranore; further north. + +2) Use the abandoned \l;nuclear plant\u object\nuclear; on the hill above and the \l;winged grabber\u object\botgj; to produce several \l;nuclear power cells\u object\atomic;, and use one to power the \l;winged shooter\u object\botfj;. + +3) Wipe out all insects from the region. There is one isolated ant in the northwest hidden in a hole: an approach from the west thorough the deep valley will make it easier to hit. + +\t;See also +\l;Controls\u command; diff --git a/help/mscent4.txt b/help/mscent4.txt index b6934075..ceb46949 100644 --- a/help/mscent4.txt +++ b/help/mscent4.txt @@ -1,12 +1,12 @@ -\b;Walkthrough -1) Search the area for \l;titanium\u object\titan;. -2) Build a \l;converter\u object\convert;. -3) Build a \l;research center\u object\research;. -4) Run the \button 66;. -5) Manufacture a \l;thumper\u object\bottump;. -6) Position the thumper close to the derelict spaceship and "thump" the ground. -7) Quickly retrieve the \l;black box\u object\bbox; and bring it back aboard your \l;spaceship\u object\base;. -8) Bring the thumper along and take off. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +1) Search the area for \l;titanium\u object\titan;. +2) Build a \l;converter\u object\convert;. +3) Build a \l;research center\u object\research;. +4) Run the \button 66;. +5) Manufacture a \l;thumper\u object\bottump;. +6) Position the thumper close to the derelict spaceship and "thump" the ground. +7) Quickly retrieve the \l;black box\u object\bbox; and bring it back aboard your \l;spaceship\u object\base;. +8) Bring the thumper along and take off. + +\t;See also +\l;Controls\u command; diff --git a/help/mscent5.txt b/help/mscent5.txt index df78b58a..a631c9d5 100644 --- a/help/mscent5.txt +++ b/help/mscent5.txt @@ -1,8 +1,8 @@ -\b;Walkthrough -1) Thump the deck of the \l;spaceship\u object\base;. You don't need to move the \l;thumper\u object\bottump; anywhere. -2) Locate the \l;orga shooter\u object\botoj; approximately 70 meters to the east. -3) Terminate the \l;ants\u object\ant; while they are still on their backs. -4) Take off. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +1) Thump the deck of the \l;spaceship\u object\base;. You don't need to move the \l;thumper\u object\bottump; anywhere. +2) Locate the \l;orga shooter\u object\botoj; approximately 70 meters to the east. +3) Terminate the \l;ants\u object\ant; while they are still on their backs. +4) Take off. + +\t;See also +\l;Controls\u command; diff --git a/help/mscrys1.txt b/help/mscrys1.txt index 8d59342e..e7e5c03e 100644 --- a/help/mscrys1.txt +++ b/help/mscrys1.txt @@ -1,12 +1,12 @@ -\b;Walkthrough -1) Build a \l;bot factory\u object\factory;. -2) Produce a \l;winged grabber\u object\botgj;. -3) Carry a \l;titanium cube\u object\titan; to the highest point. -4) Build a \l;radar\u object\radar; on the spot. -5) Build a \l;research center\u object\research; next to the spaceship. -6) Initiate the \button 68;. -7) Build the \l;defense tower\u object\tower; next to the radar. -8) When all the worms are destroyed, you can go back to your ship and take off. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +1) Build a \l;bot factory\u object\factory;. +2) Produce a \l;winged grabber\u object\botgj;. +3) Carry a \l;titanium cube\u object\titan; to the highest point. +4) Build a \l;radar\u object\radar; on the spot. +5) Build a \l;research center\u object\research; next to the spaceship. +6) Initiate the \button 68;. +7) Build the \l;defense tower\u object\tower; next to the radar. +8) When all the worms are destroyed, you can go back to your ship and take off. + +\t;See also +\l;Controls\u command; diff --git a/help/mscrys2.txt b/help/mscrys2.txt index 08d2e272..d64057d1 100644 --- a/help/mscrys2.txt +++ b/help/mscrys2.txt @@ -1,17 +1,17 @@ -\b;Walkthrough -1) Build a \l;bot factory\u object\factory;. -2) Produce a \l;winged sniffer\u object\botsj;. -3) Sniff the ground near the large crystals until you get a \l;red cross\u object\stonspot;. -4) Build a \l;derrick\u object\derrick; near the red cross. -5) Build a \l;converter\u object\convert;. - -The pairing of a derrick and a converter allows for an unlimited supply of \l;titanium\u object\titan;. In order to leave this task to a bot, execute the program \c;CollectTitanium2\n;. - -6) Sniff the area at the foot of the spaceship. A \l;green cross\u object\enerspot; means you can build a \l;power station\u object\station; on the spot. -7) Build a \l;radar\u object\radar;. -8) Produce a \l;winged shooter\u object\botfj;. -9) Eliminate all worms. -10) Go back to your ship and take off. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +1) Build a \l;bot factory\u object\factory;. +2) Produce a \l;winged sniffer\u object\botsj;. +3) Sniff the ground near the large crystals until you get a \l;red cross\u object\stonspot;. +4) Build a \l;derrick\u object\derrick; near the red cross. +5) Build a \l;converter\u object\convert;. + +The pairing of a derrick and a converter allows for an unlimited supply of \l;titanium\u object\titan;. In order to leave this task to a bot, execute the program \c;CollectTitanium2\n;. + +6) Sniff the area at the foot of the spaceship. A \l;green cross\u object\enerspot; means you can build a \l;power station\u object\station; on the spot. +7) Build a \l;radar\u object\radar;. +8) Produce a \l;winged shooter\u object\botfj;. +9) Eliminate all worms. +10) Go back to your ship and take off. + +\t;See also +\l;Controls\u command; diff --git a/help/mscrys3.txt b/help/mscrys3.txt index fbafc4ff..b015bb5a 100644 --- a/help/mscrys3.txt +++ b/help/mscrys3.txt @@ -1,7 +1,7 @@ -\b;Walkthrough -If you lose the bot, it will drop the black box somewhere southwest of your spaceship on a region surrounded by crystals. - -In case your power runs out before you can bring the black box back, use the second grabber left on the spaceship. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +If you lose the bot, it will drop the black box somewhere southwest of your spaceship on a region surrounded by crystals. + +In case your power runs out before you can bring the black box back, use the second grabber left on the spaceship. + +\t;See also +\l;Controls\u command; diff --git a/help/mscrys4.txt b/help/mscrys4.txt index 4f7b2bd0..cf8c5f7c 100644 --- a/help/mscrys4.txt +++ b/help/mscrys4.txt @@ -1,7 +1,7 @@ -\b;Walkthrough -Somewhere northeast in the valley itself you should come across a fully functional \l;power station\u object\station;. Northwest you will find several \l;power cells\u object\power;. - -A few shooters in working condition have been abandoned in and around the same area in the valley; use them to shoot all the ants. With the \l;winged grabber\u object\botgj;, you can then retrieve the \l;black box\u object\bbox; that is located behind the derelict spaceship and take off. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +Somewhere northeast in the valley itself you should come across a fully functional \l;power station\u object\station;. Northwest you will find several \l;power cells\u object\power;. + +A few shooters in working condition have been abandoned in and around the same area in the valley; use them to shoot all the ants. With the \l;winged grabber\u object\botgj;, you can then retrieve the \l;black box\u object\bbox; that is located behind the derelict spaceship and take off. + +\t;See also +\l;Controls\u command; diff --git a/help/mslune1.txt b/help/mslune1.txt index d0fb5e5f..b97ffbec 100644 --- a/help/mslune1.txt +++ b/help/mslune1.txt @@ -1,15 +1,15 @@ -\b;Walkthrough -In order to build the \l;research center\u object\research;, drop a \l;titanium cube\u object\titan; on a flat surface not too far from the spaceship. \l;You\u object\human; can carry the cube yourself, or use the available \l;grabber\u object\botgr;. - -If you used the bot, move it away from the cube in order not to interfere with the construction. To shift the selection from the bot to yourself (remember that only you can build), use \key;\key human;\norm;. - -Position yourself close to the \l;titanium cube\u object\titan; and build a \l;research center\u object\research; \button 163;. Drop a \l;power cell\u object\power; on the \l;research center\u object\research;, select the building and click the \button 65; symbol in order to perform the . - -Build a \l;bot factory\u object\factory; in the same way, and drop a \l;titanium cube\u object\titan; in the center. Build a \l;winged grabber\u object\botgj; with the \button 139; symbol, and power it with a \l;power cell\u object\power;. - -It may be preferable to scout the area yourself in order to save power. You'll find the chunks of titanium ore at the bottom of a few craters located north of the spaceship. A \l;flag\u object\flag; may help you pin down the spot faster on subsequent trips. - -Collect 4 chunks of \l;titanium ore\u object\titanore; and bring them back aboard your \l;spaceship\u object\base;. Take the \l;winged grabber\u object\botgj; and the \l;wheeled grabber\u object\botgr; along with you and take off \button 28;. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +In order to build the \l;research center\u object\research;, drop a \l;titanium cube\u object\titan; on a flat surface not too far from the spaceship. \l;You\u object\human; can carry the cube yourself, or use the available \l;grabber\u object\botgr;. + +If you used the bot, move it away from the cube in order not to interfere with the construction. To shift the selection from the bot to yourself (remember that only you can build), use \key;\key human;\norm;. + +Position yourself close to the \l;titanium cube\u object\titan; and build a \l;research center\u object\research; \button 163;. Drop a \l;power cell\u object\power; on the \l;research center\u object\research;, select the building and click the \button 65; symbol in order to perform the . + +Build a \l;bot factory\u object\factory; in the same way, and drop a \l;titanium cube\u object\titan; in the center. Build a \l;winged grabber\u object\botgj; with the \button 139; symbol, and power it with a \l;power cell\u object\power;. + +It may be preferable to scout the area yourself in order to save power. You'll find the chunks of titanium ore at the bottom of a few craters located north of the spaceship. A \l;flag\u object\flag; may help you pin down the spot faster on subsequent trips. + +Collect 4 chunks of \l;titanium ore\u object\titanore; and bring them back aboard your \l;spaceship\u object\base;. Take the \l;winged grabber\u object\botgj; and the \l;wheeled grabber\u object\botgr; along with you and take off \button 28;. + +\t;See also +\l;Controls\u command; diff --git a/help/mslune2.txt b/help/mslune2.txt index 91832044..e46a8501 100644 --- a/help/mslune2.txt +++ b/help/mslune2.txt @@ -1,7 +1,7 @@ -\b;Walkthrough -If your bot suddenly explodes, this means that you have hit the steel structures too often. Drive more slowly, so your bot will not be damaged even if you bump into an obstacle. - -If you can not take off after you have completed the training, this means that you did not pass through all the targets. Go round one more time, and pass through the targets where the cross is left in the center. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +If your bot suddenly explodes, this means that you have hit the steel structures too often. Drive more slowly, so your bot will not be damaged even if you bump into an obstacle. + +If you can not take off after you have completed the training, this means that you did not pass through all the targets. Go round one more time, and pass through the targets where the cross is left in the center. + +\t;See also +\l;Controls\u command; diff --git a/help/mslune3.txt b/help/mslune3.txt index 91832044..e46a8501 100644 --- a/help/mslune3.txt +++ b/help/mslune3.txt @@ -1,7 +1,7 @@ -\b;Walkthrough -If your bot suddenly explodes, this means that you have hit the steel structures too often. Drive more slowly, so your bot will not be damaged even if you bump into an obstacle. - -If you can not take off after you have completed the training, this means that you did not pass through all the targets. Go round one more time, and pass through the targets where the cross is left in the center. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +If your bot suddenly explodes, this means that you have hit the steel structures too often. Drive more slowly, so your bot will not be damaged even if you bump into an obstacle. + +If you can not take off after you have completed the training, this means that you did not pass through all the targets. Go round one more time, and pass through the targets where the cross is left in the center. + +\t;See also +\l;Controls\u command; diff --git a/help/mslune4.txt b/help/mslune4.txt index f77455ff..7535c4d7 100644 --- a/help/mslune4.txt +++ b/help/mslune4.txt @@ -1,19 +1,19 @@ -\b;Walkthrough -1) Build a converter \button 162; with the only titanium cube available. - -2) Deposit one chunk of titanium ore at a time at the center of the platform and let the converter do the rest. - -3) Build a power station \button 164; with one of the newly converted titanium cubes. - -4) If you don't feel like looking for the black box yourself, build a radar \button 168; and the box will appear on your mini map somewhere north of your present location, at the bottom of a crater, next to a few derelict spacecraft and debris from the previous expedition. - -5) Place the grabbers at the center of the power station platform to recharge them. The cells should still have a little power left in them, just enough to radio-control the bots onto the platform. - -6) Radio-control the winged grabber to the black box and back. - -7) Gather both grabbers and the black box onto the spaceship platform and climb on board yourself. - -8) Take off. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +1) Build a converter \button 162; with the only titanium cube available. + +2) Deposit one chunk of titanium ore at a time at the center of the platform and let the converter do the rest. + +3) Build a power station \button 164; with one of the newly converted titanium cubes. + +4) If you don't feel like looking for the black box yourself, build a radar \button 168; and the box will appear on your mini map somewhere north of your present location, at the bottom of a crater, next to a few derelict spacecraft and debris from the previous expedition. + +5) Place the grabbers at the center of the power station platform to recharge them. The cells should still have a little power left in them, just enough to radio-control the bots onto the platform. + +6) Radio-control the winged grabber to the black box and back. + +7) Gather both grabbers and the black box onto the spaceship platform and climb on board yourself. + +8) Take off. + +\t;See also +\l;Controls\u command; diff --git a/help/msorph1.txt b/help/msorph1.txt index 3b4cc8ab..28c154db 100644 --- a/help/msorph1.txt +++ b/help/msorph1.txt @@ -1,15 +1,15 @@ -\b;Walkthrough -1) Quickly build a \l;power captor\u object\captor; near the blue flag. -All subsequent buildings should be erected within the \button 41; covered by the power captor. -2) Carry some empty \l;power cells\u object\power; under the power captor. When lightning strikes, they will be recharged. -3) Build a \l;derrick\u object\derrick;. -4) Build a \l;converter\u object\convert;. -5) Execute the program \c;CollectTitanium3\n; in order to produce \l;titanium\u object\titan;. -6) Build a \l;bot factory\u object\factory;. -7) Manufacture a \l;winged orga shooter\u object\botoj;. -8) Build a \l;radar\u object\radar;. -9) Locate and terminate all \l;ants\u object\ant;. -10) Return to your \l;spaceship\u object\base; and take off. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +1) Quickly build a \l;power captor\u object\captor; near the blue flag. +All subsequent buildings should be erected within the \button 41; covered by the power captor. +2) Carry some empty \l;power cells\u object\power; under the power captor. When lightning strikes, they will be recharged. +3) Build a \l;derrick\u object\derrick;. +4) Build a \l;converter\u object\convert;. +5) Execute the program \c;CollectTitanium3\n; in order to produce \l;titanium\u object\titan;. +6) Build a \l;bot factory\u object\factory;. +7) Manufacture a \l;winged orga shooter\u object\botoj;. +8) Build a \l;radar\u object\radar;. +9) Locate and terminate all \l;ants\u object\ant;. +10) Return to your \l;spaceship\u object\base; and take off. + +\t;See also +\l;Controls\u command; diff --git a/help/msorph2.txt b/help/msorph2.txt index 6189a737..486d4475 100644 --- a/help/msorph2.txt +++ b/help/msorph2.txt @@ -1,9 +1,9 @@ -\b;Walkthrough -You will find a \l;radar\u object\radar;, a \l;power captor\u object\captor;, a \l;power cell\u object\power; and a \l;winged orga shooter\u object\botoj; in the valley south of the spaceship. This will allow you to kill the ants close to the spaceship and to locate the \l;black box\u object\bbox; in the north next to the remains of the first expedition spaceship. - -Build a succession of \l;power captors\u object\captor; along the natural path offered by the northern mountain peaks. 5 or 6 captors should offer sufficient protection against lightning. - -Bring the black box back aboard your \l;spaceship\u object\base; and take off. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +You will find a \l;radar\u object\radar;, a \l;power captor\u object\captor;, a \l;power cell\u object\power; and a \l;winged orga shooter\u object\botoj; in the valley south of the spaceship. This will allow you to kill the ants close to the spaceship and to locate the \l;black box\u object\bbox; in the north next to the remains of the first expedition spaceship. + +Build a succession of \l;power captors\u object\captor; along the natural path offered by the northern mountain peaks. 5 or 6 captors should offer sufficient protection against lightning. + +Bring the black box back aboard your \l;spaceship\u object\base; and take off. + +\t;See also +\l;Controls\u command; diff --git a/help/mssaari1.txt b/help/mssaari1.txt index cbc11d4a..6bfb8087 100644 --- a/help/mssaari1.txt +++ b/help/mssaari1.txt @@ -1,22 +1,22 @@ -\b;Walkthrough -1) You'll find a \l;titanium cube\u object\titan; left in a smashed up bot factory. Use it to build a \l;power station\u object\station;. - -2) The \l;recycler\u object\botrecy; is designed to convert derelicts back into usable titanium cubes. - -3) Build both a \l;repair center\u object\repair; and a \l;radar\u object\radar;. - -4) Recharge one of the \l;power cells\u object\power; available and power a \l;winged shooter\u object\botfj;. - -5) Eliminate all \l;ants\u object\ant;. Note that you should recharge and repair the shooter regularly. Check your levels. - -6) Fully charge the \l;grabber\u object\botgr;'s power cell, then radio-control it to the summit... - a) Access the first level by ramp on west; - b) On first level travel east to find second ramp; - c) On second level travel south to find third ramp; - d) On third level travel west for access to summit; -...then, with the chunk, straight back to the spaceship by the most direct route so as to save the remaining power. - -7) Climb aboard the ship yourself and take off. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +1) You'll find a \l;titanium cube\u object\titan; left in a smashed up bot factory. Use it to build a \l;power station\u object\station;. + +2) The \l;recycler\u object\botrecy; is designed to convert derelicts back into usable titanium cubes. + +3) Build both a \l;repair center\u object\repair; and a \l;radar\u object\radar;. + +4) Recharge one of the \l;power cells\u object\power; available and power a \l;winged shooter\u object\botfj;. + +5) Eliminate all \l;ants\u object\ant;. Note that you should recharge and repair the shooter regularly. Check your levels. + +6) Fully charge the \l;grabber\u object\botgr;'s power cell, then radio-control it to the summit... + a) Access the first level by ramp on west; + b) On first level travel east to find second ramp; + c) On second level travel south to find third ramp; + d) On third level travel west for access to summit; +...then, with the chunk, straight back to the spaceship by the most direct route so as to save the remaining power. + +7) Climb aboard the ship yourself and take off. + +\t;See also +\l;Controls\u command; diff --git a/help/mssaari2.txt b/help/mssaari2.txt index af50d191..22371a78 100644 --- a/help/mssaari2.txt +++ b/help/mssaari2.txt @@ -1,9 +1,9 @@ -\b;Walkthrough -Execute immediately the program \c;KillAnt1\n; on the \l;wheeled shooter\u object\botfr;; it will take care of the first wave of attack coming from west. - -Then build two \l;defense towers\u object\tower; one in the north of the \l;spaceship\u object\base;, the other one in the south (you have to do this VERY quickly). While \l;you\u object\human; are building, use the \l;grabber\u object\botgr; to get a \l;power cell\u object\power;. - -As soon as the successive waves of attack, made up of about fifteen \l;ants\u object\ant;, are gone, you have time to take care of the ants that did not attack. Build a \l;radar\u object\radar; in order to spot them, and a \l;converter\u object\convert;, a \l;bot factory\u object\factory;, a \l;power station\u object\station; and a \l;winged shooter\u object\botfj; in order to get rid of them... - -\t;See also -\l;Controls\u command; +\b;Walkthrough +Execute immediately the program \c;KillAnt1\n; on the \l;wheeled shooter\u object\botfr;; it will take care of the first wave of attack coming from west. + +Then build two \l;defense towers\u object\tower; one in the north of the \l;spaceship\u object\base;, the other one in the south (you have to do this VERY quickly). While \l;you\u object\human; are building, use the \l;grabber\u object\botgr; to get a \l;power cell\u object\power;. + +As soon as the successive waves of attack, made up of about fifteen \l;ants\u object\ant;, are gone, you have time to take care of the ants that did not attack. Build a \l;radar\u object\radar; in order to spot them, and a \l;converter\u object\convert;, a \l;bot factory\u object\factory;, a \l;power station\u object\station; and a \l;winged shooter\u object\botfj; in order to get rid of them... + +\t;See also +\l;Controls\u command; diff --git a/help/mssaari3.txt b/help/mssaari3.txt index 8048a14c..84f2fa66 100644 --- a/help/mssaari3.txt +++ b/help/mssaari3.txt @@ -1,9 +1,9 @@ -\b;Walkthrough -You should build a \l;radar\u object\radar; first. - -The \l;ants\u object\ant; appear to be running away from you. Try to circle around each one of them until they find themselves trapped between you and a \l;mine\u object\mine;. They'll opt for the mine and blow themselves up. - -Then bring the \l;black box\u object\bbox; aboard your ship. It is next to the derelict spaceship. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +You should build a \l;radar\u object\radar; first. + +The \l;ants\u object\ant; appear to be running away from you. Try to circle around each one of them until they find themselves trapped between you and a \l;mine\u object\mine;. They'll opt for the mine and blow themselves up. + +Then bring the \l;black box\u object\bbox; aboard your ship. It is next to the derelict spaceship. + +\t;See also +\l;Controls\u command; diff --git a/help/msterra1.txt b/help/msterra1.txt index f8db803d..a7487ad7 100644 --- a/help/msterra1.txt +++ b/help/msterra1.txt @@ -1,6 +1,6 @@ -\b;Walkthrough -Unfortunately no walkthrough has been provided for this mission. -You are on your own... - -\t;See also -\l;Controls\u command; +\b;Walkthrough +Unfortunately no walkthrough has been provided for this mission. +You are on your own... + +\t;See also +\l;Controls\u command; diff --git a/help/msterra2.txt b/help/msterra2.txt index f8db803d..a7487ad7 100644 --- a/help/msterra2.txt +++ b/help/msterra2.txt @@ -1,6 +1,6 @@ -\b;Walkthrough -Unfortunately no walkthrough has been provided for this mission. -You are on your own... - -\t;See also -\l;Controls\u command; +\b;Walkthrough +Unfortunately no walkthrough has been provided for this mission. +You are on your own... + +\t;See also +\l;Controls\u command; diff --git a/help/msterra3.txt b/help/msterra3.txt index f8db803d..a7487ad7 100644 --- a/help/msterra3.txt +++ b/help/msterra3.txt @@ -1,6 +1,6 @@ -\b;Walkthrough -Unfortunately no walkthrough has been provided for this mission. -You are on your own... - -\t;See also -\l;Controls\u command; +\b;Walkthrough +Unfortunately no walkthrough has been provided for this mission. +You are on your own... + +\t;See also +\l;Controls\u command; diff --git a/help/msterra4.txt b/help/msterra4.txt index f8db803d..a7487ad7 100644 --- a/help/msterra4.txt +++ b/help/msterra4.txt @@ -1,6 +1,6 @@ -\b;Walkthrough -Unfortunately no walkthrough has been provided for this mission. -You are on your own... - -\t;See also -\l;Controls\u command; +\b;Walkthrough +Unfortunately no walkthrough has been provided for this mission. +You are on your own... + +\t;See also +\l;Controls\u command; diff --git a/help/msterre1.txt b/help/msterre1.txt index 1868764e..3e7e0cc2 100644 --- a/help/msterre1.txt +++ b/help/msterre1.txt @@ -1,11 +1,11 @@ -\b;Walkthrough -To find the survival kit from your starting point : - -1) Follow the road heading south. -2) Turn east (left) at the first crossroad. -3) The survival kit is lying between the northern wall of Mission Control and the first tree on the right hand side of the road. - -Just position yourself close to it to successfully complete the drill. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +To find the survival kit from your starting point : + +1) Follow the road heading south. +2) Turn east (left) at the first crossroad. +3) The survival kit is lying between the northern wall of Mission Control and the first tree on the right hand side of the road. + +Just position yourself close to it to successfully complete the drill. + +\t;See also +\l;Controls\u command; diff --git a/help/msterre2.txt b/help/msterre2.txt index 12fd2a02..a97023d8 100644 --- a/help/msterre2.txt +++ b/help/msterre2.txt @@ -1,11 +1,11 @@ -\b;Walkthrough -Walk down the street that runs beside \l;Mission Control\u object\Huston;. You will find a \l;titanium cube\u object\titan; on the left hand side of the road, right after the \l;grabber bot\u object\botgr;. - -1) Face the cube. Click on the first button at the bottom left of your screen: \button 163; . -2) Walk further down the road. The second cube is on the right past the four green \l;power cells\u object\power;. -3) Repeat 1) but click on the second button: \button 160; . - -As soon as both buildings are completed, the mission is at an end. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +Walk down the street that runs beside \l;Mission Control\u object\Huston;. You will find a \l;titanium cube\u object\titan; on the left hand side of the road, right after the \l;grabber bot\u object\botgr;. + +1) Face the cube. Click on the first button at the bottom left of your screen: \button 163; . +2) Walk further down the road. The second cube is on the right past the four green \l;power cells\u object\power;. +3) Repeat 1) but click on the second button: \button 160; . + +As soon as both buildings are completed, the mission is at an end. + +\t;See also +\l;Controls\u command; diff --git a/help/msterre3.txt b/help/msterre3.txt index 29825b74..509ae869 100644 --- a/help/msterre3.txt +++ b/help/msterre3.txt @@ -1,28 +1,28 @@ -\b;Walkthrough -Before taking off, you need to bring the following aboard your spaceship: - -1) \l;Black box\u object\bbox;. -2) \l;Wheeled\u object\botgr; and \l;tracked\u object\botgc; grabbers. -3) \l;Yourself\u object\human;. - -Here is a detailed breakdown of the operations: -1) Power the \l;research center\u object\research; with one of the green \l;power cells\u object\power;. -2) Activate the \l;research center\u object\research; then click on the \button 64; button. -3) Place a \l;titanium cube\u object\titan; inside the \l;bot factory\u object\factory;. -4) Step back out and activate the \l;bot factory\u object\factory;. -5) Click on the \button 138; button. -6) Power the \l;tracked grabber\u object\botgc; with a brand new \l;power cell\u object\power;. -7) Radio-control the \l;tracked grabber\u object\botgc; to the top of the mountain in the south-west. -8) Bring the \l;black box\u object\bbox; back aboard your \l;spaceship\u object\base;. -9) Radio-control both the \l;tracked\u object\botgc; and the \l;wheeled\u object\botgr; grabbers onto the platform. -10) Climb aboard the \l;spaceship\u object\base; yourself. -11) Take off! - -In order to take off, select the \l;spaceship\u object\base;, provided that it is visible, by clicking on it. If it is not visible, you need to click one of the buttons in the upper left corner of your screen. The blue triangle \button 130; allows you to alternate between symbols for bots and symbols for buildings. Click once to shift to the list. A \button 171; symbol will now appear. Click on the button to select it. - -Once the spaceship is selected, click on the larger \button 28; button in the lower center of your screen. If the objects mentioned above as well as yourself are indeed standing on deck, takeoff will take place. - -No object or bot should hinder the closing of the eight large panel doors. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +Before taking off, you need to bring the following aboard your spaceship: + +1) \l;Black box\u object\bbox;. +2) \l;Wheeled\u object\botgr; and \l;tracked\u object\botgc; grabbers. +3) \l;Yourself\u object\human;. + +Here is a detailed breakdown of the operations: +1) Power the \l;research center\u object\research; with one of the green \l;power cells\u object\power;. +2) Activate the \l;research center\u object\research; then click on the \button 64; button. +3) Place a \l;titanium cube\u object\titan; inside the \l;bot factory\u object\factory;. +4) Step back out and activate the \l;bot factory\u object\factory;. +5) Click on the \button 138; button. +6) Power the \l;tracked grabber\u object\botgc; with a brand new \l;power cell\u object\power;. +7) Radio-control the \l;tracked grabber\u object\botgc; to the top of the mountain in the south-west. +8) Bring the \l;black box\u object\bbox; back aboard your \l;spaceship\u object\base;. +9) Radio-control both the \l;tracked\u object\botgc; and the \l;wheeled\u object\botgr; grabbers onto the platform. +10) Climb aboard the \l;spaceship\u object\base; yourself. +11) Take off! + +In order to take off, select the \l;spaceship\u object\base;, provided that it is visible, by clicking on it. If it is not visible, you need to click one of the buttons in the upper left corner of your screen. The blue triangle \button 130; allows you to alternate between symbols for bots and symbols for buildings. Click once to shift to the list. A \button 171; symbol will now appear. Click on the button to select it. + +Once the spaceship is selected, click on the larger \button 28; button in the lower center of your screen. If the objects mentioned above as well as yourself are indeed standing on deck, takeoff will take place. + +No object or bot should hinder the closing of the eight large panel doors. + +\t;See also +\l;Controls\u command; diff --git a/help/mstropi1.txt b/help/mstropi1.txt index 1410b56d..ca0330be 100644 --- a/help/mstropi1.txt +++ b/help/mstropi1.txt @@ -1,5 +1,5 @@ -\b;Walkthrough -Follow the path shown on your mini map. The explosive device lies at the bottom of a small valley populated by giant ants. They will probably attack you and you will probably lose consciousness. There is nothing you can really do about this. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +Follow the path shown on your mini map. The explosive device lies at the bottom of a small valley populated by giant ants. They will probably attack you and you will probably lose consciousness. There is nothing you can really do about this. + +\t;See also +\l;Controls\u command; diff --git a/help/mstropi2.txt b/help/mstropi2.txt index 3355aac0..23bc0024 100644 --- a/help/mstropi2.txt +++ b/help/mstropi2.txt @@ -1,21 +1,21 @@ -\b;Walkthrough -Here is a breakdown of the steps to follow to get back to the spaceship. - -1) Go round the lake, and head towards the green fluorescent globe. This globe is generated by a gravi-plant that will make flight impossible inside the globe. - -2) Follow the left flank of the valley, passing a pond on your right, and climb the small slope. On top you will be facing some giant ants: run as fast as you can towards another gravi-plant a little further on your right, your wounds will have time to heal later. - -3) Use your reactor to fly past the lake before the gravi-plant on your right. - -4) When you leave the gravi-plant, keep on the left-hand side of the lake, and follow the shore until you reach a peninsula adorned with fern-like plants. - -5) Do some island-hopping across the larger lake. Aim for the trees in order to avoid falling into the water on the other side of the island. The last island is 50 cm under water but you can still land on it without having your head submerged. - -6) The path continues to the left. A giant ant is waiting for you there, but it will not do you much harm. - -7) Give your reactor enough time to cool down, then fly across the small lake. Try to land as high on the right as you can, this is the best way not to fall into the second lake. - -8) Cross the second lake, get aboard the spaceship, and take off. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +Here is a breakdown of the steps to follow to get back to the spaceship. + +1) Go round the lake, and head towards the green fluorescent globe. This globe is generated by a gravi-plant that will make flight impossible inside the globe. + +2) Follow the left flank of the valley, passing a pond on your right, and climb the small slope. On top you will be facing some giant ants: run as fast as you can towards another gravi-plant a little further on your right, your wounds will have time to heal later. + +3) Use your reactor to fly past the lake before the gravi-plant on your right. + +4) When you leave the gravi-plant, keep on the left-hand side of the lake, and follow the shore until you reach a peninsula adorned with fern-like plants. + +5) Do some island-hopping across the larger lake. Aim for the trees in order to avoid falling into the water on the other side of the island. The last island is 50 cm under water but you can still land on it without having your head submerged. + +6) The path continues to the left. A giant ant is waiting for you there, but it will not do you much harm. + +7) Give your reactor enough time to cool down, then fly across the small lake. Try to land as high on the right as you can, this is the best way not to fall into the second lake. + +8) Cross the second lake, get aboard the spaceship, and take off. + +\t;See also +\l;Controls\u command; diff --git a/help/mstropi3.txt b/help/mstropi3.txt index 692633b2..852a973e 100644 --- a/help/mstropi3.txt +++ b/help/mstropi3.txt @@ -1,13 +1,13 @@ -\b;Walkthrough -1) There is a \l;titanium cube\u object\titan; west of your present location, near the blue flag/blue cross on your mini map. You don't need to move the cube, just build a \l;power station\u object\station; right there on the spot. - -2) With the titanium cubes on the spaceship, build a \l;research center\u object\research; and execute the \button 67;. - -3) Build a \l;bot factory\u object\factory; and a \l;winged shooter\u object\botfj;. If this bot is destroyed by enemy fire, you will find some additional \l;titanium cubes\u object\titan; in a small foggy valley northwest of the spaceship. You can bring them back with the \l;winged grabber\u object\botgj;\n;. - -4) Build a \l;radar station\u object\radar; in order to see the location of the ants on the mini-map, and let the hunt begin. Be careful not to run out of energy and not to overheat the reactor of a bot while over water. If a bot falls into deep water, it explodes. - -5) Once you have killed all the ants, get on board and take off. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +1) There is a \l;titanium cube\u object\titan; west of your present location, near the blue flag/blue cross on your mini map. You don't need to move the cube, just build a \l;power station\u object\station; right there on the spot. + +2) With the titanium cubes on the spaceship, build a \l;research center\u object\research; and execute the \button 67;. + +3) Build a \l;bot factory\u object\factory; and a \l;winged shooter\u object\botfj;. If this bot is destroyed by enemy fire, you will find some additional \l;titanium cubes\u object\titan; in a small foggy valley northwest of the spaceship. You can bring them back with the \l;winged grabber\u object\botgj;\n;. + +4) Build a \l;radar station\u object\radar; in order to see the location of the ants on the mini-map, and let the hunt begin. Be careful not to run out of energy and not to overheat the reactor of a bot while over water. If a bot falls into deep water, it explodes. + +5) Once you have killed all the ants, get on board and take off. + +\t;See also +\l;Controls\u command; diff --git a/help/mstropi4.txt b/help/mstropi4.txt index 29418a17..6b73f89d 100644 --- a/help/mstropi4.txt +++ b/help/mstropi4.txt @@ -1,7 +1,7 @@ -\b;Walkthrough -If your bot suddenly explodes, this means that you have hit the steel structures too often. Drive more slowly, so your bot will not be damaged even if you bump into an obstacle. - -If you can not take off after you completed the training, this means that you have not hit all the targets. Go round one more time, and check if any of the explosive devices or crosses in the center of the steel structures are left. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +If your bot suddenly explodes, this means that you have hit the steel structures too often. Drive more slowly, so your bot will not be damaged even if you bump into an obstacle. + +If you can not take off after you completed the training, this means that you have not hit all the targets. Go round one more time, and check if any of the explosive devices or crosses in the center of the steel structures are left. + +\t;See also +\l;Controls\u command; diff --git a/help/mstropi5.txt b/help/mstropi5.txt index 8b206ea1..06802556 100644 --- a/help/mstropi5.txt +++ b/help/mstropi5.txt @@ -1,15 +1,15 @@ -\b;Walkthrough -1) Locate the \l;black box\u object\bbox; on your own. You can try to spot it from above, using your jet engine, or dive into the water. -2) Build a \l;converter\u object\convert; near the chunks of titanium ore. You'll find them in the vicinity of the spaceship to the east. -3) Produce two \l;cubes\u object\titan;. -4) Build a \l;bot factory\u object\factory; not too far from the black box. -5) Manufacture a \l;subber\u object\botsub;. -6) Bring the black box back on board. -7) Take off. - -The black box is lying at the bottom of a small lake, northeast of the spaceship. - -You can build the bot factory right beside the lake, on the south bank. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +1) Locate the \l;black box\u object\bbox; on your own. You can try to spot it from above, using your jet engine, or dive into the water. +2) Build a \l;converter\u object\convert; near the chunks of titanium ore. You'll find them in the vicinity of the spaceship to the east. +3) Produce two \l;cubes\u object\titan;. +4) Build a \l;bot factory\u object\factory; not too far from the black box. +5) Manufacture a \l;subber\u object\botsub;. +6) Bring the black box back on board. +7) Take off. + +The black box is lying at the bottom of a small lake, northeast of the spaceship. + +You can build the bot factory right beside the lake, on the south bank. + +\t;See also +\l;Controls\u command; diff --git a/help/msvolca1.txt b/help/msvolca1.txt index 57aa1f43..7c606a2e 100644 --- a/help/msvolca1.txt +++ b/help/msvolca1.txt @@ -1,15 +1,15 @@ -\b;Walkthrough -1) Start by recharging a \l;regular power cell\u object\power; and power the \l;research center\u object\research;. Use it to research the technology for the building of a \l;nuclear plant\u object\nuclear; \button 170;. - -2) Produce a \l;wheeled grabber\u object\botgr;. - -3) Find some \l;uranium ore\u object\uranore; northwest of your position. The nuclear plant will then transform it into \l;nuclear power cells\u object\atomic; of a longer duration. - -4) Power a \l;wheeled shooter\u object\botfr; with one of your new nuclear cells. Dispatch it to kill all intruding \l;spiders\u object\spider; along the way. - -5) A \l;radar\u object\radar; is optional but could turn out useful to mark the position of the spiders on your mini map. - -6) A wheeled grabber should be part of the expedition. It will both clear the way cluttered with \l;titanium ore\u object\titanore; and bring the \l;explosive device\u object\tnt; back. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +1) Start by recharging a \l;regular power cell\u object\power; and power the \l;research center\u object\research;. Use it to research the technology for the building of a \l;nuclear plant\u object\nuclear; \button 170;. + +2) Produce a \l;wheeled grabber\u object\botgr;. + +3) Find some \l;uranium ore\u object\uranore; northwest of your position. The nuclear plant will then transform it into \l;nuclear power cells\u object\atomic; of a longer duration. + +4) Power a \l;wheeled shooter\u object\botfr; with one of your new nuclear cells. Dispatch it to kill all intruding \l;spiders\u object\spider; along the way. + +5) A \l;radar\u object\radar; is optional but could turn out useful to mark the position of the spiders on your mini map. + +6) A wheeled grabber should be part of the expedition. It will both clear the way cluttered with \l;titanium ore\u object\titanore; and bring the \l;explosive device\u object\tnt; back. + +\t;See also +\l;Controls\u command; diff --git a/help/msvolca2.txt b/help/msvolca2.txt index 3fe03203..319cd4db 100644 --- a/help/msvolca2.txt +++ b/help/msvolca2.txt @@ -1,19 +1,19 @@ -\b;Walkthrough -1) Quickly build a \l;defense tower\u object\tower; north of your spaceship. After you \l;powered\u object\power; it, execute the program \c;ServiceTower1\n; on one of the \l;grabbers\u object\botgr; which will recharge the power cell when it is empty. Place another power cell 2 m north of the tower as a first target for the attacking wasps. - -2) Build a \l;power station\u object\station; close to the defense tower. - -3) Build a \l;converter\u object\convert; south of the spaceship and execute the program \c;CollectTitanium3\n; on the second \l;grabber\u object\botgr; in order to produce some \l;titanium\u object\titan;. - -4) Build a \l;bot factory\u object\factory; and a \l;winged shooter\u object\botfj; to eliminate the \l;ants\u object\ant;. - -5) Use a \l;winged grabber\u object\botgj; to bring back some \l;organic matter\u object\bullet; from the island in the middle of the lava lake. - -6) Build an \l;autolab\u object\labo;, drop the \l;organic matter\u object\bullet; on the platform and click the button \button 109; in order to develop the blueprints for legged bots. - -7) As soon as the organic matter has been analyzed, produce a \l;legged grabber\u object\botgs; and bring it aboard the spaceship. - -8) Take off. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +1) Quickly build a \l;defense tower\u object\tower; north of your spaceship. After you \l;powered\u object\power; it, execute the program \c;ServiceTower1\n; on one of the \l;grabbers\u object\botgr; which will recharge the power cell when it is empty. Place another power cell 2 m north of the tower as a first target for the attacking wasps. + +2) Build a \l;power station\u object\station; close to the defense tower. + +3) Build a \l;converter\u object\convert; south of the spaceship and execute the program \c;CollectTitanium3\n; on the second \l;grabber\u object\botgr; in order to produce some \l;titanium\u object\titan;. + +4) Build a \l;bot factory\u object\factory; and a \l;winged shooter\u object\botfj; to eliminate the \l;ants\u object\ant;. + +5) Use a \l;winged grabber\u object\botgj; to bring back some \l;organic matter\u object\bullet; from the island in the middle of the lava lake. + +6) Build an \l;autolab\u object\labo;, drop the \l;organic matter\u object\bullet; on the platform and click the button \button 109; in order to develop the blueprints for legged bots. + +7) As soon as the organic matter has been analyzed, produce a \l;legged grabber\u object\botgs; and bring it aboard the spaceship. + +8) Take off. + +\t;See also +\l;Controls\u command; diff --git a/help/msvolca3.txt b/help/msvolca3.txt index 3bd14215..bcd857b8 100644 --- a/help/msvolca3.txt +++ b/help/msvolca3.txt @@ -1,11 +1,11 @@ -\b;Walkthrough -1) Power a \l;legged shooter\u object\botfs;. There is even a \l;nuclear cell\u object\atomic; left behind the \l;bot factory\u object\factory;. - -2) Climb the northern cliff and kill a few \l;ants\u object\ant;. The best access is from the east. - -3) Keep going until all ants are out of the way. - -4) Climb the northern cliff with a \l;legged grabber\u object\botgs; and retrieve the \l;black box\u object\bbox; that you will find in the derelict bot factory. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +1) Power a \l;legged shooter\u object\botfs;. There is even a \l;nuclear cell\u object\atomic; left behind the \l;bot factory\u object\factory;. + +2) Climb the northern cliff and kill a few \l;ants\u object\ant;. The best access is from the east. + +3) Keep going until all ants are out of the way. + +4) Climb the northern cliff with a \l;legged grabber\u object\botgs; and retrieve the \l;black box\u object\bbox; that you will find in the derelict bot factory. + +\t;See also +\l;Controls\u command; diff --git a/help/msvolca4.txt b/help/msvolca4.txt index 3005a0db..4000a249 100644 --- a/help/msvolca4.txt +++ b/help/msvolca4.txt @@ -1,13 +1,13 @@ -\b;Walkthrough -A gap in the northwest mountain leads the way to a lake of boiling lava. - -Just hop from one rocky island to the next. Keep checking your reactor, let it cool off completely before taking off again. The mini map will help you to figure out where the closest island is. - -In case of an ant attack, don't worry too much. Just take the time for your reactor to cool off, without lingering longer than necessary, and your built-in shield should do its duty. However we advise you to save the game from time to time (key Esc, and "Save"), so you will not have to start from the beginning in case of a landing in the lava lake. - -The bot is at the westernmost point on your map though you'll have to take a roundabout route to reach it. A \l;nuclear power cell\u object\atomic; lies nearby. - -You don't have to radio-control the bot back to the spaceship by the same way you came because its reactor has a greater range than yours. One or two stops may still be needed and watch out for those ants. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +A gap in the northwest mountain leads the way to a lake of boiling lava. + +Just hop from one rocky island to the next. Keep checking your reactor, let it cool off completely before taking off again. The mini map will help you to figure out where the closest island is. + +In case of an ant attack, don't worry too much. Just take the time for your reactor to cool off, without lingering longer than necessary, and your built-in shield should do its duty. However we advise you to save the game from time to time (key Esc, and "Save"), so you will not have to start from the beginning in case of a landing in the lava lake. + +The bot is at the westernmost point on your map though you'll have to take a roundabout route to reach it. A \l;nuclear power cell\u object\atomic; lies nearby. + +You don't have to radio-control the bot back to the spaceship by the same way you came because its reactor has a greater range than yours. One or two stops may still be needed and watch out for those ants. + +\t;See also +\l;Controls\u command; diff --git a/help/msvolca5.txt b/help/msvolca5.txt index b8782189..938b80b0 100644 --- a/help/msvolca5.txt +++ b/help/msvolca5.txt @@ -1,11 +1,11 @@ -\b;Walkthrough -Everything is blowing up around you. You need to leave the old basecamp as quickly as possible. Just retreat the same way you came. - -\l;Ants\u object\ant; are fairly easy to avoid. If you're badly hit, find a quiet spot and wait until your shield has regenerated. - -\l;Spiders\u object\spider; are a bit tougher but also more stupid. As soon as they see you, they burst their abdomen, dying in the process. If one fragment hits you, you'll die too. One risky but efficient method to rid yourself of a spider consists in moving dangerously close and, when the spider's abdomen starts inflating, swiftly fly backwards to safety. - -As soon as you have reached a quiet island, you can use the \l;winged orga shooter\u object\botoj; to clear your way of hostile insects. Be careful not to lose it, otherwise the whole mission would be in vain. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +Everything is blowing up around you. You need to leave the old basecamp as quickly as possible. Just retreat the same way you came. + +\l;Ants\u object\ant; are fairly easy to avoid. If you're badly hit, find a quiet spot and wait until your shield has regenerated. + +\l;Spiders\u object\spider; are a bit tougher but also more stupid. As soon as they see you, they burst their abdomen, dying in the process. If one fragment hits you, you'll die too. One risky but efficient method to rid yourself of a spider consists in moving dangerously close and, when the spider's abdomen starts inflating, swiftly fly backwards to safety. + +As soon as you have reached a quiet island, you can use the \l;winged orga shooter\u object\botoj; to clear your way of hostile insects. Be careful not to lose it, otherwise the whole mission would be in vain. + +\t;See also +\l;Controls\u command; diff --git a/help/msvolca6.txt b/help/msvolca6.txt index e3a7ef6f..b5b7fcb1 100644 --- a/help/msvolca6.txt +++ b/help/msvolca6.txt @@ -1,9 +1,9 @@ -\b;Walkthrough -It is safer for \l;you\u object\human; to stay on the \l;spaceship\u object\base;. You may get hit a few times but not fatally. - -Put your new \l;winged orga shooter\u object\botoj; to good use and don't waste any time. First shoot the ants on your right, then turn clockwise around the spaceship, flying at low altitude. - -If you can not do it this way, place the \l;winged orga shooter\u object\botoj; on a safe place north of the spaceship, then save yourself. You can then take your time to shoot the ants one after another; they can do no harm to the spaceship and the black box. - -\t;See also -\l;Controls\u command; +\b;Walkthrough +It is safer for \l;you\u object\human; to stay on the \l;spaceship\u object\base;. You may get hit a few times but not fatally. + +Put your new \l;winged orga shooter\u object\botoj; to good use and don't waste any time. First shoot the ants on your right, then turn clockwise around the spaceship, flying at low altitude. + +If you can not do it this way, place the \l;winged orga shooter\u object\botoj; on a safe place north of the spaceship, then save yourself. You can then take your time to shoot the ants one after another; they can do no harm to the spaceship and the black box. + +\t;See also +\l;Controls\u command; diff --git a/help/navig.txt b/help/navig.txt index 71700d07..63622750 100644 --- a/help/navig.txt +++ b/help/navig.txt @@ -1,22 +1,22 @@ -\b;Navigation -The three buttons on the upper left-hand corner of the screen allow you to navigate in the different texts of the help file: - -\button 30; Home -Get back to the home page, i.e. the first page that was displayed, for example when you hit the \key;\key help;\norm; or \key;\key prog;\norm; key. - -\button 55; Previous -Get back to the previous page, i.e. the page that was displayed before you clicked on a link. - -\button 48; Next -Get again to the next page, after you used the "Home" or "Previous" button. - -\t;Remark -When a button is gray, this means that it can not be used at this precise moment. For example, when you are in the home page, the "Home" button is gray, because it does not make sense to use it. - -This remark is valid for all buttons in COLOBOT. - -\t;Text scrolling -If your mouse is equipped with a wheel, you can use it to scroll the text up and down. Otherwise, use the arrow keys and the scroll bar on the right-hand side of the screen. - -\t;Font size -The cursor on the upper side of the screen allows you to change the font size of the text. +\b;Navigation +The three buttons on the upper left-hand corner of the screen allow you to navigate in the different texts of the help file: + +\button 30; Home +Get back to the home page, i.e. the first page that was displayed, for example when you hit the \key;\key help;\norm; or \key;\key prog;\norm; key. + +\button 55; Previous +Get back to the previous page, i.e. the page that was displayed before you clicked on a link. + +\button 48; Next +Get again to the next page, after you used the "Home" or "Previous" button. + +\t;Remark +When a button is gray, this means that it can not be used at this precise moment. For example, when you are in the home page, the "Home" button is gray, because it does not make sense to use it. + +This remark is valid for all buttons in COLOBOT. + +\t;Text scrolling +If your mouse is equipped with a wheel, you can use it to scroll the text up and down. Otherwise, use the arrow keys and the scroll bar on the right-hand side of the screen. + +\t;Font size +The cursor on the upper side of the screen allows you to change the font size of the text. diff --git a/help/object/ant.txt b/help/object/ant.txt index f1335766..87b82f40 100644 --- a/help/object/ant.txt +++ b/help/object/ant.txt @@ -1,11 +1,11 @@ -\b;Ant -\image ant 8 8; -Ants shoot tiny corrosive balls that eventually gnaw into the protective shielding of bots and buildings, causing them to explode. - -\l;You\u object\human; can resist their attack much longer than most buildings and bots, and your protective shield will be restored as your wounds heal. However, if you stay too long in their range or if there are too many of them, your life is in great danger. - -\t;Object \l;Category\u cbot\category; -\c;AlienAnt\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Ant +\image ant 8 8; +Ants shoot tiny corrosive balls that eventually gnaw into the protective shielding of bots and buildings, causing them to explode. + +\l;You\u object\human; can resist their attack much longer than most buildings and bots, and your protective shield will be restored as your wounds heal. However, if you stay too long in their range or if there are too many of them, your life is in great danger. + +\t;Object \l;Category\u cbot\category; +\c;AlienAnt\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/atomic.txt b/help/object/atomic.txt index 8ce2801b..367dff0e 100644 --- a/help/object/atomic.txt +++ b/help/object/atomic.txt @@ -1,15 +1,15 @@ -\b;Nuclear Power Cell -\image atomic 4 4; -A nuclear power cell supplies the bots and some buildings with energy. -Its capacity is 100 times that of a \l;regular power cell\u object\power;. - -Nuclear power cells cannot be recharged or recycled. A \l;nuclear plant\u object\nuclear; and some \l;uranium ore\u object\uranore; is needed to produce a new and fully charged nuclear power cell. - -\t;Transport -All \l;grabbers\u object\botgr; and the \l;astronaut\u object\human;. - -\t;Object \l;Category\u cbot\category; -\c;NuclearCell\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Nuclear Power Cell +\image atomic 4 4; +A nuclear power cell supplies the bots and some buildings with energy. +Its capacity is 100 times that of a \l;regular power cell\u object\power;. + +Nuclear power cells cannot be recharged or recycled. A \l;nuclear plant\u object\nuclear; and some \l;uranium ore\u object\uranore; is needed to produce a new and fully charged nuclear power cell. + +\t;Transport +All \l;grabbers\u object\botgr; and the \l;astronaut\u object\human;. + +\t;Object \l;Category\u cbot\category; +\c;NuclearCell\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/barrier.txt b/help/object/barrier.txt index d16e296f..14646cb0 100644 --- a/help/object/barrier.txt +++ b/help/object/barrier.txt @@ -1,8 +1,8 @@ -\b;Barrier -The barrier is nothing more than an obstacle used in the exercises. - -\t;Object \l;Category\u cbot\category; -\c;Barrier\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Barrier +The barrier is nothing more than an obstacle used in the exercises. + +\t;Object \l;Category\u cbot\category; +\c;Barrier\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/base.txt b/help/object/base.txt index 227c6861..84577068 100644 --- a/help/object/base.txt +++ b/help/object/base.txt @@ -1,11 +1,11 @@ -\b;\button 171; Spaceship -\image base 8 8; -\l;Your\u object\human; means of transportation from one planet to the next, the only way to travel safely across the cosmos and accomplish your missions. - -In addition to yourself, the spaceship can carry bots and raw materials. Whenever a mission is completed, you must select the spaceship, then click on the command \button 28;. - -\t;Object \l;Category\u cbot\category; -\c;SpaceShip\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 171; Spaceship +\image base 8 8; +\l;Your\u object\human; means of transportation from one planet to the next, the only way to travel safely across the cosmos and accomplish your missions. + +In addition to yourself, the spaceship can carry bots and raw materials. Whenever a mission is completed, you must select the spaceship, then click on the command \button 28;. + +\t;Object \l;Category\u cbot\category; +\c;SpaceShip\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/bbox.txt b/help/object/bbox.txt index e5468f4d..4b4a8557 100644 --- a/help/object/bbox.txt +++ b/help/object/bbox.txt @@ -1,14 +1,14 @@ -\b;Black Box -\image bbox 4 4; -A black box is actually orange so as to be easier to identify and locate. Each \l;spaceship\u object\base; is equipped with a black box that records and stores information about the flight. - -A black box can also be used to leave important information. On every planet the first expedition has left a black box containing the coordinates of the planet it was heading towards next. - -\t;Transport -All \l;grabbers\u object\botgr; and the \l;astronaut\u object\human;. - -\t;Object \l;Category\u cbot\category; -\c;BlackBox\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Black Box +\image bbox 4 4; +A black box is actually orange so as to be easier to identify and locate. Each \l;spaceship\u object\base; is equipped with a black box that records and stores information about the flight. + +A black box can also be used to leave important information. On every planet the first expedition has left a black box containing the coordinates of the planet it was heading towards next. + +\t;Transport +All \l;grabbers\u object\botgr; and the \l;astronaut\u object\human;. + +\t;Object \l;Category\u cbot\category; +\c;BlackBox\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/botfc.txt b/help/object/botfc.txt index ba61d999..b95751e3 100644 --- a/help/object/botfc.txt +++ b/help/object/botfc.txt @@ -1,20 +1,20 @@ -\b;\button 144; Tracked Shooter -\image botfc 8 8; -Tracked bot equipped with a fireball cannon. - -The fireball cannon is an efficient weapon against most kinds of \l;enemies\u object\mother;. Use it sparingly though for it requires large amounts of energy. A \l;regular power cell\u object\power; will only allow you to shoot 4 fireball bursts. - -Tip : it is possible to move the mouse while shooting, so as to sweep a larger area. - -Tracked bots can ascend steep inclinations but they are quite slow and use a lot of energy. On flat ground for short distances, a \l;wheeled shooter\u object\botfr; is a better option. When it is possible to build \l;winged bots\u object\botfj;, these represent the best solution for long distances. - -\t;Programming -To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. - -To program the fireball cannon, use \c;\l;fire\u cbot\fire;\n;. To raise or lower the aim, use \c;\l;aim\u cbot\aim;\n;. - -\t;Object \l;Category\u cbot\category; -\c;TrackedShooter\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 144; Tracked Shooter +\image botfc 8 8; +Tracked bot equipped with a fireball cannon. + +The fireball cannon is an efficient weapon against most kinds of \l;enemies\u object\mother;. Use it sparingly though for it requires large amounts of energy. A \l;regular power cell\u object\power; will only allow you to shoot 4 fireball bursts. + +Tip : it is possible to move the mouse while shooting, so as to sweep a larger area. + +Tracked bots can ascend steep inclinations but they are quite slow and use a lot of energy. On flat ground for short distances, a \l;wheeled shooter\u object\botfr; is a better option. When it is possible to build \l;winged bots\u object\botfj;, these represent the best solution for long distances. + +\t;Programming +To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. + +To program the fireball cannon, use \c;\l;fire\u cbot\fire;\n;. To raise or lower the aim, use \c;\l;aim\u cbot\aim;\n;. + +\t;Object \l;Category\u cbot\category; +\c;TrackedShooter\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/botfj.txt b/help/object/botfj.txt index 188b7f2c..b852517d 100644 --- a/help/object/botfj.txt +++ b/help/object/botfj.txt @@ -1,22 +1,22 @@ -\b;\button 145; Winged Shooter -\image botfj 8 8; -Jet propelled flying bot equipped with a fireball cannon. - -The fireball cannon is an efficient weapon against most kinds of \l;enemies\u object\mother;. Use it sparingly though for it requires large amounts of energy. A \l;regular power cell\u object\power; will only allow you to shoot 4 fireball bursts. - -Tip : it is possible to move the mouse while shooting, so as to sweep a larger area. - -The display at the bottom of your screen indicates the temperature of the reactor. Keep an eye on it. If the reactor overheats, the engine will stop and the bot will crash. - -Winged bots can fly across natural obstacles such as mountains or lakes but their energy supply is used up quickly. They're slow on the ground. To cover a short distance that will not call for flying, it is recommended to use a \l;wheeled shooter\u object\botfr; instead. - -\t;Programming -To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;jet\u cbot\jet;\n;, \c;\l;goto\u cbot\goto;\n;. - -To program the fireball cannon, use \c;\l;fire\u cbot\fire;\n;. To raise or lower the aim, use \c;\l;aim\u cbot\aim;\n;. - -\t;Object \l;Category\u cbot\category; -\c;WingedShooter\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 145; Winged Shooter +\image botfj 8 8; +Jet propelled flying bot equipped with a fireball cannon. + +The fireball cannon is an efficient weapon against most kinds of \l;enemies\u object\mother;. Use it sparingly though for it requires large amounts of energy. A \l;regular power cell\u object\power; will only allow you to shoot 4 fireball bursts. + +Tip : it is possible to move the mouse while shooting, so as to sweep a larger area. + +The display at the bottom of your screen indicates the temperature of the reactor. Keep an eye on it. If the reactor overheats, the engine will stop and the bot will crash. + +Winged bots can fly across natural obstacles such as mountains or lakes but their energy supply is used up quickly. They're slow on the ground. To cover a short distance that will not call for flying, it is recommended to use a \l;wheeled shooter\u object\botfr; instead. + +\t;Programming +To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;jet\u cbot\jet;\n;, \c;\l;goto\u cbot\goto;\n;. + +To program the fireball cannon, use \c;\l;fire\u cbot\fire;\n;. To raise or lower the aim, use \c;\l;aim\u cbot\aim;\n;. + +\t;Object \l;Category\u cbot\category; +\c;WingedShooter\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/botfr.txt b/help/object/botfr.txt index dc716aa6..43cea003 100644 --- a/help/object/botfr.txt +++ b/help/object/botfr.txt @@ -1,20 +1,20 @@ -\b;\button 143; Wheeled Shooter -\image botfr 8 8; -Wheeled bot equipped with a fireball cannon. - -The fireball cannon is an efficient weapon against most kinds of \l;enemies\u object\mother;. Use it sparingly though for it requires large amounts of energy. A \l;regular power cell\u object\power; will only allow you to shoot 4 fireball bursts. - -Tip : it is possible to move the mouse while shooting, so as to sweep a larger area. - -Wheels constitute a standard, fast and energy-saving mode of propulsion, which is perfectly adapted for a relatively flat terrain. Whenever the terrain gets sloped, it is advised to use a \l;winged shooter\u object\botfj; instead, or, if this is impossible, a \l;tracked shooter\u object\botfc;. - -\t;Programming -To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. - -To program the fireball cannon, use \c;\l;fire\u cbot\fire;\n;. To raise or lower the aim, use \c;\l;aim\u cbot\aim;\n;. - -\t;Object \l;Category\u cbot\category; -\c;WheeledShooter\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 143; Wheeled Shooter +\image botfr 8 8; +Wheeled bot equipped with a fireball cannon. + +The fireball cannon is an efficient weapon against most kinds of \l;enemies\u object\mother;. Use it sparingly though for it requires large amounts of energy. A \l;regular power cell\u object\power; will only allow you to shoot 4 fireball bursts. + +Tip : it is possible to move the mouse while shooting, so as to sweep a larger area. + +Wheels constitute a standard, fast and energy-saving mode of propulsion, which is perfectly adapted for a relatively flat terrain. Whenever the terrain gets sloped, it is advised to use a \l;winged shooter\u object\botfj; instead, or, if this is impossible, a \l;tracked shooter\u object\botfc;. + +\t;Programming +To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. + +To program the fireball cannon, use \c;\l;fire\u cbot\fire;\n;. To raise or lower the aim, use \c;\l;aim\u cbot\aim;\n;. + +\t;Object \l;Category\u cbot\category; +\c;WheeledShooter\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/botfs.txt b/help/object/botfs.txt index 9c25e2dd..5a5c2728 100644 --- a/help/object/botfs.txt +++ b/help/object/botfs.txt @@ -1,20 +1,20 @@ -\b;\button 151; Legged Shooter -\image botfs 8 8; -Ant-legged creeping bot equipped with a fireball cannon. - -The fireball cannon is an efficient weapon against most kinds of \l;enemies\u object\mother;. Use it sparingly though for it requires large amounts of energy. A \l;regular power cell\u object\power; will only allow you to shoot 4 fireball bursts. - -Tip : it is possible to move the mouse while shooting, so as to sweep a larger area. - -A moving legged shooter uses up half as much energy as a \l;wheeled shooter\u object\botfr;. A legged bot is also perfectly adapted to climb the steepest slopes. - -\t;Programming -To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. - -To program the fireball cannon, use \c;\l;fire\u cbot\fire;\n;. To raise or lower the aim, use \c;\l;aim\u cbot\aim;\n;. - -\t;Object \l;Category\u cbot\category; -\c;LeggedShooter\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 151; Legged Shooter +\image botfs 8 8; +Ant-legged creeping bot equipped with a fireball cannon. + +The fireball cannon is an efficient weapon against most kinds of \l;enemies\u object\mother;. Use it sparingly though for it requires large amounts of energy. A \l;regular power cell\u object\power; will only allow you to shoot 4 fireball bursts. + +Tip : it is possible to move the mouse while shooting, so as to sweep a larger area. + +A moving legged shooter uses up half as much energy as a \l;wheeled shooter\u object\botfr;. A legged bot is also perfectly adapted to climb the steepest slopes. + +\t;Programming +To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. + +To program the fireball cannon, use \c;\l;fire\u cbot\fire;\n;. To raise or lower the aim, use \c;\l;aim\u cbot\aim;\n;. + +\t;Object \l;Category\u cbot\category; +\c;LeggedShooter\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/botgc.txt b/help/object/botgc.txt index 1d0349a9..8abb41c7 100644 --- a/help/object/botgc.txt +++ b/help/object/botgc.txt @@ -1,33 +1,33 @@ -\b;\button 138; Tracked Grabber -\image botgc 8 8; -Tracked bot equipped with an operating arm. - -\button 32; Grabs an object or lays it down again, at a position that is determined by one of the following options : -\button 33; The object is lying in front of the bot, on the ground or on the back of a second bot. -\button 35; The object is the bot's own power cell. -\button 34; The object is lying behind the bot, on the ground. - -The following objects can be transported : -o \l;Titanium ore\u object\titanore;. -o \l;Uranium ore\u object\uranore;. -o \l;Cube of titanium\u object\titan;. -o \l;Regular power cell\u object\power;. -o \l;Nuclear power cell\u object\atomic;. -o \l;Black box\u object\bbox;. -o \l;Keys A, B, C, and D\u object\key;. -o \l;Organic matter\u object\bullet;. - -Tracked bots can ascend steep inclinations but they are quite slow and use much energy. On flat ground for short distances, a \l;wheeled grabber\u object\botgr; is a better option. When it is possible to build \l;winged bots\u object\botgj;, these represent the best solution for long distances. - -A grabber won't function underwater. What you'll need instead is a \l;subber\u object\botsub;. - -\t;Programming -To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. - -To program the operating arm, use \c;\l;grab\u cbot\grab;\n; and \c;\l;drop\u cbot\drop;\n;. - -\t;Object \l;Category\u cbot\category; -\c;TrackedGrabber\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 138; Tracked Grabber +\image botgc 8 8; +Tracked bot equipped with an operating arm. + +\button 32; Grabs an object or lays it down again, at a position that is determined by one of the following options : +\button 33; The object is lying in front of the bot, on the ground or on the back of a second bot. +\button 35; The object is the bot's own power cell. +\button 34; The object is lying behind the bot, on the ground. + +The following objects can be transported : +o \l;Titanium ore\u object\titanore;. +o \l;Uranium ore\u object\uranore;. +o \l;Cube of titanium\u object\titan;. +o \l;Regular power cell\u object\power;. +o \l;Nuclear power cell\u object\atomic;. +o \l;Black box\u object\bbox;. +o \l;Keys A, B, C, and D\u object\key;. +o \l;Organic matter\u object\bullet;. + +Tracked bots can ascend steep inclinations but they are quite slow and use much energy. On flat ground for short distances, a \l;wheeled grabber\u object\botgr; is a better option. When it is possible to build \l;winged bots\u object\botgj;, these represent the best solution for long distances. + +A grabber won't function underwater. What you'll need instead is a \l;subber\u object\botsub;. + +\t;Programming +To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. + +To program the operating arm, use \c;\l;grab\u cbot\grab;\n; and \c;\l;drop\u cbot\drop;\n;. + +\t;Object \l;Category\u cbot\category; +\c;TrackedGrabber\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/botgj.txt b/help/object/botgj.txt index b8db1584..f237bfaf 100644 --- a/help/object/botgj.txt +++ b/help/object/botgj.txt @@ -1,35 +1,35 @@ -\b;\button 139; Winged Grabber -\image botgj 8 8; -Jet propelled flying bot equipped with an operating arm. - -\button 32; Grabs an object or lays it down again, at a position that is determined by one of the following options : -\button 33; The object is lying in front of the bot, on the ground or on the back of a second bot. -\button 35; The object is the bot's own power cell. -\button 34; The object is lying behind the bot, on the ground. - -The following objects can be transported : -o \l;Titanium ore\u object\titanore;. -o \l;Uranium ore\u object\uranore;. -o \l;Cube of titanium\u object\titan;. -o \l;Regular power cell\u object\power;. -o \l;Nuclear power cell\u object\atomic;. -o \l;Black box\u object\bbox;. -o \l;Keys A, B, C, and D\u object\key;. -o \l;Organic matter\u object\bullet;. - -The display at the bottom of your screen indicates the temperature of the reactor. Keep an eye on it. If the reactor overheats, the engine will stop and the bot will crash. - -Winged bots can fly across natural obstacles such as mountains or lakes but their energy supply is used up quickly. They're slow on the ground. To cover a short distance that will not call for flying, it is recommended to use a \l;wheeled grabber\u object\botgr; instead. - -A grabber won't function underwater. What you'll need instead is a \l;subber\u object\botsub;. - -\t;Programming -To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. - -To program the operating arm, use \c;\l;grab\u cbot\grab;\n; and \c;\l;drop\u cbot\drop;\n;. - -\t;Object \l;Category\u cbot\category; -\c;WingedGrabber\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 139; Winged Grabber +\image botgj 8 8; +Jet propelled flying bot equipped with an operating arm. + +\button 32; Grabs an object or lays it down again, at a position that is determined by one of the following options : +\button 33; The object is lying in front of the bot, on the ground or on the back of a second bot. +\button 35; The object is the bot's own power cell. +\button 34; The object is lying behind the bot, on the ground. + +The following objects can be transported : +o \l;Titanium ore\u object\titanore;. +o \l;Uranium ore\u object\uranore;. +o \l;Cube of titanium\u object\titan;. +o \l;Regular power cell\u object\power;. +o \l;Nuclear power cell\u object\atomic;. +o \l;Black box\u object\bbox;. +o \l;Keys A, B, C, and D\u object\key;. +o \l;Organic matter\u object\bullet;. + +The display at the bottom of your screen indicates the temperature of the reactor. Keep an eye on it. If the reactor overheats, the engine will stop and the bot will crash. + +Winged bots can fly across natural obstacles such as mountains or lakes but their energy supply is used up quickly. They're slow on the ground. To cover a short distance that will not call for flying, it is recommended to use a \l;wheeled grabber\u object\botgr; instead. + +A grabber won't function underwater. What you'll need instead is a \l;subber\u object\botsub;. + +\t;Programming +To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. + +To program the operating arm, use \c;\l;grab\u cbot\grab;\n; and \c;\l;drop\u cbot\drop;\n;. + +\t;Object \l;Category\u cbot\category; +\c;WingedGrabber\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/botgr.txt b/help/object/botgr.txt index 1d8e8ee8..8dcc5991 100644 --- a/help/object/botgr.txt +++ b/help/object/botgr.txt @@ -1,33 +1,33 @@ -\b;\button 137; Wheeled Grabber -\image botgr 8 8; -Wheeled bot equipped with an operating arm. - -\button 32; Grabs an object or lays it down again, at a position that is determined by one of the following options : -\button 33; The object is lying in front of the bot, on the ground or on the back of a second bot. -\button 35; The object is the bot's own power cell. -\button 34; The object is lying behind the bot, on the ground. - -The following objects can be transported : -o \l;Titanium ore\u object\titanore;. -o \l;Uranium ore\u object\uranore;. -o \l;Converted titanium\u object\titan;. -o \l;Regular power cell\u object\power;. -o \l;Nuclear power cell\u object\atomic;. -o \l;Black box\u object\bbox;. -o \l;Keys A, B, C, and D\u object\key;. -o \l;Organic matter\u object\bullet;. - -Wheels constitute a standard, fast and energy-saving mode of propulsion, which is perfectly adapted for a relatively flat terrain. Whenever the terrain gets sloped, it is advised to use a \l;winged shooter\u object\botfj; instead, or, if this is impossible, a \l;tracked shooter\u object\botfc;. - -A grabber won't function underwater. What you'll need instead is a \l;subber\u object\botsub;. - -\t;Programming -To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. - -To program the operating arm, use \c;\l;grab\u cbot\grab;\n; and \c;\l;drop\u cbot\drop;\n;. - -\t;Object \l;Category\u cbot\category; -\c;WheeledGrabber\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 137; Wheeled Grabber +\image botgr 8 8; +Wheeled bot equipped with an operating arm. + +\button 32; Grabs an object or lays it down again, at a position that is determined by one of the following options : +\button 33; The object is lying in front of the bot, on the ground or on the back of a second bot. +\button 35; The object is the bot's own power cell. +\button 34; The object is lying behind the bot, on the ground. + +The following objects can be transported : +o \l;Titanium ore\u object\titanore;. +o \l;Uranium ore\u object\uranore;. +o \l;Converted titanium\u object\titan;. +o \l;Regular power cell\u object\power;. +o \l;Nuclear power cell\u object\atomic;. +o \l;Black box\u object\bbox;. +o \l;Keys A, B, C, and D\u object\key;. +o \l;Organic matter\u object\bullet;. + +Wheels constitute a standard, fast and energy-saving mode of propulsion, which is perfectly adapted for a relatively flat terrain. Whenever the terrain gets sloped, it is advised to use a \l;winged shooter\u object\botfj; instead, or, if this is impossible, a \l;tracked shooter\u object\botfc;. + +A grabber won't function underwater. What you'll need instead is a \l;subber\u object\botsub;. + +\t;Programming +To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. + +To program the operating arm, use \c;\l;grab\u cbot\grab;\n; and \c;\l;drop\u cbot\drop;\n;. + +\t;Object \l;Category\u cbot\category; +\c;WheeledGrabber\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/botgs.txt b/help/object/botgs.txt index 04faaa27..b839c9fb 100644 --- a/help/object/botgs.txt +++ b/help/object/botgs.txt @@ -1,34 +1,34 @@ -\b;\button 150; Legged Grabber -\image botgs 8 8; -Ant-legged creeping bot equipped with an operating arm. - -\button 32; Grabs an object or lays it down again, at a position that is determined by one of the following options : -\button 33; The object is lying in front of the bot, on the ground or on the back of a second bot. -\button 35; The object is the bot's own power cell. -\button 34; The object is lying behind the bot, on the ground. - -The following objects can be transported : -o \l;Titanium ore\u object\titanore;. -o \l;Uranium ore\u object\uranore;. -o \l;Converted titanium\u object\titan;. -o \l;Regular power cell\u object\power;. -o \l;Nuclear power cell\u object\atomic;. -o \l;Black box\u object\bbox;. -o \l;Keys A, B, C, and D\u object\key;. -o \l;Organic matter\u object\bullet;. - -A moving legged grabber uses up half as much energy as a \l;wheeled grabber\u object\botgr;. A legged bot is also perfectly adapted to climb the steepest slopes. - -A grabber won't function underwater. What you'll need instead is a \l;subber\u object\botsub;. - -\t;Programming -To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. - -To program the operating arm, use \c;\l;grab\u cbot\grab;\n; and \c;\l;drop\u cbot\drop;\n;. - -\t;Object \l;Category\u cbot\category; -\c;LeggedGrabber\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. - +\b;\button 150; Legged Grabber +\image botgs 8 8; +Ant-legged creeping bot equipped with an operating arm. + +\button 32; Grabs an object or lays it down again, at a position that is determined by one of the following options : +\button 33; The object is lying in front of the bot, on the ground or on the back of a second bot. +\button 35; The object is the bot's own power cell. +\button 34; The object is lying behind the bot, on the ground. + +The following objects can be transported : +o \l;Titanium ore\u object\titanore;. +o \l;Uranium ore\u object\uranore;. +o \l;Converted titanium\u object\titan;. +o \l;Regular power cell\u object\power;. +o \l;Nuclear power cell\u object\atomic;. +o \l;Black box\u object\bbox;. +o \l;Keys A, B, C, and D\u object\key;. +o \l;Organic matter\u object\bullet;. + +A moving legged grabber uses up half as much energy as a \l;wheeled grabber\u object\botgr;. A legged bot is also perfectly adapted to climb the steepest slopes. + +A grabber won't function underwater. What you'll need instead is a \l;subber\u object\botsub;. + +\t;Programming +To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. + +To program the operating arm, use \c;\l;grab\u cbot\grab;\n; and \c;\l;drop\u cbot\drop;\n;. + +\t;Object \l;Category\u cbot\category; +\c;LeggedGrabber\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. + diff --git a/help/object/botoc.txt b/help/object/botoc.txt index 62fdeb54..43fecf54 100644 --- a/help/object/botoc.txt +++ b/help/object/botoc.txt @@ -1,18 +1,18 @@ -\b;\button 154; Tracked Orga Shooter -\image botoc 8 8; -Tracked bot equipped with an orgaball cannon. - -The orgaball cannon is more effective than the \l;fireball cannon\u object\botfc;. It shoots small spheres of corrosive \l;organic matter\u object\bullet;. A \l;regular power cell\u object\power; will allow you to shoot 11 orgaball bursts. - -Tracked bots can ascend steep inclinations but they are quite slow and use a lot of energy. On flat ground for short distances, a \l;wheeled orga shooter\u object\botor; is a better option. When it is possible to build \l;winged bots\u object\botoj;, these represent the best solution for long distances. - -\t;Programming -To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. - -To program the orgaball cannon, use \c;\l;fire\u cbot\fire;\n;. To raise or lower the aim, use \c;\l;aim\u cbot\aim;\n;. - -\t;Object \l;Category\u cbot\category; -\c;TrackedOrgaShooter\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 154; Tracked Orga Shooter +\image botoc 8 8; +Tracked bot equipped with an orgaball cannon. + +The orgaball cannon is more effective than the \l;fireball cannon\u object\botfc;. It shoots small spheres of corrosive \l;organic matter\u object\bullet;. A \l;regular power cell\u object\power; will allow you to shoot 11 orgaball bursts. + +Tracked bots can ascend steep inclinations but they are quite slow and use a lot of energy. On flat ground for short distances, a \l;wheeled orga shooter\u object\botor; is a better option. When it is possible to build \l;winged bots\u object\botoj;, these represent the best solution for long distances. + +\t;Programming +To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. + +To program the orgaball cannon, use \c;\l;fire\u cbot\fire;\n;. To raise or lower the aim, use \c;\l;aim\u cbot\aim;\n;. + +\t;Object \l;Category\u cbot\category; +\c;TrackedOrgaShooter\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/botoj.txt b/help/object/botoj.txt index f4adf661..70f7b99d 100644 --- a/help/object/botoj.txt +++ b/help/object/botoj.txt @@ -1,20 +1,20 @@ -\b;\button 155; Winged Orga Shooter -\image botoj 8 8; -Jet propelled flying bot equipped with an orgaball cannon. - -The orgaball cannon is more effective than the \l;fireball cannon\u object\botfj;. It shoots small spheres of corrosive \l;organic matter\u object\bullet;. A \l;regular power cell\u object\power; will allow you to shoot 11 orgaball bursts. - -The display at the bottom of your screen indicates the temperature of the reactor. Keep an eye on it. If the reactor overheats, the engine will stop and the bot will crash. - -Winged bots can fly across natural obstacles such as mountains or lakes but their energy supply is used up quickly. They're slow on the ground. To cover a short distance that will not call for flying, it is recommended to use a \l;wheeled orga shooter\u object\botor; instead. - -\t;Programming -To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;jet\u cbot\jet;\n;, \c;\l;goto\u cbot\goto;\n;. - -To program the orgaball cannon, use \c;\l;fire\u cbot\fire;\n;. To raise or lower the aim, use \c;\l;aim\u cbot\aim;\n;. - -\t;Object \l;Category\u cbot\category; -\c;WingedOrgaShooter\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 155; Winged Orga Shooter +\image botoj 8 8; +Jet propelled flying bot equipped with an orgaball cannon. + +The orgaball cannon is more effective than the \l;fireball cannon\u object\botfj;. It shoots small spheres of corrosive \l;organic matter\u object\bullet;. A \l;regular power cell\u object\power; will allow you to shoot 11 orgaball bursts. + +The display at the bottom of your screen indicates the temperature of the reactor. Keep an eye on it. If the reactor overheats, the engine will stop and the bot will crash. + +Winged bots can fly across natural obstacles such as mountains or lakes but their energy supply is used up quickly. They're slow on the ground. To cover a short distance that will not call for flying, it is recommended to use a \l;wheeled orga shooter\u object\botor; instead. + +\t;Programming +To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;jet\u cbot\jet;\n;, \c;\l;goto\u cbot\goto;\n;. + +To program the orgaball cannon, use \c;\l;fire\u cbot\fire;\n;. To raise or lower the aim, use \c;\l;aim\u cbot\aim;\n;. + +\t;Object \l;Category\u cbot\category; +\c;WingedOrgaShooter\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/botor.txt b/help/object/botor.txt index 1332edb0..8da2ce7c 100644 --- a/help/object/botor.txt +++ b/help/object/botor.txt @@ -1,19 +1,19 @@ -\b;\button 153; Wheeled Orga Shooter -\image botor 8 8; -Wheeled bot equipped with an orgaball cannon. - -The orgaball cannon is more effective than the \l;fireball cannon\u object\botfr;. It shoots small spheres of corrosive \l;organic matter\u object\bullet;. A \l;regular power cell\u object\power; will allow you to shoot 11 orgaball bursts. - -Wheels constitute a standard, fast and energy-saving mode of propulsion, which is perfectly adapted for a relatively flat terrain. Whenever the terrain gets sloped, it is advised to instead use a \l;winged orga shooter\u object\botoj;, or, if this is impossible, a \l;tracked orga shooter\u object\botoc;. - -\t;Programming -To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. - -To program the orgaball cannon, use \c;\l;fire\u cbot\fire;\n;. To raise or lower the aim, use \c;\l;aim\u cbot\aim;\n;. - -\t;Object \l;Category\u cbot\category; -\c;WheeledOrgaShooter\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. - +\b;\button 153; Wheeled Orga Shooter +\image botor 8 8; +Wheeled bot equipped with an orgaball cannon. + +The orgaball cannon is more effective than the \l;fireball cannon\u object\botfr;. It shoots small spheres of corrosive \l;organic matter\u object\bullet;. A \l;regular power cell\u object\power; will allow you to shoot 11 orgaball bursts. + +Wheels constitute a standard, fast and energy-saving mode of propulsion, which is perfectly adapted for a relatively flat terrain. Whenever the terrain gets sloped, it is advised to instead use a \l;winged orga shooter\u object\botoj;, or, if this is impossible, a \l;tracked orga shooter\u object\botoc;. + +\t;Programming +To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. + +To program the orgaball cannon, use \c;\l;fire\u cbot\fire;\n;. To raise or lower the aim, use \c;\l;aim\u cbot\aim;\n;. + +\t;Object \l;Category\u cbot\category; +\c;WheeledOrgaShooter\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. + diff --git a/help/object/botos.txt b/help/object/botos.txt index cdee7fbb..a1ff6d09 100644 --- a/help/object/botos.txt +++ b/help/object/botos.txt @@ -1,18 +1,18 @@ -\b;\button 156; Legged Orga Shooter -\image botos 8 8; -Ant-legged creeping bot equipped with an orgaball cannon. - -The orgaball cannon is more effective than the \l;fireball cannon\u object\botfs;. It shoots small spheres of corrosive \l;organic matter\u object\bullet;. A \l;regular power cell\u object\power; will allow you to shoot 11 orgaball bursts. - -A moving legged orga shooter uses up half as much energy as a \l;wheeled orga shooter\u object\botor;. A legged bot is also perfectly adapted to climb the steepest slopes. - -\t;Programming -To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. - -To program the orgaball cannon, use \c;\l;fire\u cbot\fire;\n;. To raise or lower the aim, use \c;\l;aim\u cbot\aim;\n;. - -\t;Object \l;Category\u cbot\category; -\c;LeggedOrgaShooter\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 156; Legged Orga Shooter +\image botos 8 8; +Ant-legged creeping bot equipped with an orgaball cannon. + +The orgaball cannon is more effective than the \l;fireball cannon\u object\botfs;. It shoots small spheres of corrosive \l;organic matter\u object\bullet;. A \l;regular power cell\u object\power; will allow you to shoot 11 orgaball bursts. + +A moving legged orga shooter uses up half as much energy as a \l;wheeled orga shooter\u object\botor;. A legged bot is also perfectly adapted to climb the steepest slopes. + +\t;Programming +To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. + +To program the orgaball cannon, use \c;\l;fire\u cbot\fire;\n;. To raise or lower the aim, use \c;\l;aim\u cbot\aim;\n;. + +\t;Object \l;Category\u cbot\category; +\c;LeggedOrgaShooter\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/botphaz.txt b/help/object/botphaz.txt index 742b44a3..232463e1 100644 --- a/help/object/botphaz.txt +++ b/help/object/botphaz.txt @@ -1,14 +1,14 @@ -\b;\button 147; Phazer Shooter -\image botphaz 8 8; -Tracked bot equipped with a very powerful phazer cannon, efficient against most kinds of enemies. When you aim upward, it can shoot up to 60 meters. It is the only weapon that can kill the \l;Alien Queen\u object\mother;. - -\t;Programming -To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. - -To program the phazer cannon, use \c;\l;fire\u cbot\fire;\n;. To raise or lower the aim, use \c;\l;aim\u cbot\aim;\n;. - -\t;Object \l;Category\u cbot\category; -\c;PhazerShooter\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 147; Phazer Shooter +\image botphaz 8 8; +Tracked bot equipped with a very powerful phazer cannon, efficient against most kinds of enemies. When you aim upward, it can shoot up to 60 meters. It is the only weapon that can kill the \l;Alien Queen\u object\mother;. + +\t;Programming +To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. + +To program the phazer cannon, use \c;\l;fire\u cbot\fire;\n;. To raise or lower the aim, use \c;\l;aim\u cbot\aim;\n;. + +\t;Object \l;Category\u cbot\category; +\c;PhazerShooter\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/botrecy.txt b/help/object/botrecy.txt index 62daabe5..68d06f26 100644 --- a/help/object/botrecy.txt +++ b/help/object/botrecy.txt @@ -1,14 +1,14 @@ -\b;\button 148; Recycler -\image botrecy 8 8; -Tracked bot designed to convert a \l;derelict bot\u object\wreck; back into a reusable \l;titanium cube\u object\titan;. - -\t;Programming -To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. - -To program the recycling of a derelict bot, use \c;\l;recycle\u cbot\recycle;\n;. - -\t;Object \l;Category\u cbot\category; -\c;RecyclerBot\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 148; Recycler +\image botrecy 8 8; +Tracked bot designed to convert a \l;derelict bot\u object\wreck; back into a reusable \l;titanium cube\u object\titan;. + +\t;Programming +To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. + +To program the recycling of a derelict bot, use \c;\l;recycle\u cbot\recycle;\n;. + +\t;Object \l;Category\u cbot\category; +\c;RecyclerBot\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/botsc.txt b/help/object/botsc.txt index c89b7553..5d6424ea 100644 --- a/help/object/botsc.txt +++ b/help/object/botsc.txt @@ -1,20 +1,20 @@ -\b;\button 141; Tracked Sniffer -\image botsc 8 8; -Tracked bot equipped to prospect the geological structure of the subsoil. Whenever it locates something of use, the sniffer lays down the following marks: - -- a \l;red cross\u object\stonspot; -> \l;titanium ore\u object\titanore;. -- a \l;yellow circle\u object\uranspot; -> \l;uranium ore\u object\uranore;. -- a \l;green cross\u object\enerspot; -> energy deposit, useful for a \l;power station\u object\station; or a \l;power plant\u object\energy;. - -Tracked bots can ascend steep inclinations but they are quite slow and use a lot of energy. On flat ground for short distances, a \l;wheeled sniffer\u object\botsr; is a better option. When it is possible to build \l;winged bots\u object\botsj;, these represent the best solution for long distances. - -\t;Programming -To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. - -To program the sniffing arm, use \c;\l;sniff\u cbot\sniff;\n;. - -\t;Object \l;Category\u cbot\category; -\c;TrackedSniffer\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 141; Tracked Sniffer +\image botsc 8 8; +Tracked bot equipped to prospect the geological structure of the subsoil. Whenever it locates something of use, the sniffer lays down the following marks: + +- a \l;red cross\u object\stonspot; -> \l;titanium ore\u object\titanore;. +- a \l;yellow circle\u object\uranspot; -> \l;uranium ore\u object\uranore;. +- a \l;green cross\u object\enerspot; -> energy deposit, useful for a \l;power station\u object\station; or a \l;power plant\u object\energy;. + +Tracked bots can ascend steep inclinations but they are quite slow and use a lot of energy. On flat ground for short distances, a \l;wheeled sniffer\u object\botsr; is a better option. When it is possible to build \l;winged bots\u object\botsj;, these represent the best solution for long distances. + +\t;Programming +To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. + +To program the sniffing arm, use \c;\l;sniff\u cbot\sniff;\n;. + +\t;Object \l;Category\u cbot\category; +\c;TrackedSniffer\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/botshld.txt b/help/object/botshld.txt index 7dadce8b..d1bcdaa8 100644 --- a/help/object/botshld.txt +++ b/help/object/botshld.txt @@ -1,18 +1,18 @@ -\b;\button 157; Shielder -\image botshld 8 8; -Tracked bot designed to protect and defend against all \l;enemy\u object\mother; attacks within a perimeter of 10 to 25 meters. The individual shields of bots and buildings are re-energized through the shielder's defensive actions. This bot is the only way to get through narrow passages adorned with poisonous green mushrooms. - -A \l;regular power cell\u object\power; allows for a 20-second activity span with a radius of 25 meters, much too short in most cases. A \l;nuclear power cell\u object\atomic; is of course more suited to this bot. - -The energy consumption is proportional to the radius of the protective sphere. With a radius of 10 meters, the bot can work 2.5 times longer than with the maximum radius of 25 meters. - -\t;Programming -To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. - -To program the deployment of the shield, use \c;\l;shield\u cbot\shield;\n;. - -\t;Object \l;Category\u cbot\category; -\c;Shielder\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 157; Shielder +\image botshld 8 8; +Tracked bot designed to protect and defend against all \l;enemy\u object\mother; attacks within a perimeter of 10 to 25 meters. The individual shields of bots and buildings are re-energized through the shielder's defensive actions. This bot is the only way to get through narrow passages adorned with poisonous green mushrooms. + +A \l;regular power cell\u object\power; allows for a 20-second activity span with a radius of 25 meters, much too short in most cases. A \l;nuclear power cell\u object\atomic; is of course more suited to this bot. + +The energy consumption is proportional to the radius of the protective sphere. With a radius of 10 meters, the bot can work 2.5 times longer than with the maximum radius of 25 meters. + +\t;Programming +To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. + +To program the deployment of the shield, use \c;\l;shield\u cbot\shield;\n;. + +\t;Object \l;Category\u cbot\category; +\c;Shielder\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/botsj.txt b/help/object/botsj.txt index 1fd3690d..9085244f 100644 --- a/help/object/botsj.txt +++ b/help/object/botsj.txt @@ -1,22 +1,22 @@ -\b;\button 142; Winged Sniffer -\image botsj 8 8; -Jet propelled flying bot equipped to prospect the geological structure of the subsoil. Whenever it locates something of use, the sniffer lays down the following marks: - -- a \l;red cross\u object\stonspot; -> \l;titanium ore\u object\titanore;. -- a \l;yellow circle\u object\uranspot; -> \l;uranium ore\u object\uranore;. -- a \l;green cross\u object\enerspot; -> energy deposit, useful for a \l;power station\u object\station; or a \l;power plant\u object\energy;. - -The display at the bottom of your screen indicates the temperature of the reactor. Keep an eye on it. If the reactor overheats, the engine stops and the bot crashes. - -Winged bots can fly across natural obstacles such as mountains or lakes but their energy supply uses up quickly. They're slow on the ground. To cover a short distance that will not call for flying, it is recommended to use a \l;wheeled sniffer\u object\botsr; instead. - -\t;Programming -To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;jet\u cbot\jet;\n;, \c;\l;goto\u cbot\goto;\n;. - -To program the sniffing arm, use \c;\l;sniff\u cbot\sniff;\n;. - -\t;Object \l;Category\u cbot\category; -\c;WingedSniffer\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 142; Winged Sniffer +\image botsj 8 8; +Jet propelled flying bot equipped to prospect the geological structure of the subsoil. Whenever it locates something of use, the sniffer lays down the following marks: + +- a \l;red cross\u object\stonspot; -> \l;titanium ore\u object\titanore;. +- a \l;yellow circle\u object\uranspot; -> \l;uranium ore\u object\uranore;. +- a \l;green cross\u object\enerspot; -> energy deposit, useful for a \l;power station\u object\station; or a \l;power plant\u object\energy;. + +The display at the bottom of your screen indicates the temperature of the reactor. Keep an eye on it. If the reactor overheats, the engine stops and the bot crashes. + +Winged bots can fly across natural obstacles such as mountains or lakes but their energy supply uses up quickly. They're slow on the ground. To cover a short distance that will not call for flying, it is recommended to use a \l;wheeled sniffer\u object\botsr; instead. + +\t;Programming +To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;jet\u cbot\jet;\n;, \c;\l;goto\u cbot\goto;\n;. + +To program the sniffing arm, use \c;\l;sniff\u cbot\sniff;\n;. + +\t;Object \l;Category\u cbot\category; +\c;WingedSniffer\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/botsr.txt b/help/object/botsr.txt index 1af372aa..9e5609c8 100644 --- a/help/object/botsr.txt +++ b/help/object/botsr.txt @@ -1,20 +1,20 @@ -\b;\button 140; Wheeled Sniffer -\image botsr 8 8; -Wheeled bot equipped to prospect the geological structure of the subsoil. Whenever it locates something of use, the sniffer lays down the following marks: - -- a \l;red cross\u object\stonspot; -> \l;titanium ore\u object\titanore;. -- a \l;yellow circle\u object\uranspot; -> \l;uranium ore\u object\uranore;. -- a \l;green cross\u object\enerspot; -> energy deposit, useful for a \l;power station\u object\station; or a \l;power plant\u object\energy;. - -Wheels constitute a standard, fast and energy-saving mode of propulsion, which is perfectly adapted for a relatively flat terrain. Whenever the terrain gets sloped, it is advised to use a \l;winged sniffer\u object\botsj; instead, or, if this is impossible, a \l;tracked sniffer\u object\botsc;. - -\t;Programming -To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. - -To program the sniffing arm, use \c;\l;sniff\u cbot\sniff;\n;. - -\t;Object \l;Category\u cbot\category; -\c;WheeledSniffer\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 140; Wheeled Sniffer +\image botsr 8 8; +Wheeled bot equipped to prospect the geological structure of the subsoil. Whenever it locates something of use, the sniffer lays down the following marks: + +- a \l;red cross\u object\stonspot; -> \l;titanium ore\u object\titanore;. +- a \l;yellow circle\u object\uranspot; -> \l;uranium ore\u object\uranore;. +- a \l;green cross\u object\enerspot; -> energy deposit, useful for a \l;power station\u object\station; or a \l;power plant\u object\energy;. + +Wheels constitute a standard, fast and energy-saving mode of propulsion, which is perfectly adapted for a relatively flat terrain. Whenever the terrain gets sloped, it is advised to use a \l;winged sniffer\u object\botsj; instead, or, if this is impossible, a \l;tracked sniffer\u object\botsc;. + +\t;Programming +To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. + +To program the sniffing arm, use \c;\l;sniff\u cbot\sniff;\n;. + +\t;Object \l;Category\u cbot\category; +\c;WheeledSniffer\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/botss.txt b/help/object/botss.txt index 10de94d9..b2bb5b53 100644 --- a/help/object/botss.txt +++ b/help/object/botss.txt @@ -1,20 +1,20 @@ -\b;\button 152; Legged Sniffer -\image botss 8 8; -Ant-legged creeping bot equipped to prospect the geological structure of the subsoil. Whenever it locates something of use, the sniffer lays down the following marks: - -- a \l;red cross\u object\stonspot; -> \l;titanium ore\u object\titanore;. -- a \l;yellow circle\u object\uranspot; -> \l;uranium ore\u object\uranore;. -- a \l;green cross\u object\enerspot; -> energy deposit, useful for a \l;power station\u object\station; or a \l;power plant\u object\energy;. - -A moving legged shooter uses up half as much energy as a \l;wheeled sniffer\u object\botsr;. A legged bot is also perfectly adapted to climb the steepest slopes. - -\t;Programming -To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. - -To program the sniffing arm, use \c;\l;sniff\u cbot\sniff;\n;. - -\t;Object \l;Category\u cbot\category; -\c;LeggedSniffer\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 152; Legged Sniffer +\image botss 8 8; +Ant-legged creeping bot equipped to prospect the geological structure of the subsoil. Whenever it locates something of use, the sniffer lays down the following marks: + +- a \l;red cross\u object\stonspot; -> \l;titanium ore\u object\titanore;. +- a \l;yellow circle\u object\uranspot; -> \l;uranium ore\u object\uranore;. +- a \l;green cross\u object\enerspot; -> energy deposit, useful for a \l;power station\u object\station; or a \l;power plant\u object\energy;. + +A moving legged shooter uses up half as much energy as a \l;wheeled sniffer\u object\botsr;. A legged bot is also perfectly adapted to climb the steepest slopes. + +\t;Programming +To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. + +To program the sniffing arm, use \c;\l;sniff\u cbot\sniff;\n;. + +\t;Object \l;Category\u cbot\category; +\c;LeggedSniffer\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/botsub.txt b/help/object/botsub.txt index 55570319..4b9f8959 100644 --- a/help/object/botsub.txt +++ b/help/object/botsub.txt @@ -1,16 +1,16 @@ -\b;\button 149; Subber -\image botsub 8 8; -Amphibious tracked bot equipped with an operating claw. The subber is the only bot capable of moving and running operations underwater. - -It is best to check the \l;power cell\u object\power; readings prior to immersion since replacing or recharging it underwater is impossible. The subber can only pick up objects from the ground, as opposed to, for example, a battery from the back of another bot. - -\t;Programming -To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. - -To program the operating claw, use \c;\l;grab\u cbot\grab;\n; and \c;\l;drop\u cbot\drop;\n;. - -\t;Object \l;Category\u cbot\category; -\c;Subber\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 149; Subber +\image botsub 8 8; +Amphibious tracked bot equipped with an operating claw. The subber is the only bot capable of moving and running operations underwater. + +It is best to check the \l;power cell\u object\power; readings prior to immersion since replacing or recharging it underwater is impossible. The subber can only pick up objects from the ground, as opposed to, for example, a battery from the back of another bot. + +\t;Programming +To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. + +To program the operating claw, use \c;\l;grab\u cbot\grab;\n; and \c;\l;drop\u cbot\drop;\n;. + +\t;Object \l;Category\u cbot\category; +\c;Subber\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/bottarg.txt b/help/object/bottarg.txt index 82d1cc85..4807d784 100644 --- a/help/object/bottarg.txt +++ b/help/object/bottarg.txt @@ -1,11 +1,11 @@ -\b;\button 173; Target Bot -\image bottarg 8 8; -Wheeled bot intended solely for target practice. It is autonomous and its trajectory is dependant upon the nature of the exercise. - -Note that target bots, loaded as they are with \l;TNT\u object\tnt;, are extremely sensitive to shocks. - -\t;Object \l;Category\u cbot\category; -\c;TargetBot\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 173; Target Bot +\image bottarg 8 8; +Wheeled bot intended solely for target practice. It is autonomous and its trajectory is dependant upon the nature of the exercise. + +Note that target bots, loaded as they are with \l;TNT\u object\tnt;, are extremely sensitive to shocks. + +\t;Object \l;Category\u cbot\category; +\c;TargetBot\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/bottr.txt b/help/object/bottr.txt index 4522f5b3..65f185c6 100644 --- a/help/object/bottr.txt +++ b/help/object/bottr.txt @@ -1,12 +1,12 @@ -\b;\button 158; Practice Bot -\image bottr 8 8; -Wheeled bot intended solely for training and practice. Its only purpose is to help you get accustomed to the programming of the bots' various ground movements. - -\t;Instructions -To program the bot's movements, use the following commands: \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. - -\t;Object \l;Category\u cbot\category; -\c;PracticeBot\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 158; Practice Bot +\image bottr 8 8; +Wheeled bot intended solely for training and practice. Its only purpose is to help you get accustomed to the programming of the bots' various ground movements. + +\t;Instructions +To program the bot's movements, use the following commands: \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. + +\t;Object \l;Category\u cbot\category; +\c;PracticeBot\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/bottump.txt b/help/object/bottump.txt index b014eca7..8398f770 100644 --- a/help/object/bottump.txt +++ b/help/object/bottump.txt @@ -1,18 +1,18 @@ -\b;\button 146; Thumper -\image bottump 8 8; -Tracked bot designed to hit the ground with enormous force. The purpose of the thumping is to turn \l;ants\u object\ant; and \l;spiders\u object\spider; belly up within a radius of 100 meters. An insect on its back is not dead but will struggle to get right side up again. After approximately 60 seconds of effort, it will usually succeed. - -To visualize the zone of impact, hit the button \button 41;. Little red dots outline the circular zone for 20 seconds. - -The bot uses up a large amount of power. A thump will drain 2/5ths of a \l;regular power cell\u object\power;. - -\t;Instructions -To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. - -To program the thumping, use \c;\l;thump\u cbot\thump;\n;. - -\t;Object \l;Category\u cbot\category; -\c;Thumper\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 146; Thumper +\image bottump 8 8; +Tracked bot designed to hit the ground with enormous force. The purpose of the thumping is to turn \l;ants\u object\ant; and \l;spiders\u object\spider; belly up within a radius of 100 meters. An insect on its back is not dead but will struggle to get right side up again. After approximately 60 seconds of effort, it will usually succeed. + +To visualize the zone of impact, hit the button \button 41;. Little red dots outline the circular zone for 20 seconds. + +The bot uses up a large amount of power. A thump will drain 2/5ths of a \l;regular power cell\u object\power;. + +\t;Instructions +To program the bot's movements, use the following commands : \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n;, \c;\l;motor\u cbot\motor;\n;, \c;\l;goto\u cbot\goto;\n;. + +To program the thumping, use \c;\l;thump\u cbot\thump;\n;. + +\t;Object \l;Category\u cbot\category; +\c;Thumper\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/bullet.txt b/help/object/bullet.txt index 3f7332cf..5df1efe5 100644 --- a/help/object/bullet.txt +++ b/help/object/bullet.txt @@ -1,12 +1,12 @@ -\b;Organic Matter -\image bullet 4 4; -The organic matter is the insects' secretion. \l;Wasps\u object\wasp; often use balls of organic matter to bombard you. You should perhaps try to get hold of some since it could allow you, given the necessary \l;analysis\u object\labo;, to discover new and strange technologies that will improve the efficiency of your bots. - -\t;Transport -All \l;grabbers\u object\botgr; and the \l;astronaut\u object\human;. - -\t;Object \l;Category\u cbot\category; -\c;OrgaMatter\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Organic Matter +\image bullet 4 4; +The organic matter is the insects' secretion. \l;Wasps\u object\wasp; often use balls of organic matter to bombard you. You should perhaps try to get hold of some since it could allow you, given the necessary \l;analysis\u object\labo;, to discover new and strange technologies that will improve the efficiency of your bots. + +\t;Transport +All \l;grabbers\u object\botgr; and the \l;astronaut\u object\human;. + +\t;Object \l;Category\u cbot\category; +\c;OrgaMatter\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/captor.txt b/help/object/captor.txt index 3dfdd068..d13df6f7 100644 --- a/help/object/captor.txt +++ b/help/object/captor.txt @@ -1,25 +1,25 @@ -\b;\button 174; Power Captor -\image captor 8 8; -The power captor acts as both a lightning conductor and a power converter. -It offers protection within a radius of 50 meters against the perilous lightning bolts of magnetic storms. Additionally, when the captor is hit by lightning, all bots and \l;power cells\u object\power; placed underneath, with the exception of the \l;nuclear power cells\u object\atomic;, are recharged. - -To visualize the zone shielded by a power captor, select it then hit the button \button 41;. Red dots outline the circular zone for 20 seconds. - -In the vastness of space, few planets suffer from magnetic storms. Among the ones you'll be visiting, only Orpheon is subject to this phenomenon. - -Note that your \l;spaceship\u object\base; can also act as a lightning conductor. However it will not recharge power cells. - -\t;Requirements for building -Any flat surface of at least 10 meters wide. - -\t;Power source -Lightning bolts. - -\t;Duration of operation -1 second. - -\t;Object \l;Category\u cbot\category; -\c;PowerCaptor\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 174; Power Captor +\image captor 8 8; +The power captor acts as both a lightning conductor and a power converter. +It offers protection within a radius of 50 meters against the perilous lightning bolts of magnetic storms. Additionally, when the captor is hit by lightning, all bots and \l;power cells\u object\power; placed underneath, with the exception of the \l;nuclear power cells\u object\atomic;, are recharged. + +To visualize the zone shielded by a power captor, select it then hit the button \button 41;. Red dots outline the circular zone for 20 seconds. + +In the vastness of space, few planets suffer from magnetic storms. Among the ones you'll be visiting, only Orpheon is subject to this phenomenon. + +Note that your \l;spaceship\u object\base; can also act as a lightning conductor. However it will not recharge power cells. + +\t;Requirements for building +Any flat surface of at least 10 meters wide. + +\t;Power source +Lightning bolts. + +\t;Duration of operation +1 second. + +\t;Object \l;Category\u cbot\category; +\c;PowerCaptor\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/convert.txt b/help/object/convert.txt index 79d5e25c..49836688 100644 --- a/help/object/convert.txt +++ b/help/object/convert.txt @@ -1,24 +1,24 @@ -\b;\button 162; Converter -\image convert 8 8; -This building was designed to convert chunks of \l;titanium ore\u object\titanore; into usable \l;titanium cubes\u object\titan;. All \l;you\u object\human; need to do is place a chunk at the center of the platform and step back. The converter takes care of the rest. - -\t;Requirements for building -Any flat surface of at least 6 meters wide. - -\t;Input -Titanium ore. - -\t;Output -Titanium. - -\t;Power source -None. - -\t;Duration of operation -15 seconds. - -\t;Object \l;Category\u cbot\category; -\c;Converter\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 162; Converter +\image convert 8 8; +This building was designed to convert chunks of \l;titanium ore\u object\titanore; into usable \l;titanium cubes\u object\titan;. All \l;you\u object\human; need to do is place a chunk at the center of the platform and step back. The converter takes care of the rest. + +\t;Requirements for building +Any flat surface of at least 6 meters wide. + +\t;Input +Titanium ore. + +\t;Output +Titanium. + +\t;Power source +None. + +\t;Duration of operation +15 seconds. + +\t;Object \l;Category\u cbot\category; +\c;Converter\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/derrick.txt b/help/object/derrick.txt index f546ebfa..4eea1369 100644 --- a/help/object/derrick.txt +++ b/help/object/derrick.txt @@ -1,29 +1,29 @@ -\b;\button 161; Derrick -\image derrick 8 8; -The derrick is intended for the extraction of raw materials. - -In order to determine the best site on which to erect a derrick, a \l;sniffer\u object\botsr; should be used to prospect the subsoil. The marks it lays down provide information about the specifics of what the derrick will be able to extract: - -- a \l;red cross\u object\stonspot; -> \l;titanium ore\u object\titanore;. -- a \l;yellow circle\u object\uranspot; -> \l;uranium ore\u object\uranore;. - -\t;Requirements for building -Any flat and geologically adequate surface of at least 2.5 meters wide. - -\t;Input -Titanium or uranium ore in the subsoil. - -\t;Output -Chunks of titanium or uranium ore. - -\t;Power source -None. - -\t;Duration of operation -10 seconds for titanium and 30 for uranium. - -\t;Object \l;Category\u cbot\category; -\c;Derrick\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 161; Derrick +\image derrick 8 8; +The derrick is intended for the extraction of raw materials. + +In order to determine the best site on which to erect a derrick, a \l;sniffer\u object\botsr; should be used to prospect the subsoil. The marks it lays down provide information about the specifics of what the derrick will be able to extract: + +- a \l;red cross\u object\stonspot; -> \l;titanium ore\u object\titanore;. +- a \l;yellow circle\u object\uranspot; -> \l;uranium ore\u object\uranore;. + +\t;Requirements for building +Any flat and geologically adequate surface of at least 2.5 meters wide. + +\t;Input +Titanium or uranium ore in the subsoil. + +\t;Output +Chunks of titanium or uranium ore. + +\t;Power source +None. + +\t;Duration of operation +10 seconds for titanium and 30 for uranium. + +\t;Object \l;Category\u cbot\category; +\c;Derrick\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/egg.txt b/help/object/egg.txt index 501d8ee0..d3e11e20 100644 --- a/help/object/egg.txt +++ b/help/object/egg.txt @@ -1,8 +1,8 @@ -\b;Alien Egg -The alien eggs are laid by the \l;Alien Queen\u object\mother;. After a short time, they will hatch and an \l;ant\u object\ant;, a \l;wasp\u object\wasp;, a \l;spider\u object\spider; or a \l;worm\u object\worm; will come out. - -\t;Object \l;Category\u cbot\category; -\c;AlienEgg\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Alien Egg +The alien eggs are laid by the \l;Alien Queen\u object\mother;. After a short time, they will hatch and an \l;ant\u object\ant;, a \l;wasp\u object\wasp;, a \l;spider\u object\spider; or a \l;worm\u object\worm; will come out. + +\t;Object \l;Category\u cbot\category; +\c;AlienEgg\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/energy.txt b/help/object/energy.txt index 75cd214f..45a695bf 100644 --- a/help/object/energy.txt +++ b/help/object/energy.txt @@ -1,28 +1,28 @@ -\b;\button 167; Power Plant -\image energy 8 8; -The power plant is a \l;power cell\u object\power; factory. It transforms a \l;titanium cube\u object\titan; into a regular power cell fully charged and ready for use. - -A power plant requires some energy in the subsoil. If the satellite report says that energy is available only at some places, you will need a \l;sniffer bot\u object\botsr; to prospect the subsoil. The marks it lays down provide information about the specifics of its findings: a \l;green cross\u object\enerspot; means that there is an energy deposit at this location beneath the surface, which is indispensable for the construction of a power plant or a \l;power station\u object\station;. - -If the large power cell at the base of the plant remains red after the construction is completed, this means that the site is not geologically adequate. - -\t;Requirements for building -Any flat and geologically adequate surface of at least 4 meters wide. - -\t;Input -Titanium. - -\t;Output -Regular power cell. - -\t;Power source -Subsoil energy. - -\t;Duration of operation -12 seconds. - -\t;Object \l;Category\u cbot\category; -\c;PowerPlant\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 167; Power Plant +\image energy 8 8; +The power plant is a \l;power cell\u object\power; factory. It transforms a \l;titanium cube\u object\titan; into a regular power cell fully charged and ready for use. + +A power plant requires some energy in the subsoil. If the satellite report says that energy is available only at some places, you will need a \l;sniffer bot\u object\botsr; to prospect the subsoil. The marks it lays down provide information about the specifics of its findings: a \l;green cross\u object\enerspot; means that there is an energy deposit at this location beneath the surface, which is indispensable for the construction of a power plant or a \l;power station\u object\station;. + +If the large power cell at the base of the plant remains red after the construction is completed, this means that the site is not geologically adequate. + +\t;Requirements for building +Any flat and geologically adequate surface of at least 4 meters wide. + +\t;Input +Titanium. + +\t;Output +Regular power cell. + +\t;Power source +Subsoil energy. + +\t;Duration of operation +12 seconds. + +\t;Object \l;Category\u cbot\category; +\c;PowerPlant\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/enerspot.txt b/help/object/enerspot.txt index 954bf4ea..44bf6235 100644 --- a/help/object/enerspot.txt +++ b/help/object/enerspot.txt @@ -1,17 +1,17 @@ -\b;Underground Energy Deposit -\image enerspot 4 4; -Whenever a \l;sniffer\u object\botsr; uncovers a source of energy in the subsoil, it lays down a green cross. The following buildings can be erected nearby : - -o \l;Power station\u object\station; -o \l;Power plant\u object\energy; - -In order to prospect the subsoil you need a \l;sniffer bot\u object\botsr;, which can also discover \l;titanium ore\u object\titanore; deposits (indicated by a \l;red cross\u object\stonspot;) or \l;uranium ore\u object\uranore; deposits (indicated by a \l;yellow circle\u object\uranspot;). - -\t;Transport -Impossible. - -\t;Object \l;Category\u cbot\category; -\c;EnergySite\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Underground Energy Deposit +\image enerspot 4 4; +Whenever a \l;sniffer\u object\botsr; uncovers a source of energy in the subsoil, it lays down a green cross. The following buildings can be erected nearby : + +o \l;Power station\u object\station; +o \l;Power plant\u object\energy; + +In order to prospect the subsoil you need a \l;sniffer bot\u object\botsr;, which can also discover \l;titanium ore\u object\titanore; deposits (indicated by a \l;red cross\u object\stonspot;) or \l;uranium ore\u object\uranore; deposits (indicated by a \l;yellow circle\u object\uranspot;). + +\t;Transport +Impossible. + +\t;Object \l;Category\u cbot\category; +\c;EnergySite\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/exchange.txt b/help/object/exchange.txt index 9190c9e5..2cb763a7 100644 --- a/help/object/exchange.txt +++ b/help/object/exchange.txt @@ -1,31 +1,31 @@ -\b;\button 172; Information Exchange Post -\image info 8 8; -This building stores digital information. A post can contain up to 10 pieces of information, each one referenced by a name. -For example, a post can contain 3 informations¦:\c; -\tab;"Position.x" 23.45 -\tab;"Position.y" -102.70 -\tab;"Quantity" 3.00 -\n; -To put new information, you must execute the command \c;\l;send\u cbot\send;\n;. -To read information from a post, you must execute the command \c;\l;receive\u cbot\receive;\n;. - -\t;Requirements for building -Any flat surface of at least 2.5 meters wide. - -\t;Input -None. - -\t;Output -Digital information. - -\t;Power source -None. - -\t;Duration of operation -1 second. - -\t;Object \l;Category\u cbot\category; -\c;ExchangePost\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 172; Information Exchange Post +\image info 8 8; +This building stores digital information. A post can contain up to 10 pieces of information, each one referenced by a name. +For example, a post can contain 3 informations¦:\c; +\tab;"Position.x" 23.45 +\tab;"Position.y" -102.70 +\tab;"Quantity" 3.00 +\n; +To put new information, you must execute the command \c;\l;send\u cbot\send;\n;. +To read information from a post, you must execute the command \c;\l;receive\u cbot\receive;\n;. + +\t;Requirements for building +Any flat surface of at least 2.5 meters wide. + +\t;Input +None. + +\t;Output +Digital information. + +\t;Power source +None. + +\t;Duration of operation +1 second. + +\t;Object \l;Category\u cbot\category; +\c;ExchangePost\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/factory.txt b/help/object/factory.txt index f2a3ed7c..cc86ca11 100644 --- a/help/object/factory.txt +++ b/help/object/factory.txt @@ -1,33 +1,33 @@ -\b;\button 160; Bot Factory -\image factory 8 8; -This building is intended for the manufacturing of bots using \l;titanium\u object\titan;. - -1) Place the titanium cube inside the factory. -2) Step back out. -3) Select the factory. -4) Click on the button showing the diagram of the bot you want the factory to assemble (e.g. \button 137; for a \l;wheeled grabber\u object\botgr;). - -The finished bot does not include an onboard \l;power cell\u object\power;. You'll need to supply it with one for it to be able to leave the factory. - -The list of feasible bots will depend upon the research your \l;research center\u object\research; has completed at this time. - -\t;Requirements for building -Any flat surface of at least 7.5 meters wide. - -\t;Input -Titanium. - -\t;Output -Completed bot. - -\t;Power source -None. - -\t;Duration of operation -15 seconds. - -\t;Object \l;Category\u cbot\category; -\c;BotFactory\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 160; Bot Factory +\image factory 8 8; +This building is intended for the manufacturing of bots using \l;titanium\u object\titan;. + +1) Place the titanium cube inside the factory. +2) Step back out. +3) Select the factory. +4) Click on the button showing the diagram of the bot you want the factory to assemble (e.g. \button 137; for a \l;wheeled grabber\u object\botgr;). + +The finished bot does not include an onboard \l;power cell\u object\power;. You'll need to supply it with one for it to be able to leave the factory. + +The list of feasible bots will depend upon the research your \l;research center\u object\research; has completed at this time. + +\t;Requirements for building +Any flat surface of at least 7.5 meters wide. + +\t;Input +Titanium. + +\t;Output +Completed bot. + +\t;Power source +None. + +\t;Duration of operation +15 seconds. + +\t;Object \l;Category\u cbot\category; +\c;BotFactory\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/flag.txt b/help/object/flag.txt index f2af46e2..4740d2ff 100644 --- a/help/object/flag.txt +++ b/help/object/flag.txt @@ -1,22 +1,22 @@ -\b;Colored Flag -\image flag 4 4; -The colored flags are helpful to mark strategic locations or positions that \l;you\u object\human; will need to find again. Flags appear on the mini-map in the shape of a cross of the same color as the flag. - -Use the buttons \button 118; and \button 119; to plant and remove flags, the colors of which you can choose with the buttons above. - -When your mini-map is out of order, the fact that flags follow the direction of the wind can help you to find your way and not to walk around in circles. - -When programming, you can use flags to give a bot a reference to a certain position: the instruction \c;\l;radar\u cbot\radar;\n; allows bots to know the exact position of a flag of a given color. - -\t;Transport -Impossible. - -\t;Object \l;Category\u cbot\category; -\c;BlueFlag\n; -\c;RedFlag\n; -\c;GreenFlag\n; -\c;YellowFlag\n; -\c;VioletFlag\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Colored Flag +\image flag 4 4; +The colored flags are helpful to mark strategic locations or positions that \l;you\u object\human; will need to find again. Flags appear on the mini-map in the shape of a cross of the same color as the flag. + +Use the buttons \button 118; and \button 119; to plant and remove flags, the colors of which you can choose with the buttons above. + +When your mini-map is out of order, the fact that flags follow the direction of the wind can help you to find your way and not to walk around in circles. + +When programming, you can use flags to give a bot a reference to a certain position: the instruction \c;\l;radar\u cbot\radar;\n; allows bots to know the exact position of a flag of a given color. + +\t;Transport +Impossible. + +\t;Object \l;Category\u cbot\category; +\c;BlueFlag\n; +\c;RedFlag\n; +\c;GreenFlag\n; +\c;YellowFlag\n; +\c;VioletFlag\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/goal.txt b/help/object/goal.txt index d10f2ace..d59fa12f 100644 --- a/help/object/goal.txt +++ b/help/object/goal.txt @@ -1,8 +1,8 @@ -\b;Finishing Pad -The finishing pad is an objective to be reached in some exercises. - -\t;Object \l;Category\u cbot\category; -\c;GoalArea\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Finishing Pad +The finishing pad is an objective to be reached in some exercises. + +\t;Object \l;Category\u cbot\category; +\c;GoalArea\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/human.txt b/help/object/human.txt index 96365176..399384af 100644 --- a/help/object/human.txt +++ b/help/object/human.txt @@ -1,19 +1,19 @@ -\b;\button 136; Astronaut -\image human 8 8; -The astronaut is you within the game. - -If you die, the mission immediately fails. - -You can construct buildings with the help of the neutron gun holstered to your survival kit. The survival kit allows you, in most missions, to fly, thanks to the reactor placed underneath, or to swim with no time limit. You can carry most objects but the weight will slow down your movements considerably. Flying, swimming and walking underwater are also made impossible if you are carrying an object. The use of a \l;grabber\u object\botgr; or a \l;subber\u object\botsub; is advised for tasks such as these. - -You cannot carry \l;uranium ore\u object\uranore; because of the risks attached to radioactivity. - -A special button \button 111; allows you to ensure that the ground around you is flat. This is important since building is only possible on a flat surface. A flat surface is designated green while a sloping one is red. - -A button \button 118; allows you to mark a location with \l;flags\u object\flag; of various colors. This can help you not to get lost, to find important positions again, or to indicate a position to a bot. 5 flags of 5 different colors are at your disposal. You can remove a flag by using the next button \button 119; and store it for further use. - -\t;Object \l;Category\u cbot\category; -\c;Me\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 136; Astronaut +\image human 8 8; +The astronaut is you within the game. + +If you die, the mission immediately fails. + +You can construct buildings with the help of the neutron gun holstered to your survival kit. The survival kit allows you, in most missions, to fly, thanks to the reactor placed underneath, or to swim with no time limit. You can carry most objects but the weight will slow down your movements considerably. Flying, swimming and walking underwater are also made impossible if you are carrying an object. The use of a \l;grabber\u object\botgr; or a \l;subber\u object\botsub; is advised for tasks such as these. + +You cannot carry \l;uranium ore\u object\uranore; because of the risks attached to radioactivity. + +A special button \button 111; allows you to ensure that the ground around you is flat. This is important since building is only possible on a flat surface. A flat surface is designated green while a sloping one is red. + +A button \button 118; allows you to mark a location with \l;flags\u object\flag; of various colors. This can help you not to get lost, to find important positions again, or to indicate a position to a bot. 5 flags of 5 different colors are at your disposal. You can remove a flag by using the next button \button 119; and store it for further use. + +\t;Object \l;Category\u cbot\category; +\c;Me\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/huston.txt b/help/object/huston.txt index 830dad8e..8bcaa64e 100644 --- a/help/object/huston.txt +++ b/help/object/huston.txt @@ -1,11 +1,11 @@ -\b;\button 176; Mission Control -\image huston 8 8; -Earth control center for all \l;your\u object\human; space missions. Though still named after the well-known mission control of the old days, "Houston" is actually located in the middle of the Nevada Desert, the new center for space exploration activities. - -The Mission Control Center watches over you day and night, and a whole team of scientists and engineers are working hard trying to find a solution to all the problems that you encounter. - -\t;Object \l;Category\u cbot\category; -\c;Houston\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 176; Mission Control +\image huston 8 8; +Earth control center for all \l;your\u object\human; space missions. Though still named after the well-known mission control of the old days, "Houston" is actually located in the middle of the Nevada Desert, the new center for space exploration activities. + +The Mission Control Center watches over you day and night, and a whole team of scientists and engineers are working hard trying to find a solution to all the problems that you encounter. + +\t;Object \l;Category\u cbot\category; +\c;Houston\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/key.txt b/help/object/key.txt index ddf1d1ca..e21d292f 100644 --- a/help/object/key.txt +++ b/help/object/key.txt @@ -1,17 +1,17 @@ -\b;Keys A, B, C and D -\image key 4 4; -The keys give \l;you\u object\human; access to the \l;vault\u object\safe;. You'll need 4 of them. - -o Key A, blue and triangle-shaped -o Key B, red and pentagon-shaped -o Key C, green and shaped like a 6-pointed star -o Key D, yellow and circular - -\t;Transport -All \l;grabbers\u object\botgr; and the \l;astronaut\u object\human;. - -\t;Objects \l;Category\u cbot\category; -\c;KeyA\n;, \c;KeyB\n;, \c;KeyC\n; and \c;KeyD\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Keys A, B, C and D +\image key 4 4; +The keys give \l;you\u object\human; access to the \l;vault\u object\safe;. You'll need 4 of them. + +o Key A, blue and triangle-shaped +o Key B, red and pentagon-shaped +o Key C, green and shaped like a 6-pointed star +o Key D, yellow and circular + +\t;Transport +All \l;grabbers\u object\botgr; and the \l;astronaut\u object\human;. + +\t;Objects \l;Category\u cbot\category; +\c;KeyA\n;, \c;KeyB\n;, \c;KeyC\n; and \c;KeyD\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/labo.txt b/help/object/labo.txt index 9e203513..d6a03462 100644 --- a/help/object/labo.txt +++ b/help/object/labo.txt @@ -1,24 +1,24 @@ -\b;\button 166; Autolab -\image labo 8 8; -The lab is intended for the analysis of \l;organic matter\u object\bullet;. It will help \l;you\u object\human; become familiar with the insects' very own technology and perhaps even use it to your advantage. Place a chunk of \l;organic matter\u object\bullet; on the platform, select the lab, and click the button corresponding to the desired research program. - -\t;Requirements for building -Any flat surface of at least 6 meters wide. - -\t;Input -Organic matter. - -\t;Output -New and improved technologies. - -\t;Power source -None. - -\t;Duration of operation -20 seconds. - -\t;Object \l;Category\u cbot\category; -\c;AutoLab\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 166; Autolab +\image labo 8 8; +The lab is intended for the analysis of \l;organic matter\u object\bullet;. It will help \l;you\u object\human; become familiar with the insects' very own technology and perhaps even use it to your advantage. Place a chunk of \l;organic matter\u object\bullet; on the platform, select the lab, and click the button corresponding to the desired research program. + +\t;Requirements for building +Any flat surface of at least 6 meters wide. + +\t;Input +Organic matter. + +\t;Output +New and improved technologies. + +\t;Power source +None. + +\t;Duration of operation +20 seconds. + +\t;Object \l;Category\u cbot\category; +\c;AutoLab\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/lrv.txt b/help/object/lrv.txt index 996d8695..e4271afc 100644 --- a/help/object/lrv.txt +++ b/help/object/lrv.txt @@ -1,9 +1,9 @@ -\b;Apollo Lunar Roving Vehicle - - - -\c;< no archive picture available >\n; - - - -The Lunar Jeep (LRV) was brought to the moon on July 30th 1971 by the astronauts David Scott and Jim Irwin from Apollo mission 15. Its batteries are still partly charged, which allows you to remote control it. But this old-fashioned technology will be of no use to you. +\b;Apollo Lunar Roving Vehicle + + + +\c;< no archive picture available >\n; + + + +The Lunar Jeep (LRV) was brought to the moon on July 30th 1971 by the astronauts David Scott and Jim Irwin from Apollo mission 15. Its batteries are still partly charged, which allows you to remote control it. But this old-fashioned technology will be of no use to you. diff --git a/help/object/mine.txt b/help/object/mine.txt index d0c4b6fb..6da1b95c 100644 --- a/help/object/mine.txt +++ b/help/object/mine.txt @@ -1,14 +1,14 @@ -\b;Mine -\image mine 8 8; -Mines were a defensive weapons system used by the first expedition. Because of the dangers this system causes for the mission itself, they are no longer used in your expedition. In some exercises mines are used to learn how to avoid obstacles. There is no way to remove them or to create new ones. - -With a \l;practice bot\u object\bottr;, don't get any closer than 2 meters to the position given by the instruction \l;radar\u cbot\radar;. - -\t;Transport -Impossible. - -\t;Object \l;Category\u cbot\category; -\c;Mine\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Mine +\image mine 8 8; +Mines were a defensive weapons system used by the first expedition. Because of the dangers this system causes for the mission itself, they are no longer used in your expedition. In some exercises mines are used to learn how to avoid obstacles. There is no way to remove them or to create new ones. + +With a \l;practice bot\u object\bottr;, don't get any closer than 2 meters to the position given by the instruction \l;radar\u cbot\radar;. + +\t;Transport +Impossible. + +\t;Object \l;Category\u cbot\category; +\c;Mine\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/mother.txt b/help/object/mother.txt index 37630664..bb26c86a 100644 --- a/help/object/mother.txt +++ b/help/object/mother.txt @@ -1,15 +1,15 @@ -\b;Alien Queen -\image mother 8 8; -This huge insect is the mother of them all. It lays \l;eggs\u object\egg; and from these eggs will hatch all the various kinds of insects \l;you\u object\human;'re likely to encounter. All of them are extremely hazardous to yourself and your mission. The queen's protective shell is particularly resistant to attack. - -It gives birth to the following insects : -o \l;ants\u object\ant; -o \l;spiders\u object\spider; -o \l;wasps\u object\wasp; -o \l;worms\u object\worm; - -\t;Object \l;Category\u cbot\category; -\c;AlienQueen\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Alien Queen +\image mother 8 8; +This huge insect is the mother of them all. It lays \l;eggs\u object\egg; and from these eggs will hatch all the various kinds of insects \l;you\u object\human;'re likely to encounter. All of them are extremely hazardous to yourself and your mission. The queen's protective shell is particularly resistant to attack. + +It gives birth to the following insects : +o \l;ants\u object\ant; +o \l;spiders\u object\spider; +o \l;wasps\u object\wasp; +o \l;worms\u object\worm; + +\t;Object \l;Category\u cbot\category; +\c;AlienQueen\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/nest.txt b/help/object/nest.txt index 43520683..c14e16f2 100644 --- a/help/object/nest.txt +++ b/help/object/nest.txt @@ -1,8 +1,8 @@ -\b;Nest -The alien nest is an odd structure out of which \l;organic matter\u object\bullet; erupts on a regular basis. \l;Wasps\u object\wasp; visit nests regularly to collect ammunition that they will use to bombard your bots, buildings and yourself. - -\t;Object \l;Category\u cbot\category; -\c;AlienNest\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Nest +The alien nest is an odd structure out of which \l;organic matter\u object\bullet; erupts on a regular basis. \l;Wasps\u object\wasp; visit nests regularly to collect ammunition that they will use to bombard your bots, buildings and yourself. + +\t;Object \l;Category\u cbot\category; +\c;AlienNest\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/nuclear.txt b/help/object/nuclear.txt index b41abc92..6d06b3f3 100644 --- a/help/object/nuclear.txt +++ b/help/object/nuclear.txt @@ -1,24 +1,24 @@ -\b;\button 170; Nuclear Plant -\image nuclear 8 8; -The nuclear plant is a \l;nuclear power cell\u object\atomic; factory. It transforms a chunk of \l;uranium ore\u object\uranore; into a \l;nuclear power cell\u object\atomic; fully charged and ready for use. - -\t;Requirements for building -Any flat surface of at least 10 meters wide. - -\t;Input -Uranium ore. - -\t;Output -Nuclear power cell. - -\t;Power source -None. - -\t;Duration of operation -30 seconds. - -\t;Object \l;Category\u cbot\category; -\c;NuclearPlant\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 170; Nuclear Plant +\image nuclear 8 8; +The nuclear plant is a \l;nuclear power cell\u object\atomic; factory. It transforms a chunk of \l;uranium ore\u object\uranore; into a \l;nuclear power cell\u object\atomic; fully charged and ready for use. + +\t;Requirements for building +Any flat surface of at least 10 meters wide. + +\t;Input +Uranium ore. + +\t;Output +Nuclear power cell. + +\t;Power source +None. + +\t;Duration of operation +30 seconds. + +\t;Object \l;Category\u cbot\category; +\c;NuclearPlant\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/power.txt b/help/object/power.txt index fe31baf6..03e2bc2b 100644 --- a/help/object/power.txt +++ b/help/object/power.txt @@ -1,16 +1,16 @@ -\b;Regular Power Cell -\image power 4 4; -A power cell supplies the bots and a few buildings with energy. - -An entirely red power cell is empty. The green section indicates the remaining capacity. A power cell can be recharged using a \l;power station\u object\station;. A \l;power plant\u object\energy; is needed to produce a new and fully charged power cell. - -The capacity of a regular power cell is 100 times smaller than that of a \l;nuclear power cell\u object\atomic; produced by a \l;nuclear plant\u object\nuclear; using \l;uranium ore\u object\uranore;. - -\t;Transport -All \l;grabbers\u object\botgr; and the \l;astronaut\u object\human;. - -\t;Object \l;Category\u cbot\category; -\c;PowerCell\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Regular Power Cell +\image power 4 4; +A power cell supplies the bots and a few buildings with energy. + +An entirely red power cell is empty. The green section indicates the remaining capacity. A power cell can be recharged using a \l;power station\u object\station;. A \l;power plant\u object\energy; is needed to produce a new and fully charged power cell. + +The capacity of a regular power cell is 100 times smaller than that of a \l;nuclear power cell\u object\atomic; produced by a \l;nuclear plant\u object\nuclear; using \l;uranium ore\u object\uranore;. + +\t;Transport +All \l;grabbers\u object\botgr; and the \l;astronaut\u object\human;. + +\t;Object \l;Category\u cbot\category; +\c;PowerCell\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/radar.txt b/help/object/radar.txt index dea59457..453f2ea9 100644 --- a/help/object/radar.txt +++ b/help/object/radar.txt @@ -1,26 +1,26 @@ -\b;\button 168; Radar -\image radar 8 8; -The radar indicates the direction of the nearest \l;enemy\u object\mother;. Moreover, the information given by the radar allows the mini-map at the bottom right corner of your screen to show the position of all bots, buildings and enemies as small squares and triangles of different colors. - -Radar stations also act as relays for communication with the Earth from distant planets. - -\t;Requirements for building -Any flat surface of at least 2.5 meters wide. - -\t;Input -None. - -\t;Output -Information for the mini-map. - -\t;Power source -None. - -\t;Duration of operation -Constant. - -\t;Object \l;Category\u cbot\category; -\c;RadarStation\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 168; Radar +\image radar 8 8; +The radar indicates the direction of the nearest \l;enemy\u object\mother;. Moreover, the information given by the radar allows the mini-map at the bottom right corner of your screen to show the position of all bots, buildings and enemies as small squares and triangles of different colors. + +Radar stations also act as relays for communication with the Earth from distant planets. + +\t;Requirements for building +Any flat surface of at least 2.5 meters wide. + +\t;Input +None. + +\t;Output +Information for the mini-map. + +\t;Power source +None. + +\t;Duration of operation +Constant. + +\t;Object \l;Category\u cbot\category; +\c;RadarStation\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/repair.txt b/help/object/repair.txt index 4ad0e559..4adac267 100644 --- a/help/object/repair.txt +++ b/help/object/repair.txt @@ -1,24 +1,24 @@ -\b;\button 169; Repair Center -\image repair 8 8; -The repair center regenerates the shield on damaged bots. A bot's shield will absorb a certain amount of \l;enemy\u object\mother; hits. If there is no shield left, this means that the bot itself, when hit next, will be destroyed. - -\t;Requirements for building -Any flat surface of at least 6 meters wide. - -\t;Input -Damaged bot. - -\t;Output -Repaired bot with regenerated shield. - -\t;Power source -None. - -\t;Duration of operation -A few seconds depending on the repair job to be done. - -\t;Object \l;Category\u cbot\category; -\c;RepairCenter\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 169; Repair Center +\image repair 8 8; +The repair center regenerates the shield on damaged bots. A bot's shield will absorb a certain amount of \l;enemy\u object\mother; hits. If there is no shield left, this means that the bot itself, when hit next, will be destroyed. + +\t;Requirements for building +Any flat surface of at least 6 meters wide. + +\t;Input +Damaged bot. + +\t;Output +Repaired bot with regenerated shield. + +\t;Power source +None. + +\t;Duration of operation +A few seconds depending on the repair job to be done. + +\t;Object \l;Category\u cbot\category; +\c;RepairCenter\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/research.txt b/help/object/research.txt index 52f8810c..47e66333 100644 --- a/help/object/research.txt +++ b/help/object/research.txt @@ -1,27 +1,27 @@ -\b;\button 163; Research Center -\image research 8 8; -The research center is an enormous computer. Its most useful feature is its ability to come up with new technologies as well as improvements on existing ones regarding buildings and bots in particular. - -The 65'536 processors it contains use up a large amount of energy. -Each research program necessitates a brand new and fully charged \l;power cell\u object\power; - -\t;Requirements for building -Any flat surface of at least 5 meters wide. - -\t;Input -Request for research. - -\t;Output -New and improved technologies. - -\t;Power source -Regular or nuclear power cell. - -\t;Duration of operation -Between 9 seconds and 1 minute depending on the research. - -\t;Object \l;Category\u cbot\category; -\c;ResearchCenter\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 163; Research Center +\image research 8 8; +The research center is an enormous computer. Its most useful feature is its ability to come up with new technologies as well as improvements on existing ones regarding buildings and bots in particular. + +The 65'536 processors it contains use up a large amount of energy. +Each research program necessitates a brand new and fully charged \l;power cell\u object\power; + +\t;Requirements for building +Any flat surface of at least 5 meters wide. + +\t;Input +Request for research. + +\t;Output +New and improved technologies. + +\t;Power source +Regular or nuclear power cell. + +\t;Duration of operation +Between 9 seconds and 1 minute depending on the research. + +\t;Object \l;Category\u cbot\category; +\c;ResearchCenter\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/safe.txt b/help/object/safe.txt index 5e7b4634..79bc849e 100644 --- a/help/object/safe.txt +++ b/help/object/safe.txt @@ -1,9 +1,9 @@ -\b;\button 175; Vault -\image safe 8 8; -This dome-shaped building was conceived by the first expedition. Its purpose was to offer protection to a new type of advanced bot. To protect it from insect attacks, the vault was locked by 4 \l;keys\u object\key;. Only after you find the 4 keys and place each one of them on their corresponding slots will you be given access to the bot. - -\t;Object \l;Category\u cbot\category; -\c;Vault\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 175; Vault +\image safe 8 8; +This dome-shaped building was conceived by the first expedition. Its purpose was to offer protection to a new type of advanced bot. To protect it from insect attacks, the vault was locked by 4 \l;keys\u object\key;. Only after you find the 4 keys and place each one of them on their corresponding slots will you be given access to the bot. + +\t;Object \l;Category\u cbot\category; +\c;Vault\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/spider.txt b/help/object/spider.txt index 326e00d9..7e65b27b 100644 --- a/help/object/spider.txt +++ b/help/object/spider.txt @@ -1,9 +1,9 @@ -\b;Spider -\image spider 8 8; -Spiders work like suicide commandoes: whenever a spider gets within a close enough range of its target, it inflates its abdomen and bursts into a multitude of tiny burning fragments. These fragments will set fire to everything they get in contact with. Luckily the spider won't survive. - -\t;Object \l;Category\u cbot\category; -\c;AlienSpider\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Spider +\image spider 8 8; +Spiders work like suicide commandoes: whenever a spider gets within a close enough range of its target, it inflates its abdomen and bursts into a multitude of tiny burning fragments. These fragments will set fire to everything they get in contact with. Luckily the spider won't survive. + +\t;Object \l;Category\u cbot\category; +\c;AlienSpider\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/start.txt b/help/object/start.txt index ef24cdb7..a4523e12 100644 --- a/help/object/start.txt +++ b/help/object/start.txt @@ -1,8 +1,8 @@ -\b;Starting Pad -The starting pad is a platform used in some exercises. - -\t;Object \l;Category\u cbot\category; -\c;StartArea\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Starting Pad +The starting pad is a platform used in some exercises. + +\t;Object \l;Category\u cbot\category; +\c;StartArea\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/station.txt b/help/object/station.txt index 61cbdd24..17ad780d 100644 --- a/help/object/station.txt +++ b/help/object/station.txt @@ -1,28 +1,28 @@ -\b;\button 164; Power Station -\image station 8 8; -The power station extracts energy from the underground and recharges \l;regular power cells\u object\power; through induction. To recharge a power cell loaded at the back of a bot, just move the bot to the center of the platform and wait a few seconds. A \l;power cell\u object\power; carried at arm's length can also be recharged. \l;Nuclear power cells\u object\atomic; are non-rechargeable. - -A power plant needs some energy in the subsoil. If the satellite report says that energy is available only at some places, you will need a \l;sniffer bot\u object\botsr; to prospect the subsoil. The marks it lays down provide information about the specifics of its findings: a \l;green cross\u object\enerspot; means that there is an energy deposit at this location beneath the surface, which is indispensable to the construction of a power station or a \l;power plant\u object\energy;. - -The large power cell at the top of the station remaining red after the construction is completed can only mean that the site is not geologically adequate. - -\t;Requirements for building -Any flat and geologically adequate surface at least 6 meters wide. - -\t;Input -Empty power cell. - -\t;Output -Recharged power cell. - -\t;Power source -Subsoil energy. - -\t;Duration of operation -A few seconds, depending on the capacity to be recharged. - -\t;Object \l;Category\u cbot\category; -\c;PowerStation\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 164; Power Station +\image station 8 8; +The power station extracts energy from the underground and recharges \l;regular power cells\u object\power; through induction. To recharge a power cell loaded at the back of a bot, just move the bot to the center of the platform and wait a few seconds. A \l;power cell\u object\power; carried at arm's length can also be recharged. \l;Nuclear power cells\u object\atomic; are non-rechargeable. + +A power plant needs some energy in the subsoil. If the satellite report says that energy is available only at some places, you will need a \l;sniffer bot\u object\botsr; to prospect the subsoil. The marks it lays down provide information about the specifics of its findings: a \l;green cross\u object\enerspot; means that there is an energy deposit at this location beneath the surface, which is indispensable to the construction of a power station or a \l;power plant\u object\energy;. + +The large power cell at the top of the station remaining red after the construction is completed can only mean that the site is not geologically adequate. + +\t;Requirements for building +Any flat and geologically adequate surface at least 6 meters wide. + +\t;Input +Empty power cell. + +\t;Output +Recharged power cell. + +\t;Power source +Subsoil energy. + +\t;Duration of operation +A few seconds, depending on the capacity to be recharged. + +\t;Object \l;Category\u cbot\category; +\c;PowerStation\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/stonspot.txt b/help/object/stonspot.txt index 8d0b01b7..2c9f4deb 100644 --- a/help/object/stonspot.txt +++ b/help/object/stonspot.txt @@ -1,14 +1,14 @@ -\b;Underground Titanium Deposit -\image stonspot 4 4; -A red cross reveals the presence of a stratum of \l;titanium ore\u object\titanore; in the subsoil. It will be possible to extract it using a \l;derrick\u object\derrick;. - -A \l;sniffer\u object\botsr; will lay down a red cross each time it uncovers a deposit. \l;Sniffer bots\u object\botsr; can also detect the presence of \l;uranium ore\u object\uranore; as indicated by a \l;yellow circle\u object\uranspot; and of energy as indicated by a \l;green cross\u object\enerspot;. - -\t;Transport -Impossible. - -\t;Object \l;Category\u cbot\category; -\c;TitaniumSite\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Underground Titanium Deposit +\image stonspot 4 4; +A red cross reveals the presence of a stratum of \l;titanium ore\u object\titanore; in the subsoil. It will be possible to extract it using a \l;derrick\u object\derrick;. + +A \l;sniffer\u object\botsr; will lay down a red cross each time it uncovers a deposit. \l;Sniffer bots\u object\botsr; can also detect the presence of \l;uranium ore\u object\uranore; as indicated by a \l;yellow circle\u object\uranspot; and of energy as indicated by a \l;green cross\u object\enerspot;. + +\t;Transport +Impossible. + +\t;Object \l;Category\u cbot\category; +\c;TitaniumSite\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/titan.txt b/help/object/titan.txt index 23af4472..2e0d306d 100644 --- a/help/object/titan.txt +++ b/help/object/titan.txt @@ -1,14 +1,14 @@ -\b;Titanium -\image titan 4 4; -Titanium is indispensable for the construction of buildings, \l;bots\u object\factory; and \l;regular power cells\u object\energy;. There is usually some left on the \l;spaceship\u object\base; when you embark on a new mission. - -If more is needed, you'll have to \l;convert\u object\convert; chunks of \l;titanium ore\u object\titanore; into usable titanium cubes. - -\t;Transport -All \l;grabbers\u object\botgr; and the \l;astronaut\u object\human;. - -\t;Object \l;Category\u cbot\category; -\c;Titanium\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Titanium +\image titan 4 4; +Titanium is indispensable for the construction of buildings, \l;bots\u object\factory; and \l;regular power cells\u object\energy;. There is usually some left on the \l;spaceship\u object\base; when you embark on a new mission. + +If more is needed, you'll have to \l;convert\u object\convert; chunks of \l;titanium ore\u object\titanore; into usable titanium cubes. + +\t;Transport +All \l;grabbers\u object\botgr; and the \l;astronaut\u object\human;. + +\t;Object \l;Category\u cbot\category; +\c;Titanium\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/titanore.txt b/help/object/titanore.txt index 752f39fd..a42551d3 100644 --- a/help/object/titanore.txt +++ b/help/object/titanore.txt @@ -1,14 +1,14 @@ -\b;Titanium Ore -\image titanore 4 4; -\l;Titanium\u object\titan; is indispensable for the construction of buildings, \l;bots\u object\factory; and \l;regular power cells\u object\energy;. The titanium \l;you\u object\human; see in its usable, cube shaped form has been \l;converted\u object\convert; from raw chunks of titanium ore. - -Titanium ore can be found either directly on the surface or in the subsoil. In the latter case, it needs to be first located and identified by a \l;sniffer\u object\botsr;, then extracted using a \l;derrick\u object\derrick;. If a sniffer identifies a titanium ore deposit, it lays down a \l;red cross\u object\stonspot;. - -\t;Transport -All \l;grabbers\u object\botgr; and the \l;astronaut\u object\human;. - -\t;Object \l;Category\u cbot\category; -\c;TitaniumOre\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Titanium Ore +\image titanore 4 4; +\l;Titanium\u object\titan; is indispensable for the construction of buildings, \l;bots\u object\factory; and \l;regular power cells\u object\energy;. The titanium \l;you\u object\human; see in its usable, cube shaped form has been \l;converted\u object\convert; from raw chunks of titanium ore. + +Titanium ore can be found either directly on the surface or in the subsoil. In the latter case, it needs to be first located and identified by a \l;sniffer\u object\botsr;, then extracted using a \l;derrick\u object\derrick;. If a sniffer identifies a titanium ore deposit, it lays down a \l;red cross\u object\stonspot;. + +\t;Transport +All \l;grabbers\u object\botgr; and the \l;astronaut\u object\human;. + +\t;Object \l;Category\u cbot\category; +\c;TitaniumOre\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/tnt.txt b/help/object/tnt.txt index 9af47af1..264d5acf 100644 --- a/help/object/tnt.txt +++ b/help/object/tnt.txt @@ -1,12 +1,12 @@ -\b; Explosive (TNT) -\image tnt 4 4; -A TNT charge is extremely sensitive. You should approach it with caution so as not to hit it or give it any kind of shock. The risk is minimized once the explosive is within a \l;grabber\u object\botgr;'s grasp. - -\t;Transport -All \l;grabbers\u object\botgr; and the \l;astronaut\u object\human;. - -\t;Object \l;Category\u cbot\category; -\c;TNT\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b; Explosive (TNT) +\image tnt 4 4; +A TNT charge is extremely sensitive. You should approach it with caution so as not to hit it or give it any kind of shock. The risk is minimized once the explosive is within a \l;grabber\u object\botgr;'s grasp. + +\t;Transport +All \l;grabbers\u object\botgr; and the \l;astronaut\u object\human;. + +\t;Object \l;Category\u cbot\category; +\c;TNT\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/tower.txt b/help/object/tower.txt index 7bc32d62..27443a6d 100644 --- a/help/object/tower.txt +++ b/help/object/tower.txt @@ -1,22 +1,22 @@ -\b;\button 165; Defense Tower -\image tower 8 8; -The tower constitutes the best defense against \l;enemy\u object\mother; attacks, whether they originate on the ground or from the skies. - -The tower requires either a \l;regular\u object\power; or a \l;nuclear\u object\atomic; power cell. A regular power cell provides a capacity for 8 shots. A nuclear power cell is of course preferable. The tower starts blinking when it runs out of power. - -The range is 40 meters. To visualize it, select the tower then hit the button \button 41;. Red dots outline the circular zone for 20 seconds. - -\t;Requirements for building -Any flat surface of at least 3.5 meters wide. - -\t;Power source -Regular or nuclear power cell. - -\t;Duration of operation -1 second. - -\t;Object \l;Category\u cbot\category; -\c;DefenseTower\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;\button 165; Defense Tower +\image tower 8 8; +The tower constitutes the best defense against \l;enemy\u object\mother; attacks, whether they originate on the ground or from the skies. + +The tower requires either a \l;regular\u object\power; or a \l;nuclear\u object\atomic; power cell. A regular power cell provides a capacity for 8 shots. A nuclear power cell is of course preferable. The tower starts blinking when it runs out of power. + +The range is 40 meters. To visualize it, select the tower then hit the button \button 41;. Red dots outline the circular zone for 20 seconds. + +\t;Requirements for building +Any flat surface of at least 3.5 meters wide. + +\t;Power source +Regular or nuclear power cell. + +\t;Duration of operation +1 second. + +\t;Object \l;Category\u cbot\category; +\c;DefenseTower\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/uranore.txt b/help/object/uranore.txt index d2cbc5b6..354f2a25 100644 --- a/help/object/uranore.txt +++ b/help/object/uranore.txt @@ -1,16 +1,16 @@ -\b;Uranium Ore -\image uranore 4 4; -Uranium ore is essential to the production of \l;nuclear power cells\u object\atomic;. - -It is to be found on the surface or in the subsoil. In the latter case, it needs to be first located and identified by a \l;sniffer\u object\botsr;, then extracted using a \l;derrick\u object\derrick;. If a sniffer identifies a deposit of uranium ore, it lays down a \l;yellow circle\u object\uranspot;. - -A \l;nuclear plant\u object\nuclear; will then take care of converting the chunk into a new and fully charged \l;nuclear power cell\u object\atomic;. - -\t;Transport -All \l;grabbers\u object\botgr;. Due to its radioactivity, the \l;astronaut\u object\human; can not transport it. - -\t;Object \l;Category\u cbot\category; -\c;UraniumOre\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Uranium Ore +\image uranore 4 4; +Uranium ore is essential to the production of \l;nuclear power cells\u object\atomic;. + +It is to be found on the surface or in the subsoil. In the latter case, it needs to be first located and identified by a \l;sniffer\u object\botsr;, then extracted using a \l;derrick\u object\derrick;. If a sniffer identifies a deposit of uranium ore, it lays down a \l;yellow circle\u object\uranspot;. + +A \l;nuclear plant\u object\nuclear; will then take care of converting the chunk into a new and fully charged \l;nuclear power cell\u object\atomic;. + +\t;Transport +All \l;grabbers\u object\botgr;. Due to its radioactivity, the \l;astronaut\u object\human; can not transport it. + +\t;Object \l;Category\u cbot\category; +\c;UraniumOre\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/uranspot.txt b/help/object/uranspot.txt index 8cd7e93c..2f90e070 100644 --- a/help/object/uranspot.txt +++ b/help/object/uranspot.txt @@ -1,15 +1,15 @@ -\b; Underground Uranium Deposit -\image uranspot 4 4; -A yellow circle reveals the presence of a stratum of \l;uranium ore\u object\uranore; in the subsoil. It will be possible to extract it using a \l;derrick\u object\derrick;. - -A \l;sniffer\u object\botsr; will lay down a yellow circle each time it uncovers a deposit. \l;Sniffer bots\u object\botsr; can also detect the presence of \l;titanium ore\u object\titanore; as indicated by a \l;red cross\u object\stonspot; and of energy as indicated by a \l;green cross\u object\enerspot;. - - -\t;Transport -Impossible. - -\t;Object \l;Category\u cbot\category; -\c;UraniumSite\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b; Underground Uranium Deposit +\image uranspot 4 4; +A yellow circle reveals the presence of a stratum of \l;uranium ore\u object\uranore; in the subsoil. It will be possible to extract it using a \l;derrick\u object\derrick;. + +A \l;sniffer\u object\botsr; will lay down a yellow circle each time it uncovers a deposit. \l;Sniffer bots\u object\botsr; can also detect the presence of \l;titanium ore\u object\titanore; as indicated by a \l;red cross\u object\stonspot; and of energy as indicated by a \l;green cross\u object\enerspot;. + + +\t;Transport +Impossible. + +\t;Object \l;Category\u cbot\category; +\c;UraniumSite\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/wasp.txt b/help/object/wasp.txt index 054b1ce0..19c70649 100644 --- a/help/object/wasp.txt +++ b/help/object/wasp.txt @@ -1,11 +1,11 @@ -\b;Wasp -\image wasp 8 8; -The wasp is a formidable enemy, very hard to shoot down since its flying is particularly swift. Wasps carry balls of \l;organic matter\u object\bullet; that they will hurl at your bots and buildings and at yourself from above. - -The \l;defense tower\u object\tower; is the easiest way to get rid of them. - -\t;Object \l;Category\u cbot\category; -\c;AlienWasp\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Wasp +\image wasp 8 8; +The wasp is a formidable enemy, very hard to shoot down since its flying is particularly swift. Wasps carry balls of \l;organic matter\u object\bullet; that they will hurl at your bots and buildings and at yourself from above. + +The \l;defense tower\u object\tower; is the easiest way to get rid of them. + +\t;Object \l;Category\u cbot\category; +\c;AlienWasp\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/waypoint.txt b/help/object/waypoint.txt index 41e1f33b..e3d322c0 100644 --- a/help/object/waypoint.txt +++ b/help/object/waypoint.txt @@ -1,12 +1,12 @@ -\b;Checkpoint -\image waypoint 4 4; -In the exercises, blue crosses indicate positions that have to be crossed. They disappear as soon as a \l;practice bot\u object\bottr; crosses them. - -\t;Transport -Impossible. - -\t;Object \l;Category\u cbot\category; -\c;WayPoint\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Checkpoint +\image waypoint 4 4; +In the exercises, blue crosses indicate positions that have to be crossed. They disappear as soon as a \l;practice bot\u object\bottr; crosses them. + +\t;Transport +Impossible. + +\t;Object \l;Category\u cbot\category; +\c;WayPoint\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/worm.txt b/help/object/worm.txt index 1afb06c9..8644162b 100644 --- a/help/object/worm.txt +++ b/help/object/worm.txt @@ -1,11 +1,11 @@ -\b;Worm -\image worm 8 8; -Worms transmit viruses to programmed bots. The virus alters the programming to such an extent that the bot either functions in a very erratic way or stops functioning altogether. - -Worms live in the subsoil but sometimes emerge and crawl on the surface. When they are underground they are undetectable and indestructible. - -\t;Object \l;Category\u cbot\category; -\c;AlienWorm\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Worm +\image worm 8 8; +Worms transmit viruses to programmed bots. The virus alters the programming to such an extent that the bot either functions in a very erratic way or stops functioning altogether. + +Worms live in the subsoil but sometimes emerge and crawl on the surface. When they are underground they are undetectable and indestructible. + +\t;Object \l;Category\u cbot\category; +\c;AlienWorm\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/object/wreck.txt b/help/object/wreck.txt index a72a312d..dd0315e6 100644 --- a/help/object/wreck.txt +++ b/help/object/wreck.txt @@ -1,10 +1,10 @@ -\b;Derelict bot -A derelict bot is what's left of a bot after it has been disabled by a \l;spider\u object\spider; or by friendly fire. - -A \l;recycler\u object\botrecy; can convert a derelict bot back into a reusable \l;titanium cube\u object\titan;. - -\t;Object \l;Category\u cbot\category; -\c;Wreck\n; - -\t;See also -\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. +\b;Derelict bot +A derelict bot is what's left of a bot after it has been disabled by a \l;spider\u object\spider; or by friendly fire. + +A \l;recycler\u object\botrecy; can convert a derelict bot back into a reusable \l;titanium cube\u object\titan;. + +\t;Object \l;Category\u cbot\category; +\c;Wreck\n; + +\t;See also +\l;CBOT Language\u cbot;, \l;Variables\u cbot\type; and \l;Categories\u cbot\category;. diff --git a/help/tant1.txt b/help/tant1.txt index 6bb3bf2f..950b9bac 100644 --- a/help/tant1.txt +++ b/help/tant1.txt @@ -1,16 +1,16 @@ -\b;Objective -As a defense against several giant ants attacking from the north, rotate the bot when shooting in order to perform barrage fire. - -\t;Program -When you are radio-guiding a bot, you can rotate the cannon during the burst in order to sweep a whole zone. You can also do this when programming the bot, but you have to turn the whole bot with the instruction \c;\l;motor\u cbot\motor;( , )\n;. This instruction asks for two numbers: the speed of the left-hand motor, and the speed of the right-hand motor. These numbers must range between -1 and +1.\c; motor(1,1);\n; moves the bot forward with maximum speed (both motors at full power).\c; motor(-1,-1);\n; moves the bot backward with maximum speed.\c; motor(1,0.9);\n; moves the bot forward with a slight turn to the right: the left-hand motor turns a little faster than the right-hand motor. And \c;motor(1,-1);\n; will turn the bot clockwise on the spot: the left-hand motor moves forward, the right-hand motor moves backward. - -After a \l;motor\u cbot\motor; instruction the motors will keep this speed until the next \c;motor\n;, \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n; or \c;\l;goto\u cbot\goto;\n; instruction. For example, if you perform a rotation on the spot with \c;motor(1,-1);\n; and afterward you shoot with \c;fire(1);\n;, the bot will continue to turn during the burst, and will sweep a whole zone. - -The ants attack from the north. In order to sweep the whole zone north of the bot, first turn 90 degrees left with \c;turn(90);\n;, then repeat always with \c;\l;while\u cbot\while; (true)\n; the following instructions: -o rotate clockwise with \c;motor(1,-1);\n; -o a 2 seconds burst with \c;fire(2);\n; -o rotate counter-clockwise with \c;motor(-1,1);\n; -o a 2 seconds burst. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Objective +As a defense against several giant ants attacking from the north, rotate the bot when shooting in order to perform barrage fire. + +\t;Program +When you are radio-guiding a bot, you can rotate the cannon during the burst in order to sweep a whole zone. You can also do this when programming the bot, but you have to turn the whole bot with the instruction \c;\l;motor\u cbot\motor;( , )\n;. This instruction asks for two numbers: the speed of the left-hand motor, and the speed of the right-hand motor. These numbers must range between -1 and +1.\c; motor(1,1);\n; moves the bot forward with maximum speed (both motors at full power).\c; motor(-1,-1);\n; moves the bot backward with maximum speed.\c; motor(1,0.9);\n; moves the bot forward with a slight turn to the right: the left-hand motor turns a little faster than the right-hand motor. And \c;motor(1,-1);\n; will turn the bot clockwise on the spot: the left-hand motor moves forward, the right-hand motor moves backward. + +After a \l;motor\u cbot\motor; instruction the motors will keep this speed until the next \c;motor\n;, \c;\l;move\u cbot\move;\n;, \c;\l;turn\u cbot\turn;\n; or \c;\l;goto\u cbot\goto;\n; instruction. For example, if you perform a rotation on the spot with \c;motor(1,-1);\n; and afterward you shoot with \c;fire(1);\n;, the bot will continue to turn during the burst, and will sweep a whole zone. + +The ants attack from the north. In order to sweep the whole zone north of the bot, first turn 90 degrees left with \c;turn(90);\n;, then repeat always with \c;\l;while\u cbot\while; (true)\n; the following instructions: +o rotate clockwise with \c;motor(1,-1);\n; +o a 2 seconds burst with \c;fire(2);\n; +o rotate counter-clockwise with \c;motor(-1,1);\n; +o a 2 seconds burst. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/tant2.txt b/help/tant2.txt index ae7d8a64..a775f77f 100644 --- a/help/tant2.txt +++ b/help/tant2.txt @@ -1,33 +1,33 @@ -\b;Objective -As a defense against ants attacking from all sides, adapt the program \c;Spider2\n; in order to fly at a given altitude. - -\t;Program -The program necessary for this task is somewhat similar to the program \c;Spider2\n; that looks for the closest ant, turns towards it and fires: -\c; -\s;extern void object::Spider2() -\s;{ -\s; object item; -\s; -\s; while (true) -\s; { -\s; item = radar(AlienSpider); -\s; turn(direction(item.position)); -\s; fire(1); -\s; } -\s;} -\n; -You can copy-paste it to the editor, and adapt it. Replace \c;radar(AlienSpider);\n; by \c;radar(AlienAnt);\n;, and write before the \c;while\n; loop another loop that activates the jet beneath the \l;winged shooter\u object\botfj; until the bot reaches an altitude of 20 meters. - -The instruction \c;\l;jet\u cbot\jet;()\n; controls the jet beneath winged bots. The number in brackets must range between \c;-1\n; and \c;1\n;.\c; jet(1);\n; moves the bot upward with maximum speed.\c; jet(-1);\n; moves the bot downward with maximum speed, and \c;jet(0);\n; stabilizes the altitude. As the bot must reach a precise altitude, move it upward slowly with \c;jet(0.2);\n;, wait until it has reached the desired height, then stabilize the altitude with \c;jet(0);\n;. - -In order to "wait until it has reached the desired height", we need a conditional loop: the instructions inside the loop will be repeated only as long as a certain condition is true. The altitude of the bot is given by \c;position.z\n;. We already saw that \c;position\n; gives the position of the bot. And a position is given by the three coordinates x, y and z: the x-axis is the axis west-east, the y-axis is the axis south-north, and the z-axis is the vertical axis. Therefore we must wait while \c;position.z\n; is smaller than 20: -\c; -\s; while (position.z < 20) -\s; { -\s; wait(0.2); -\s; } -\n; -After waiting 0.2 seconds, the program will check if the altitude is still below 20 meters. If this is the case, it will wait a little more, if not, the program continues after the loop, i.e. after the closing brace \c;}\n;. Do not forget after the loop to stabilize the altitude with \c;jet(0);\n;. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Objective +As a defense against ants attacking from all sides, adapt the program \c;Spider2\n; in order to fly at a given altitude. + +\t;Program +The program necessary for this task is somewhat similar to the program \c;Spider2\n; that looks for the closest ant, turns towards it and fires: +\c; +\s;extern void object::Spider2() +\s;{ +\s; object item; +\s; +\s; while (true) +\s; { +\s; item = radar(AlienSpider); +\s; turn(direction(item.position)); +\s; fire(1); +\s; } +\s;} +\n; +You can copy-paste it to the editor, and adapt it. Replace \c;radar(AlienSpider);\n; by \c;radar(AlienAnt);\n;, and write before the \c;while\n; loop another loop that activates the jet beneath the \l;winged shooter\u object\botfj; until the bot reaches an altitude of 20 meters. + +The instruction \c;\l;jet\u cbot\jet;()\n; controls the jet beneath winged bots. The number in brackets must range between \c;-1\n; and \c;1\n;.\c; jet(1);\n; moves the bot upward with maximum speed.\c; jet(-1);\n; moves the bot downward with maximum speed, and \c;jet(0);\n; stabilizes the altitude. As the bot must reach a precise altitude, move it upward slowly with \c;jet(0.2);\n;, wait until it has reached the desired height, then stabilize the altitude with \c;jet(0);\n;. + +In order to "wait until it has reached the desired height", we need a conditional loop: the instructions inside the loop will be repeated only as long as a certain condition is true. The altitude of the bot is given by \c;position.z\n;. We already saw that \c;position\n; gives the position of the bot. And a position is given by the three coordinates x, y and z: the x-axis is the axis west-east, the y-axis is the axis south-north, and the z-axis is the vertical axis. Therefore we must wait while \c;position.z\n; is smaller than 20: +\c; +\s; while (position.z < 20) +\s; { +\s; wait(0.2); +\s; } +\n; +After waiting 0.2 seconds, the program will check if the altitude is still below 20 meters. If this is the case, it will wait a little more, if not, the program continues after the loop, i.e. after the closing brace \c;}\n;. Do not forget after the loop to stabilize the altitude with \c;jet(0);\n;. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/tant3.txt b/help/tant3.txt index 5987a2ee..0798edad 100644 --- a/help/tant3.txt +++ b/help/tant3.txt @@ -1,40 +1,40 @@ -\b;Objective -Adapt the program \c;Tower1\n; in order to avoid wasting energy when shooting at ants that are out of range. - -\t;Program -The program \c;Tower1\n; shoots in the direction of the closest ant, even if it is still out of range: -\c; -\s;extern void object::Tour1() -\s;{ -\s; object item; -\s; -\s; jet(0.2); -\s; while(position.z < 20) -\s; { -\s; wait(0.2); -\s; } -\s; jet(0); -\s; -\s; while(true) -\s; { -\s; item = radar(AlienAnt); -\s; turn(direction(item.position)); -\s; fire(1); -\s; } -\s;} -\n; -If the bot must perform the same task than before with only a \l;regular power cell\u object\power;, you can insert a loop that waits until the ant is close enough, i.e. until the ant is at less than 40 meters. Only one burst will be needed for every ant then. - -You can give the instruction \c;\l;radar\u cbot\radar();\n; more parameters (numbers) indicating where the radar should look for the ants. For example \c;radar(AlienAnt,0,360,0,40);\n; will only look for ants that are closer than 40 meters. The two first numbers tell the radar to search in all directions, the two last numbers tell the radar to detect only ants that are at a distance between 0 and 40 meters. If no ant is found that is closer than 40 meters, the instruction \c;\l;radar\u cbot\radar();\n; returns the value \c;null\n;. We can then write a conditional loop similar to the one written in the last exercise that waits as long as there is no ant closer than 40 meters: -\c; -\s; while (radar(AlienAnt, 0, 360, 0, 40) == null) -\s; { -\s; wait(0.2); -\s; } -\n; -Notice that two equal signs "==" are needed to perform a comparison of equality. - -Just insert these lines before the instruction \c;fire(0);\n;, and the bot will wait before shooting until the ant is closer than 40 meters. Like this a regular power cell is enough to kill all ants. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Objective +Adapt the program \c;Tower1\n; in order to avoid wasting energy when shooting at ants that are out of range. + +\t;Program +The program \c;Tower1\n; shoots in the direction of the closest ant, even if it is still out of range: +\c; +\s;extern void object::Tour1() +\s;{ +\s; object item; +\s; +\s; jet(0.2); +\s; while(position.z < 20) +\s; { +\s; wait(0.2); +\s; } +\s; jet(0); +\s; +\s; while(true) +\s; { +\s; item = radar(AlienAnt); +\s; turn(direction(item.position)); +\s; fire(1); +\s; } +\s;} +\n; +If the bot must perform the same task than before with only a \l;regular power cell\u object\power;, you can insert a loop that waits until the ant is close enough, i.e. until the ant is at less than 40 meters. Only one burst will be needed for every ant then. + +You can give the instruction \c;\l;radar\u cbot\radar();\n; more parameters (numbers) indicating where the radar should look for the ants. For example \c;radar(AlienAnt,0,360,0,40);\n; will only look for ants that are closer than 40 meters. The two first numbers tell the radar to search in all directions, the two last numbers tell the radar to detect only ants that are at a distance between 0 and 40 meters. If no ant is found that is closer than 40 meters, the instruction \c;\l;radar\u cbot\radar();\n; returns the value \c;null\n;. We can then write a conditional loop similar to the one written in the last exercise that waits as long as there is no ant closer than 40 meters: +\c; +\s; while (radar(AlienAnt, 0, 360, 0, 40) == null) +\s; { +\s; wait(0.2); +\s; } +\n; +Notice that two equal signs "==" are needed to perform a comparison of equality. + +Just insert these lines before the instruction \c;fire(0);\n;, and the bot will wait before shooting until the ant is closer than 40 meters. Like this a regular power cell is enough to kill all ants. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/tant4.txt b/help/tant4.txt index 4e83056c..7c58831f 100644 --- a/help/tant4.txt +++ b/help/tant4.txt @@ -1,10 +1,10 @@ -\b;Objectif -Program a \l;winged shooter\u object\botfj; to hunt all ants in the region. - -\t;Program -In this swamp, a wheeled or tracked shooter is of little use. And ants, in opposition to spiders, keep moving: you can not just turn towards the closest ant, move forward and shoot. - -The easiest way to solve the problem consists in flying at a height of 10 meters, aiming downward with \c;aim(-20);\n;, and approaching the ant with a conditional loop as long as the \l;distance\u cbot\dist; is greater than 20m. In this conditional loop, you must look for the closest ant, turn towards it, set the motors at full speed with \c;motor(1,1);\n;, and wait a little, for example 0.2 seconds. All these instructions must be repeated until the ant is at less than 20 meters. Then just shoot it. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Objectif +Program a \l;winged shooter\u object\botfj; to hunt all ants in the region. + +\t;Program +In this swamp, a wheeled or tracked shooter is of little use. And ants, in opposition to spiders, keep moving: you can not just turn towards the closest ant, move forward and shoot. + +The easiest way to solve the problem consists in flying at a height of 10 meters, aiming downward with \c;aim(-20);\n;, and approaching the ant with a conditional loop as long as the \l;distance\u cbot\dist; is greater than 20m. In this conditional loop, you must look for the closest ant, turn towards it, set the motors at full speed with \c;motor(1,1);\n;, and wait a little, for example 0.2 seconds. All these instructions must be repeated until the ant is at less than 20 meters. Then just shoot it. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/tant5.txt b/help/tant5.txt index 8f2b16e7..e822f2fb 100644 --- a/help/tant5.txt +++ b/help/tant5.txt @@ -1,52 +1,52 @@ -\b;Objective -Adapt the flying height of the \l;winged shooter\u object\botfj; to the terrain. - -\t;Program -Here is one more time the program of the previous exercise that hunts ants: -\c; -\s;extern void object::JetFighter1() -\s;{ -\s; object item; -\s; -\s; aim(-20); -\s; jet(0.2); -\s; while (position.z < 10) -\s; { -\s; wait(0.2); -\s; } -\s; jet(0); -\s; -\s; while (true) -\s; { -\s; while (radar(AlienAnt, 0, 360, 0, 20) == null) -\s; { -\s; item = radar(AlienAnt); -\s; turn(direction(item.position)); -\s; motor(1,1); -\s; wait(0.2); -\s; } -\s; fire(1); -\s; } -\s;} -\n; -The bot always stays at an altitude of 10m above sea level. This is not adapted to the mountainous terrain of the present exercise, the bot has got to adapt to the terrain. The best way to do so is to insert just before the \c;wait(0.2);\n; a test to see if the height above ground is too low or too high, and to react accordingly. - -We already saw that \c;position.z\n; gives the altitude above sea level. \c;\l;topo\u cbot\topo;(position)\n; gives the altitude of the ground at the position of the bot. If we want the bot to stay at an altitude between 6 and 9m above ground, we must treat the following cases: if \c;position.z-topo(position)\n; is smaller than 6, the bot must climb with \c;jet(1);\n;. If \c;position.z-topo(position)\n; is greater than 9, the bot must go down with \c;jet(-1);\n;. In order to program these tests, use the instruction \c;\l;if\u cbot\if;\n;, that executes the instructions in braces only once if the condition is true: -\c; -\s; jet(0); -\s; if (position.z-topo(position) < 6) -\s; { -\s; jet(1); -\s; } -\s; -\s; if (position.z-topo(position) > 9) -\s; { -\s; jet(-1); -\s; } -\n; -Before starting the testing, stabilize the altitude with \c;jet(0);\n;: in case the height above ground lies between 6 and 9m, the bot must neither climb nor go down. If afterwards either \c;jet(1);\n; or \c;jet(-1);\n; is executed, it will cancel the previous \c;jet(0);\n;. - -Just insert these lines before the \c;wait(0.2)\n;, and the bot will adapt to the terrain. You can then delete the first lines of the program that set the initial altitude at 10m. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Objective +Adapt the flying height of the \l;winged shooter\u object\botfj; to the terrain. + +\t;Program +Here is one more time the program of the previous exercise that hunts ants: +\c; +\s;extern void object::JetFighter1() +\s;{ +\s; object item; +\s; +\s; aim(-20); +\s; jet(0.2); +\s; while (position.z < 10) +\s; { +\s; wait(0.2); +\s; } +\s; jet(0); +\s; +\s; while (true) +\s; { +\s; while (radar(AlienAnt, 0, 360, 0, 20) == null) +\s; { +\s; item = radar(AlienAnt); +\s; turn(direction(item.position)); +\s; motor(1,1); +\s; wait(0.2); +\s; } +\s; fire(1); +\s; } +\s;} +\n; +The bot always stays at an altitude of 10m above sea level. This is not adapted to the mountainous terrain of the present exercise, the bot has got to adapt to the terrain. The best way to do so is to insert just before the \c;wait(0.2);\n; a test to see if the height above ground is too low or too high, and to react accordingly. + +We already saw that \c;position.z\n; gives the altitude above sea level. \c;\l;topo\u cbot\topo;(position)\n; gives the altitude of the ground at the position of the bot. If we want the bot to stay at an altitude between 6 and 9m above ground, we must treat the following cases: if \c;position.z-topo(position)\n; is smaller than 6, the bot must climb with \c;jet(1);\n;. If \c;position.z-topo(position)\n; is greater than 9, the bot must go down with \c;jet(-1);\n;. In order to program these tests, use the instruction \c;\l;if\u cbot\if;\n;, that executes the instructions in braces only once if the condition is true: +\c; +\s; jet(0); +\s; if (position.z-topo(position) < 6) +\s; { +\s; jet(1); +\s; } +\s; +\s; if (position.z-topo(position) > 9) +\s; { +\s; jet(-1); +\s; } +\n; +Before starting the testing, stabilize the altitude with \c;jet(0);\n;: in case the height above ground lies between 6 and 9m, the bot must neither climb nor go down. If afterwards either \c;jet(1);\n; or \c;jet(-1);\n; is executed, it will cancel the previous \c;jet(0);\n;. + +Just insert these lines before the \c;wait(0.2)\n;, and the bot will adapt to the terrain. You can then delete the first lines of the program that set the initial altitude at 10m. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/tcell1.txt b/help/tcell1.txt index 3425084d..f001d85c 100644 --- a/help/tcell1.txt +++ b/help/tcell1.txt @@ -1,38 +1,38 @@ -\b;Objective -Program the \l;grabber bot\u object\botgr; to change the \l;power cell\u object\power; of the \l;winged shooter\u object\botfj;. The winged shooter can then shoot the spiders. - -\t;Procedure -1) Program the \l;grabber bot\u object\botgr;. -2) Execute the program with the arrow button \button 21;. -The \l;winged shooter\u object\botfj; is already programmed, it will do its job as soon as it has got a new power cell. - -\t;Program -You will need the following instructions: -\c; -\s;grab();\n; -\n;Takes whatever there is in front of the bot. -\c; -\s;drop();\n; -\n;Drops whatever the bot is carrying in front. -\c; -\s;turn();\n; -\n;We have seen this instruction already in the previous exercise: it performs a rotation of a certain angle, given in degrees. - -Let us see the beginning of the program: -o pick up the empty power cell with \c;grab();\n; -o turn left 90 degrees (quarter turn) with \c;turn(90)\n; -o drop the empty cell with \c;drop();\n; -o etc. - -It is up to you now to write the rest of the program! - -If you have got a problem, you can always look at the solution: select the \c;Solution\n; program, and click the braces button \button 22;. - -\t;Remarks -Be careful to write the instructions precisely, respecting lower and upper case letters. - -Always write one instruction per line, finishing each line with a semicolon. - -In case your program does not do exactly what you wanted, you can put the bot back at the starting point with the button \button 59;. You can also start over again from the beginning (hit the key "Esc", the click "Restart"). The program you have written will not be lost. - -\key;\key help;\norm; allows you to review these instructions at all times. +\b;Objective +Program the \l;grabber bot\u object\botgr; to change the \l;power cell\u object\power; of the \l;winged shooter\u object\botfj;. The winged shooter can then shoot the spiders. + +\t;Procedure +1) Program the \l;grabber bot\u object\botgr;. +2) Execute the program with the arrow button \button 21;. +The \l;winged shooter\u object\botfj; is already programmed, it will do its job as soon as it has got a new power cell. + +\t;Program +You will need the following instructions: +\c; +\s;grab();\n; +\n;Takes whatever there is in front of the bot. +\c; +\s;drop();\n; +\n;Drops whatever the bot is carrying in front. +\c; +\s;turn();\n; +\n;We have seen this instruction already in the previous exercise: it performs a rotation of a certain angle, given in degrees. + +Let us see the beginning of the program: +o pick up the empty power cell with \c;grab();\n; +o turn left 90 degrees (quarter turn) with \c;turn(90)\n; +o drop the empty cell with \c;drop();\n; +o etc. + +It is up to you now to write the rest of the program! + +If you have got a problem, you can always look at the solution: select the \c;Solution\n; program, and click the braces button \button 22;. + +\t;Remarks +Be careful to write the instructions precisely, respecting lower and upper case letters. + +Always write one instruction per line, finishing each line with a semicolon. + +In case your program does not do exactly what you wanted, you can put the bot back at the starting point with the button \button 59;. You can also start over again from the beginning (hit the key "Esc", the click "Restart"). The program you have written will not be lost. + +\key;\key help;\norm; allows you to review these instructions at all times. diff --git a/help/tcell2.txt b/help/tcell2.txt index e750bb32..6d989599 100644 --- a/help/tcell2.txt +++ b/help/tcell2.txt @@ -1,48 +1,48 @@ -\b;Objective -Power the \l;winged shooters\u object\botfj; with \l;power cells\u object\power;, so that they can kill the ants in the ant nest located in a hole north of your position. - -\t;Program -The \l;wheeled grabber\u object\botgr; must go to a \l;power cell\u object\power;, grab it, go to a \l;winged shooter\u object\botfj;, and drop the cell. This task is very similar to the task performed in the previous exercise. Here is this program again: -\c; -\s;extern void object::Titanium2() -\s;{ -\s; object item; -\s; -\s; item = radar(TitaniumOre); -\s; goto(item.position); -\s; grab(); -\s; -\s; item = radar(Converter); -\s; goto(item.position); -\s; drop(); -\s;} -\n; -The best way to solve the present exercise is to copy \button 61; the program above into the clipboard (from \c;object\n; to \c;drop();\n;), and paste \button 62; it into the program editor. Then you just have to make the necessary changes in order to adapt it to the new task. - -Instead of looking for titanium ore (\c;TitaniumOre\n;), look for a power cell (\c;PowerCell\n;). Instead of going to a converter (\c;Converter\n;), go to a winged shooter (\c;WingedShooter\n;). As soon as the winged shooter has got a new power cell, it will get down to work. - -If you want to know more about the "names" of the different objects in the programming language, please refer to the \l;text about categories\u cbot\category;. - -\t;Further improvement: loops -Once the program explained above works properly, you can improve it in order to repeat the task over and over again. Like this you will not have to execute the program several times in order to power several bots. - -All programs written until now execute all instructions only once, one after another, from the beginning to the end of the program. You can also tell the bot to repeat some instructions: just write \c;while (true)\n;, an open brace, the instructions to be repeated, and a closing brace. Repeating some instructions several times in this way is called a loop. Here is an example of a program that repeats over and over the instructions that look for a power cell, grab it, and drop it on a winged shooter: -\c; -\s; while (true) -\s; { -\s; item = radar(PowerCell); -\s; goto(item.position); -\s; grab(); -\s; -\s; item = radar(WingedShooter); -\s; goto(item.position); -\s; drop(); -\s; } -\n; -Of course the variable declaration \c;object item;\n; must not be inside the loop, but just before: declare a variable only once. - -\t;Remark -A bot can execute a program perfectly well on his own. Meantime you can for example select the astronaut and take a look at what is happening at the nest, the show is worth it. But be careful not to get shot by your own bots... - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Objective +Power the \l;winged shooters\u object\botfj; with \l;power cells\u object\power;, so that they can kill the ants in the ant nest located in a hole north of your position. + +\t;Program +The \l;wheeled grabber\u object\botgr; must go to a \l;power cell\u object\power;, grab it, go to a \l;winged shooter\u object\botfj;, and drop the cell. This task is very similar to the task performed in the previous exercise. Here is this program again: +\c; +\s;extern void object::Titanium2() +\s;{ +\s; object item; +\s; +\s; item = radar(TitaniumOre); +\s; goto(item.position); +\s; grab(); +\s; +\s; item = radar(Converter); +\s; goto(item.position); +\s; drop(); +\s;} +\n; +The best way to solve the present exercise is to copy \button 61; the program above into the clipboard (from \c;object\n; to \c;drop();\n;), and paste \button 62; it into the program editor. Then you just have to make the necessary changes in order to adapt it to the new task. + +Instead of looking for titanium ore (\c;TitaniumOre\n;), look for a power cell (\c;PowerCell\n;). Instead of going to a converter (\c;Converter\n;), go to a winged shooter (\c;WingedShooter\n;). As soon as the winged shooter has got a new power cell, it will get down to work. + +If you want to know more about the "names" of the different objects in the programming language, please refer to the \l;text about categories\u cbot\category;. + +\t;Further improvement: loops +Once the program explained above works properly, you can improve it in order to repeat the task over and over again. Like this you will not have to execute the program several times in order to power several bots. + +All programs written until now execute all instructions only once, one after another, from the beginning to the end of the program. You can also tell the bot to repeat some instructions: just write \c;while (true)\n;, an open brace, the instructions to be repeated, and a closing brace. Repeating some instructions several times in this way is called a loop. Here is an example of a program that repeats over and over the instructions that look for a power cell, grab it, and drop it on a winged shooter: +\c; +\s; while (true) +\s; { +\s; item = radar(PowerCell); +\s; goto(item.position); +\s; grab(); +\s; +\s; item = radar(WingedShooter); +\s; goto(item.position); +\s; drop(); +\s; } +\n; +Of course the variable declaration \c;object item;\n; must not be inside the loop, but just before: declare a variable only once. + +\t;Remark +A bot can execute a program perfectly well on his own. Meantime you can for example select the astronaut and take a look at what is happening at the nest, the show is worth it. But be careful not to get shot by your own bots... + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/tchasse.txt b/help/tchasse.txt index 0e459b80..eb807f5a 100644 --- a/help/tchasse.txt +++ b/help/tchasse.txt @@ -1,18 +1,18 @@ -\b;Exercise -You must find a way to destroy the four moving \l;target bots\u object\bottarg; without wasting one shot. Notice that after every move, the targets will stay motionless during one second. - -\b;General principle -1) Detect a target with the instruction \c;\l;radar\u cbot\radar;(TargetBot);\n;. -2) Turn towards the target with \c;\l;turn\u cbot\turn;(direction());\n;. -3) After the rotation, check if the target did not move. -4) If it did not, wait 0.2 seconds with \c;\l;wait\u cbot\wait;(0.2);\n;. -5) Re-check if the target did not move. -6) If it did not, shoot with \c;\l;fire\u cbot\fire;(2);\n; and wait 2 seconds for the target to be hit by the bullets and destroyed. - -There are of course other ways to achieve the goal. - -\b;Remark -In order to increase the efficiency of your shots, aim a little downward with \c;\l;aim\u cbot\aim;(-3);\n;. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +You must find a way to destroy the four moving \l;target bots\u object\bottarg; without wasting one shot. Notice that after every move, the targets will stay motionless during one second. + +\b;General principle +1) Detect a target with the instruction \c;\l;radar\u cbot\radar;(TargetBot);\n;. +2) Turn towards the target with \c;\l;turn\u cbot\turn;(direction());\n;. +3) After the rotation, check if the target did not move. +4) If it did not, wait 0.2 seconds with \c;\l;wait\u cbot\wait;(0.2);\n;. +5) Re-check if the target did not move. +6) If it did not, shoot with \c;\l;fire\u cbot\fire;(2);\n; and wait 2 seconds for the target to be hit by the bullets and destroyed. + +There are of course other ways to achieve the goal. + +\b;Remark +In order to increase the efficiency of your shots, aim a little downward with \c;\l;aim\u cbot\aim;(-3);\n;. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/tdragst.txt b/help/tdragst.txt index 14be2b9a..38b62d30 100644 --- a/help/tdragst.txt +++ b/help/tdragst.txt @@ -1,64 +1,64 @@ -\b;Exercise -Reach the finishing pad (25m in front of you) as fast as possible, using the instruction \c;motor( , )\n;. You will have to slow down progressively at the end of the move, otherwise the bot will get blown up on the \l;mines\u object\mine;. - -You could very well write no more than \c;\l;move\u cbot\move;(25);\n;, this would work perfectly well. However, the aim of this exercise is to learn how to use the instruction \c;\l;motor\u cbot\motor;\n;. - -This instruction asks for two values: -1) The speed of the left-hand motor. -2) The speed of the right-hand motor. - -\s;\c; motor( left, right ); -\n; -The values must range between -1 and 1: --1 = full throttle backward - 0 = stop - 1 = full throttle forward - -For example, \c;motor(0.5, 0.5);\n; will move the motor forward with half-speed, until new instructions are given to the motors. - -With the instruction \c;motor(0.5, 0.6);\n;, the bot will move forward with half-speed, turning at the same time slightly to the left: the right-hand motor moves a little faster (\c;0.6\n;) than the left-hand motor (\c;0.5\n;). - -\b;General principle -In order to move forward for exactly 25 meters and not more, you must move full speed during the first 23 meters, then reduce the speed of the motors progressively during the last two meters. -The \l;variable\u cbot\var; \l;position\u cbot\object; gives you at any moment the current position of the bot, and the instruction \c;\l;distance\u cbot\dist;( , );\n; returns the distance between two points. The best way to know where you are consists in saving the current position before the start into a \l;variable\u cbot\var;, for example a variable called \c;start\n;. Then you can calculate the distance between the starting position and your current position with \c;distance(position, start)\n;. - -\b;The program -1) declare the variables -\s;\c; point start; -\s; float len; -\n; -2) save the starting position -\s;\c; start = position; -\n; -3) start full throttle : -\s;\c; motor(1, 1); -\n; -4) Perform an infinite \c;\l;while\u cbot\while;\n; loop: -\s;\c; while ( true ) -\s; { -\s; len = distance(position, start); -\s; if ( len > 25-2 ) -\s; { -\s; motor( less than before ! ); -\s; } -\s; } -\n; -As long as the distance between the start and the current position is smaller than 23m, the instruction in braces after the \c;\l;if\u cbot\if;\n; instruction will not be executed, so the motors keep their maximum speed as they were told by the \c;\l;motor\u cbot\motor;(1,1);\n; instruction. - -In order to slow down progressively, the speed of the motors must be proportional to the remaining distance: -o \c;2.0\n; meters left -> speed = \c;1.00\n; (maximum) -o \c;1.5\n; meters left -> speed = \c;0.75\n; -o \c;1.0\n; meter left -> speed = \c;0.50\n; -o \c;0.5\n; meter left -> speed = \c;0.25\n; -o \c;0.0\n; meter left -> speed = \c;0.00\n; (stop) - -\image tdragst1 12 6; -You can use the following \l;expression\u cbot\expr; \c;(25-len)/2\n; in order to calculate the value for the speed instruction that must be given to the motors. - -It is now up to you to put everything together and to test the program. - -\b;Remark -You can use values greater than 1 for the instruction \c;\l;motor\u cbot\motor;();\n;, but the bot will not move any faster. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +Reach the finishing pad (25m in front of you) as fast as possible, using the instruction \c;motor( , )\n;. You will have to slow down progressively at the end of the move, otherwise the bot will get blown up on the \l;mines\u object\mine;. + +You could very well write no more than \c;\l;move\u cbot\move;(25);\n;, this would work perfectly well. However, the aim of this exercise is to learn how to use the instruction \c;\l;motor\u cbot\motor;\n;. + +This instruction asks for two values: +1) The speed of the left-hand motor. +2) The speed of the right-hand motor. + +\s;\c; motor( left, right ); +\n; +The values must range between -1 and 1: +-1 = full throttle backward + 0 = stop + 1 = full throttle forward + +For example, \c;motor(0.5, 0.5);\n; will move the motor forward with half-speed, until new instructions are given to the motors. + +With the instruction \c;motor(0.5, 0.6);\n;, the bot will move forward with half-speed, turning at the same time slightly to the left: the right-hand motor moves a little faster (\c;0.6\n;) than the left-hand motor (\c;0.5\n;). + +\b;General principle +In order to move forward for exactly 25 meters and not more, you must move full speed during the first 23 meters, then reduce the speed of the motors progressively during the last two meters. +The \l;variable\u cbot\var; \l;position\u cbot\object; gives you at any moment the current position of the bot, and the instruction \c;\l;distance\u cbot\dist;( , );\n; returns the distance between two points. The best way to know where you are consists in saving the current position before the start into a \l;variable\u cbot\var;, for example a variable called \c;start\n;. Then you can calculate the distance between the starting position and your current position with \c;distance(position, start)\n;. + +\b;The program +1) declare the variables +\s;\c; point start; +\s; float len; +\n; +2) save the starting position +\s;\c; start = position; +\n; +3) start full throttle : +\s;\c; motor(1, 1); +\n; +4) Perform an infinite \c;\l;while\u cbot\while;\n; loop: +\s;\c; while ( true ) +\s; { +\s; len = distance(position, start); +\s; if ( len > 25-2 ) +\s; { +\s; motor( less than before ! ); +\s; } +\s; } +\n; +As long as the distance between the start and the current position is smaller than 23m, the instruction in braces after the \c;\l;if\u cbot\if;\n; instruction will not be executed, so the motors keep their maximum speed as they were told by the \c;\l;motor\u cbot\motor;(1,1);\n; instruction. + +In order to slow down progressively, the speed of the motors must be proportional to the remaining distance: +o \c;2.0\n; meters left -> speed = \c;1.00\n; (maximum) +o \c;1.5\n; meters left -> speed = \c;0.75\n; +o \c;1.0\n; meter left -> speed = \c;0.50\n; +o \c;0.5\n; meter left -> speed = \c;0.25\n; +o \c;0.0\n; meter left -> speed = \c;0.00\n; (stop) + +\image tdragst1 12 6; +You can use the following \l;expression\u cbot\expr; \c;(25-len)/2\n; in order to calculate the value for the speed instruction that must be given to the motors. + +It is now up to you to put everything together and to test the program. + +\b;Remark +You can use values greater than 1 for the instruction \c;\l;motor\u cbot\motor;();\n;, but the bot will not move any faster. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/texch1.txt b/help/texch1.txt index f75060d4..914ba70f 100644 --- a/help/texch1.txt +++ b/help/texch1.txt @@ -1,31 +1,31 @@ -\b;Exercise -Several \l;information exchange posts\u object\exchange; stand in the middle of a \l;mine\u object\mine; field. When the bot is close enough to an exchange post, it can read the information that it contains. Every exchange post contains the angle of the rotation that must be performed in order to reach the next exchange post, without touching a \l;mine\u object\mine;. -The exchange posts are distant 20m from each other. - -\b;General principe -Repeat 5 times : - o Move 20m forward. - o Read the direction of the next \l;information exchange post\u object\exchange;. - o Execute the necessary rotation. - -\image tinfo1 8 8; -In order to repeat the steps above, use a \c;\l;for\u cbot\for;\n; loop, as we saw it before. -\s;\c; for ( int i=0 ; i<5 ; i=i+1 ) -\n; -Move forward with the instruction \c;move(20);\n;. - -Use the instruction \c;\l;receive\u cbot\receive;("Direction");\n; in order to read the information contained in the \l;exchange post\u object\exchange;. This is of course possible only when the bot is close enough to the exchange post. -You will need a \l;variable\u cbot\var; to contain the value retrieved from the exchange post. Let us call it \c;dir\n;; you must declare it with the following line: -\s;\c; float dir; -\n; -Then retrieve the rotation angle from the exchange post, and put it into the variable: -\s;\c; dir = receive(...); -\n; -Then you can execute the rotation: -\s;\c; turn(dir); -\n; -\b;Remark -You can click on an \l;information exchange post\u object\exchange; in order to read what information it contains. In this exercise, every exchange post contains only one value called \c;"Direction"\n;, but it can contain up to 10 different values, as you will see in some of the following exercises. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +Several \l;information exchange posts\u object\exchange; stand in the middle of a \l;mine\u object\mine; field. When the bot is close enough to an exchange post, it can read the information that it contains. Every exchange post contains the angle of the rotation that must be performed in order to reach the next exchange post, without touching a \l;mine\u object\mine;. +The exchange posts are distant 20m from each other. + +\b;General principe +Repeat 5 times : + o Move 20m forward. + o Read the direction of the next \l;information exchange post\u object\exchange;. + o Execute the necessary rotation. + +\image tinfo1 8 8; +In order to repeat the steps above, use a \c;\l;for\u cbot\for;\n; loop, as we saw it before. +\s;\c; for ( int i=0 ; i<5 ; i=i+1 ) +\n; +Move forward with the instruction \c;move(20);\n;. + +Use the instruction \c;\l;receive\u cbot\receive;("Direction");\n; in order to read the information contained in the \l;exchange post\u object\exchange;. This is of course possible only when the bot is close enough to the exchange post. +You will need a \l;variable\u cbot\var; to contain the value retrieved from the exchange post. Let us call it \c;dir\n;; you must declare it with the following line: +\s;\c; float dir; +\n; +Then retrieve the rotation angle from the exchange post, and put it into the variable: +\s;\c; dir = receive(...); +\n; +Then you can execute the rotation: +\s;\c; turn(dir); +\n; +\b;Remark +You can click on an \l;information exchange post\u object\exchange; in order to read what information it contains. In this exercise, every exchange post contains only one value called \c;"Direction"\n;, but it can contain up to 10 different values, as you will see in some of the following exercises. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/texch2.txt b/help/texch2.txt index f75e2ddf..842770cf 100644 --- a/help/texch2.txt +++ b/help/texch2.txt @@ -1,36 +1,36 @@ -\b;Exercise -In this exercise, the \l;information exchange posts\u object\exchange; along the way contain the direction of the next post and the distance. And you do not know how many exchange posts you must get in touch with before arriving at your goal. - -\b;General principle - Repeat forever: - o Retrieve the direction from the \l;exchange post\u object\exchange;. - o Retrieve the distance from the \l;exchange post\u object\exchange;. - o If no information could be retrieved, stop the program. - o Execute the rotation. - o Move forward to the next post. - -In order to repeat always, use a \c;\l;while\u cbot\while; (true)\n; loop. The instructions between the braces \c;{ }\n; will be repeated over and over, or until a \c;\l;break\u cbot\break;\n; instruction is executed. -\s;\c; while ( true ) -\n; -This time you need 2 \l;variables\u cbot\var;, one for the rotation angle, one for the distance, for example \c;dir\n; and \c;len\n; : -\s;\c; float dir, len; -\n; -Then you can retrieve the information: -\s;\c; dir = receive("Direction"); -\s;\c; len = receive("Length"); -\n; -A variable of the \l;type\u cbot\type; \c;\l;float\u cbot\float;\n; can take a special value called \c;\l;nan\u cbot\nan;\n;. This value means that the variable contains no number (Not A Number). -When there is no \l;exchange post\u object\exchange; nearby, either because the bot has reached the goal, or because it took the wrong way, the two variables \c;dir\n; and \c;len\n; contain this value. You can test this with the instruction \c;\l;if\u cbot\if;\n;, and stop the program if necessary with the instruction \c;\l;break\u cbot\break;\n;: -\s;\c; if ( dir == nan ) break; -\n; -If the information retrieval from the \l;exchange post\u object\exchange; has been performed successfully, execute the rotation: -\s;\c; turn(dir); -\n; -And move forward: -\s;\c; move(len); -\n; -\b;Remark -You can click on an \l;information exchange post\u object\exchange; in order to read what information it contains. In this exercise, every exchange post contains two values called \c;"Direction"\n; and \c;"Length"\n;. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +In this exercise, the \l;information exchange posts\u object\exchange; along the way contain the direction of the next post and the distance. And you do not know how many exchange posts you must get in touch with before arriving at your goal. + +\b;General principle + Repeat forever: + o Retrieve the direction from the \l;exchange post\u object\exchange;. + o Retrieve the distance from the \l;exchange post\u object\exchange;. + o If no information could be retrieved, stop the program. + o Execute the rotation. + o Move forward to the next post. + +In order to repeat always, use a \c;\l;while\u cbot\while; (true)\n; loop. The instructions between the braces \c;{ }\n; will be repeated over and over, or until a \c;\l;break\u cbot\break;\n; instruction is executed. +\s;\c; while ( true ) +\n; +This time you need 2 \l;variables\u cbot\var;, one for the rotation angle, one for the distance, for example \c;dir\n; and \c;len\n; : +\s;\c; float dir, len; +\n; +Then you can retrieve the information: +\s;\c; dir = receive("Direction"); +\s;\c; len = receive("Length"); +\n; +A variable of the \l;type\u cbot\type; \c;\l;float\u cbot\float;\n; can take a special value called \c;\l;nan\u cbot\nan;\n;. This value means that the variable contains no number (Not A Number). +When there is no \l;exchange post\u object\exchange; nearby, either because the bot has reached the goal, or because it took the wrong way, the two variables \c;dir\n; and \c;len\n; contain this value. You can test this with the instruction \c;\l;if\u cbot\if;\n;, and stop the program if necessary with the instruction \c;\l;break\u cbot\break;\n;: +\s;\c; if ( dir == nan ) break; +\n; +If the information retrieval from the \l;exchange post\u object\exchange; has been performed successfully, execute the rotation: +\s;\c; turn(dir); +\n; +And move forward: +\s;\c; move(len); +\n; +\b;Remark +You can click on an \l;information exchange post\u object\exchange; in order to read what information it contains. In this exercise, every exchange post contains two values called \c;"Direction"\n; and \c;"Length"\n;. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/tfollow1.txt b/help/tfollow1.txt index ee2cba5a..25f6fb93 100644 --- a/help/tfollow1.txt +++ b/help/tfollow1.txt @@ -1,62 +1,62 @@ -\b;Exercise -You must follow the \l;target bot\u object\bottr; with the explosive device, but without touching it, otherwise it will blow up. Every time the target bot stops, you must be close to it (less than 10m). After you managed to stay close to the target bot at 10 successive stops, it will lead you to the finishing pad, and the exercise is over. At every stop, the target bot checks that you are there. If you are not there, you must start over again. - -\b;General principle -Repeat forever : -o Look for the target bot. -o Calculate the distance to the bot. -o if the distance to the target bot is less than 5m, move backward. -o Otherwise, calculate the direction of the target bot, and move towards it. - -As many times before, use \c;\l;while\u cbot\while; (true)\n; in order to perform the infinite loop: -\s;\c;while (true) -\s;{ -\s; \n;instructions to be repeated ...\c; -\s;} -\n; -Look for the target bot with the instruction \c;\l;radar\u cbot\radar;\n;: -\s;\c; target = radar(TargetBot); -\n; -You do not have to test if the radar found a target bot: there must be one. - -Use the instruction \c;\l;distance\u cbot\dist;( , )\n; to calculate the distance between two points. The first point will be the position of your own bot, given by \c;position\n;. The second point is the position of the target bot, given by \c;target.position\n;. -\s;\c;len = distance(position, target.position); -\n; -If the distance to the target bot is smaller than 5m, move backward with a speed inversely proportional to the distance: the closer you are to the bot, the faster you must move backward. - Distance = 5.0 meters -> speed = 0.0 - Distance = 2.5 meters -> speed = -0.5 - Distance = 0.0 meters -> speed = -1.0 -You can use the \l;expression\u cbot\expr; \c;distance/5-1\n; in order to achieve this, together with the \c;\l;if\u cbot\if;\n; to test if the target is closer than 5m: -\s;\c;if ( len < 5 ) // too close ? -\s;{ -\s; motor(len/5-1, len/5-1); // moves backward -\s;} -\n; -If the distance to the target is greater than 5m, move towards the target. First calculate the angle necessary to face the target with the instruction \c;\l;direction\u cbot\direct;\n;. You can then adjust the speed of the right-hand and left-hand motor in order to follow the target: -\s;\c;else -\s;{ -\s; dir = direction(target.position); -\s; if ( dir >= 0 ) // target on the left side? -\s; { -\s; motor(1-dir/90, 1); -\s; } -\s; else // target on the right side? -\s; { -\s; \n;it is up to you to fill in\c; -\s; } -\s;} -\n; -When the target is on your left, \c;dir\n; takes a positive value, ranging between 0 and 180. The \l;expression\u cbot\expr; \c;1-dir/90\n; returns a speed ranging between 1 and -1, according to the direction: - direction = 0 -> speed = 1.0 - direction = 45 -> speed = 0.5 - direction = 90 -> speed = 0.0 - direction = 135 -> speed = -0.5 - direction = 180 -> speed = -1.0 - -\image radar2 14 10; -When the target is on the right side, \c;dir\n; is negative, ranging between 0 and -180. - -The only task left for you now is to declare the \l;variables\u cbot\var; that you use in the program. \c;target\n; is of type \c;object\n;, whereas \c;dir\n; and \c;len\n; are of type \c;float\n;. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +You must follow the \l;target bot\u object\bottr; with the explosive device, but without touching it, otherwise it will blow up. Every time the target bot stops, you must be close to it (less than 10m). After you managed to stay close to the target bot at 10 successive stops, it will lead you to the finishing pad, and the exercise is over. At every stop, the target bot checks that you are there. If you are not there, you must start over again. + +\b;General principle +Repeat forever : +o Look for the target bot. +o Calculate the distance to the bot. +o if the distance to the target bot is less than 5m, move backward. +o Otherwise, calculate the direction of the target bot, and move towards it. + +As many times before, use \c;\l;while\u cbot\while; (true)\n; in order to perform the infinite loop: +\s;\c;while (true) +\s;{ +\s; \n;instructions to be repeated ...\c; +\s;} +\n; +Look for the target bot with the instruction \c;\l;radar\u cbot\radar;\n;: +\s;\c; target = radar(TargetBot); +\n; +You do not have to test if the radar found a target bot: there must be one. + +Use the instruction \c;\l;distance\u cbot\dist;( , )\n; to calculate the distance between two points. The first point will be the position of your own bot, given by \c;position\n;. The second point is the position of the target bot, given by \c;target.position\n;. +\s;\c;len = distance(position, target.position); +\n; +If the distance to the target bot is smaller than 5m, move backward with a speed inversely proportional to the distance: the closer you are to the bot, the faster you must move backward. + Distance = 5.0 meters -> speed = 0.0 + Distance = 2.5 meters -> speed = -0.5 + Distance = 0.0 meters -> speed = -1.0 +You can use the \l;expression\u cbot\expr; \c;distance/5-1\n; in order to achieve this, together with the \c;\l;if\u cbot\if;\n; to test if the target is closer than 5m: +\s;\c;if ( len < 5 ) // too close ? +\s;{ +\s; motor(len/5-1, len/5-1); // moves backward +\s;} +\n; +If the distance to the target is greater than 5m, move towards the target. First calculate the angle necessary to face the target with the instruction \c;\l;direction\u cbot\direct;\n;. You can then adjust the speed of the right-hand and left-hand motor in order to follow the target: +\s;\c;else +\s;{ +\s; dir = direction(target.position); +\s; if ( dir >= 0 ) // target on the left side? +\s; { +\s; motor(1-dir/90, 1); +\s; } +\s; else // target on the right side? +\s; { +\s; \n;it is up to you to fill in\c; +\s; } +\s;} +\n; +When the target is on your left, \c;dir\n; takes a positive value, ranging between 0 and 180. The \l;expression\u cbot\expr; \c;1-dir/90\n; returns a speed ranging between 1 and -1, according to the direction: + direction = 0 -> speed = 1.0 + direction = 45 -> speed = 0.5 + direction = 90 -> speed = 0.0 + direction = 135 -> speed = -0.5 + direction = 180 -> speed = -1.0 + +\image radar2 14 10; +When the target is on the right side, \c;dir\n; is negative, ranging between 0 and -180. + +The only task left for you now is to declare the \l;variables\u cbot\var; that you use in the program. \c;target\n; is of type \c;object\n;, whereas \c;dir\n; and \c;len\n; are of type \c;float\n;. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/tfor.txt b/help/tfor.txt index e0857898..07285d69 100644 --- a/help/tfor.txt +++ b/help/tfor.txt @@ -1,57 +1,57 @@ -\b;Exercise -Destroy the six \l;targets\u object\bottarg; with a program using a loop. The bot must move 5m forward to get from one target to the next. - -\b;General principle -The program must execute the following scheme: -Repeat 6 times : - o move 5m forward - o turn 90 degrees left - o shoot - o turn 90 degrees right - -\image tfor1 14 5; -\b;Instruction \c;for ( )\n; -The instruction \c;\l;for\u cbot\for;\n; asks for 3 expressions: -1) Initialize the counting variable. -2) The end \l;condition\u cbot\cond;. -3) The counting \l;expression\u cbot\expr;. - -Here is the loop once it is integrated into the program frame: -\s;\c;extern void object::Massacre( ) -\s;{ -\s; for ( int i=0 ; i<6 ; i=i+1 ) -\s; { -\s; \n;instructions repeated 6 times ...\c; -\s; } -\s;} -\n; -ATTENTION: The line \c;for ( )\n; must not be followed by a \l;semicolon\u cbot\term; ! - -\b;Explanation of the instruction \c;for ( )\n; -1) \c;int i=0\n; - The \l;variable\u cbot\var; i is set to zero before the beginning of the loop. - -2) \c;i<6\n; - The loop will be executed as long as i is smaller than 6. - -3) \c;i=i+1\n; - At the end of every loop, add 1 to the variable i. - -\b;Blocks -Use braces \c;{ }\n; in order to create a \l;block\u cbot\bloc;. All the instructions that must be executed in the \c;for\n; loop are held together by a block. The whole program itself is made up of a block: -\c; -\s;extern void object::massacre( ) -\s;{ -\s; \n;fill in here ...\c; -\s;} -\n; -Never change these characters. Just add the instructions of the program between the braces. -You can fit several blocks one into the other. For example the \c;for\n; block is fitted into the block of the whole program. In order to improve readability, the editor lines up the braces belonging to the different blocks. - -\b;Remember -The instruction used to move forward is \c;\l;move\u cbot\move;();\n;. -The instruction used to turn the bot is \c;\l;turn\u cbot\turn;();\n;. A positive angle turns left. -The instruction used to fire the cannon is \c;\l;fire\u cbot\fire;(1);\n;. A one-second burst allows to destroy all six \l;targets\u object\bottarg;. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +Destroy the six \l;targets\u object\bottarg; with a program using a loop. The bot must move 5m forward to get from one target to the next. + +\b;General principle +The program must execute the following scheme: +Repeat 6 times : + o move 5m forward + o turn 90 degrees left + o shoot + o turn 90 degrees right + +\image tfor1 14 5; +\b;Instruction \c;for ( )\n; +The instruction \c;\l;for\u cbot\for;\n; asks for 3 expressions: +1) Initialize the counting variable. +2) The end \l;condition\u cbot\cond;. +3) The counting \l;expression\u cbot\expr;. + +Here is the loop once it is integrated into the program frame: +\s;\c;extern void object::Massacre( ) +\s;{ +\s; for ( int i=0 ; i<6 ; i=i+1 ) +\s; { +\s; \n;instructions repeated 6 times ...\c; +\s; } +\s;} +\n; +ATTENTION: The line \c;for ( )\n; must not be followed by a \l;semicolon\u cbot\term; ! + +\b;Explanation of the instruction \c;for ( )\n; +1) \c;int i=0\n; + The \l;variable\u cbot\var; i is set to zero before the beginning of the loop. + +2) \c;i<6\n; + The loop will be executed as long as i is smaller than 6. + +3) \c;i=i+1\n; + At the end of every loop, add 1 to the variable i. + +\b;Blocks +Use braces \c;{ }\n; in order to create a \l;block\u cbot\bloc;. All the instructions that must be executed in the \c;for\n; loop are held together by a block. The whole program itself is made up of a block: +\c; +\s;extern void object::massacre( ) +\s;{ +\s; \n;fill in here ...\c; +\s;} +\n; +Never change these characters. Just add the instructions of the program between the braces. +You can fit several blocks one into the other. For example the \c;for\n; block is fitted into the block of the whole program. In order to improve readability, the editor lines up the braces belonging to the different blocks. + +\b;Remember +The instruction used to move forward is \c;\l;move\u cbot\move;();\n;. +The instruction used to turn the bot is \c;\l;turn\u cbot\turn;();\n;. A positive angle turns left. +The instruction used to fire the cannon is \c;\l;fire\u cbot\fire;(1);\n;. A one-second burst allows to destroy all six \l;targets\u object\bottarg;. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/tlaby1.txt b/help/tlaby1.txt index e291ae30..c5deb7c6 100644 --- a/help/tlaby1.txt +++ b/help/tlaby1.txt @@ -1,62 +1,62 @@ -\b;Exercise -Program the bot so that it will find its way without hitting the walls of the labyrinth. We suppose that you do not know the configuration of the labyrinth, but there are no bifurcations, and no dead-ends. The labyrinth is made of squares measuring 5m each. - -\b;The instruction \c;radar\n; -The instruction \c;\l;radar\u cbot\radar;(Barrier, 0, 45, 0, 5);\n; will find any \l;barrier\u object\barrier; in front of the radar that is closer than 5m. Let us take a closer look at the five parameters used: - -\s;\c;Barrier\n; -\l;Category\u cbot\category; of the object that the radar must look for, i.e. a barrier. - -\s;\c;0\n; -Direction of the radar. \c;0\n; means that the radar must search straight forward. - -\s;\c;45\n; -Opening angle in degrees. With an opening angle of 45 degrees, barriers situated between 22.5 degrees to the left and 22.5 degrees to the right will be detected. - -\s;\c;0\n; -Minimum detection distance. \c;0\n; means that even object that are very close to the bot will be detected. - -\s;\c;5\n; -Maximum detection range. Any barrier situated beyond \c;5\n; meters will not be detected. - -To take another example, \c;\l;radar\u cbot\radar;(Barrier, 90, 45, 0, 5);\n; will direct the radar 90 degrees to the left, in order to test if the way to the left is free. - -\image tlaby1 10 10; -\b;General principle -The program must only take care of one square portion of the labyrinth. You will have to execute it several times in order to arrive at the finishing pad. -o If there is nothing in front, move forward. -o If there is nothing on the left side, quarter turn left, move forward. -o If there is nothing on the right side, quarter turn right, move forward. - -1) First of all declare three \l;variables\u cbot\var; of type \c;\l;object\u cbot\object;\n;, that we call \c;front\n;, \c;left\n; and \c;right\n;. Variables of this type can contain the description of any object, for example of a barrier found by the radar. -\s;\c; object front, left, right;\n; - -2) Look for barriers in all three directions, and put the result of the \c;radar\n; instruction into the three variables defined at point 1). If the radar finds nothing, the variable will contain the value \c;\l;null\u cbot\null;\n;. -\s;\c; front = radar(Barrier, 0, 45, 0, 5); -\s; left = radar(Barrier, 90, 45, 0, 5); -\s; right = radar(Barrier, -90, 45, 0, 5); -\n; -3) Test if the way is free in front of the bot with the instruction \c;\l;if\u cbot\if;\n;. If the test is true, the instructions in braces \c;{ }\n; will be executed, otherwise the execution will resume after the closing brace \c;}\n;. -The instruction \c;return\n; leaves the program: the job is done. -\s;\c;if ( front == null ) -\s;{ -\s; move(5); -\s; return; -\s;} -\n; -4) Test if it is possible to turn left; if so, turn left with the instruction \c;\l;turn\u cbot\turn;\n; and move 5m forward. -\s;\c;if ( left == null ) -\s;{ -\s; turn(90); -\s; move(5); -\s; return; -\s;} -\n; -5) Test if it is possible to turn right. - ... - -\b;Attention -The instruction \c;if ( )\n; must never be followed by a \l;semicolon\u cbot\term;. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +Program the bot so that it will find its way without hitting the walls of the labyrinth. We suppose that you do not know the configuration of the labyrinth, but there are no bifurcations, and no dead-ends. The labyrinth is made of squares measuring 5m each. + +\b;The instruction \c;radar\n; +The instruction \c;\l;radar\u cbot\radar;(Barrier, 0, 45, 0, 5);\n; will find any \l;barrier\u object\barrier; in front of the radar that is closer than 5m. Let us take a closer look at the five parameters used: + +\s;\c;Barrier\n; +\l;Category\u cbot\category; of the object that the radar must look for, i.e. a barrier. + +\s;\c;0\n; +Direction of the radar. \c;0\n; means that the radar must search straight forward. + +\s;\c;45\n; +Opening angle in degrees. With an opening angle of 45 degrees, barriers situated between 22.5 degrees to the left and 22.5 degrees to the right will be detected. + +\s;\c;0\n; +Minimum detection distance. \c;0\n; means that even object that are very close to the bot will be detected. + +\s;\c;5\n; +Maximum detection range. Any barrier situated beyond \c;5\n; meters will not be detected. + +To take another example, \c;\l;radar\u cbot\radar;(Barrier, 90, 45, 0, 5);\n; will direct the radar 90 degrees to the left, in order to test if the way to the left is free. + +\image tlaby1 10 10; +\b;General principle +The program must only take care of one square portion of the labyrinth. You will have to execute it several times in order to arrive at the finishing pad. +o If there is nothing in front, move forward. +o If there is nothing on the left side, quarter turn left, move forward. +o If there is nothing on the right side, quarter turn right, move forward. + +1) First of all declare three \l;variables\u cbot\var; of type \c;\l;object\u cbot\object;\n;, that we call \c;front\n;, \c;left\n; and \c;right\n;. Variables of this type can contain the description of any object, for example of a barrier found by the radar. +\s;\c; object front, left, right;\n; + +2) Look for barriers in all three directions, and put the result of the \c;radar\n; instruction into the three variables defined at point 1). If the radar finds nothing, the variable will contain the value \c;\l;null\u cbot\null;\n;. +\s;\c; front = radar(Barrier, 0, 45, 0, 5); +\s; left = radar(Barrier, 90, 45, 0, 5); +\s; right = radar(Barrier, -90, 45, 0, 5); +\n; +3) Test if the way is free in front of the bot with the instruction \c;\l;if\u cbot\if;\n;. If the test is true, the instructions in braces \c;{ }\n; will be executed, otherwise the execution will resume after the closing brace \c;}\n;. +The instruction \c;return\n; leaves the program: the job is done. +\s;\c;if ( front == null ) +\s;{ +\s; move(5); +\s; return; +\s;} +\n; +4) Test if it is possible to turn left; if so, turn left with the instruction \c;\l;turn\u cbot\turn;\n; and move 5m forward. +\s;\c;if ( left == null ) +\s;{ +\s; turn(90); +\s; move(5); +\s; return; +\s;} +\n; +5) Test if it is possible to turn right. + ... + +\b;Attention +The instruction \c;if ( )\n; must never be followed by a \l;semicolon\u cbot\term;. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/tlaby2.txt b/help/tlaby2.txt index 405ef532..b09ec7f2 100644 --- a/help/tlaby2.txt +++ b/help/tlaby2.txt @@ -1,55 +1,55 @@ -\b;Exercise -This exercise is very similar to the previous one. This time the bot should find its way alone from the start to the goal; you will have to execute the program only once. - -\b;Remark -The labyrinth is not exactly the same, but this should be of no importance, as the program adapts to what it "sees". - -\image tlaby1 10 10; -\b;General principle -Use an infinite \c;\l;while\u cbot\while;\n; loop in order to execute the previous program several times: -\s;\c;while ( true ) -\s;{ -\s; \n;If there is nothing in front, move forward\c; -\s; \n;If there is nothing on your left hand, turn left\c; -\s; \n;If there is nothing on your right hand, turn right\c; -\s;} -\n; -Inside this \c;while\n; loop, replace the \c;return\n; instructions by \c;\l;continue\u cbot\continue;\n; instructions. \c;return\n; would quit the program, which is not what we want here. \c;continue\n; will just resume the execution at the beginning of the \c;\l;while\u cbot\while;\n; loop: -\s;\c;if ( front == null ) -\s;{ -\s; move(5); -\s; continue; -\s;} -\n; -\b;Remember -Here is again the program of the previous exercise : -\c; -\s;object front, left, right; -\s; -\s;front = radar(Barrier, 0, 45, 0, 5); -\s;left = radar(Barrier, 90, 45, 0, 5); -\s;right = radar(Barrier, -90, 45, 0, 5); -\s; -\s;if ( front == null ) -\s;{ -\s; move(5); -\s; return; -\s;} -\s;if ( left == null ) -\s;{ -\s; turn(90); -\s; move(5); -\s; return; -\s;} -\s;if ( right == null ) -\s;{ -\s; turn(-90); -\s; move(5); -\s; return; -\s;} -\n; -\b;Help -If you need some help, just click on the hyperlinks of the instructions \c;\l;radar\u cbot\radar;\n;, \c;\l;if\u cbot\if;\n;, \c;\l;move\u cbot\move;\n; or \c;\l;turn\u cbot\turn;\n;. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +This exercise is very similar to the previous one. This time the bot should find its way alone from the start to the goal; you will have to execute the program only once. + +\b;Remark +The labyrinth is not exactly the same, but this should be of no importance, as the program adapts to what it "sees". + +\image tlaby1 10 10; +\b;General principle +Use an infinite \c;\l;while\u cbot\while;\n; loop in order to execute the previous program several times: +\s;\c;while ( true ) +\s;{ +\s; \n;If there is nothing in front, move forward\c; +\s; \n;If there is nothing on your left hand, turn left\c; +\s; \n;If there is nothing on your right hand, turn right\c; +\s;} +\n; +Inside this \c;while\n; loop, replace the \c;return\n; instructions by \c;\l;continue\u cbot\continue;\n; instructions. \c;return\n; would quit the program, which is not what we want here. \c;continue\n; will just resume the execution at the beginning of the \c;\l;while\u cbot\while;\n; loop: +\s;\c;if ( front == null ) +\s;{ +\s; move(5); +\s; continue; +\s;} +\n; +\b;Remember +Here is again the program of the previous exercise : +\c; +\s;object front, left, right; +\s; +\s;front = radar(Barrier, 0, 45, 0, 5); +\s;left = radar(Barrier, 90, 45, 0, 5); +\s;right = radar(Barrier, -90, 45, 0, 5); +\s; +\s;if ( front == null ) +\s;{ +\s; move(5); +\s; return; +\s;} +\s;if ( left == null ) +\s;{ +\s; turn(90); +\s; move(5); +\s; return; +\s;} +\s;if ( right == null ) +\s;{ +\s; turn(-90); +\s; move(5); +\s; return; +\s;} +\n; +\b;Help +If you need some help, just click on the hyperlinks of the instructions \c;\l;radar\u cbot\radar;\n;, \c;\l;if\u cbot\if;\n;, \c;\l;move\u cbot\move;\n; or \c;\l;turn\u cbot\turn;\n;. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/tmove1.txt b/help/tmove1.txt index 935d3eff..24604c1f 100644 --- a/help/tmove1.txt +++ b/help/tmove1.txt @@ -1,33 +1,33 @@ -\b;Exercise -Program the robot in such a way that it arrives on the finishing pad, after having passed by the three blue crosses. - -\b;Procedure -1) Take the power cell and put it on the rear of the bot. -2) Walk around on reconnaissance to understand what the bot must do. -3) Program the bot. To do so, you must select it, and then click on the braces button \button 22;; you will get into the program editor. -4) Once you finished writing the program, click "OK", and execute the program with the arrow key \button 21;. - -\b;Program -The pads are at a distance of 20 meters from each other. -The instruction \c;move(20);\n; moves 20 meters forward. -The instruction \c;turn(90);\n; turns left with an angle of 90 degrees. -The instruction \c;turn(-90);\n; turns right with an angle of 90 degrees. - -The frame of the program consists in: -\c; -\s; extern void object::MoveBot( ) -\s; { -\s; \n;\\write the necessary instructions here ...\c; -\s; } -\n; -For now, you must not change the frame of the program. Just insert the instructions you need to move the bot around between the braces \c;{ }\n;. - -\b;Attention -Be very careful about upper case and lower case letters! -Every instruction must be terminated with a semicolon. - -\b;Helpful trick -When you write the program, you can watch the scene by clicking on the button \button 51;, and by moving the mouse to the edges of the window to turn the camera. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +Program the robot in such a way that it arrives on the finishing pad, after having passed by the three blue crosses. + +\b;Procedure +1) Take the power cell and put it on the rear of the bot. +2) Walk around on reconnaissance to understand what the bot must do. +3) Program the bot. To do so, you must select it, and then click on the braces button \button 22;; you will get into the program editor. +4) Once you finished writing the program, click "OK", and execute the program with the arrow key \button 21;. + +\b;Program +The pads are at a distance of 20 meters from each other. +The instruction \c;move(20);\n; moves 20 meters forward. +The instruction \c;turn(90);\n; turns left with an angle of 90 degrees. +The instruction \c;turn(-90);\n; turns right with an angle of 90 degrees. + +The frame of the program consists in: +\c; +\s; extern void object::MoveBot( ) +\s; { +\s; \n;\\write the necessary instructions here ...\c; +\s; } +\n; +For now, you must not change the frame of the program. Just insert the instructions you need to move the bot around between the braces \c;{ }\n;. + +\b;Attention +Be very careful about upper case and lower case letters! +Every instruction must be terminated with a semicolon. + +\b;Helpful trick +When you write the program, you can watch the scene by clicking on the button \button 51;, and by moving the mouse to the edges of the window to turn the camera. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/tmove2.txt b/help/tmove2.txt index fc84d794..14e873f5 100644 --- a/help/tmove2.txt +++ b/help/tmove2.txt @@ -1,66 +1,66 @@ -\b;Exercise -This exercise is very similar to the previous one. The bot must move exactly in the same way, but when writing the program, you must use a new concept that is extremely important in programming: \l;variables\u cbot\var;. -We saw that all the pads are at a distance form each other of 20 meters. And all the rotations performed consist in 90 degree angles. Instead of rewriting the same values over and over again in the program, we can store them in a variable: - -Instead of: -\c;\s; move(20); -\s; turn(90); -\s; move(20); -\s; turn(-90); -\s; ... -\n; -We write : -\c;\s; dist = 20; -\s; dir = 90; -\s; move(dist); -\s; turn(dir); -\s; move(dist); -\s; turn(-dir); -\s; ... -\n; -\b;Variables -A \l;variable\u cbot\var; is composed of three elements: -1) The name -2) The type of the content -3) The content - -\t;The name -Use the name to refer to a variable. For example, instead of writing \c;move(20);\n;, write \c;move(dist);\n;: "dist" is the name of the variable. You can choose almost any name for a variable, for example \c;dist\n;, \c;dir\n;, \c;p2\n;, \c;a\n;, \c;x\n;, \c;nothing_2_grab\n;, etc. - -\t;The type -The type of a variable determines what kind of information the variable can contain. According to the type, a variable can contain a whole number, a real number, a character string, the coordinates of a point, etc. Here is a list with the most common variable types: - o \c;\l;int\u cbot\int;\n; for a whole number (12, -500, etc.) - o \c;\l;float\u cbot\float;\n; for a real number (3.14, 0.2, -99.98, etc.) - o \c;\l;string\u cbot\string;\n; for a character string ("Hello!", "Nothing to grab", etc.) - o \c;\l;point\u cbot\point;\n; for the x,y,z-coordinates of a point in space - o \c;\l;object\u cbot\object;\n; for the information about an object (bot, building, etc.) - -\t;The content -The content of a variable can be a number, a string, coordinates, etc., according to the type of the variable. The content of a variable can change many times during the execution of a program. - -Before you can use a variable, you have to declare it. For example, before you can use the two variables \c;dist\n; and \c;dir\n;, you must declare them with the following lines: -\c; -\s; float dist; -\s; float dir; -\n; -Now you can use the two variables. To put the value 20 into \c;dist\n; and 90 into \c;dir\n;, write: -\c; -\s; dist = 20; -\s; dir = 90; -\n; -Now you can move and turn the bot with the instructions \c;\l;move\u cbot\move;\n; and \c;\l;turn\n;\u cbot\turn;: -\c; -\s; move(dist); -\s; turn(dir); -\n; -You can also use a whole \l;mathematical expression\u cbot\expr; instead of just the variable: -\c; -\s; move(dist+100); -\s; turn(-dir); -\n; -The latter instruction will be needed to turn the bot right. - -Now, rewrite the program of the previous exercise, but use a variable for the distance and another variable for the angle of the rotation. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +This exercise is very similar to the previous one. The bot must move exactly in the same way, but when writing the program, you must use a new concept that is extremely important in programming: \l;variables\u cbot\var;. +We saw that all the pads are at a distance form each other of 20 meters. And all the rotations performed consist in 90 degree angles. Instead of rewriting the same values over and over again in the program, we can store them in a variable: + +Instead of: +\c;\s; move(20); +\s; turn(90); +\s; move(20); +\s; turn(-90); +\s; ... +\n; +We write : +\c;\s; dist = 20; +\s; dir = 90; +\s; move(dist); +\s; turn(dir); +\s; move(dist); +\s; turn(-dir); +\s; ... +\n; +\b;Variables +A \l;variable\u cbot\var; is composed of three elements: +1) The name +2) The type of the content +3) The content + +\t;The name +Use the name to refer to a variable. For example, instead of writing \c;move(20);\n;, write \c;move(dist);\n;: "dist" is the name of the variable. You can choose almost any name for a variable, for example \c;dist\n;, \c;dir\n;, \c;p2\n;, \c;a\n;, \c;x\n;, \c;nothing_2_grab\n;, etc. + +\t;The type +The type of a variable determines what kind of information the variable can contain. According to the type, a variable can contain a whole number, a real number, a character string, the coordinates of a point, etc. Here is a list with the most common variable types: + o \c;\l;int\u cbot\int;\n; for a whole number (12, -500, etc.) + o \c;\l;float\u cbot\float;\n; for a real number (3.14, 0.2, -99.98, etc.) + o \c;\l;string\u cbot\string;\n; for a character string ("Hello!", "Nothing to grab", etc.) + o \c;\l;point\u cbot\point;\n; for the x,y,z-coordinates of a point in space + o \c;\l;object\u cbot\object;\n; for the information about an object (bot, building, etc.) + +\t;The content +The content of a variable can be a number, a string, coordinates, etc., according to the type of the variable. The content of a variable can change many times during the execution of a program. + +Before you can use a variable, you have to declare it. For example, before you can use the two variables \c;dist\n; and \c;dir\n;, you must declare them with the following lines: +\c; +\s; float dist; +\s; float dir; +\n; +Now you can use the two variables. To put the value 20 into \c;dist\n; and 90 into \c;dir\n;, write: +\c; +\s; dist = 20; +\s; dir = 90; +\n; +Now you can move and turn the bot with the instructions \c;\l;move\u cbot\move;\n; and \c;\l;turn\n;\u cbot\turn;: +\c; +\s; move(dist); +\s; turn(dir); +\n; +You can also use a whole \l;mathematical expression\u cbot\expr; instead of just the variable: +\c; +\s; move(dist+100); +\s; turn(-dir); +\n; +The latter instruction will be needed to turn the bot right. + +Now, rewrite the program of the previous exercise, but use a variable for the distance and another variable for the angle of the rotation. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/tproc1.txt b/help/tproc1.txt index 03b243a8..484d7897 100644 --- a/help/tproc1.txt +++ b/help/tproc1.txt @@ -1,59 +1,59 @@ -\b;Exercise -The \l;bot\u object\bottr; must pass over all the \l;blue crosses\u object\waypoint; on the ground. The way that must be covered is made of two squares. The first one measures 15 meters, the second 25 meters. - -\image tproc1a 8 8; -\b;General principle -In order to solve this problem, the most efficient solution consists in creating a \l;function\u cbot\function; that instructs the bot to move on a square shape of a certain size. The main program becomes then very simple:\c; -\s;extern void object::Function1( ) -\s;{ -\s; Square(15); -\s; Square(25); -\s;} -\n; -You still have to define the function called \c;Square\n;. In order to do this, you will have to write some instructions outside the \l;block\u cbot\bloc; that until now was the frame of each one of your programs. At the very end of the program, after the last closing brace, we will define the function \c;Square\n;. The program will take the following shape: -\c; -\s;extern void object::Function1( ) -\s;{ -\s; \n;main function ...\c; -\s;} -\s; -\s;void object::Square(float length) -\s;{ -\s; \n;new function ...\c; -\s;} -\n; -Let us look in detail at the different elements of the declaration of the function \c;Square\n;: - -\c;\l;void\u cbot\void;\n; -This means that this function will return no value. - -\c;\l;object\u cbot\object;::\n; -When you write this in front of the function name, you can have access in the function to all the characteristics of the bot, such as \c;position\n;, \c;orientation\n;, etc. In this exercise, this element is not compulsory, as we will not need the characteristics of the bot in the function. - -\c;Square ( )\n; -This is the name of the function. You can call it Square, or any other name. - -\c;\l;float\u cbot\float; length\n; -Here you define the parameters that the function will get when it is called. The first time the function is actually called with \c;Square(15)\n;, the variable \c;length\n; will contain the value \c;15\n;. The second time, \c;length\n; will contain \c;25\n;. - -Here is in detail what will happen when the program is executed: -- First the main function \c;Function\n; will be executed. -- At the line \c;Square(15)\n;, the program will follow the red arrow and enter the function \c;Square\n; a first time, \c;length\n; containing \c;15\n;. -- At the end of the function \c;Square\n;, the program follows the orange arrow and comes back to the main function. -- At the line \c;Square(25)\n;, the program will follow the blue arrow and enter the function \c;Square\n; a second time. -- At the end of the function \c;Square\n;, the program follows the light blue arrow and comes back to the main function. - -\image tproc1b 17 12; -In the function \c;Square\n;, use the instructions \c;\l;move\u cbot\move;\n; and \c;\l;turn\u cbot\turn;\n;. In order to make it shorter, you can use a \c;\l;for\u cbot\for;\n; loop, that will repeat the instructions \c;\l;move\u cbot\move;\n; and \c;\l;turn\u cbot\turn;\n; 4 times; however, this is not compulsory. -\c; -\s;void object::Square(float length) -\s;{ -\s; for ( int i=0 ; i<4 ; i=i+1 ) -\s; { -\s; move(length); -\s; turn(90); -\s; } -\s;} -\n; -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +The \l;bot\u object\bottr; must pass over all the \l;blue crosses\u object\waypoint; on the ground. The way that must be covered is made of two squares. The first one measures 15 meters, the second 25 meters. + +\image tproc1a 8 8; +\b;General principle +In order to solve this problem, the most efficient solution consists in creating a \l;function\u cbot\function; that instructs the bot to move on a square shape of a certain size. The main program becomes then very simple:\c; +\s;extern void object::Function1( ) +\s;{ +\s; Square(15); +\s; Square(25); +\s;} +\n; +You still have to define the function called \c;Square\n;. In order to do this, you will have to write some instructions outside the \l;block\u cbot\bloc; that until now was the frame of each one of your programs. At the very end of the program, after the last closing brace, we will define the function \c;Square\n;. The program will take the following shape: +\c; +\s;extern void object::Function1( ) +\s;{ +\s; \n;main function ...\c; +\s;} +\s; +\s;void object::Square(float length) +\s;{ +\s; \n;new function ...\c; +\s;} +\n; +Let us look in detail at the different elements of the declaration of the function \c;Square\n;: + +\c;\l;void\u cbot\void;\n; +This means that this function will return no value. + +\c;\l;object\u cbot\object;::\n; +When you write this in front of the function name, you can have access in the function to all the characteristics of the bot, such as \c;position\n;, \c;orientation\n;, etc. In this exercise, this element is not compulsory, as we will not need the characteristics of the bot in the function. + +\c;Square ( )\n; +This is the name of the function. You can call it Square, or any other name. + +\c;\l;float\u cbot\float; length\n; +Here you define the parameters that the function will get when it is called. The first time the function is actually called with \c;Square(15)\n;, the variable \c;length\n; will contain the value \c;15\n;. The second time, \c;length\n; will contain \c;25\n;. + +Here is in detail what will happen when the program is executed: +- First the main function \c;Function\n; will be executed. +- At the line \c;Square(15)\n;, the program will follow the red arrow and enter the function \c;Square\n; a first time, \c;length\n; containing \c;15\n;. +- At the end of the function \c;Square\n;, the program follows the orange arrow and comes back to the main function. +- At the line \c;Square(25)\n;, the program will follow the blue arrow and enter the function \c;Square\n; a second time. +- At the end of the function \c;Square\n;, the program follows the light blue arrow and comes back to the main function. + +\image tproc1b 17 12; +In the function \c;Square\n;, use the instructions \c;\l;move\u cbot\move;\n; and \c;\l;turn\u cbot\turn;\n;. In order to make it shorter, you can use a \c;\l;for\u cbot\for;\n; loop, that will repeat the instructions \c;\l;move\u cbot\move;\n; and \c;\l;turn\u cbot\turn;\n; 4 times; however, this is not compulsory. +\c; +\s;void object::Square(float length) +\s;{ +\s; for ( int i=0 ; i<4 ; i=i+1 ) +\s; { +\s; move(length); +\s; turn(90); +\s; } +\s;} +\n; +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/tproc2.txt b/help/tproc2.txt index d92f0edb..6be8e7b2 100644 --- a/help/tproc2.txt +++ b/help/tproc2.txt @@ -1,34 +1,34 @@ -\b;Exercise -Follow the way in form of a spiral. The bot must move 2 times 25m forward and turn, then move 2 times 20m forward and turn, and so on. -\image tproc2 8 8; -\b;Function -You will have noticed that the way is made of "L"-shaped parts that are fit one into another. The first one (dark blue) measures two times 25 meters. The second one (light blue) measures 5 meters less. Let us start with writing the \l;function\u cbot\function; that will move the bot on a "L"-shaped part whose length will be given as a parameter: -\c; -\s;void object::Part(float length) -\s;{ -\s; for ( int i=0 ; i<2 ; i=i+1 ) -\s; { -\s; move(length); -\s; turn(90); -\s; } -\s;} -\n; -Now you just need to write the main function, that will call the function \c;Part\n;. At the beginning the variable \c;rest\n; will be set to 25m. The \c;while\n; loop will then repeat the instructions inside the block as long as \c;rest\n; is greater than zero. Inside the loop, first call the function \c;Part\n; (see above), then subtract 5m to the length of the L. -\c; -\s;extern void object::Function2( ) -\s;{ -\s; float rest = 25; -\s; while ( rest > 0 ) -\s; { -\s; Part(rest); -\s; rest = rest-5; -\s; } -\s;} -\n; -The function \c;Part\n; will be called a last time with the value \c;5\n;. Then the expression \c;rest-5\n; will set the value of the variable \c;rest\n; to zero, and the \c;while\n; loop will stop. - -\b;Remark -You will have noticed that in the previous exercise, the main function was at the beginning of the program, whereas in this exercise, it is at the end of the program, after the function \c;Part\n;. The rank order of the functions in the program does not matter, you can write a program either way. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +Follow the way in form of a spiral. The bot must move 2 times 25m forward and turn, then move 2 times 20m forward and turn, and so on. +\image tproc2 8 8; +\b;Function +You will have noticed that the way is made of "L"-shaped parts that are fit one into another. The first one (dark blue) measures two times 25 meters. The second one (light blue) measures 5 meters less. Let us start with writing the \l;function\u cbot\function; that will move the bot on a "L"-shaped part whose length will be given as a parameter: +\c; +\s;void object::Part(float length) +\s;{ +\s; for ( int i=0 ; i<2 ; i=i+1 ) +\s; { +\s; move(length); +\s; turn(90); +\s; } +\s;} +\n; +Now you just need to write the main function, that will call the function \c;Part\n;. At the beginning the variable \c;rest\n; will be set to 25m. The \c;while\n; loop will then repeat the instructions inside the block as long as \c;rest\n; is greater than zero. Inside the loop, first call the function \c;Part\n; (see above), then subtract 5m to the length of the L. +\c; +\s;extern void object::Function2( ) +\s;{ +\s; float rest = 25; +\s; while ( rest > 0 ) +\s; { +\s; Part(rest); +\s; rest = rest-5; +\s; } +\s;} +\n; +The function \c;Part\n; will be called a last time with the value \c;5\n;. Then the expression \c;rest-5\n; will set the value of the variable \c;rest\n; to zero, and the \c;while\n; loop will stop. + +\b;Remark +You will have noticed that in the previous exercise, the main function was at the beginning of the program, whereas in this exercise, it is at the end of the program, after the function \c;Part\n;. The rank order of the functions in the program does not matter, you can write a program either way. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/tradar1.txt b/help/tradar1.txt index 1ccd1141..d55a31c6 100644 --- a/help/tradar1.txt +++ b/help/tradar1.txt @@ -1,57 +1,57 @@ -\b;Exercise -Let the bot find all the \l;blue crosses\u object\waypoint; on the ground. As soon as the bot passed over one of the crosses, it will disappear. Here is the general principle that you will apply: - -Repeat forever: - o Look for a cross - o If there is none, stop the program. - o Calculate the direction of the cross. - o Set the speed of the motors in such a way that they will find their way to the cross. - -\b;The program -Use a \c;\l;while\u cbot\while;\n; loop in order to repeat several instructions over and over: -\s;\c;while ( true ) -\s;{ -\s; \n;instructions...\c; -\s;} -\n; -The instruction \c;\l;radar\u cbot\radar;\n; will detect the blue crosses and put their description into a variable, for example \c;spot\n;. In this case, \c;\l;radar\u cbot\radar;()\n; needs only one parameter, i.e. the category of the object that it must look for: -\s;\c;spot = radar(WayPoint); -\n; -Once all the crosses have been found, \c;radar\n; will return the value \c;\l;null\u cbot\null;\n;. You will have to test this case and react accordingly with the instruction \c;\l;if\u cbot\if;\n;: -\s;\c;if ( spot == null ) // no more ? -\s;{ -\s; motor(0, 0); // stops the motors -\s; break; // stops the loop -\s;} -\n;The instruction \c;\l;break\u cbot\break;\n; will stop the infinite loop \c;while (true)\n;. - -Use the instruction \c;\l;direction\u cbot\direct;()\n; to calculate the angle of the rotation that the bot must perform in order to turn towards the blue cross. The coordinates of the object are given by \c;spot.position\n;. The following line will put the angle of the necessary rotation into the \l;variable\u cbot\var; \c;dir\n;: -\s;\c;dir = direction(spot.position); -\n; -The value of the angle is positive if the blue cross is on your left hand, and negative if it is on your right hand. If the cross to be reached is on your left hand, you must set the right-hand motor to full speed, and set the left-hand motor to a lower speed, according to the angle: - - direction = \c; 0\n; -> speed = \c; 1.0\n; - direction = \c; 45\n; -> speed = \c; 0.5\n; - direction = \c; 90\n; -> speed = \c; 0.0\n; - direction = \c;135\n; -> speed = \c;-0.5\n; - direction = \c;180\n; -> speed = \c;-1.0\n; - -The graphic below shows the speed of the left-hand and right-hand motor as set by the instruction \c;\l;motor\u cbot\motor;\n;, according to the angle: - -\image radar2 14 10; -If the cross is straight ahead, the angle is 0 degrees. The motors will get the speeds 1 and 1, which means full speed ahead. If the cross is behind, the right motor will be set to speed -1: it will turn around. You can use the \l;expression\u cbot\expr; \c;1+dir/90\n; in order to calculate the necessary speed of the motors: -\s;\c;if ( dir < 0 ) // on the right side? -\s;{ -\s; motor(1, 1+dir/90); // turns more or less -\s;} -\n; -Use the same principle if the angle has got a positive value, ranging between 0 and 180 degrees. It is up to you to work out the exact instructions to be performed: -\s;\c;else // on the left side? -\s;{ -\s; \n;up to you to fill in here...\c; -\s;} -\n; -At the beginning of the program, you must still declare all the variables. \c;spot\n; is of type \c;\l;object\u cbot\object;\n;, whereas \c;dir\n; is of type \c;\l;float\u cbot\float;\n;. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +Let the bot find all the \l;blue crosses\u object\waypoint; on the ground. As soon as the bot passed over one of the crosses, it will disappear. Here is the general principle that you will apply: + +Repeat forever: + o Look for a cross + o If there is none, stop the program. + o Calculate the direction of the cross. + o Set the speed of the motors in such a way that they will find their way to the cross. + +\b;The program +Use a \c;\l;while\u cbot\while;\n; loop in order to repeat several instructions over and over: +\s;\c;while ( true ) +\s;{ +\s; \n;instructions...\c; +\s;} +\n; +The instruction \c;\l;radar\u cbot\radar;\n; will detect the blue crosses and put their description into a variable, for example \c;spot\n;. In this case, \c;\l;radar\u cbot\radar;()\n; needs only one parameter, i.e. the category of the object that it must look for: +\s;\c;spot = radar(WayPoint); +\n; +Once all the crosses have been found, \c;radar\n; will return the value \c;\l;null\u cbot\null;\n;. You will have to test this case and react accordingly with the instruction \c;\l;if\u cbot\if;\n;: +\s;\c;if ( spot == null ) // no more ? +\s;{ +\s; motor(0, 0); // stops the motors +\s; break; // stops the loop +\s;} +\n;The instruction \c;\l;break\u cbot\break;\n; will stop the infinite loop \c;while (true)\n;. + +Use the instruction \c;\l;direction\u cbot\direct;()\n; to calculate the angle of the rotation that the bot must perform in order to turn towards the blue cross. The coordinates of the object are given by \c;spot.position\n;. The following line will put the angle of the necessary rotation into the \l;variable\u cbot\var; \c;dir\n;: +\s;\c;dir = direction(spot.position); +\n; +The value of the angle is positive if the blue cross is on your left hand, and negative if it is on your right hand. If the cross to be reached is on your left hand, you must set the right-hand motor to full speed, and set the left-hand motor to a lower speed, according to the angle: + + direction = \c; 0\n; -> speed = \c; 1.0\n; + direction = \c; 45\n; -> speed = \c; 0.5\n; + direction = \c; 90\n; -> speed = \c; 0.0\n; + direction = \c;135\n; -> speed = \c;-0.5\n; + direction = \c;180\n; -> speed = \c;-1.0\n; + +The graphic below shows the speed of the left-hand and right-hand motor as set by the instruction \c;\l;motor\u cbot\motor;\n;, according to the angle: + +\image radar2 14 10; +If the cross is straight ahead, the angle is 0 degrees. The motors will get the speeds 1 and 1, which means full speed ahead. If the cross is behind, the right motor will be set to speed -1: it will turn around. You can use the \l;expression\u cbot\expr; \c;1+dir/90\n; in order to calculate the necessary speed of the motors: +\s;\c;if ( dir < 0 ) // on the right side? +\s;{ +\s; motor(1, 1+dir/90); // turns more or less +\s;} +\n; +Use the same principle if the angle has got a positive value, ranging between 0 and 180 degrees. It is up to you to work out the exact instructions to be performed: +\s;\c;else // on the left side? +\s;{ +\s; \n;up to you to fill in here...\c; +\s;} +\n; +At the beginning of the program, you must still declare all the variables. \c;spot\n; is of type \c;\l;object\u cbot\object;\n;, whereas \c;dir\n; is of type \c;\l;float\u cbot\float;\n;. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/tradar2.txt b/help/tradar2.txt index 73d41b27..8ad15fce 100644 --- a/help/tradar2.txt +++ b/help/tradar2.txt @@ -1,8 +1,8 @@ -\b;Exercise -In this exercise, a "crazy bot" places many \l;blue crosses\u object\waypoint; on the ground. In order to find them, you can reuse the program written in the previous exercise. This can show you the flexibility of such a program: it adapts to whatever environment it encounters. - -\t;Remark -Do not wait too long, because the crazy bot gets down to work immediately. Fortunately, as long as you are in the program editor, the game will pause. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +In this exercise, a "crazy bot" places many \l;blue crosses\u object\waypoint; on the ground. In order to find them, you can reuse the program written in the previous exercise. This can show you the flexibility of such a program: it adapts to whatever environment it encounters. + +\t;Remark +Do not wait too long, because the crazy bot gets down to work immediately. Fortunately, as long as you are in the program editor, the game will pause. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/tremote1.txt b/help/tremote1.txt index 834f2d34..70c55aa0 100644 --- a/help/tremote1.txt +++ b/help/tremote1.txt @@ -1,39 +1,39 @@ -\b;Exercise -Remote control a robot using an \l;information exchange post\u object\exchange;, so it will transport \l;uranium ore\u object\uranore;. -The main actors of this exercise are¦: - -1) A \l;sniffer\u object\botsr; (can't carry anything). -2) An \l;information exchange post\u object\exchange; that receives information from a sender and then transmits it to a receiver. -3) A \l;grabber\u object\botgr; which waits for orders from the exchange post. You have no way control this robot directly. - -\image tremot1a 16 8; -An information exchange post stores "name/value" couples. To control the "slave" robot we use just one couple¦: - - name="order", valuer=order number - -The slace robot understands following orders¦: -\c; - 1 -> grab(); // take an object - 2 -> drop(); // drop an object - 3 -> move(10); // move 10 meters forward - 4 -> move(-10); // move 10 meters backwards -\n; -To instruct the slave to move forward 10 meters all you have to do is¦: -\c;\s; \l;send\u cbot\send;("order", 3, 100); // order 3 -> "move(10)" -\n; -After the send instruction we wait for 5 seconds to be sure the move is done. -\c;\s; \l;wait\u cbot\wait;(5); -\n; -Remark: There is a better way for waiting the order has been executed, but we'll see this later in exercise "Remote Control #2". - -To finish the exercise you must¦: - -1) Take the uranium ore -2) Move forward by 10 meters -3) Drop the uranium ore -4) Move backwards by 10 meters - -It's up to you to write the program. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +Remote control a robot using an \l;information exchange post\u object\exchange;, so it will transport \l;uranium ore\u object\uranore;. +The main actors of this exercise are¦: + +1) A \l;sniffer\u object\botsr; (can't carry anything). +2) An \l;information exchange post\u object\exchange; that receives information from a sender and then transmits it to a receiver. +3) A \l;grabber\u object\botgr; which waits for orders from the exchange post. You have no way control this robot directly. + +\image tremot1a 16 8; +An information exchange post stores "name/value" couples. To control the "slave" robot we use just one couple¦: + + name="order", valuer=order number + +The slace robot understands following orders¦: +\c; + 1 -> grab(); // take an object + 2 -> drop(); // drop an object + 3 -> move(10); // move 10 meters forward + 4 -> move(-10); // move 10 meters backwards +\n; +To instruct the slave to move forward 10 meters all you have to do is¦: +\c;\s; \l;send\u cbot\send;("order", 3, 100); // order 3 -> "move(10)" +\n; +After the send instruction we wait for 5 seconds to be sure the move is done. +\c;\s; \l;wait\u cbot\wait;(5); +\n; +Remark: There is a better way for waiting the order has been executed, but we'll see this later in exercise "Remote Control #2". + +To finish the exercise you must¦: + +1) Take the uranium ore +2) Move forward by 10 meters +3) Drop the uranium ore +4) Move backwards by 10 meters + +It's up to you to write the program. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/tremote2.txt b/help/tremote2.txt index dbb0744a..58083be3 100644 --- a/help/tremote2.txt +++ b/help/tremote2.txt @@ -1,50 +1,50 @@ -\b;Exercise -Remote control a robot using an \l;information exchange post\u object\exchange;, so it will pass over the 6 blue waypoints. -The main actors of this exercise are¦: - -1) A \l;wheeled grabber\u object\botgr; robot without an energy cell. This is the master you have to program. -2) An \l;information exchange post\u object\exchange; that receives information from the master and then transmits it to the slave. -3) A \l;practice bot\u object\bottr; which waits for orders from the exchange post. This robot has already been programmed. - -\image tremot2a 16 8; -An information exchange post stores "name/value" couples. To control the "slave" robot we use two couples¦: - -1) name="order", value=order number -2) nom="param", valuer=parameter for the operation - -Order #1 means "move" and order #2 means "turn". The parameter is the distance to move or the turning angle. For example to make the slave move 20 meters write¦: -\c;\s; \l;send\u cbot\send;("order", 1, 100); // order "move" -\s; \l;send\u cbot\send;("param", 20, 100); // distance 20 meters -\n; -These two instruction send following 2 pieces of information to the exchange post¦: -\c; order=1 - param=20 -\n; -The slave robot waits for an order and executes it. Once the order has been executed by the slave, it removes the order from the exchange post. Once an order has been sent, the master must wait for the slave finishing the order before sending the next order. This is done by testing if the order is still inside the exchange post. Just write¦: -\c;\s; while ( \l;testinfo\u cbot\testinfo;("order", 100) ) // wait for end of work -\s; { -\s; wait(1); -\s; } -\n; -As we must give more than one order its most convenient to write a \l;function\u cbot\function; \c;SendToPost\n;, that sends the order and wait for its completion¦: -\c;\s;void object::SendToPost(float order, float param) -\s;{ -\s; send("param", param, 100); // send the parameter -\s; send("order", order, 100); // send the order -\s; -\s; while ( testinfo("order", 100) ) // wait for end of work -\s; { -\s; wait(1); -\s; } -\s;} -\n; -To move forward by 20 meters, you must write in the main program¦: -\c;\s; SendToPost(1, 20); // move(20); -\n; -This is the route the robot must travel through¦: - -\image tremot2b 8 8; -It's up to you to finish the programming. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Exercise +Remote control a robot using an \l;information exchange post\u object\exchange;, so it will pass over the 6 blue waypoints. +The main actors of this exercise are¦: + +1) A \l;wheeled grabber\u object\botgr; robot without an energy cell. This is the master you have to program. +2) An \l;information exchange post\u object\exchange; that receives information from the master and then transmits it to the slave. +3) A \l;practice bot\u object\bottr; which waits for orders from the exchange post. This robot has already been programmed. + +\image tremot2a 16 8; +An information exchange post stores "name/value" couples. To control the "slave" robot we use two couples¦: + +1) name="order", value=order number +2) nom="param", valuer=parameter for the operation + +Order #1 means "move" and order #2 means "turn". The parameter is the distance to move or the turning angle. For example to make the slave move 20 meters write¦: +\c;\s; \l;send\u cbot\send;("order", 1, 100); // order "move" +\s; \l;send\u cbot\send;("param", 20, 100); // distance 20 meters +\n; +These two instruction send following 2 pieces of information to the exchange post¦: +\c; order=1 + param=20 +\n; +The slave robot waits for an order and executes it. Once the order has been executed by the slave, it removes the order from the exchange post. Once an order has been sent, the master must wait for the slave finishing the order before sending the next order. This is done by testing if the order is still inside the exchange post. Just write¦: +\c;\s; while ( \l;testinfo\u cbot\testinfo;("order", 100) ) // wait for end of work +\s; { +\s; wait(1); +\s; } +\n; +As we must give more than one order its most convenient to write a \l;function\u cbot\function; \c;SendToPost\n;, that sends the order and wait for its completion¦: +\c;\s;void object::SendToPost(float order, float param) +\s;{ +\s; send("param", param, 100); // send the parameter +\s; send("order", order, 100); // send the order +\s; +\s; while ( testinfo("order", 100) ) // wait for end of work +\s; { +\s; wait(1); +\s; } +\s;} +\n; +To move forward by 20 meters, you must write in the main program¦: +\c;\s; SendToPost(1, 20); // move(20); +\n; +This is the route the robot must travel through¦: + +\image tremot2b 8 8; +It's up to you to finish the programming. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/tremote3.txt b/help/tremote3.txt index 207342df..b8875f05 100644 --- a/help/tremote3.txt +++ b/help/tremote3.txt @@ -1,103 +1,103 @@ -\b;Exercice -Remote control a slave robot without using an \l;information exchange post\u object\exchange;. The robot should pass over the 6 blue crosses. You must use a \l;string\u cbot\string; to pass the orders to the slave bot. This string contains the order the slave shoud execute, for exemple \c;"move(20)"\n;. You can see that this is the same syntax as used in the CBOT language but we could have chosen any other syntax for exemple something like \c;"advance=20"\n;. The string will be a \c;\l;static\u cbot\static;\n; class member that will be used to communicate from the master to the slave. - -The two main actors of this exercise are: -1) The \l;wheeled grabber\u object\botgr; without an energy pack and therefore immobile. This is the master you should program so it will transmit orders to the slave. -2) The slave \l;practice bot\u object\bottr; which is already programmed and just waits for orders from the master. - -\b;The slave -First of all we must understand how the program of the slave works. The \l;class\u cbot\class; \c;exchange\n; contains the mechanism for exchaning the orders. We declare a \c;\l;static\u cbot\static;\n; class member \c;m_order\n; which will contain the order to be executed. The word \c;static\n; insures that the member \c;m_order\n; is shared between all instances of the \l;class\u cbot\class; exchange. - -\c;\s;\l;public\u cbot\public; \l;class\u cbot\class; exchange -\s;{ -\s; \l;static\u cbot\static; \l;private\u cbot\private; \l;string\u cbot\string; m_order = ""; - -\n;The \c;put\n; method will be used by the master robot for transmitting an order. As long as the string \c;m_order\n; is not empty, the slave has not finished the order and the \c;put\n; method will return \c;false\n; and will do nothing. - -\c;\s; \l;synchronized\u cbot\synchro; \l;bool\u cbot\bool; put(string order) -\s; { -\s; if ( m_order == "" ) -\s; { -\s; m_order = order; -\s; return true; -\s; } -\s; else -\s; { -\s; return false; -\s; } -\s; } -\n; -Another method \c;get\n; will be used by the slave to retrieve the orders. This method returns the string contained in \c;m_order\n; and empties it, so a new order can be accepted: - -\c;\s; \l;synchronized\u cbot\synchro; string get() -\s; { -\s; string ret = m_order; -\s; m_order = ""; -\s; return ret; -\s; } -\s;} -\n; -The main program of the slave contains an instance of the class \c;exchange\n; called \c;list\n;. - -\c;\s;\l;extern\u cbot\extern; void object::Slave3( ) -\s;{ -\s; exchange list(); -\s; string todo; -\n; -The outer \c;while\n; loop lasts for ever. The inner \c;while\n; loop waits for an order by using the \c;get\n; method of the \c;exchange\n; class. As soon as \c;get\n; returns a non empty string, the while loop stops. - -\c;\s; \l;while\u cbot\while; ( true ) -\s; { -\s; \l;while\u cbot\while; ( true ) -\s; { -\s; todo = list.get(); -\s; if ( todo != "" ) break; -\s; wait(1); -\s; } -\n; -Now we have received the order in the \c;todo\n; variable. All we have to do is execute it: - -\c;\s; if ( \l;strfind\u cbot\strfind;(todo, "move") == 0 ) -\s; { -\s; move(\l;strval\u cbot\strval;(\l;strmid\u cbot\strmid;(todo,5))); -\s; } -\s; if ( strfind(todo, "turn") == 0 ) -\s; { -\s; turn(strval(strmid(todo,5))); -\s; } -\s; } -\s;} -\n; -\b;The master -In the master we write an function called \c;SendOrder\n; which will send an order to the slave: - -\c;\s;void object::SendOrder(string order) -\s;{ -\s; exchange list(); -\s; -\s; while ( list.put(order) == false ) -\s; { -\s; wait(1); -\s; } -\s;} -\n; -The \c;while\n; loop waits until a pending order has been terminated, that is the slaved has exited from the \c;get\n; method. -Now the main program of the master is very simple: - -\c;\s;extern void object::Remote3( ) -\s;{ -\s; SendOrder("move(20)"); -\s; SendOrder("turn(90)"); -\s; SendOrder("move(20)"); -\s; SendOrder("turn(90)"); -\s; SendOrder("move(10)"); -\s; SendOrder("turn(90)"); -\s; SendOrder("move(10)"); -\s; SendOrder("turn(-90)"); -\s; SendOrder("move(10)"); -\s;} -\n; -\key;\key help;\norm; show these instruction at any time. - -\t;See also -\l;Controls\u command; and \l;programming\u cbot;. +\b;Exercice +Remote control a slave robot without using an \l;information exchange post\u object\exchange;. The robot should pass over the 6 blue crosses. You must use a \l;string\u cbot\string; to pass the orders to the slave bot. This string contains the order the slave shoud execute, for exemple \c;"move(20)"\n;. You can see that this is the same syntax as used in the CBOT language but we could have chosen any other syntax for exemple something like \c;"advance=20"\n;. The string will be a \c;\l;static\u cbot\static;\n; class member that will be used to communicate from the master to the slave. + +The two main actors of this exercise are: +1) The \l;wheeled grabber\u object\botgr; without an energy pack and therefore immobile. This is the master you should program so it will transmit orders to the slave. +2) The slave \l;practice bot\u object\bottr; which is already programmed and just waits for orders from the master. + +\b;The slave +First of all we must understand how the program of the slave works. The \l;class\u cbot\class; \c;exchange\n; contains the mechanism for exchaning the orders. We declare a \c;\l;static\u cbot\static;\n; class member \c;m_order\n; which will contain the order to be executed. The word \c;static\n; insures that the member \c;m_order\n; is shared between all instances of the \l;class\u cbot\class; exchange. + +\c;\s;\l;public\u cbot\public; \l;class\u cbot\class; exchange +\s;{ +\s; \l;static\u cbot\static; \l;private\u cbot\private; \l;string\u cbot\string; m_order = ""; + +\n;The \c;put\n; method will be used by the master robot for transmitting an order. As long as the string \c;m_order\n; is not empty, the slave has not finished the order and the \c;put\n; method will return \c;false\n; and will do nothing. + +\c;\s; \l;synchronized\u cbot\synchro; \l;bool\u cbot\bool; put(string order) +\s; { +\s; if ( m_order == "" ) +\s; { +\s; m_order = order; +\s; return true; +\s; } +\s; else +\s; { +\s; return false; +\s; } +\s; } +\n; +Another method \c;get\n; will be used by the slave to retrieve the orders. This method returns the string contained in \c;m_order\n; and empties it, so a new order can be accepted: + +\c;\s; \l;synchronized\u cbot\synchro; string get() +\s; { +\s; string ret = m_order; +\s; m_order = ""; +\s; return ret; +\s; } +\s;} +\n; +The main program of the slave contains an instance of the class \c;exchange\n; called \c;list\n;. + +\c;\s;\l;extern\u cbot\extern; void object::Slave3( ) +\s;{ +\s; exchange list(); +\s; string todo; +\n; +The outer \c;while\n; loop lasts for ever. The inner \c;while\n; loop waits for an order by using the \c;get\n; method of the \c;exchange\n; class. As soon as \c;get\n; returns a non empty string, the while loop stops. + +\c;\s; \l;while\u cbot\while; ( true ) +\s; { +\s; \l;while\u cbot\while; ( true ) +\s; { +\s; todo = list.get(); +\s; if ( todo != "" ) break; +\s; wait(1); +\s; } +\n; +Now we have received the order in the \c;todo\n; variable. All we have to do is execute it: + +\c;\s; if ( \l;strfind\u cbot\strfind;(todo, "move") == 0 ) +\s; { +\s; move(\l;strval\u cbot\strval;(\l;strmid\u cbot\strmid;(todo,5))); +\s; } +\s; if ( strfind(todo, "turn") == 0 ) +\s; { +\s; turn(strval(strmid(todo,5))); +\s; } +\s; } +\s;} +\n; +\b;The master +In the master we write an function called \c;SendOrder\n; which will send an order to the slave: + +\c;\s;void object::SendOrder(string order) +\s;{ +\s; exchange list(); +\s; +\s; while ( list.put(order) == false ) +\s; { +\s; wait(1); +\s; } +\s;} +\n; +The \c;while\n; loop waits until a pending order has been terminated, that is the slaved has exited from the \c;get\n; method. +Now the main program of the master is very simple: + +\c;\s;extern void object::Remote3( ) +\s;{ +\s; SendOrder("move(20)"); +\s; SendOrder("turn(90)"); +\s; SendOrder("move(20)"); +\s; SendOrder("turn(90)"); +\s; SendOrder("move(10)"); +\s; SendOrder("turn(90)"); +\s; SendOrder("move(10)"); +\s; SendOrder("turn(-90)"); +\s; SendOrder("move(10)"); +\s;} +\n; +\key;\key help;\norm; show these instruction at any time. + +\t;See also +\l;Controls\u command; and \l;programming\u cbot;. diff --git a/help/tremote4.txt b/help/tremote4.txt index a5ca59f7..876a00f3 100644 --- a/help/tremote4.txt +++ b/help/tremote4.txt @@ -1,129 +1,129 @@ -\b;Exercise -Remote control a slave robot without using an \l;information exchange post\u object\exchange;. The robot should pass over the 6 blue crosses. You must use a \c;\l;static\u cbot\static;\n; variable to pass the orders to the slave bot. - -The two main actors of this exercise are: -1) The \l;wheeled grabber\u object\botgr; without an energy pack and therefore immobile. This is the master you should program so it will transmit orders to the slave. -2) The slave \l;practice bot\u object\bottr; which is already programmed and just waits for orders from the master. - -\b;The slave -First of all we must understand how the program of the slave works. The \l;class\u cbot\class; \c;order\n; contains two members: \c;m_type\n; is the order to execute (move or turn) and \c;m_param\n; is the distance to move or the rotation angle¦: - -\c;\s;\l;public\u cbot\public; \l;class\u cbot\class; order -\s;{ -\s; \l;int\u cbot\int; m_type = \l;nan\u cbot\nan;; -\s; \l;float\u cbot\float; m_param; -\s;} -\n; -A second \l;class\u cbot\class; \c;exchange\n; contains the mechanism for exchanging the orders. We declare a \c;\l;static\u cbot\static;\n; class member \c;m_order\n; which will contain the order to be executed. The word \c;static\n; insures that the member \c;m_order\n; is shared between all instances of the \l;class\u cbot\class; exchange. - -\c;\s;\l;public\u cbot\public; \l;class\u cbot\class; exchange -\s;{ -\s; \l;static\u cbot\static; \l;private\u cbot\private; order m_order = new order; -\n; -\n;The \c;put\n; method will be used by the master robot for transmitting an order. As long as \c;m_order\n; is different from \c;\l;nan\u cbot\nan;\n;, the slave has not finished the order and the \c;put\n; method will return \c;false\n; and will do nothing¦: - -\c;\s; \l;synchronized\u cbot\synchro; \l;bool\u cbot\bool; put(order a) -\s; { -\s; if ( m_order.m_type == nan ) -\s; { -\s; m_order = a; -\s; return true; -\s; } -\s; else -\s; { -\s; return false; -\s; } -\s; } -\n; -Another method \c;get\n; will be used by the slave to retrieve the orders. This method returns the order to be executed: - -\c;\s; \l;synchronized\u cbot\synchro; order get() -\s; { -\s; return m_order; -\s; } -\n; -A third method \c;delete\n; will be used by the slave to indicate that the order has been executed: - -\c;\s; \l;synchronized\u cbot\synchro; void delete() -\s; { -\s; m_order.m_type = nan; -\s; } -\s;} -\n; -The main program of the slave contains an instance of the class \c;exchange\n; called \c;list\n;. We put () after the word \c;list\n; in order to create an instance of the class \c;exchange\n;. - -\c;\s;\l;extern\u cbot\extern; void object::Slave3( ) -\s;{ -\s; exchange list(); -\s; order todo; -\n; -The outer \c;while\n; loop lasts for ever. The inner \c;while\n; loop waits for an order by using the \c;get\n; method of the \c;exchange\n; class. As soon as \c;get\n; returns a value different from \c;nan\n;, the while loop stops. - -\c;\s; \l;while\u cbot\while; ( true ) -\s; { -\s; \l;while\u cbot\while; ( true ) -\s; { -\s; todo = list.get(); -\s; if ( todo.m_type != nan ) break; -\s; wait(1); -\s; } -\n; -Now we have received the order in the \c;todo\n; variable. All we have to do is execute it: - -\c;\s; if ( todo.m_type == 1 ) -\s; { -\s; move(todo.m_param); -\s; } -\s; else if ( todo.m_type == 2 ) -\s; { -\s; turn(todo.m_param); -\s; } -\s; else -\s; { -\s; message("Unknown order"); -\s; } -\n; -As soon as the execution of the order is finished, we must call the \c;delete\n; method so the master knows that another order can be sent¦: - -\c;\s; list.delete(); -\s; } -\s;} -\n; -\b;The master -In the master we write an function called \c;SendOrder\n; which will send an order to the slave: - -\c;\s;void object::SendOrder(float order, float param) -\s;{ -\s; exchange list(); -\s; order todo(); -\s; -\s; todo.m_type = order; -\s; todo.m_param = param; -\s; -\s; while ( list.put(todo) == false ) -\s; { -\s; wait(1); -\s; } -\s;} -\n; -The \c;while\n; loop waits until a pending order has been terminated, that is the slaved has exited from the \c;get\n; method and the \c;delete\n; method has been called. -Now the main program of the master is very simple: - -\c;\s;extern void object::Remote4( ) -\s;{ -\s; SendOrder(1, 20); // move(20); -\s; SendOrder(2, 90); // turn(90); -\s; SendOrder(1, 20); // move(20); -\s; SendOrder(2, 90); // turn(90); -\s; SendOrder(1, 10); // move(10); -\s; SendOrder(2, 90); // turn(90); -\s; SendOrder(1, 10); // move(10); -\s; SendOrder(2,-90); // turn(-90); -\s; SendOrder(1, 10); // move(10); -\s;} -\n; -\key;\key help;\norm; show these instruction at any time. - - -\t;See also -\l;Controls\u command; and \l;programming\u cbot;. +\b;Exercise +Remote control a slave robot without using an \l;information exchange post\u object\exchange;. The robot should pass over the 6 blue crosses. You must use a \c;\l;static\u cbot\static;\n; variable to pass the orders to the slave bot. + +The two main actors of this exercise are: +1) The \l;wheeled grabber\u object\botgr; without an energy pack and therefore immobile. This is the master you should program so it will transmit orders to the slave. +2) The slave \l;practice bot\u object\bottr; which is already programmed and just waits for orders from the master. + +\b;The slave +First of all we must understand how the program of the slave works. The \l;class\u cbot\class; \c;order\n; contains two members: \c;m_type\n; is the order to execute (move or turn) and \c;m_param\n; is the distance to move or the rotation angle¦: + +\c;\s;\l;public\u cbot\public; \l;class\u cbot\class; order +\s;{ +\s; \l;int\u cbot\int; m_type = \l;nan\u cbot\nan;; +\s; \l;float\u cbot\float; m_param; +\s;} +\n; +A second \l;class\u cbot\class; \c;exchange\n; contains the mechanism for exchanging the orders. We declare a \c;\l;static\u cbot\static;\n; class member \c;m_order\n; which will contain the order to be executed. The word \c;static\n; insures that the member \c;m_order\n; is shared between all instances of the \l;class\u cbot\class; exchange. + +\c;\s;\l;public\u cbot\public; \l;class\u cbot\class; exchange +\s;{ +\s; \l;static\u cbot\static; \l;private\u cbot\private; order m_order = new order; +\n; +\n;The \c;put\n; method will be used by the master robot for transmitting an order. As long as \c;m_order\n; is different from \c;\l;nan\u cbot\nan;\n;, the slave has not finished the order and the \c;put\n; method will return \c;false\n; and will do nothing¦: + +\c;\s; \l;synchronized\u cbot\synchro; \l;bool\u cbot\bool; put(order a) +\s; { +\s; if ( m_order.m_type == nan ) +\s; { +\s; m_order = a; +\s; return true; +\s; } +\s; else +\s; { +\s; return false; +\s; } +\s; } +\n; +Another method \c;get\n; will be used by the slave to retrieve the orders. This method returns the order to be executed: + +\c;\s; \l;synchronized\u cbot\synchro; order get() +\s; { +\s; return m_order; +\s; } +\n; +A third method \c;delete\n; will be used by the slave to indicate that the order has been executed: + +\c;\s; \l;synchronized\u cbot\synchro; void delete() +\s; { +\s; m_order.m_type = nan; +\s; } +\s;} +\n; +The main program of the slave contains an instance of the class \c;exchange\n; called \c;list\n;. We put () after the word \c;list\n; in order to create an instance of the class \c;exchange\n;. + +\c;\s;\l;extern\u cbot\extern; void object::Slave3( ) +\s;{ +\s; exchange list(); +\s; order todo; +\n; +The outer \c;while\n; loop lasts for ever. The inner \c;while\n; loop waits for an order by using the \c;get\n; method of the \c;exchange\n; class. As soon as \c;get\n; returns a value different from \c;nan\n;, the while loop stops. + +\c;\s; \l;while\u cbot\while; ( true ) +\s; { +\s; \l;while\u cbot\while; ( true ) +\s; { +\s; todo = list.get(); +\s; if ( todo.m_type != nan ) break; +\s; wait(1); +\s; } +\n; +Now we have received the order in the \c;todo\n; variable. All we have to do is execute it: + +\c;\s; if ( todo.m_type == 1 ) +\s; { +\s; move(todo.m_param); +\s; } +\s; else if ( todo.m_type == 2 ) +\s; { +\s; turn(todo.m_param); +\s; } +\s; else +\s; { +\s; message("Unknown order"); +\s; } +\n; +As soon as the execution of the order is finished, we must call the \c;delete\n; method so the master knows that another order can be sent¦: + +\c;\s; list.delete(); +\s; } +\s;} +\n; +\b;The master +In the master we write an function called \c;SendOrder\n; which will send an order to the slave: + +\c;\s;void object::SendOrder(float order, float param) +\s;{ +\s; exchange list(); +\s; order todo(); +\s; +\s; todo.m_type = order; +\s; todo.m_param = param; +\s; +\s; while ( list.put(todo) == false ) +\s; { +\s; wait(1); +\s; } +\s;} +\n; +The \c;while\n; loop waits until a pending order has been terminated, that is the slaved has exited from the \c;get\n; method and the \c;delete\n; method has been called. +Now the main program of the master is very simple: + +\c;\s;extern void object::Remote4( ) +\s;{ +\s; SendOrder(1, 20); // move(20); +\s; SendOrder(2, 90); // turn(90); +\s; SendOrder(1, 20); // move(20); +\s; SendOrder(2, 90); // turn(90); +\s; SendOrder(1, 10); // move(10); +\s; SendOrder(2, 90); // turn(90); +\s; SendOrder(1, 10); // move(10); +\s; SendOrder(2,-90); // turn(-90); +\s; SendOrder(1, 10); // move(10); +\s;} +\n; +\key;\key help;\norm; show these instruction at any time. + + +\t;See also +\l;Controls\u command; and \l;programming\u cbot;. diff --git a/help/tremote5.txt b/help/tremote5.txt index 3e22893e..f2313946 100644 --- a/help/tremote5.txt +++ b/help/tremote5.txt @@ -1,113 +1,113 @@ -\b;Exercise -Remote control a slave robot without using an \l;information exchange post\u object\exchange;. The robot should pass over the 6 blue crosses. - -The two main actors of this exercise are: -1) The \l;wheeled grabber\u object\botgr; without an energy pack and therefore immobile. This is the master you should program so it will transmit orders to the slave. -2) The slave \l;practice bot\u object\bottr; which is already programmed and just waits for orders from the master. - -The orders shall be stored, so the master will be able to transmit several orders without waiting for each order being processed. We use an \l;array\u cbot\array; for this purpose. - -\b;The slave -First of all we must understand how the program of the slave works. The \l;class\u cbot\class; \c;order\n; contains two members: \c;m_type\n; is the order to execute (move or turn) and \c;m_param\n; is the distance to move or the rotation angle¦: - -\c;\s;\l;public\u cbot\public; \l;class\u cbot\class; order -\s;{ -\s; \l;int\u cbot\int; m_type; -\s; \l;float\u cbot\float; m_param; -\s;} -\n; -A second \l;class\u cbot\class; \c;exchange\n; contains the mechanism for exchanging the orders. We declare a \c;\l;static\u cbot\static;\n; class member \c;m_fifo\n; which will contain the list of orders to be executed. The word \c;static\n; insures that the member \c;m_fifo\n; is shared between all instances of the \l;class\u cbot\class; exchange. - -\c;\s;{ -\s; \l;static\u cbot\static; \l;private\u cbot\private; order m_fifo[] = null; -\n; -The \c;put\n; method will be used by the master robot for transmitting an order. The order will simply be added at the end of the \c;m_fifo\n; array: - -\c;\s; \l;synchronized\u cbot\synchro; void put(order a) -\s; { -\s; m_fifo[sizeof(m_fifo)] = a; -\s; } -\n; -Another method \c;get\n; will be used by the slave to retrieve the orders. This method returns the order to be executed. If the list is empty, \c;null\n; will be returned and the robot must wait for more orders. Otherwise the first order in the list must be returned and the remaining orders must be "scrolled up". As an array can not be "shortened" we use a temporary array \c;copy\n;¦: - -\c;\s; \l;synchronized\u cbot\synchro; order get() -\s; { -\s; if ( sizeof(m_fifo) == 0 ) return null; -\s; -\s; order a = m_fifo[0]; -\s; order copy[] = null; -\s; for ( int i=1 ; i 9) -\s; { -\s; \l;jet\u cbot\jet;(-1); -\s; } -\s; \l;wait\u cbot\wait;(0.2); -\s; } -\s; \l;fire\u cbot\fire;(1); -\s; } -\s;} -\n; -In order to adapt the program to shooting wasps, you need to make a few changes. Replace all \c;radar(AlienAnt)\n; with \c;radar(AlienWasp)\n;. The cannon must aim straight forward and not downward, replace \c;aim(-20);\n; with \c;aim(0);\n;. And the bot must fly at the same height as the wasp. For this, you must compare the altitude of the bot given by \c;position.z\n; with the altitude of the wasp given by \c;item.position.z\n;: if \c;position.z > item.position.z\n;, go down slowly with \c;jet(-0.3);\n;. If \c;position.z < item.position.z-1\n;, climb slowly with \c;jet(0.3);\n;. A winged shooter is higher than a wasp, therefore it is better if the altitude of the bot is a little lower than the altitude of the wasp. In this case, we admit that the altitude of the bot ranges between the altitude of the wasp and the altitude of the wasp minus 1. - -\t;Further improvement -Wasps move very fast. In order to increase your chances to get them, better to repeat just before the \c;fire(1);\n; a \c;radar\n; and a \c;turn\n; in order to perform a last readjustment of the direction before the shot. - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Objective +Shoot down the flying wasps. + +\t;Program +Here is again the program of the previous exercise that shoots all ants and adapts to the terrain: +\c; +\s;extern void object::JetFighter2() +\s;{ +\s; \l;object\u cbot\type; item; +\s; +\s; \l;aim\u cbot\aim;(-20); +\s; +\s; \l;while\u cbot\while; (true) +\s; { +\s; \l;while\u cbot\while; (\l;radar\u cbot\radar;(AlienAnt, 0, 360, 0, 20) == null) +\s; { +\s; item = \l;radar\u cbot\radar;(AlienAnt); +\s; \l;turn\u cbot\turn;(\l;direction\u cbot\direct;(item.position)); +\s; \l;motor\u cbot\motor;(1,1); +\s; +\s; \l;jet\u cbot\jet;(0); +\s; \l;if\u cbot\if; (position.z-topo(position) < 6) +\s; { +\s; \l;jet\u cbot\jet;(1); +\s; } +\s; +\s; \l;if\u cbot\if; (position.z-topo(position) > 9) +\s; { +\s; \l;jet\u cbot\jet;(-1); +\s; } +\s; \l;wait\u cbot\wait;(0.2); +\s; } +\s; \l;fire\u cbot\fire;(1); +\s; } +\s;} +\n; +In order to adapt the program to shooting wasps, you need to make a few changes. Replace all \c;radar(AlienAnt)\n; with \c;radar(AlienWasp)\n;. The cannon must aim straight forward and not downward, replace \c;aim(-20);\n; with \c;aim(0);\n;. And the bot must fly at the same height as the wasp. For this, you must compare the altitude of the bot given by \c;position.z\n; with the altitude of the wasp given by \c;item.position.z\n;: if \c;position.z > item.position.z\n;, go down slowly with \c;jet(-0.3);\n;. If \c;position.z < item.position.z-1\n;, climb slowly with \c;jet(0.3);\n;. A winged shooter is higher than a wasp, therefore it is better if the altitude of the bot is a little lower than the altitude of the wasp. In this case, we admit that the altitude of the bot ranges between the altitude of the wasp and the altitude of the wasp minus 1. + +\t;Further improvement +Wasps move very fast. In order to increase your chances to get them, better to repeat just before the \c;fire(1);\n; a \c;radar\n; and a \c;turn\n; in order to perform a last readjustment of the direction before the shot. + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/twasp2.txt b/help/twasp2.txt index 10ae0f97..fcec44ab 100644 --- a/help/twasp2.txt +++ b/help/twasp2.txt @@ -1,84 +1,84 @@ -\b;Objective -Bring down the flying wasps in a more efficient way than with the previous program. - -\b;Program -Here is again the program of the previous exercise that shoots down all the wasps after many, many unsuccessful attempts: -\c; -\s;extern void object::Wasp1() -\s;{ -\s; \l;object\u cbot\type; item; -\s; -\s; \l;aim\u cbot\aim;(0); -\s; -\s; \l;while\u cbot\while; (true) -\s; { -\s; \l;while\u cbot\while; (\l;radar\u cbot\radar;(AlienWasp, 0, 360, 0, 20) == null) -\s; { -\s; item = \l;radar\u cbot\radar;(AlienWasp); -\s; \l;turn\u cbot\turn;(\l;direction\u cbot\direct;(item.position)); -\s; \l;motor\u cbot\motor;(1,1); -\s; -\s; \l;jet\u cbot\jet;(0); -\s; \l;if\u cbot\if; (position.z > item.position.z) -\s; { -\s; \l;jet\u cbot\jet;(-0.3); -\s; } -\s; -\s; \l;if\u cbot\if; (position.z < item.position.z - 1) -\s; { -\s; \l;jet\u cbot\jet;(0.3); -\s; } -\s; -\s; \l;wait\u cbot\wait;(0.2); -\s; } -\s; item = \l;radar\u cbot\radar;(AlienWasp); -\s; \l;turn\u cbot\turn;(\l;direction\u cbot\direct;(item.position)); -\s; \l;fire\u cbot\fire;(1); -\s; } -\s;} -\n; -The many failures are due to the fact that the wasp is already gone before the bullets can reach it. The only way to improve the program consists in setting the power of the two motors and of the jet in such a way that the bot follows the movement of the target during the burst. - -Just before the shot, the program adjusts a last time the direction with \c;turn(direction(item.position));\n;. In order to follow the wasp during the burst, you have to "remember" the angle of this last rotation: if the angle was positive (rotation to the left), the bot must continue to turn left during the burst; if the angle was negative, the bot must continue to turn right. - -In order to "remember" the angle of the last rotation, we need a variable that can contain just one number. If we choose to call it \c;angle\n;, we must define the variable with the following line at the beginning of the program: -\c; -\s; \l;float\u cbot\type; angle; -\n; -The variable type \l;float\u cbot\type; is the variable type that can contain any number, i.e. whole numbers or real numbers. Please refer to the \l;text about variable types\u cbot\type; if you want to know more about the different types of variables and what they can contain. - -Just before the instruction \c;fire(1);\n;, instead of writing \c;\l;turn\u cbot\turn;(\l;direction\u cbot\direct;(item.position));\n;, we will put the rotation angle into the variable \c;angle\n;: -\c; -\s; angle = direction(item.position); -\n; -Then we perform the rotation, and we set the power of the motors so that the bot continues the movement: -\c; -\s; turn(angle); -\s; if (angle < 0) -\s; { -\s; motor(1,0.5); -\s; } -\s; else -\s; { -\s; motor(0.5,1); -\s; } -\n; -The instruction \c;else\n; determines what instructions the program should execute if the condition stated in the \c;if\n; instruction is false. - -Then we must set the power of the jet so that the bot follows the wasp also in the vertical direction: -\c; -\s; jet(0); -\s; if(position.z > item.position.z) -\s; { -\s; jet(-0.3); -\s; } -\s; -\s; if(position.z < item.position.z - 1) -\s; { -\s; jet(0.3); -\s; } -\n; -As you will see, this program is much more efficient than the previous one! - -\t;See also -\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. +\b;Objective +Bring down the flying wasps in a more efficient way than with the previous program. + +\b;Program +Here is again the program of the previous exercise that shoots down all the wasps after many, many unsuccessful attempts: +\c; +\s;extern void object::Wasp1() +\s;{ +\s; \l;object\u cbot\type; item; +\s; +\s; \l;aim\u cbot\aim;(0); +\s; +\s; \l;while\u cbot\while; (true) +\s; { +\s; \l;while\u cbot\while; (\l;radar\u cbot\radar;(AlienWasp, 0, 360, 0, 20) == null) +\s; { +\s; item = \l;radar\u cbot\radar;(AlienWasp); +\s; \l;turn\u cbot\turn;(\l;direction\u cbot\direct;(item.position)); +\s; \l;motor\u cbot\motor;(1,1); +\s; +\s; \l;jet\u cbot\jet;(0); +\s; \l;if\u cbot\if; (position.z > item.position.z) +\s; { +\s; \l;jet\u cbot\jet;(-0.3); +\s; } +\s; +\s; \l;if\u cbot\if; (position.z < item.position.z - 1) +\s; { +\s; \l;jet\u cbot\jet;(0.3); +\s; } +\s; +\s; \l;wait\u cbot\wait;(0.2); +\s; } +\s; item = \l;radar\u cbot\radar;(AlienWasp); +\s; \l;turn\u cbot\turn;(\l;direction\u cbot\direct;(item.position)); +\s; \l;fire\u cbot\fire;(1); +\s; } +\s;} +\n; +The many failures are due to the fact that the wasp is already gone before the bullets can reach it. The only way to improve the program consists in setting the power of the two motors and of the jet in such a way that the bot follows the movement of the target during the burst. + +Just before the shot, the program adjusts a last time the direction with \c;turn(direction(item.position));\n;. In order to follow the wasp during the burst, you have to "remember" the angle of this last rotation: if the angle was positive (rotation to the left), the bot must continue to turn left during the burst; if the angle was negative, the bot must continue to turn right. + +In order to "remember" the angle of the last rotation, we need a variable that can contain just one number. If we choose to call it \c;angle\n;, we must define the variable with the following line at the beginning of the program: +\c; +\s; \l;float\u cbot\type; angle; +\n; +The variable type \l;float\u cbot\type; is the variable type that can contain any number, i.e. whole numbers or real numbers. Please refer to the \l;text about variable types\u cbot\type; if you want to know more about the different types of variables and what they can contain. + +Just before the instruction \c;fire(1);\n;, instead of writing \c;\l;turn\u cbot\turn;(\l;direction\u cbot\direct;(item.position));\n;, we will put the rotation angle into the variable \c;angle\n;: +\c; +\s; angle = direction(item.position); +\n; +Then we perform the rotation, and we set the power of the motors so that the bot continues the movement: +\c; +\s; turn(angle); +\s; if (angle < 0) +\s; { +\s; motor(1,0.5); +\s; } +\s; else +\s; { +\s; motor(0.5,1); +\s; } +\n; +The instruction \c;else\n; determines what instructions the program should execute if the condition stated in the \c;if\n; instruction is false. + +Then we must set the power of the jet so that the bot follows the wasp also in the vertical direction: +\c; +\s; jet(0); +\s; if(position.z > item.position.z) +\s; { +\s; jet(-0.3); +\s; } +\s; +\s; if(position.z < item.position.z - 1) +\s; { +\s; jet(0.3); +\s; } +\n; +As you will see, this program is much more efficient than the previous one! + +\t;See also +\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/win.txt b/help/win.txt index ce54ac8e..88e55a42 100644 --- a/help/win.txt +++ b/help/win.txt @@ -1,3 +1,3 @@ - -Houston congratulates you in the name of mankind for the success of your missin. -The Great Migration to Terra Nova will start very soon. + +Houston congratulates you in the name of mankind for the success of your missin. +The Great Migration to Terra Nova will start very soon.