- This wiki is out of date, use the continuation of this wiki instead
Signal
From FenixWiki
(Difference between revisions)
Revision as of 15:47, 13 April 2007 (edit) Yonni (Talk | contribs) ← Previous diff |
Revision as of 10:57, 18 April 2007 (edit) (undo) Sandman (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
[[Category:functions]] | [[Category:functions]] | ||
- | + | [[Category:processinteraction]] | |
- | + | ||
- | + | ||
== Definition == | == Definition == | ||
+ | '''INT''' Signal ( <'''INT''' processID|processType> , <'''INT''' signal> ) | ||
- | + | Allows one [[process]] to control another [[process]] in a limited number of ways, by sending [[signals]]. | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
== Returns == | == Returns == | ||
- | + | '''INT''' - Nothing | |
- | + | ||
- | + | ||
== Parameters == | == Parameters == | ||
+ | '''INT''' processID|processType: The [[ProcessID]] of the process or the [[ProcessType]] of the type of processes to which the signal is to be sent. For a process to send a signal to itself, the [[local variable]] [[id]] can be used. | ||
- | + | '''INT''' signal: The code of the signal that is to be sent to the target process. This parameter is passed by way of a set of [[predefined constants]] which denote the signal which is to be sent. These are listed [[signals|here]]. | |
- | + | ||
- | + | ||
- | + | ||
- | '''INT''' signal: The code of the signal that is to be sent to the target process | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
+ | == Notes == | ||
+ | To obtain the processType of a function, the operator "Type" can be used. | ||
== Example == | == Example == | ||
- | <pre> | + | <pre> |
- | + | Signal( get_id(type enemy) , s_kill ); //kills a process of type enemy | |
- | + | Signal( id , s_kill_tree ); //kills the process that calls it, and all of its sons, their sons, etc. | |
+ | Signal( Type player , s_freeze ); //freezes all processes of type player so that they are still displayed, but do not execute any code. | ||
+ | </pre> |
Revision as of 10:57, 18 April 2007
Contents |
Definition
INT Signal ( <INT processID|processType> , <INT signal> )
Allows one process to control another process in a limited number of ways, by sending signals.
Returns
INT - Nothing
Parameters
INT processID|processType: The ProcessID of the process or the ProcessType of the type of processes to which the signal is to be sent. For a process to send a signal to itself, the local variable id can be used.
INT signal: The code of the signal that is to be sent to the target process. This parameter is passed by way of a set of predefined constants which denote the signal which is to be sent. These are listed here.
Notes
To obtain the processType of a function, the operator "Type" can be used.
Example
Signal( get_id(type enemy) , s_kill ); //kills a process of type enemy Signal( id , s_kill_tree ); //kills the process that calls it, and all of its sons, their sons, etc. Signal( Type player , s_freeze ); //freezes all processes of type player so that they are still displayed, but do not execute any code.