1.
getMarkerText <marker>
_
Operand types:
<marker>: String name of marker
Type of returned value:
String: text currently associated with marker
Description:
Gets text of marker. See setMarkerText.
Example:
text=getMarkerText "MarkerOne"
2.
#include <.h> in config.cpp of addons. Or resource.cpp support in addons.
3.
getMarkerShape <marker> ---> "ICON", "RECTANGLE", "ELLIPSE"
4.
preProcessing for addons
(currently you have to manually preProcess addonized sqf's, including the removal of all #defines)
preprocess <text>
Operand types:
<text>: String
Type of returned value:
String
Description:
Return preprocessed content of given string. Preprocessor is C-like, supports comments using // or /* and */ and macros defined with #define
Example:
preprocess "comment{a}; if (a==b) then {a=1;}; a" , result is "if(a==b)then{a=1;};a"
5.
network scripting infrastructure
networkNodes
Operand types:
none
Type of returned value:
Array
Description:
Returns array filled with the current configuration of the network. One entry per machine connected. Each entry:
[Object:player, bool: connected]
Object:player is the player object or objnull in case of dedicated server.
bool: connected is the connection state (may be integer for other options). This array is to be synchronized on all machines. First element should point to server or Single Player machine. Server is therefore always accessible through netID 0.
<object> getNetID
Operand types:
<object>: object or group whose local network ID is required
Type of returned value:
Integer
Description:
Returns netID index of machine where given object or group is local. Returned index points to specific element from networkNodes for use in message calls. Server is always at index 0 therefore does not require use of this function.
getLocalID
Operand types:
none
Type of returned value:
Integer
Description:
Returns netID index of local machine. Returned index points to specific element from networkNodes for use in message calls. Server is always at index 0 therefore does not require use of this function.
message <parameters>
Operand types:
<parameters>: Array
index 1; destinations: Array
List of netID's to send message to, empty array for all machines. Duplicate netID's are contacted only once.
index 2; data: Array
Array containing data to be transferred in message, to be available as _this on remote machine. May be empty array for no data. Can contain anything, strings, objects, groups, sides, arrays, etc.
index 3; command: String
Command string to execute remotely, usually containing _this to pass all data to a function or to assign all data to an array.
Type of returned value:
Integer
Description:
Used to send messages to local or remote machines, destination ID's can be gathered by using getNetID.
Return value is -1 <parameters> were wrong, 0 on success.
Example:
_ok=message [[getNetID manx],[manx,{hello world}],{(_this select 0)sidechat(_this select 1);}]
Sends a message to the machine where manx object is local, the remote machine then performs manx sidechat{hello world} which was passed in as data.
Example2:
_ok=message [[],[],{skiptime 16;}]
Sends a message to all machines, executes skiptime 16; everywhere.
Last edited by bn880 on Sun Dec 05, 2004 10:55 pm; edited 1 time in total