-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #260 from CBATeam/createNamespace
add CBA_fnc_createNamespace and CBA_fnc_deleteNamespace
- Loading branch information
Showing
5 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
class CfgLocationTypes { | ||
class CBA_NamespaceDummy { | ||
name = ""; | ||
drawStyle = "name"; | ||
texture = ""; | ||
color[] = {0,0,0,0}; | ||
size = 0; | ||
textSize = 0; | ||
shadow = 0; | ||
font = "PuristaMedium"; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* ---------------------------------------------------------------------------- | ||
Function: CBA_fnc_createNamespace | ||
Description: | ||
Creates a namespace. Used to store and read variables via setVariable and getVariable. | ||
The Namespace is destroyed after the mission ends. getVariable ARRAY is not supported. | ||
Parameters: | ||
None | ||
Returns: | ||
_namespace - a namespace <LOCATION> | ||
Examples: | ||
(begin example) | ||
_namespace = call CBA_fnc_createNamespace; | ||
(end) | ||
Author: | ||
commy2 | ||
---------------------------------------------------------------------------- */ | ||
#include "script_component.hpp" | ||
SCRIPT(createNamespace); | ||
|
||
createLocation ["CBA_NamespaceDummy", [-1000, -1000, 0], 0, 0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* ---------------------------------------------------------------------------- | ||
Function: CBA_fnc_deleteNamespace | ||
Description: | ||
Deletes a namespace created with CBA_fnc_createNamespace. | ||
Parameters: | ||
_namespace - a namespace <LOCATION> | ||
Returns: | ||
None | ||
Examples: | ||
(begin example) | ||
_namespace call CBA_fnc_deleteNamespace; | ||
(end) | ||
Author: | ||
commy2 | ||
---------------------------------------------------------------------------- */ | ||
#include "script_component.hpp" | ||
SCRIPT(deleteNamespace); | ||
|
||
params [["_namespace", locationNull, [locationNull]]]; | ||
|
||
deleteLocation _namespace; |