Complete.Org: Mailing Lists: Archives: freeciv: August 2000:
[Freeciv] Re: workinglist for units
Home

[Freeciv] Re: workinglist for units

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Freeciv-Forum" <freeciv@xxxxxxxxxxx>
Subject: [Freeciv] Re: workinglist for units
From: "Michael Kiermaier" <michael.kiermaier@xxxxxxx>
Date: Thu, 3 Aug 2000 23:43:45 +0200

Bevan Broun <bevanb@xxxxxxxxxxxxx> wrote:
> I have been thinking something similar with regard to reconnaissance
> missions (ie checking out if anyone around). I found it tiring to make
> my fighter to
>
> move1: go 5 move in one direction then back
> move2: go 5 move in different direction then back
> ...
>
> I would have like to assign a macro to the unit with logic like:
>
> until ( something seen or happens ) do {
>     move1: go 5 move in one direction then back
>     move2: go 5 move in different direction then back
>     move3: ...
>     last move: end back at the starting postition
> }
> the macro would stop and the unit require attention as soon as an
> opposition unit was encounterd. I imagine that it would be possible to
> use key stroke recording to write the macros.
>
> BB

i think this should be possible with a loop command and a more general
goto-command in the unit workinglist:
something like goto(x,y,reference).
x and y are the goal coordinates.
whith reference you can choose the coordinate system. for example:
  MAP: the map coordinate system is used
  UNIT XY: unit XY is at (0,0).

a unit should stop the workinglist it something critical happens. enemy
contact would be such a critical event (like the actual goto)

now your patrol would be:
begin loop
goto(5,0,PATROL UNIT)
goto(-5,0,PATROL UNIT)
end loop
...

further useful examples:

a)
three cruisers guarding a transport:

transport:
goto(x,y,MAP)

cruiser1:
begin loop
goto(2,0,TRANSPORT)
end loop

cruiser2:
begin loop
goto(0,2,TRANSPORT)
end loop

cruiser3:
begin loop
goto(0,-2,TRANSPORT)
end loop

b)
a transport picking up a settler:

transport:
goto(0,0,SETTLER)

settler
goto(0,0,TRANSPORT)

~michael





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv] Re: workinglist for units, Michael Kiermaier <=