BIS fnc animalSiteSpawn: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 39: | Line 39: | ||
[[Category:Functions|{{uc:animalSiteSpawn}}]] | [[Category:Functions|{{uc:animalSiteSpawn}}]] | ||
[[Category:{{Name|arma3}}: Functions|{{uc:animalSiteSpawn}}]] | [[Category:{{Name|arma3}}: Functions|{{uc:animalSiteSpawn}}]] | ||
<!-- CONTINUE Notes --> | |||
<dl class="command_description"> | |||
<dd class="notedate">Posted on December 7, 2014 - 08:37 (UTC)</dd> | |||
<dt class="note">[[User:DreadedEntity|DreadedEntity]]</dt> | |||
<dd class="note"> | |||
The only way to stop the animals from spawning is to delete the object. When using this function, I recommend creating a non-solid object (almost anything from the "Objects (Helpers)" list in the editor, and using [[hideObjectGlobal]] on it. Using [[setVariable]] you can add the animal site to a reference object to find it easily when you want to delete it. | |||
<code>_obj = [[createVehicle]] ["Sign_Sphere10cm_F", [[getPos]] [[player]], [], 0, "CAN_COLLIDE"]; | |||
[[hideObjectGlobal]] _obj; | |||
player [[setVariable]] ["animalSite", _obj]; | |||
_obj = [[nil]];</code> | |||
</dd> | |||
</dl> | |||
<!-- DISCONTINUE Notes --> |
Revision as of 09:37, 7 December 2014
Description
- Description:
- Create an area that spawns animals. The animals will be created or deleted if a player is inside or outside the area's radius. Can only be used by the server.
- Execution:
- call
- Groups:
- Uncategorised
Syntax
- Syntax:
- [animalSite, classnamesToSpawn, radius] call BIS_fnc_animalSiteSpawn;
- Parameters:
- [animalSite, classnamesToSpawn, radius]: Array
- animalSite: Object - The object to create the site around.
- classnamesToSpawn: Array - Animals that can be spawned.
- radius: Number - The radius by which animals are created or deleted.
- Return Value:
- Nothing
Examples
- Example 1:
[player, ["rabbit_f","turtle_f","hen_random_f"], 200] call BIS_fnc_animalSiteSpawn;
Additional Information
- See also:
- See also needed
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Notes
Bottom Section
- Posted on December 7, 2014 - 08:37 (UTC)
- DreadedEntity
-
The only way to stop the animals from spawning is to delete the object. When using this function, I recommend creating a non-solid object (almost anything from the "Objects (Helpers)" list in the editor, and using hideObjectGlobal on it. Using setVariable you can add the animal site to a reference object to find it easily when you want to delete it.
_obj = createVehicle ["Sign_Sphere10cm_F", getPos player, [], 0, "CAN_COLLIDE"]; hideObjectGlobal _obj; player setVariable ["animalSite", _obj]; _obj = nil;