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 10:25, 23 March 2007 (edit)
FCR (Talk | contribs)

← Previous diff
Current revision (11:39, 25 December 2007) (edit) (undo)
Sandman (Talk | contribs)
m
 
(11 intermediate revisions not shown.)
Line 1: Line 1:
-'''INT''' advance ( '''INT''' distance )+[[Category:functions]]
 +[[Category:processinteraction]]
-Moves a process forward in the direction of its [[angle]].+==Definition==
 +'''INT''' advance ( <'''INT''' distance> )
 + 
 +Moves the [[process]] [[call]]ing advance() forward in the direction of its [[angle]].
== Parameters == == Parameters ==
 +{|
 +| '''INT''' distance || - distance to advance in [[pixel]]s, not adjusted for [[resolution]].
 +|}
-'''INT''' distance - distance to advance in pixels, not adjusted for resolution+== Returns ==
 +{|
 +| '''INT''' : Returns [[true]] if successful and [[false]] if failed.
 +|}
== Example == == Example ==
- 
-Here is a example on how to use advance. 
- 
<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+
- frame;+ Loop
- end+ frame;
-end+ End
 +End
-process proc()+Process proc()
-begin+Begin
- loop+ // This loop makes this process advance 3 pixels every frame
- advance(3);+ Loop
- frame;+ advance(3); // advance 3 pixels
- end+ frame;
-end+ End
 +End
</pre> </pre>
 +
 +{{Funcbox
 + | category = Processinteraction
 +}}

Current revision


Contents

[edit] Definition

INT advance ( <INT distance> )

Moves the process calling advance() forward in the direction of its angle.

[edit] Parameters

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

[edit] Returns

INT : Returns true if successful and false if failed.

[edit] Example

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


Processinteraction Functions
Advance() • Collision() • Exists() • Get_angle() • Get_dist() • Get_id() • Let_me_alone() • Signal() • Xadvance() •
Personal tools