- This wiki is out of date, use the continuation of this wiki instead
Xadvance
From FenixWiki
(Difference between revisions)
| Revision as of 11:48, 25 December 2007 (edit) Sandman (Talk | contribs) m ← Previous diff |
Current revision (11:49, 25 December 2007) (edit) (undo) Sandman (Talk | contribs) m |
||
| Line 3: | Line 3: | ||
| ==Definition== | ==Definition== | ||
| - | |||
| '''INT''' xadvance ( <'''INT''' angle> , <'''INT''' distance> ) | '''INT''' xadvance ( <'''INT''' angle> , <'''INT''' distance> ) | ||
| Moves a process a certain distance in a certain direction. | Moves a process a certain distance in a certain direction. | ||
| - | |||
| == Parameters == | == Parameters == | ||
| - | |||
| {| | {| | ||
| | '''INT''' angle || - The [[angle]] in which to move the process, in thousandths of a degree. | | '''INT''' angle || - The [[angle]] in which to move the process, in thousandths of a degree. | ||
| Line 16: | Line 13: | ||
| | '''INT''' distance || - The distance to move the process, in pixels. | | '''INT''' distance || - The distance to move the process, in pixels. | ||
| |} | |} | ||
| - | |||
| == Returns == | == Returns == | ||
| - | |||
| '''INT''' : Successrate | '''INT''' : Successrate | ||
| {| | {| | ||
| Line 28: | Line 23: | ||
| == Example == | == Example == | ||
| - | |||
| <pre> | <pre> | ||
| Program example; | Program example; | ||
Current revision
Contents |
[edit] Definition
INT xadvance ( <INT angle> , <INT distance> )
Moves a process a certain distance in a certain direction.
[edit] Parameters
| INT angle | - The angle in which to move the process, in thousandths of a degree. |
| INT distance | - The distance to move the process, in pixels. |
[edit] Returns
INT : Successrate
| true | - Success. |
| false | - Error. |
[edit] Example
Program example;
Global
myproc;
Begin
myproc=proc();
Loop
frame;
End
End
Process proc();
Begin
x=100;
y=100;
Loop
xadvance(90000,10); //moves the process vertically (90 degrees) 10 pixels
frame;
End
End
| Processinteraction Functions | |
| • Advance() • Collision() • Exists() • Get_angle() • Get_dist() • Get_id() • Let_me_alone() • Signal() • Xadvance() • | |
