SRL Archive - Test corner

PowerWalk


JLewis

2006-04-02 15:24:46

A walking procedure worth looking at that I made.


{*******************************************************************************
Procedure PowerWalk (Direction:String; Power: integer);;
Directions: Set to: 'N','E','S','W','NW','NE','SW','SE' Set Power from 1 to 8
8 being farthest away 1 being the closest
By: JLewis
Description: Walks any direction acording to power given.
*******************************************************************************}

procedure PowerWalk (Direction : string; Power : Integer);
var XX,YY,Si,Di : Integer;
begin
if ( Power > 8 ) or ( Power < 1 ) then
Exit;
XX := 648;
YY := 84;
Di := Power * 7;
Si := Power * 6;
case Direction of
'N': begin
X := XX;
Y := YY - Di;
Mouse( X, Y, 3, 3, True);
FFlag ( 10 );
end;
'NW': begin
X := XX - Si;
Y := YY - Di;
Mouse ( X, Y, 3, 3, True );;
FFlag ( 10 );
end;
'W' : begin
X := XX - Di;
Y := YY;
Mouse ( X, Y, 3, 3, True );;
FFlag ( 10 );
end;
'SW' : begin
X := XX - Si;
Y := YY + Di;
Mouse ( X, Y, 3, 3, True );;
FFlag ( 10 );
end;
'S' : begin
X := XX;
Y := YY + Di;
Mouse ( X, Y, 3, 3, True );;
FFlag ( 10 );
end;
'SE' : begin
X := XX + Si;
Y := YY + Di;
Mouse ( X, Y, 3, 3, True );;
FFlag ( 10 );
end;
'E' : begin
X :=XX + Di;
Y :=YY;
Mouse ( X, Y, 3, 3, True );;
FFlag ( 10 );
end;
'NE' : begin
X := XX + Si;
Y := YY - Di;
Mouse ( X, Y, 3, 3, True );;
FFlag ( 10 );
end;
end;
end;

Sdcit

2006-04-02 15:28:50

1. We ALWAYS indent :)

2.I would of suggested using get color and radial walking or something of that sort


3. Great job! :D

JLewis

2006-04-02 15:31:38

Sorry I had it in Quote Tags changed it to Code Tags so you could see the Standards!

Sdcit

2006-04-02 15:37:21

Woot! Thats a good work j!

The Prince of Randomness?

2006-04-02 16:01:40

Great Work!

Kernel Klink

2006-04-02 16:03:07

Haha, I like the procedure name. I like your creativity. Keep 'em coming.

JLewis

2006-04-02 16:11:51

Thanks for comments

weaselforce

2006-04-02 16:28:52

looks very hot, but mabey some standard as to how far it walks would be helpful

JLewis

2006-04-02 17:54:36

The Power is the distance 1 being closest 8 being farthest it tells it in the description

phantombmx

2006-04-02 19:09:22

oo i like this.. i might use this! i like this a lot! excellent work! ;)

Bebe

2006-04-02 19:14:44

From: JLewis
The Power is the distance 1 being closest 8 being farthest it tells it in the description

No, he was asking how far away does each number go away from the original point.

I am assuming that it is randomized (Not having looked though the procedure myself), so could you provide the users with the adverage distance each number walks/runs from the original point.

JLewis

2006-04-02 20:06:46

Each one moves about 6 or 7 pixels

weaselforce

2006-04-02 20:54:05

Yea it looks really good, i'm glad you thought of this.