This wiki is out of date, use the continuation of this wiki instead

Advance

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 09:43, 13 April 2007 (edit)
86.136.63.228 (Talk)
(Returns)
← Previous diff
Revision as of 00:22, 16 April 2007 (edit) (undo)
Sandman (Talk | contribs)

Next diff →
Line 3: Line 3:
'''INT''' advance ( '''INT''' distance ) '''INT''' advance ( '''INT''' distance )
-Moves a process forward in the direction of its [[angle]].+Moves a [[process]] forward in the direction of its [[angle]].
 + 
== Returns == == Returns ==
-INT : Returns an integer. Returns 1 if successful and 0 if failed.+'''INT''' : Returns an integer. Returns [[true|1]] if successful and [[false|0]] if failed.
 + 
== Parameters == == Parameters ==
-'''INT''' distance - distance to advance in pixels, not adjusted for resolution+'''INT''' distance - distance to advance in [[pixel]]s, not adjusted for [[resolution]]
 + 
== Example == == Example ==
Line 18: Line 21:
<pre> <pre>
-program example;+Program example;
-global+Global
- my_proc;+ my_proc;
-begin+Begin
- my_proc = proc(); //create a new process+ my_proc = proc(); //create a new process
- loop+ Loop
- frame;+ frame;
- end+ End
-end+End
-process proc()+Process proc()
-begin+Begin
- loop+ // This loop makes this process advance 3 pixels every frame
- advance(3); // advance 3 pixels per frame+ Loop
- frame;+ advance(3); // advance 3 pixels
- end+ frame;
-end+ End
 +End
</pre> </pre>
[[Category:functions]] [[Category:functions]]

Revision as of 00:22, 16 April 2007

Contents

Definition

INT advance ( INT distance )

Moves a process forward in the direction of its angle.


Returns

INT : Returns an integer. Returns 1 if successful and 0 if failed.


Parameters

INT distance - distance to advance in pixels, not adjusted for resolution


Example

Here is a example on how to use advance.

Program example;
Global
    my_proc;
Begin
    my_proc = proc(); //create a new process
   
    Loop
        frame;
    End
End

Process proc()
Begin
    // This loop makes this process advance 3 pixels every frame
    Loop
        advance(3); // advance 3 pixels
        frame;
    End
End
Personal tools