- This wiki is out of date, use the continuation of this wiki instead
Signal
From FenixWiki
(Difference between revisions)
Revision as of 00:46, 2 May 2007 (edit) Sandman (Talk | contribs) (→Notes) ← Previous diff |
Revision as of 13:29, 4 May 2007 (edit) (undo) Sandman (Talk | contribs) m Next diff → |
||
Line 30: | Line 30: | ||
To obtain the processType of a function, the operator [[Type]] can be used. | To obtain the processType of a function, the operator [[Type]] can be used. | ||
For a process to send a signal to itself, the [[local variable]] [[id]] can be used. | For a process to send a signal to itself, the [[local variable]] [[id]] can be used. | ||
- | The parameter | + | The parameter signal is passed by way of a set of [[constants|signals]] which denote the signal which is to be sent. |
== Example == | == Example == |
Revision as of 13:29, 4 May 2007
Contents |
Definition
INT Signal ( <INT processID|processTypeID> , <INT signal> )
Allows a process or a range of processes of certain processType to be controlled in a limited number of ways, by sending signals.
Parameters
INT processID|processTypeID | - The ProcessID of the process or the ProcessTypeID of the type of processes to which the signal is to be sent. |
INT signal | - The code of the signal that is to be sent to the target process. |
Returns
INT : Successrate
false | - There was an error. |
true | - Sending was successful. |
Errors
Invalid signal | - The specified signal is invalid. |
Notes
To obtain the processType of a function, the operator Type can be used. For a process to send a signal to itself, the local variable id can be used. The parameter signal is passed by way of a set of signals which denote the signal which is to be sent.
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 descendants Signal( Type player , s_freeze ); // Freezes all processes of type player so that they are // still displayed, but do not execute any code.